gnu: python-click: Fix 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'"))))
97be1bc2
MB
2304 #t))
2305 (replace 'check
2306 (lambda _
2307 (zero? (system* "make" "test")))))))
2308 (native-inputs
2309 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2310 (home-page "http://click.pocoo.org")
2311 (synopsis "Command line library for Python")
2312 (description
2313 "Click is a Python package for creating command line interfaces in a
2314composable way with as little code as necessary. Its name stands for
2315\"Command Line Interface Creation Kit\". It's highly configurable but comes
2316with sensible defaults out of the box.")
3f641af0 2317 (license license:bsd-3)))
12c270dd
RW
2318
2319(define-public python2-click
2320 (package-with-python2 python-click))
2321
addc808d
EF
2322(define-public python-wheel
2323 (package
2324 (name "python-wheel")
40981b5c 2325 (version "0.29.0")
e1ba0749
EF
2326 (source
2327 (origin
2328 (method url-fetch)
2329 (uri (pypi-uri "wheel" version))
2330 (sha256
2331 (base32
40981b5c 2332 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2333 (build-system python-build-system)
2334 (native-inputs
f3b98f4f 2335 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2336 ("python-pytest-cov" ,python-pytest-cov)))
2337 (home-page "https://bitbucket.org/pypa/wheel/")
2338 (synopsis "Format for built Python packages")
2339 (description
2340 "A wheel is a ZIP-format archive with a specially formatted filename and
2341the @code{.whl} extension. It is designed to contain all the files for a PEP
2342376 compatible install in a way that is very close to the on-disk format. Many
2343packages will be properly installed with only the @code{Unpack} step and the
2344unpacked archive preserves enough information to @code{Spread} (copy data and
2345scripts to their final locations) at any later time. Wheel files can be
2346installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2347 (license license:expat)
2348 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2349
2350(define-public python2-wheel
8ad4ae20
LF
2351 (let ((wheel (package-with-python2
2352 (strip-python2-variant python-wheel))))
264ae686 2353 (package (inherit wheel)
8ad4ae20
LF
2354 (native-inputs `(("python2-functools32" ,python2-functools32)
2355 ,@(package-native-inputs wheel))))))
2356
addc808d 2357
ae641128 2358(define-public python-requests
e6cfbd36 2359 (package
ae641128 2360 (name "python-requests")
74a066f9 2361 (version "2.9.1")
e6cfbd36
DT
2362 (source (origin
2363 (method url-fetch)
5d691657 2364 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2365 (sha256
2366 (base32
74a066f9 2367 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2368 (build-system python-build-system)
5d691657 2369 (native-inputs
f3b98f4f 2370 `(("python-py" ,python-py)
5d691657
EF
2371 ("python-pytest" ,python-pytest)
2372 ("python-pytest-cov" ,python-pytest-cov)
2373 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2374 (home-page "http://python-requests.org/")
2375 (synopsis "Python HTTP library")
2376 (description
2377 "Requests is a Python HTTP client library. It aims to be easier to use
2378than Python’s urllib2 library.")
3f641af0 2379 (license license:asl2.0)))
864b5211 2380
e9005180
DT
2381;; Some software requires an older version of Requests, notably Docker
2382;; Compose.
2383(define-public python-requests-2.7
2384 (package (inherit python-requests)
2385 (version "2.7.0")
2386 (source (origin
2387 (method url-fetch)
2388 (uri (pypi-uri "requests" version))
2389 (sha256
2390 (base32
2391 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2392
ae641128 2393(define-public python2-requests
8ad4ae20 2394 (package-with-python2 python-requests))
ae641128 2395
ea521b42
DT
2396(define-public python-vcversioner
2397 (package
2398 (name "python-vcversioner")
538fe019 2399 (version "2.16.0.0")
ea521b42
DT
2400 (source
2401 (origin
2402 (method url-fetch)
2403 (uri (pypi-uri "vcversioner" version))
2404 (sha256
2405 (base32
538fe019 2406 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2407 (build-system python-build-system)
ea521b42
DT
2408 (synopsis "Python library for version number discovery")
2409 (description "Vcversioner is a Python library that inspects tagging
2410information in a variety of version control systems in order to discover
2411version numbers.")
2412 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2413 (license license:isc)))
ea521b42
DT
2414
2415(define-public python2-vcversioner
f210e944 2416 (package-with-python2 python-vcversioner))
ae641128 2417
864b5211
DT
2418(define-public python-jsonschema
2419 (package
2420 (name "python-jsonschema")
b3667afb 2421 (version "2.5.1")
864b5211
DT
2422 (source (origin
2423 (method url-fetch)
2424 (uri
2425 (string-append
2426 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2427 version ".tar.gz"))
2428 (sha256
2429 (base32
b3667afb 2430 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2431 (build-system python-build-system)
8bcd6b91
EF
2432 (arguments
2433 '(#:phases
2434 (modify-phases %standard-phases
2435 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2436 (native-inputs
8bcd6b91
EF
2437 `(("python-nose" ,python-nose)
2438 ("python-vcversioner" ,python-vcversioner)))
2439 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2440 (synopsis "Implementation of JSON Schema for Python")
2441 (description
2442 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2443 (license license:expat)
2444 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2445
2446(define-public python2-jsonschema
a14600ec
LF
2447 (let ((jsonschema (package-with-python2
2448 (strip-python2-variant python-jsonschema))))
264ae686 2449 (package (inherit jsonschema)
eaba9d66 2450 (native-inputs
8bcd6b91 2451 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2452 ,@(package-native-inputs jsonschema)))
2453 (propagated-inputs
2454 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2455
2456(define-public python-unidecode
2457 (package
2458 (name "python-unidecode")
8925d4f3 2459 (version "0.04.18")
850189b8
DT
2460 (source (origin
2461 (method url-fetch)
8925d4f3 2462 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2463 (sha256
2464 (base32
8925d4f3 2465 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2466 (build-system python-build-system)
850189b8
DT
2467 (home-page "https://pypi.python.org/pypi/Unidecode")
2468 (synopsis "ASCII transliterations of Unicode text")
2469 (description
2470 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2471useful when integrating with legacy code that doesn't support Unicode, or for
2472ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2473machine identifiers from human-readable Unicode strings that should still be
2474somewhat intelligeble.")
3f641af0 2475 (license license:gpl2+)))
850189b8
DT
2476
2477(define-public python2-unidecode
2478 (package-with-python2 python-unidecode))
6d45fef4
DT
2479
2480(define-public python-pyjwt
2481 (package
2482 (name "python-pyjwt")
eb31d4b4 2483 (version "1.4.0")
6d45fef4
DT
2484 (source
2485 (origin
2486 (method url-fetch)
eb31d4b4 2487 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2488 (sha256
2489 (base32
eb31d4b4 2490 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2491 (build-system python-build-system)
eb31d4b4 2492 (native-inputs
130fe994
HG
2493 `(("python-pytest" ,python-pytest)
2494 ("python-pytest-cov" ,python-pytest-cov)
2495 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2496 (home-page "http://github.com/progrium/pyjwt")
2497 (synopsis "JSON Web Token implementation in Python")
2498 (description
2499 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2500 (license license:expat)))
6d45fef4
DT
2501
2502(define-public python2-pyjwt
2503 (package-with-python2 python-pyjwt))
2504
2cec1f6f
DT
2505(define-public python-oauthlib
2506 (package
2507 (name "python-oauthlib")
bde2171d 2508 (version "1.0.3")
2cec1f6f
DT
2509 (source (origin
2510 (method url-fetch)
bde2171d 2511 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2512 (sha256
2513 (base32
bde2171d 2514 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2515 (build-system python-build-system)
bde2171d 2516 (native-inputs
bb06aa34 2517 `(("python-nose" ,python-nose)
bde2171d 2518 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2519 ("python-pyjwt" ,python-pyjwt)
2520 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2521 (home-page "https://github.com/idan/oauthlib")
2522 (synopsis "OAuth implementation for Python")
2523 (description
2524 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2525OAuth request-signing logic.")
3f641af0 2526 (license license:bsd-3)
59f151ec 2527 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2528
2529(define-public python2-oauthlib
59f151ec 2530 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2531 (package
2532 (inherit base)
00e10c6e 2533 (native-inputs `(("python2-unittest2" ,python2-unittest2)
bb06aa34 2534 ("python2-mock" ,python2-mock)
59f151ec 2535 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2536
2537(define-public python-itsdangerous
2538 (package
2539 (name "python-itsdangerous")
2540 (version "0.24")
2541 (source
2542 (origin
2543 (method url-fetch)
2544 (uri (string-append
2545 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2546 version ".tar.gz"))
2547 (sha256
2548 (base32
2549 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2550 (build-system python-build-system)
ec5dbb5c
DT
2551 (home-page "http://github.com/mitsuhiko/itsdangerous")
2552 (synopsis "Python library for passing data to/from untrusted environments")
2553 (description
2554 "Itsdangerous provides various helpers to pass trusted data to untrusted
2555environments and back.")
f210e944 2556 (license license:bsd-3)))
ec5dbb5c
DT
2557
2558(define-public python2-itsdangerous
f210e944 2559 (package-with-python2 python-itsdangerous))
5731cae3 2560
8d12be1e
RW
2561(define-public python-pyyaml
2562 (package
2563 (name "python-pyyaml")
2564 (version "3.11")
2565 (source
2566 (origin
2567 (method url-fetch)
2568 (uri (string-append
2569 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2570 version ".tar.gz"))
2571 (sha256
2572 (base32
2573 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2574 (build-system python-build-system)
2575 (inputs
2576 `(("libyaml" ,libyaml)))
8d12be1e
RW
2577 (home-page "http://pyyaml.org/wiki/PyYAML")
2578 (synopsis "YAML parser and emitter for Python")
2579 (description
2580 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2581complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2582API, and sensible error messages. PyYAML supports standard YAML tags and
2583provides Python-specific tags that allow to represent an arbitrary Python
2584object.")
2585 (license license:expat)))
2586
2587(define-public python2-pyyaml
2588 (package-with-python2 python-pyyaml))
2589
5731cae3
DT
2590(define-public python-virtualenv
2591 (package
2592 (name "python-virtualenv")
58d04dba 2593 (version "15.0.3")
5731cae3
DT
2594 (source
2595 (origin
2596 (method url-fetch)
17804240 2597 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2598 (sha256
2599 (base32
58d04dba 2600 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2601 (build-system python-build-system)
17804240
EF
2602 (arguments
2603 `(#:phases
2604 (modify-phases %standard-phases
58d04dba
RW
2605 (replace 'check
2606 (lambda _
2607 ;; Disable failing test. See upstream bug report
2608 ;; https://github.com/pypa/virtualenv/issues/957
2609 (substitute* "tests/test_virtualenv.py"
2610 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2611 (zero? (system* "py.test")))))))
e7881f3d 2612 (native-inputs
f3b98f4f 2613 `(("python-mock" ,python-mock)
17804240 2614 ("python-pytest" ,python-pytest)))
5731cae3
DT
2615 (home-page "https://virtualenv.pypa.io/")
2616 (synopsis "Virtual Python environment builder")
2617 (description
2618 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2619 (license license:expat)))
5731cae3
DT
2620
2621(define-public python2-virtualenv
2622 (package-with-python2 python-virtualenv))
8176d4d5
DT
2623
2624(define-public python-markupsafe
2625 (package
2626 (name "python-markupsafe")
2627 (version "0.23")
2628 (source
2629 (origin
2630 (method url-fetch)
2631 (uri (string-append
2632 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2633 version ".tar.gz"))
2634 (sha256
2635 (base32
2636 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2637 (build-system python-build-system)
8176d4d5
DT
2638 (home-page "http://github.com/mitsuhiko/markupsafe")
2639 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2640 (description
2641 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2642for Python.")
3f641af0 2643 (license license:bsd-3)))
8176d4d5
DT
2644
2645(define-public python2-markupsafe
2646 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2647
2648(define-public python-jinja2
2649 (package
2650 (name "python-jinja2")
e98149b3 2651 (version "2.8")
fe34f0d1
DT
2652 (source
2653 (origin
2654 (method url-fetch)
e98149b3 2655 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2656 (sha256
2657 (base32
e98149b3 2658 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2659 (build-system python-build-system)
f22efa01 2660 (propagated-inputs
f3b98f4f 2661 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2662 (home-page "http://jinja.pocoo.org/")
2663 (synopsis "Python template engine")
2664 (description
2665 "Jinja2 is a small but fast and easy to use stand-alone template engine
2666written in pure Python.")
3f641af0 2667 (license license:bsd-3)))
fe34f0d1
DT
2668
2669(define-public python2-jinja2
2670 (package-with-python2 python-jinja2))
3580ab8b 2671
f7d17ac7
EE
2672(define-public python-pystache
2673 (package
2674 (name "python-pystache")
2675 (version "0.5.4")
2676 (source (origin
2677 (method url-fetch)
2678 (uri (pypi-uri "pystache" version))
2679 (sha256
2680 (base32
2681 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2682 (build-system python-build-system)
f7d17ac7
EE
2683 (home-page "http://defunkt.io/pystache/")
2684 (synopsis "Python logic-less template engine")
2685 (description
2686 "Pystache is a Python implementation of the framework agnostic,
2687logic-free templating system Mustache.")
2688 (license license:expat)))
2689
2690(define-public python2-pystache
2691 (package-with-python2 python-pystache))
2692
1285119b
RW
2693(define-public python-joblib
2694 (package
2695 (name "python-joblib")
f34ef331 2696 (version "0.10.3")
1285119b
RW
2697 (source (origin
2698 (method url-fetch)
f34ef331 2699 (uri (pypi-uri "joblib" version))
1285119b
RW
2700 (sha256
2701 (base32
6aa5f1ca
HG
2702 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2703 (modules '((guix build utils)))
2704 (snippet
2705 '(begin
2706 ;; Remove pre-compiled .pyc files from source.
2707 (for-each delete-file-recursively
2708 (find-files "." "__pycache__" #:directories? #t))
2709 (for-each delete-file (find-files "." "\\.pyc$"))
2710 #t))))
1285119b 2711 (build-system python-build-system)
a8dd960a
RW
2712 (arguments
2713 `(#:phases
2714 (modify-phases %standard-phases
2715 (add-before 'check 'disable-failing-tests
2716 (lambda _
2717 ;; This numpydoc tests fails for unknown reasons
2718 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2719 ;; This numpydoc test depends on matplotlib, which is not a
2720 ;; required input.
2721 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2722 ;; These tests fail to execute sys.executable
2723 (substitute* "joblib/test/test_parallel.py"
2724 (("import nose" line)
2725 (string-append "from nose.plugins.skip import SkipTest\n" line))
2726 (("def test_nested_parallel_warnings" line)
2727 (string-append "@SkipTest\n" line))
2728 (("def test_parallel_with_interactively_defined_functions" line)
2729 (string-append "@SkipTest\n" line)))
2730 #t)))))
f052ec9a 2731 ;; Provide nose to enable tests command
1285119b 2732 (native-inputs
f3b98f4f 2733 `(("python-nose" ,python-nose)
f34ef331
RW
2734 ("python-sphinx" ,python-sphinx)
2735 ("python-docutils" ,python-docutils)
2736 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2737 (home-page "http://pythonhosted.org/joblib/")
2738 (synopsis "Using Python functions as pipeline jobs")
2739 (description
2740 "Joblib is a set of tools to provide lightweight pipelining in Python.
2741In particular, joblib offers: transparent disk-caching of the output values
2742and lazy re-evaluation (memoize pattern), easy simple parallel computing
2743logging and tracing of the execution.")
3f641af0 2744 (license license:bsd-3)))
1285119b
RW
2745
2746(define-public python2-joblib
2747 (package-with-python2 python-joblib))
2748
3580ab8b
DT
2749(define-public python-docutils
2750 (package
2751 (name "python-docutils")
2752 (version "0.12")
2753 (source
2754 (origin
2755 (method url-fetch)
2756 (uri (string-append
2757 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2758 version ".tar.gz"))
2759 (sha256
2760 (base32
2761 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2762 (build-system python-build-system)
3580ab8b
DT
2763 (arguments
2764 '(#:tests? #f)) ; no setup.py test command
2765 (home-page "http://docutils.sourceforge.net/")
2766 (synopsis "Python Documentation Utilities")
2767 (description
2768 "Docutils is a modular system for processing documentation into useful
2769formats, such as HTML, XML, and LaTeX. For input Docutils supports
2770reStructuredText.")
2771 ;; Most of the source code is public domain, but some source files are
2772 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2773 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2774
2775(define-public python2-docutils
2776 (package-with-python2 python-docutils))
fb35b7c0
DT
2777
2778(define-public python-pygments
2779 (package
2780 (name "python-pygments")
9f442285 2781 (version "2.0.2")
fb35b7c0
DT
2782 (source
2783 (origin
2784 (method url-fetch)
9f442285 2785 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2786 (sha256
2787 (base32
9f442285 2788 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2789 (build-system python-build-system)
995cb99e
MB
2790 (arguments
2791 ;; FIXME: Tests require sphinx, which depends on this.
2792 '(#:tests? #f))
fb35b7c0
DT
2793 (home-page "http://pygments.org/")
2794 (synopsis "Syntax highlighting")
2795 (description
2796 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2797 (license license:bsd-2)))
fb35b7c0
DT
2798
2799(define-public python2-pygments
2800 (package-with-python2 python-pygments))
9dd6078d
DT
2801
2802(define-public python-sphinx
2803 (package
2804 (name "python-sphinx")
2805 (version "1.2.3")
2806 (source
2807 (origin
2808 (method url-fetch)
2809 (uri (string-append
2810 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2811 version ".tar.gz"))
2812 (sha256
2813 (base32
2814 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2815 (build-system python-build-system)
03cb5f9e
MB
2816 (arguments
2817 ;; FIXME: Missing dependencies.
2818 '(#:tests? #f))
f22efa01 2819 (propagated-inputs
f3b98f4f 2820 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2821 ("python-docutils" ,python-docutils)
2822 ("python-pygments" ,python-pygments)))
2823 (home-page "http://sphinx-doc.org/")
2824 (synopsis "Python documentation generator")
2825 (description "Sphinx is a tool that makes it easy to create documentation
2826for Python projects or other documents consisting of multiple reStructuredText
2827sources.")
3f641af0 2828 (license license:bsd-3)))
9dd6078d
DT
2829
2830(define-public python2-sphinx
2831 (package-with-python2 python-sphinx))
6888830b 2832
ad320b20
RW
2833(define-public python-sphinx-rtd-theme
2834 (package
2835 (name "python-sphinx-rtd-theme")
2836 (version "0.1.6")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (string-append "https://pypi.python.org/packages/source/s/"
2841 "sphinx_rtd_theme/sphinx_rtd_theme-"
2842 version ".tar.gz"))
2843 (sha256
2844 (base32
2845 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2846 (build-system python-build-system)
ad320b20
RW
2847 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2848 (synopsis "ReadTheDocs.org theme for Sphinx")
2849 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2850 (license license:expat)))
ad320b20
RW
2851
2852(define-public python2-sphinx-rtd-theme
2853 (package-with-python2 python-sphinx-rtd-theme))
2854
fe94cf0c
HG
2855(define-public python-rst.linker
2856 (package
2857 (name "python-rst.linker")
2858 (version "1.7")
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "rst.linker" version))
2863 (sha256
2864 (base32
2865 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2866 (build-system python-build-system)
2867 (propagated-inputs
2868 `(("python-dateutil" ,python-dateutil-2)
2869 ("python-six" ,python-six)))
2870 (native-inputs
2871 `(("python-setuptools-scm" ,python-setuptools-scm)))
2872 ;; Test would require path.py, which would introduce a cyclic dependence.
2873 (arguments `(#:tests? #f))
2874 ;; Note: As of version 1.7 the documentation is not worth building.
2875 (home-page "https://github.com/jaraco/rst.linker")
2876 (synopsis "Sphinx plugin to add links and timestamps")
2877 (description "rst.linker allows to automatically replace text by a
2878reStructuredText external reference or timestamps. It's primary purpose is to
2879augment the changelog, but it can be used for other documents, too.")
2880 (license license:expat)))
2881
2882(define-public python2-rst.linker
2883 (package-with-python2 python-rst.linker))
2884
f4de5b3b
CAW
2885(define-public python-feedgenerator
2886 (package
2887 (name "python-feedgenerator")
f0412aa2 2888 (version "1.8")
f4de5b3b 2889 (source
f4de5b3b 2890 (origin
f0412aa2
EF
2891 (method url-fetch)
2892 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2893 (sha256
2894 (base32
7c88bcf4
HG
2895 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2896 (modules '((guix build utils)))
2897 (snippet
2898 '(begin
2899 ;; Remove pre-compiled .pyc files from source.
2900 (for-each delete-file-recursively
2901 (find-files "." "__pycache__" #:directories? #t))
2902 (for-each delete-file (find-files "." "\\.pyc$"))
2903 #t))))
f4de5b3b 2904 (build-system python-build-system)
dae73d9b 2905 (propagated-inputs
f3b98f4f 2906 `(("python-pytz" ,python-pytz)
f4de5b3b 2907 ("python-six" ,python-six)))
f0412aa2 2908 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2909 (synopsis
2910 "Standalone version of Django's Atom/RSS feed generator")
2911 (description
2912 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2913which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2914 (license license:bsd-3)))
f4de5b3b
CAW
2915
2916(define-public python2-feedgenerator
2917 (package-with-python2 python-feedgenerator))
2918
59ad30e3
CAW
2919(define-public python-blinker
2920 (package
2921 (name "python-blinker")
7fb9ff4d 2922 (version "1.4")
59ad30e3
CAW
2923 (source
2924 (origin
2925 (method url-fetch)
7fb9ff4d 2926 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2927 (sha256
2928 (base32
7fb9ff4d 2929 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 2930 (build-system python-build-system)
59ad30e3
CAW
2931 (home-page "http://pythonhosted.org/blinker/")
2932 (synopsis "Fast, simple object-to-object and broadcast signaling")
2933 (description
2934 "Blinker provides a fast dispatching system that allows any number of
2935interested parties to subscribe to events, or \"signals\".")
2936 (license license:expat)))
2937
2938(define-public python2-blinker
2939 (package-with-python2 python-blinker))
2940
b8050e71
CAW
2941(define-public pelican
2942 (package
2943 (name "pelican")
11f97c27 2944 (version "3.6.3")
b8050e71
CAW
2945 (source
2946 (origin
2947 (method url-fetch)
11f97c27 2948 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2949 (sha256
2950 (base32
11f97c27 2951 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2952 (build-system python-build-system)
f22efa01 2953 (propagated-inputs
b8050e71
CAW
2954 `(("python-feedgenerator" ,python-feedgenerator)
2955 ("python-jinja2" ,python-jinja2)
2956 ("python-pygments" ,python-pygments)
2957 ("python-docutils" ,python-docutils)
2958 ("python-pytz" ,python-pytz)
2959 ("python-blinker" ,python-blinker)
2960 ("python-unidecode" ,python-unidecode)
2961 ("python-six" ,python-six)
2962 ("python-dateutil-2" ,python-dateutil-2)))
2963 (home-page "http://getpelican.com/")
2964 (arguments
2965 `(;; XXX Requires a lot more packages to do unit tests :P
2966 #:tests? #f
2967 #:phases (modify-phases %standard-phases
2968 (add-before
2969 'install 'adjust-requires
2970 ;; Since feedgenerator is installed from git, it doesn't
2971 ;; conform to the version requirements.
2972 ;;
2973 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2974 ;; version requirement so setuptools doesn't get confused.
2975 (lambda _
2976 (substitute* "setup.py"
2977 (("['\"]feedgenerator.*?['\"]")
2978 "'feedgenerator'")))))))
2979 (synopsis "Python-based static site publishing system")
2980 (description
2981 "Pelican is a tool to generate a static blog from reStructuredText,
2982Markdown input files, and more. Pelican uses Jinja2 for templating
2983and is very extensible.")
3f641af0 2984 (license license:agpl3+)))
b8050e71 2985
240ca4aa
RW
2986(define-public python-scikit-learn
2987 (package
2988 (name "python-scikit-learn")
be0a4c26 2989 (version "0.16.1")
240ca4aa
RW
2990 (source
2991 (origin
2992 (method url-fetch)
2993 (uri (string-append
2994 "https://github.com/scikit-learn/scikit-learn/archive/"
2995 version ".tar.gz"))
7e21b9fb 2996 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
2997 (sha256
2998 (base32
be0a4c26 2999 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
3000 (build-system python-build-system)
3001 (arguments
3002 `(#:phases
3003 (alist-cons-before
2f6b3d2e
RW
3004 'check 'set-HOME
3005 ;; some tests require access to "$HOME"
3006 (lambda _ (setenv "HOME" "/tmp"))
3007 ;; Tests can only be run after the library has been installed and not
3008 ;; within the source directory.
3009 (alist-cons-after
3010 'install 'check
3011 (lambda _
3012 (with-directory-excursion "/tmp"
3013 ;; With Python 3 one test of 3334 fails
3014 ;; (sklearn.tests.test_common.test_transformers); see
3015 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3016 (system* "nosetests" "-v" "sklearn")))
3017 (alist-delete 'check %standard-phases)))))
240ca4aa 3018 (inputs
328bb95d
HG
3019 `(("openblas" ,openblas)))
3020 (native-inputs
3021 `(("python-nose" ,python-nose)))
240ca4aa
RW
3022 (propagated-inputs
3023 `(("python-numpy" ,python-numpy)
3024 ("python-scipy" ,python-scipy)))
3025 (home-page "http://scikit-learn.org/")
3026 (synopsis "Machine Learning in Python")
3027 (description
3028 "Scikit-learn provides simple and efficient tools for data
3029mining and data analysis.")
1b5241c5 3030 (license license:bsd-3)))
240ca4aa
RW
3031
3032(define-public python2-scikit-learn
1b5241c5 3033 (package-with-python2 python-scikit-learn))
240ca4aa 3034
12f8f9bb
RW
3035(define-public python-scikit-image
3036 (package
3037 (name "python-scikit-image")
3038 (version "0.11.3")
3039 (source
3040 (origin
3041 (method url-fetch)
3042 (uri (string-append
3043 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3044 version ".tar.gz"))
3045 (sha256
3046 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3047 (build-system python-build-system)
b83e2333 3048 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3049 (propagated-inputs
3050 `(("python-matplotlib" ,python-matplotlib)
3051 ("python-networkx" ,python-networkx)
12f8f9bb 3052 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3053 ("python-pillow" ,python-pillow)))
3054 (native-inputs
b83e2333
HG
3055 `(("python-numpy" ,python-numpy)
3056 ("python-cython" ,python-cython)
3057 ("python-six" ,python-six)))
12f8f9bb
RW
3058 (home-page "http://scikit-image.org/")
3059 (synopsis "Image processing in Python")
3060 (description
e881752c 3061 "Scikit-image is a collection of algorithms for image processing.")
12733594 3062 (license license:bsd-3)))
12f8f9bb
RW
3063
3064(define-public python2-scikit-image
12733594 3065 (package-with-python2 python-scikit-image))
12f8f9bb 3066
5394a6a6
RW
3067(define-public python-redis
3068 (package
3069 (name "python-redis")
3070 (version "2.10.3")
3071 (source
3072 (origin
3073 (method url-fetch)
3074 (uri (string-append
3075 "https://pypi.python.org/packages/source/r/redis/redis-"
3076 version ".tar.gz"))
3077 (sha256
3078 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3079 (build-system python-build-system)
3080 ;; Tests require a running Redis server
3081 (arguments '(#:tests? #f))
cf8124b0
HG
3082 ;; As long as we are not running test, we do not need this input :-)
3083 ;;(native-inputs
3084 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3085 (home-page "https://github.com/andymccurdy/redis-py")
3086 (synopsis "Redis Python client")
3087 (description
3088 "This package provides a Python interface to the Redis key-value store.")
3089 (license license:expat)))
3090
3091(define-public python2-redis
3092 (package-with-python2 python-redis))
3093
748cef5b
RW
3094(define-public python-rq
3095 (package
3096 (name "python-rq")
3097 (version "0.5.2")
3098 (source
3099 (origin
3100 (method url-fetch)
3101 (uri (string-append
3102 "https://pypi.python.org/packages/source/r/rq/rq-"
3103 version ".tar.gz"))
3104 (sha256
3105 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3106 (build-system python-build-system)
3107 (propagated-inputs
3108 `(("python-click" ,python-click)
3109 ("python-redis" ,python-redis)))
748cef5b
RW
3110 (home-page "http://python-rq.org/")
3111 (synopsis "Simple job queues for Python")
3112 (description
3113 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3114processing them in the background with workers. It is backed by Redis and it
3115is designed to have a low barrier to entry.")
3f641af0 3116 (license license:bsd-2)))
748cef5b
RW
3117
3118(define-public python2-rq
3119 (package-with-python2 python-rq))
3120
6888830b
FB
3121(define-public python-cython
3122 (package
3123 (name "python-cython")
dd22efef 3124 (version "0.24.1")
6888830b
FB
3125 (source
3126 (origin
3127 (method url-fetch)
56918e26 3128 (uri (pypi-uri "Cython" version))
6888830b
FB
3129 (sha256
3130 (base32
dd22efef 3131 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3132 (build-system python-build-system)
3133 ;; we need the full python package and not just the python-wrapper
3134 ;; because we need libpython3.3m.so
3135 (inputs
3136 `(("python" ,python)))
3137 (arguments
3138 `(#:phases
b92f651b
EF
3139 (modify-phases %standard-phases
3140 (add-before 'check 'set-HOME
3141 ;; some tests require access to "$HOME/.cython"
3142 (lambda _ (setenv "HOME" "/tmp")))
3143 (replace 'check
3144 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3145 (home-page "http://cython.org/")
3146 (synopsis "C extensions for Python")
3147 (description "Cython is an optimising static compiler for both the Python
3148programming language and the extended Cython programming language. It makes
3149writing C extensions for Python as easy as Python itself.")
3f641af0 3150 (license license:asl2.0)
48b311b1 3151 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3152
3153(define-public python2-cython
48b311b1
LC
3154 (package (inherit (package-with-python2
3155 (strip-python2-variant python-cython)))
6888830b
FB
3156 (name "python2-cython")
3157 (inputs
3158 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3159
ee5fb7ee
AV
3160;; The RPython toolchain currently does not support Python 3.
3161(define-public python2-rpython
3162 (package
3163 (name "python2-rpython")
3164 (version "0.1.4")
3165 (source
3166 (origin
3167 (method url-fetch)
3168 (uri (pypi-uri "rpython" version))
3169 (sha256
3170 (base32
3171 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3172 (build-system python-build-system)
3173 (arguments `(#:python ,python-2))
3174 (native-inputs
f3b98f4f 3175 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3176 (home-page "https://rpython.readthedocs.org")
3177 (synopsis "Framework for implementing interpreters and virtual machines")
3178 (description "RPython is a translation and support framework for
3179producing implementations of dynamic languages, emphasizing a clean separation
3180between language specification and implementation aspects.")
3181 (license license:expat)))
3182
0da98533
FB
3183;; This version of numpy is missing the documentation and is only used to
3184;; build matplotlib which is required to build numpy's documentation.
3185(define python-numpy-bootstrap
3186 (package
3187 (name "python-numpy-bootstrap")
ef9b4c04 3188 (version "1.10.4")
0da98533
FB
3189 (source
3190 (origin
3191 (method url-fetch)
de67e922 3192 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3193 "/numpy-" version ".tar.gz"))
3194 (sha256
3195 (base32
ef9b4c04 3196 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3197 (build-system python-build-system)
3198 (inputs
328bb95d 3199 `(("openblas" ,openblas)
cba256f8 3200 ("lapack" ,lapack)))
0da98533 3201 (native-inputs
2efabc55
HG
3202 `(("python-nose" ,python-nose)
3203 ("gfortran" ,gfortran)))
0da98533
FB
3204 (arguments
3205 `(#:phases
2efabc55
HG
3206 (modify-phases %standard-phases
3207 (add-before 'build 'set-environment-variables
3208 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3209 (call-with-output-file "site.cfg"
3210 (lambda (port)
cba256f8
RW
3211 (format port
3212 "[openblas]
dbdfe515
RW
3213libraries = openblas
3214library_dirs = ~a/lib
3215include_dirs = ~a/include
cba256f8 3216
2efabc55
HG
3217# backslash-n to make emacs happy
3218\n[lapack]
cba256f8
RW
3219lapack_libs = lapack
3220library_dirs = ~a/lib
3221include_dirs = ~a/include
3222"
3223 (assoc-ref inputs "openblas")
3224 (assoc-ref inputs "openblas")
3225 (assoc-ref inputs "lapack")
3226 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3227 ;; Use "gcc" executable, not "cc".
3228 (substitute* "numpy/distutils/system_info.py"
3229 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3230 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3231 #t))
6a843168
FB
3232 ;; Tests can only be run after the library has been installed and not
3233 ;; within the source directory.
2efabc55
HG
3234 (delete 'check)
3235 (add-after 'install 'check
3236 (lambda* (#:key outputs inputs #:allow-other-keys)
3237 ;; Make installed package available for running the tests
3238 (add-installed-pythonpath inputs outputs)
6a843168 3239 (with-directory-excursion "/tmp"
89b5c60e 3240 (zero? (system* "python" "-c"
2efabc55 3241 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3242 (home-page "http://www.numpy.org/")
3243 (synopsis "Fundamental package for scientific computing with Python")
3244 (description "NumPy is the fundamental package for scientific computing
e881752c 3245with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3246object, sophisticated (broadcasting) functions, tools for integrating C/C++
3247and Fortran code, useful linear algebra, Fourier transform, and random number
3248capabilities.")
3f641af0 3249 (license license:bsd-3)))
0da98533
FB
3250
3251(define python2-numpy-bootstrap
3252 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3253
3a1bfe18
RW
3254(define-public python2-fastlmm
3255 (package
3256 (name "python2-fastlmm")
b074e7d4 3257 (version "0.2.21")
3a1bfe18
RW
3258 (source
3259 (origin
3260 (method url-fetch)
b074e7d4 3261 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3262 (sha256
3263 (base32
b074e7d4 3264 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3265 (build-system python-build-system)
3266 (arguments
3267 `(#:python ,python-2)) ; only Python 2.7 is supported
3268 (propagated-inputs
3269 `(("python2-numpy" ,python2-numpy)
3270 ("python2-scipy" ,python2-scipy)
3271 ("python2-matplotlib" ,python2-matplotlib)
3272 ("python2-pandas" ,python2-pandas)
3273 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3274 ("python2-pysnptools" ,python2-pysnptools)))
3275 (native-inputs
3276 `(("unzip" ,unzip)
2efabc55 3277 ("python2-cython" ,python2-cython)
f3b98f4f 3278 ("python2-mock" ,python2-mock)))
3a1bfe18
RW
3279 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3280 (synopsis "Perform genome-wide association studies on large data sets")
3281 (description
3282 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3283Models, is a program for performing both single-SNP and SNP-set genome-wide
3284association studies (GWAS) on extremely large data sets.")
3f641af0 3285 (license license:asl2.0)))
3a1bfe18 3286
2ee8869a
FB
3287(define-public python-numpy
3288 (package (inherit python-numpy-bootstrap)
3289 (name "python-numpy")
3290 (outputs '("out" "doc"))
89b5c60e 3291 (inputs
b0aa6ede
HG
3292 `(("which" ,which)
3293 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3294 (propagated-inputs
3295 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3296 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3297 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3298 (native-inputs
3299 `(("pkg-config" ,pkg-config)
2efabc55
HG
3300 ("python-sphinx" ,python-sphinx)
3301 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3302 ("texlive" ,texlive)
3303 ("texinfo" ,texinfo)
3304 ("perl" ,perl)
3305 ,@(package-native-inputs python-numpy-bootstrap)))
3306 (arguments
89b5c60e 3307 `(,@(substitute-keyword-arguments
2ee8869a
FB
3308 (package-arguments python-numpy-bootstrap)
3309 ((#:phases phases)
3310 `(alist-cons-after
3311 'install 'install-doc
2efabc55
HG
3312 (lambda* (#:key inputs outputs #:allow-other-keys)
3313 ;; Make installed package available for building the
3314 ;; documentation
3315 (add-installed-pythonpath inputs outputs)
2ee8869a 3316 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3317 (doc (string-append
3318 data "/doc/" ,name "-"
2ee8869a
FB
3319 ,(package-version python-numpy-bootstrap)))
3320 (info (string-append data "/info"))
3321 (html (string-append doc "/html"))
3322 (pyver ,(string-append "PYVER=")))
3323 (with-directory-excursion "doc"
3324 (mkdir-p html)
3325 (system* "make" "html" pyver)
3326 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3327 (system* "make" "-C" "build/latex"
2ee8869a
FB
3328 "all-pdf" "PAPER=a4" pyver)
3329 ;; FIXME: Generation of the info file fails.
3330 ;; (system* "make" "info" pyver)
3331 ;; (mkdir-p info)
3332 ;; (copy-file "build/texinfo/numpy.info"
3333 ;; (string-append info "/numpy.info"))
3334 (for-each (lambda (file)
3335 (copy-file (string-append "build/latex" file)
3336 (string-append doc file)))
3337 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3338 (with-directory-excursion "build/html"
3339 (for-each (lambda (file)
3340 (let* ((dir (dirname file))
3341 (tgt-dir (string-append html "/" dir)))
3342 (unless (equal? "." dir)
3343 (mkdir-p tgt-dir))
96c46210 3344 (install-file file html)))
2ee8869a
FB
3345 (find-files "." ".*"))))))
3346 ,phases)))))))
3347
764c077b 3348(define-public python2-numpy
57b7b8cd 3349 (package-with-python2 python-numpy))
2ee8869a 3350
15bfe6d6
FB
3351(define-public python-pyparsing
3352 (package
3353 (name "python-pyparsing")
e0669289 3354 (version "2.0.3")
15bfe6d6
FB
3355 (source
3356 (origin
3357 (method url-fetch)
de67e922
LF
3358 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3359 "/pyparsing-" version
15bfe6d6
FB
3360 "/pyparsing-" version ".tar.gz"))
3361 (sha256
3362 (base32
e0669289 3363 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3364 (build-system python-build-system)
3365 (outputs '("out" "doc"))
3366 (arguments
3367 `(#:tests? #f ; no test target
3368 #:modules ((guix build python-build-system)
3369 (guix build utils))
3370 #:phases
3371 (alist-cons-after
3372 'install 'install-doc
3373 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3374 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3375 "/share/doc/" ,name "-" ,version))
3376 (html-doc (string-append doc "/html"))
3377 (examples (string-append doc "/examples")))
3378 (mkdir-p html-doc)
3379 (mkdir-p examples)
89b5c60e 3380 (for-each
15bfe6d6 3381 (lambda (dir tgt)
89b5c60e 3382 (map (lambda (file)
96c46210 3383 (install-file file tgt))
15bfe6d6
FB
3384 (find-files dir ".*")))
3385 (list "docs" "htmldoc" "examples")
3386 (list doc html-doc examples))))
3387 %standard-phases)))
3388 (home-page "http://pyparsing.wikispaces.com")
3389 (synopsis "Python parsing class library")
3390 (description
3391 "The pyparsing module is an alternative approach to creating and
3392executing simple grammars, vs. the traditional lex/yacc approach, or the use
3393of regular expressions. The pyparsing module provides a library of classes
3394that client code uses to construct the grammar directly in Python code.")
bd3fa666 3395 (license license:expat)))
15bfe6d6
FB
3396
3397(define-public python2-pyparsing
3398 (package-with-python2 python-pyparsing))
3399
ec00de35
FB
3400(define-public python-numpydoc
3401 (package
3402 (name "python-numpydoc")
3403 (version "0.5")
3404 (source
3405 (origin
3406 (method url-fetch)
89b5c60e 3407 (uri (string-append
ec00de35
FB
3408 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3409 version ".tar.gz"))
3410 (sha256
3411 (base32
5e4d8f67
AE
3412 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3413 (modules '((guix build utils)))
3414 (snippet
3415 '(begin
3416 ;; Drop a test requiring matplotlib, which we cannot add as an
3417 ;; input since it would create a circular dependency: Extend the
3418 ;; test for Python 3, where it is already dropped, to Python 2.
3419 (substitute* "numpydoc/tests/test_plot_directive.py"
3420 (("3") "2"))))))
ec00de35 3421 (build-system python-build-system)
fe4a8da4 3422 (propagated-inputs
213d1745
HG
3423 `(("python-sphinx" ,python-sphinx)))
3424 (native-inputs
3425 `(("python-nose" ,python-nose)))
ec00de35
FB
3426 (home-page "https://pypi.python.org/pypi/numpydoc")
3427 (synopsis
3428 "Numpy's Sphinx extensions")
3429 (description
3430 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3431 (license license:bsd-2)))
ec00de35
FB
3432
3433(define-public python2-numpydoc
5e4d8f67 3434 (package-with-python2 python-numpydoc))
1c65314c 3435
1e656049
RW
3436(define-public python-numexpr
3437 (package
3438 (name "python-numexpr")
26112c0a 3439 (version "2.6.0")
1e656049
RW
3440 (source
3441 (origin
3442 (method url-fetch)
26112c0a 3443 (uri (pypi-uri "numexpr" version))
1e656049
RW
3444 (sha256
3445 (base32
26112c0a 3446 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3447 (build-system python-build-system)
3448 (arguments `(#:tests? #f)) ; no tests included
3449 (propagated-inputs
3450 `(("python-numpy" ,python-numpy)))
3451 (home-page "https://github.com/pydata/numexpr")
3452 (synopsis "Fast numerical expression evaluator for NumPy")
3453 (description
3454 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3455expressions that operate on arrays are accelerated and use less memory than
3456doing the same calculation in Python. In addition, its multi-threaded
3457capabilities can make use of all your cores, which may accelerate
3458computations, most specially if they are not memory-bounded (e.g. those using
3459transcendental functions).")
f210e944 3460 (license license:expat)))
1e656049
RW
3461
3462(define-public python2-numexpr
f210e944 3463 (package-with-python2 python-numexpr))
1e656049 3464
1c65314c
FB
3465(define-public python-matplotlib
3466 (package
3467 (name "python-matplotlib")
1bbc659f 3468 (version "1.4.3")
1c65314c
FB
3469 (source
3470 (origin
3471 (method url-fetch)
de67e922
LF
3472 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3473 "/matplotlib-" version
1c65314c
FB
3474 "/matplotlib-" version ".tar.gz"))
3475 (sha256
3476 (base32
1bbc659f 3477 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3478 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3479 (build-system python-build-system)
3480 (outputs '("out" "doc"))
25f9a068
FB
3481 (propagated-inputs ; the following packages are all needed at run time
3482 `(("python-pyparsing" ,python-pyparsing)
3483 ("python-pygobject" ,python-pygobject)
3484 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3485 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3486 ("python-dateutil" ,python-dateutil-2)
3487 ("python-numpy" ,python-numpy-bootstrap)
3488 ("python-pillow" ,python-pillow)
3489 ("python-pytz" ,python-pytz)
3490 ("python-six" ,python-six)
25f9a068
FB
3491 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3492 ;; from 'gtk+') provides the required 'typelib' files used by
3493 ;; 'gobject-introspection'. The location of these files is set with the
3494 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3495 ;; is done automatically by a 'native-search-path' procedure. However,
3496 ;; at run-time the user must set this variable as follows:
3497 ;;
3498 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3499 ("gtk+" ,gtk+)
3500 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3501 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3502 ;; object. For this reason we need to import both libraries.
3503 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3504 ("python-pycairo" ,python-pycairo)
3505 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3506 (inputs
ca33a3ad 3507 `(("libpng" ,libpng)
1c65314c
FB
3508 ("imagemagick" ,imagemagick)
3509 ("freetype" ,freetype)
25f9a068
FB
3510 ("cairo" ,cairo)
3511 ("glib" ,glib)
1c65314c 3512 ;; FIXME: Add backends when available.
1c65314c
FB
3513 ;("python-wxpython" ,python-wxpython)
3514 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3515 ("tcl" ,tcl)
3516 ("tk" ,tk)))
1c65314c
FB
3517 (native-inputs
3518 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3519 ("python-sphinx" ,python-sphinx)
3520 ("python-numpydoc" ,python-numpydoc)
3521 ("python-nose" ,python-nose)
3522 ("python-mock" ,python-mock)
1c65314c
FB
3523 ("texlive" ,texlive)
3524 ("texinfo" ,texinfo)))
3525 (arguments
3526 `(#:phases
25f9a068
FB
3527 (alist-cons-before
3528 'build 'configure-environment
3529 (lambda* (#:key outputs inputs #:allow-other-keys)
3530 (let ((cairo (assoc-ref inputs "cairo"))
3531 (gtk+ (assoc-ref inputs "gtk+")))
3532 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3533 ;; has not effect.
25f9a068
FB
3534 (setenv "LD_LIBRARY_PATH"
3535 (string-append cairo "/lib:" gtk+ "/lib"))
3536 (setenv "HOME" (getcwd))
3537 (call-with-output-file "setup.cfg"
3538 (lambda (port)
1bbc659f
FB
3539 (format port "[directories]~%
3540basedirlist = ~a,~a~%
57b7b8cd 3541 [rc_options]~%
1bbc659f
FB
3542backend = TkAgg~%"
3543 (assoc-ref inputs "tcl")
3544 (assoc-ref inputs "tk"))))))
25f9a068
FB
3545 (alist-cons-after
3546 'install 'install-doc
ca33a3ad 3547 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3548 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3549 (doc (string-append data "/doc/" ,name "-" ,version))
3550 (info (string-append data "/info"))
3551 (html (string-append doc "/html")))
ca33a3ad
HG
3552 ;; Make installed package available for building the
3553 ;; documentation
3554 (add-installed-pythonpath inputs outputs)
25f9a068 3555 (with-directory-excursion "doc"
25f9a068
FB
3556 ;; Produce pdf in 'A4' format.
3557 (substitute* (find-files "." "conf\\.py")
3558 (("latex_paper_size = 'letter'")
3559 "latex_paper_size = 'a4'"))
3560 (mkdir-p html)
3561 (mkdir-p info)
3562 ;; The doc recommends to run the 'html' target twice.
3563 (system* "python" "make.py" "html")
3564 (system* "python" "make.py" "html")
18b31516 3565 (copy-recursively "build/html" html)
25f9a068
FB
3566 (system* "python" "make.py" "latex")
3567 (system* "python" "make.py" "texinfo")
18b31516
FB
3568 (symlink (string-append html "/_images")
3569 (string-append info "/matplotlib-figures"))
3570 (with-directory-excursion "build/texinfo"
3571 (substitute* "matplotlib.texi"
3572 (("@image\\{([^,]*)" all file)
3573 (string-append "@image{matplotlib-figures/" file)))
3574 (symlink (string-append html "/_images")
3575 "./matplotlib-figures")
3576 (system* "makeinfo" "--no-split"
3577 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3578 (copy-file "build/texinfo/matplotlib.info"
3579 (string-append info "/matplotlib.info"))
3580 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3581 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3582 %standard-phases))))
1c65314c
FB
3583 (home-page "http://matplotlib.org")
3584 (synopsis "2D plotting library for Python")
3585 (description
3586 "Matplotlib is a Python 2D plotting library which produces publication
3587quality figures in a variety of hardcopy formats and interactive environments
3588across platforms. Matplotlib can be used in Python scripts, the python and
3589ipython shell, web application servers, and six graphical user interface
3590toolkits.")
3f641af0 3591 (license license:psfl)
57b7b8cd 3592 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3593
764c077b 3594(define-public python2-matplotlib
57b7b8cd
LC
3595 (let ((matplotlib (package-with-python2
3596 (strip-python2-variant python-matplotlib))))
764c077b 3597 (package (inherit matplotlib)
88c26834
AE
3598 ;; Make sure to use special packages for Python 2 instead
3599 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3600 (propagated-inputs
7ca0dbc3 3601 `(("python2-pycairo" ,python2-pycairo)
764c077b 3602 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3603 ("python2-tkinter" ,python-2 "tk")
3604 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3605 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3606
0dde6232
RW
3607(define-public python2-pysnptools
3608 (package
3609 (name "python2-pysnptools")
a800018e 3610 (version "0.3.9")
0dde6232
RW
3611 (source
3612 (origin
3613 (method url-fetch)
3f2e9675 3614 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3615 (sha256
3616 (base32
a800018e 3617 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3618 (build-system python-build-system)
3619 (arguments
3620 `(#:python ,python-2)) ; only Python 2.7 is supported
3621 (propagated-inputs
3622 `(("python2-numpy" ,python2-numpy)
3623 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3624 ("python2-pandas" ,python2-pandas)))
3625 (native-inputs
3626 `(("python2-cython" ,python2-cython)))
0dde6232 3627 (native-inputs
f3b98f4f 3628 `(("unzip" ,unzip)))
0dde6232
RW
3629 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3630 (synopsis "Library for reading and manipulating genetic data")
3631 (description
3632 "PySnpTools is a library for reading and manipulating genetic data. It
3633can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3634those files. It can also efficiently manipulate ranges of integers using set
3635operators such as union, intersection, and difference.")
3f641af0 3636 (license license:asl2.0)))
0dde6232 3637
c9b1b4f9
RW
3638(define-public python-rpy2
3639 (package
3640 (name "python-rpy2")
ec3bcbc7 3641 (version "2.7.6")
c9b1b4f9
RW
3642 (source
3643 (origin
3644 (method url-fetch)
ec3bcbc7 3645 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3646 (sha256
3647 (base32
ec3bcbc7 3648 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3649 (build-system python-build-system)
482d9591
HG
3650 (propagated-inputs
3651 `(("python-six" ,python-six)))
c9b1b4f9 3652 (inputs
482d9591 3653 `(("readline" ,readline)
c9b1b4f9
RW
3654 ("icu4c" ,icu4c)
3655 ("pcre" ,pcre)
3656 ("r" ,r)))
3657 (native-inputs
f3b98f4f 3658 `(("zlib" ,zlib)))
c9b1b4f9
RW
3659 (home-page "http://rpy.sourceforge.net/")
3660 (synopsis "Python interface to the R language")
3661 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3662low-level interface to R from Python, a proposed high-level interface,
3663including wrappers to graphical libraries, as well as R-like structures and
3664functions.")
3f641af0 3665 (license license:gpl3+)))
c9b1b4f9
RW
3666
3667(define-public python2-rpy2
3668 (let ((rpy2 (package-with-python2 python-rpy2)))
3669 (package (inherit rpy2)
3670 (native-inputs
3671 `(("python2-singledispatch" ,python2-singledispatch)
3672 ,@(package-native-inputs rpy2))))))
3673
bb986599
FB
3674(define-public python-scipy
3675 (package
3676 (name "python-scipy")
ba8a0824 3677 (version "0.16.0")
bb986599
FB
3678 (source
3679 (origin
3680 (method url-fetch)
de67e922
LF
3681; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3682 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3683 "/scipy-" version ".tar.xz"))
bb986599
FB
3684 (sha256
3685 (base32
ba8a0824 3686 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3687 (build-system python-build-system)
dd86c0d1 3688 (propagated-inputs
bb986599
FB
3689 `(("python-numpy" ,python-numpy)
3690 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3691 ("python-pyparsing" ,python-pyparsing)))
3692 (inputs
3693 `(("lapack" ,lapack)
719b01c1 3694 ("openblas" ,openblas)))
bb986599 3695 (native-inputs
dd86c0d1
RW
3696 `(("python-nose" ,python-nose)
3697 ("python-sphinx" ,python-sphinx)
5248d49e 3698 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3699 ("gfortran" ,gfortran)
bb986599
FB
3700 ("texlive" ,texlive)
3701 ("perl" ,perl)))
3702 (outputs '("out" "doc"))
3703 (arguments
3704 `(#:phases
3705 (alist-cons-before
719b01c1 3706 'build 'configure-openblas
bb986599 3707 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3708 (call-with-output-file "site.cfg"
3709 (lambda (port)
3710 (format port
3711 "[blas]
3712libraries = openblas
3713library_dirs = ~a/lib
3714include_dirs = ~a/include
d548e6aa
HG
3715
3716# backslash-n to make emacs happy
3717\n[atlas]
719b01c1
RW
3718library_dirs = ~a/lib
3719atlas_libs = openblas
3720"
3721 (assoc-ref inputs "openblas")
3722 (assoc-ref inputs "openblas")
3723 (assoc-ref inputs "openblas"))))
3724 #t)
bb986599
FB
3725 (alist-cons-after
3726 'install 'install-doc
d548e6aa 3727 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3728 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3729 (doc (string-append data "/doc/" ,name "-" ,version))
3730 (html (string-append doc "/html"))
3731 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3732 ;; Make installed package available for building the
3733 ;; documentation
3734 (add-installed-pythonpath inputs outputs)
bb986599 3735 (with-directory-excursion "doc"
bb986599
FB
3736 ;; Fix generation of images for mathematical expressions.
3737 (substitute* (find-files "source" "conf\\.py")
3738 (("pngmath_use_preview = True")
3739 "pngmath_use_preview = False"))
3740 (mkdir-p html)
3741 (system* "make" "html" pyver)
3742 (system* "make" "latex" "PAPER=a4" pyver)
3743 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3744 (copy-file "build/latex/scipy-ref.pdf"
3745 (string-append doc "/scipy-ref.pdf"))
3746 (with-directory-excursion "build/html"
3747 (for-each (lambda (file)
3748 (let* ((dir (dirname file))
3749 (tgt-dir (string-append html "/" dir)))
96c46210 3750 (install-file file html)))
bb986599
FB
3751 (find-files "." ".*"))))))
3752 ;; Tests can only be run after the library has been installed and not
3753 ;; within the source directory.
3754 (alist-cons-after
3755 'install 'check
89b5c60e 3756 (lambda _
bb986599
FB
3757 (with-directory-excursion "/tmp"
3758 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3759 (alist-delete
3760 'check
4f9ff21e
RW
3761 (alist-cons-after
3762 'unpack 'fix-tests
3763 (lambda _
3764 (substitute* "scipy/integrate/tests/test_quadpack.py"
3765 (("libm.so") "libm.so.6"))
3766 #t)
3767 %standard-phases)))))))
bb986599
FB
3768 (home-page "http://www.scipy.org/")
3769 (synopsis "The Scipy library provides efficient numerical routines")
3770 (description "The SciPy library is one of the core packages that make up
3771the SciPy stack. It provides many user-friendly and efficient numerical
3772routines such as routines for numerical integration and optimization.")
3f641af0 3773 (license license:bsd-3)))
bb986599 3774
764c077b 3775(define-public python2-scipy
57b7b8cd 3776 (package-with-python2 python-scipy))
bb986599 3777
73acc193 3778(define-public python-socksipy-branch
3779 (package
3780 (name "python-socksipy-branch")
3781 (version "1.01")
3782 (source
3783 (origin
3784 (method url-fetch)
3785 (uri (pypi-uri "SocksiPy-branch" version))
3786 (sha256
3787 (base32
3788 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3789 (build-system python-build-system)
3790 (arguments
3791 `(#:tests? #f)) ; There are no tests
3792 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3793 (synopsis "Python SOCKS module")
3794 (description
3795 "SocksiPy - A Python SOCKS client module. It provides a
3796socket-like interface that supports connections to any TCP
3797service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3798The original version was developed by Dan Haim, this is a
3799branch created by Mario Vilas to address some open issues,
3800as the original project seems to have been abandoned circa 2007.")
3801 (license license:bsd-3)))
3802
3803(define-public python2-socksipy-branch
3804 (package-with-python2 python-socksipy-branch))
3805
94914805
EB
3806(define-public python-sqlalchemy
3807 (package
3808 (name "python-sqlalchemy")
a4ba286b 3809 (version "1.0.12")
94914805
EB
3810 (source
3811 (origin
3812 (method url-fetch)
3813 (uri (string-append "https://pypi.python.org/packages/source/S/"
3814 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3815 (sha256
3816 (base32
a4ba286b 3817 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3818 (build-system python-build-system)
3819 (native-inputs
3820 `(("python-cython" ,python-cython) ;for c extensions
3821 ("python-pytest" ,python-pytest)
3822 ("python-mock" ,python-mock))) ;for tests
3823 (arguments
3824 `(#:phases (alist-replace
3825 'check
3826 (lambda _ (zero? (system* "py.test")))
3827 %standard-phases)))
3828 (home-page "http://www.sqlalchemy.org")
3829 (synopsis "Database abstraction library")
3830 (description
3831 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3832gives application developers the full power and flexibility of SQL. It
3833provides a full suite of well known enterprise-level persistence patterns,
3834designed for efficient and high-performing database access, adapted into a
3835simple and Pythonic domain language.")
3f641af0 3836 (license license:x11)))
94914805
EB
3837
3838(define-public python2-sqlalchemy
3839 (package-with-python2 python-sqlalchemy))
c937562e 3840
4a093330
DM
3841(define-public python-pycodestyle
3842 (package
3843 (name "python-pycodestyle")
3844 (version "2.0.0")
3845 (source
3846 (origin
3847 (method url-fetch)
3848 (uri (pypi-uri "pycodestyle" version))
3849 (sha256
3850 (base32
3851 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3852 (build-system python-build-system)
3853 (home-page "https://pycodestyle.readthedocs.io/")
3854 (synopsis "Python style guide checker")
3855 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3856Python code against some of the style conventions in
3857@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3858 (license license:expat)))
4a093330
DM
3859
3860(define-public python2-pycodestyle
f210e944 3861 (package-with-python2 python-pycodestyle))
b91912c4
DM
3862
3863(define-public python-orderedmultidict
3864 (package
3865 (name "python-orderedmultidict")
3866 (version "0.7.10")
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "orderedmultidict" version))
3871 (sha256
3872 (base32
3873 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3874 (build-system python-build-system)
3875 (arguments
3876 `(#:phases
3877 (modify-phases %standard-phases
3878 (add-after 'unpack 'fix-tests
3879 (lambda _
3880 ;; The package uses nosetest for running the tests.
3881 ;; Adding this initfile allows to run the test suite
3882 ;; without requiring nosetest.
3883 (zero? (system* "touch" "tests/__init__.py")))))))
3884 (propagated-inputs
3885 `(("python-six" ,python-six)))
3886 (native-inputs
3887 `(("python-pycodestyle" ,python-pycodestyle)))
3888 (home-page "https://github.com/gruns/orderedmultidict")
3889 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3890 (description "This package contains a library for ordered multivalue
3891dictionaries. A multivalue dictionary is a dictionary that can store
3892multiple values for the same key. An ordered multivalue dictionary is a
3893multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3894 (license license:unlicense)))
b91912c4
DM
3895
3896(define-public python2-orderedmultidict
f210e944 3897 (package-with-python2 python-orderedmultidict))
9dede065
DM
3898
3899(define-public python-furl
3900 (package
3901 (name "python-furl")
3902 (version "0.5.6")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (pypi-uri "furl" version))
3907 (sha256
3908 (base32
3909 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3910 (build-system python-build-system)
3911 (propagated-inputs
3912 `(("python-six" ,python-six)
3913 ("python-orderedmultidict" ,python-orderedmultidict)))
3914 (native-inputs
3915 `(("python-pycodestyle" ,python-pycodestyle)))
3916 (home-page "https://github.com/gruns/furl")
3917 (synopsis "URL manipulation in Python")
3918 (description "Furl provides an easy-to-use alternative to the
3919@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3920 (license license:unlicense)))
9dede065
DM
3921
3922(define-public python2-furl
f210e944 3923 (package-with-python2 python-furl))
462bf271
DM
3924
3925(define-public python-flask-babel
3926 (package
3927 (name "python-flask-babel")
3928 (version "0.11.1")
3929 (source
3930 (origin
3931 (method url-fetch)
3932 (uri (pypi-uri "Flask-Babel" version))
3933 (sha256
3934 (base32
3935 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3936 (build-system python-build-system)
3937 (propagated-inputs
3938 `(("python-flask" ,python-flask)
3939 ("python-babel" ,python-babel)
3940 ("python-jinja2" ,python-jinja2)
3941 ("python-pytz" ,python-pytz)))
3942 (home-page "https://github.com/python-babel/flask-babel")
3943 (synopsis "Add i18n/l10n support to Flask applications")
3944 (description "This package implements internationalization and localization
3945support for Flask. This is based on the Python babel module as well as pytz -
3946both of which are installed automatically if you install this library.")
f210e944 3947 (license license:bsd-3)))
462bf271
DM
3948
3949(define-public python2-flask-babel
f210e944 3950 (package-with-python2 python-flask-babel))
4a093330 3951
de2966cf
EF
3952(define-public python-sqlalchemy-utils
3953 (package
3954 (name "python-sqlalchemy-utils")
bb4b1706 3955 (version "0.32.11")
de2966cf
EF
3956 (source
3957 (origin
3958 (method url-fetch)
3959 (uri (pypi-uri "SQLAlchemy-Utils" version))
3960 (sha256
3961 (base32
bb4b1706 3962 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 3963 (build-system python-build-system)
c22b4f87 3964 (propagated-inputs
de2966cf
EF
3965 `(("python-six" ,python-six)
3966 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
3967 (native-inputs
3968 `(("python-pytest" ,python-pytest)))
de2966cf
EF
3969 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3970 (synopsis "Various utility functions for SQLAlchemy")
3971 (description
3972 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
3973for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3974
3975You might also want to install the following optional dependencies:
3976@enumerate
3977@item @code{python-passlib}
3978@item @code{python-babel}
3979@item @code{python-cryptography}
3980@item @code{python-pytz}
3981@item @code{python-psycopg2}
3982@item @code{python-furl}
3983@item @code{python-flask-babel}
3984@end enumerate
3985")
de2966cf
EF
3986 (license license:bsd-3)))
3987
3988(define-public python2-sqlalchemy-utils
f210e944 3989 (package-with-python2 python-sqlalchemy-utils))
de2966cf 3990
af5a4602
CAW
3991(define-public python-alembic
3992 (package
3993 (name "python-alembic")
bb484529 3994 (version "0.8.7")
af5a4602
CAW
3995 (source
3996 (origin
3997 (method url-fetch)
3998 (uri (pypi-uri "alembic" version))
3999 (sha256
4000 (base32
bb484529 4001 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4002 (build-system python-build-system)
4003 (native-inputs
4004 `(("python-mock" ,python-mock)
4005 ("python-pytest-cov" ,python-pytest-cov)))
4006 (propagated-inputs
4007 `(("python-sqlalchemy" ,python-sqlalchemy)
4008 ("python-mako" ,python-mako)
4009 ("python-editor" ,python-editor)))
4010 (home-page "http://bitbucket.org/zzzeek/alembic")
4011 (synopsis
4012 "Database migration tool for SQLAlchemy")
4013 (description
4014 "Alembic is a lightweight database migration tool for usage with the
4015SQLAlchemy Database Toolkit for Python.")
f210e944 4016 (license license:expat)))
af5a4602
CAW
4017
4018(define-public python2-alembic
f210e944 4019 (package-with-python2 python-alembic))
af5a4602 4020
1671c07c
EB
4021(define-public python-distutils-extra
4022 (package
4023 (name "python-distutils-extra")
4024 (version "2.38")
4025 (source
4026 (origin
4027 (method url-fetch)
4028 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4029 version "/+download/python-distutils-extra-"
4030 version ".tar.gz"))
4031 (sha256
4032 (base32
4033 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4034 (build-system python-build-system)
1671c07c
EB
4035 (home-page "https://launchpad.net/python-distutils-extra/")
4036 (synopsis "Enhancements to Python's distutils")
4037 (description
4038 "The python-distutils-extra module enables you to easily integrate
4039gettext support, themed icons, and scrollkeeper-based documentation into
4040Python's distutils.")
3f641af0 4041 (license license:gpl2)))
1671c07c
EB
4042
4043(define-public python2-distutils-extra
4044 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4045
4046(define-public python2-elib.intl
4047 (package
4048 (name "python2-elib.intl")
4049 (version "0.0.3")
4050 (source
4051 (origin
4052 ;; This project doesn't tag releases or publish tarballs, so we take
4053 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4054 (method git-fetch)
4055 (uri (git-reference
4056 (url "https://github.com/dieterv/elib.intl.git")
4057 (commit "d09997cfef")))
4058 (sha256
4059 (base32
4060 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4061 (build-system python-build-system)
ea5456c8
EB
4062 (arguments
4063 ;; incompatible with Python 3 (exception syntax)
4064 `(#:python ,python-2
b41a05ce 4065 #:tests? #f))
ea5456c8
EB
4066 (home-page "https://github.com/dieterv/elib.intl")
4067 (synopsis "Enhanced internationalization for Python")
4068 (description
4069 "The elib.intl module provides enhanced internationalization (I18N)
4070services for your Python modules and applications.")
3f641af0 4071 (license license:lgpl3+)))
ea5456c8 4072
c937562e
EB
4073(define-public python-pillow
4074 (package
4075 (name "python-pillow")
aba5182c 4076 (version "3.3.3")
c937562e
EB
4077 (source
4078 (origin
4079 (method url-fetch)
f1d9231d 4080 (uri (pypi-uri "Pillow" version))
c937562e
EB
4081 (sha256
4082 (base32
aba5182c 4083 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4084 (build-system python-build-system)
4085 (native-inputs
f3b98f4f 4086 `(("python-nose" ,python-nose)))
c937562e 4087 (inputs
5ff408d9
SB
4088 `(("freetype" ,freetype)
4089 ("lcms" ,lcms)
c937562e
EB
4090 ("zlib" ,zlib)
4091 ("libjpeg" ,libjpeg)
4092 ("openjpeg" ,openjpeg)
5ff408d9
SB
4093 ("libtiff" ,libtiff)
4094 ("libwebp" ,libwebp)))
c937562e 4095 (arguments
e5358a6b 4096 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4097 (add-after
4098 'install 'check-installed
6151120a 4099 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4100 (begin
4101 (setenv "HOME" (getcwd))
6151120a
HG
4102 ;; Make installed package available for running the
4103 ;; tests
4104 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4105 (and (zero? (system* "python" "selftest.py"
4106 "--installed"))
4107 (zero? (system* "python" "test-installed.py"))))))
4108 (delete 'check))))
c937562e
EB
4109 (home-page "https://pypi.python.org/pypi/Pillow")
4110 (synopsis "Fork of the Python Imaging Library")
4111 (description
4112 "The Python Imaging Library adds image processing capabilities to your
4113Python interpreter. This library provides extensive file format support, an
4114efficient internal representation, and fairly powerful image processing
4115capabilities. The core image library is designed for fast access to data
4116stored in a few basic pixel formats. It should provide a solid foundation for
4117a general image processing tool.")
3f641af0 4118 (license (license:x11-style
c937562e
EB
4119 "http://www.pythonware.com/products/pil/license.htm"
4120 "The PIL Software License"))))
4121
4122(define-public python2-pillow
4123 (package-with-python2 python-pillow))
bb986599 4124
a415f036
FB
4125(define-public python-pycparser
4126 (package
4127 (name "python-pycparser")
38eb6919 4128 (version "2.14")
a415f036
FB
4129 (source
4130 (origin
4131 (method url-fetch)
38eb6919 4132 (uri (pypi-uri "pycparser" version))
a415f036
FB
4133 (sha256
4134 (base32
38eb6919 4135 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4136 (outputs '("out" "doc"))
4137 (build-system python-build-system)
4138 (native-inputs
f3b98f4f 4139 `(("pkg-config" ,pkg-config)))
a415f036 4140 (arguments
89b5c60e 4141 `(#:phases
a415f036
FB
4142 (alist-replace
4143 'check
4144 (lambda _
4145 (with-directory-excursion "tests"
4146 (zero? (system* "python" "all_tests.py"))))
4147 (alist-cons-after
4148 'install 'install-doc
4149 (lambda* (#:key outputs #:allow-other-keys)
4150 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4151 (doc (string-append data "/doc/" ,name "-" ,version))
4152 (examples (string-append doc "/examples")))
4153 (mkdir-p examples)
4154 (for-each (lambda (file)
4155 (copy-file (string-append "." file)
4156 (string-append doc file)))
4157 '("/README.rst" "/CHANGES" "/LICENSE"))
4158 (copy-recursively "examples" examples)))
4159 %standard-phases))))
4160 (home-page "https://github.com/eliben/pycparser")
4161 (synopsis "C parser in Python")
4162 (description
4163 "Pycparser is a complete parser of the C language, written in pure Python
4164using the PLY parsing library. It parses C code into an AST and can serve as
4165a front-end for C compilers or analysis tools.")
3f641af0 4166 (license license:bsd-3)))
a415f036
FB
4167
4168(define-public python2-pycparser
4169 (package-with-python2 python-pycparser))
57c3f716
FB
4170
4171(define-public python-cffi
4172 (package
4173 (name "python-cffi")
2d3a437c 4174 (version "1.4.2")
57c3f716
FB
4175 (source
4176 (origin
4177 (method url-fetch)
2d3a437c 4178 (uri (pypi-uri "cffi" version))
89b5c60e 4179 (sha256
2d3a437c 4180 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4181 (build-system python-build-system)
4182 (outputs '("out" "doc"))
4183 (inputs
4184 `(("libffi" ,libffi)))
4185 (propagated-inputs ; required at run-time
4186 `(("python-pycparser" ,python-pycparser)))
4187 (native-inputs
4188 `(("pkg-config" ,pkg-config)
4189 ("python-sphinx" ,python-sphinx)
f3b98f4f 4190 ("python-pytest" ,python-pytest)))
57c3f716 4191 (arguments
4179f952 4192 `(#:phases
57c3f716
FB
4193 (alist-cons-after
4194 'install 'install-doc
4195 (lambda* (#:key outputs #:allow-other-keys)
4196 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4197 (doc (string-append data "/doc/" ,name "-" ,version))
4198 (html (string-append doc "/html")))
4199 (with-directory-excursion "doc"
4200 (system* "make" "html")
4201 (mkdir-p html)
4202 (copy-recursively "build/html" html))
4203 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4204 %standard-phases)))
4205 (home-page "http://cffi.readthedocs.org")
4206 (synopsis "Foreign function interface for Python")
4207 (description
4208 "Foreign Function Interface for Python calling C code.")
bd3fa666 4209 (license license:expat)))
57c3f716
FB
4210
4211(define-public python2-cffi
4212 (package-with-python2 python-cffi))
6fa14469
FB
4213
4214(define-public python-xcffib
4215 (package
4216 (name "python-xcffib")
4217 (version "0.1.9")
4218 (source
4219 (origin
4220 (method url-fetch)
4221 (uri (string-append "https://pypi.python.org/packages/source/x/"
4222 "xcffib/xcffib-" version ".tar.gz"))
4223 (sha256
4224 (base32
4225 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4226 (build-system python-build-system)
4227 (inputs
482d9591 4228 `(("libxcb" ,libxcb)))
6fa14469 4229 (propagated-inputs
482d9591
HG
4230 `(("python-cffi" ,python-cffi) ; used at run time
4231 ("python-six" ,python-six)))
6fa14469 4232 (arguments
89b5c60e 4233 `(#:phases
6fa14469
FB
4234 (alist-cons-after
4235 'install 'install-doc
4236 (lambda* (#:key outputs #:allow-other-keys)
4237 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4238 "/doc/" ,name "-" ,version)))
4239 (mkdir-p doc)
4240 (copy-file "README.md"
4241 (string-append doc "/README.md"))))
4242 %standard-phases)))
4243 (home-page "https://github.com/tych0/xcffib")
4244 (synopsis "XCB Python bindings")
4245 (description
4246 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4247support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4248 (license license:expat)))
6fa14469
FB
4249
4250(define-public python2-xcffib
4251 (package-with-python2 python-xcffib))
4252
9e099723
FB
4253(define-public python-cairocffi
4254 (package
4255 (name "python-cairocffi")
4256 (version "0.6")
4257 (source
4258 (origin
4259 (method url-fetch)
4260 ;; The archive on pypi is missing the 'utils' directory!
4261 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4262 version ".tar.gz"))
f586c877 4263 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4264 (sha256
4265 (base32
4266 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4267 (build-system python-build-system)
4268 (outputs '("out" "doc"))
4269 (inputs
4270 `(("gdk-pixbuf" ,gdk-pixbuf)
4271 ("cairo" ,cairo)))
4272 (native-inputs
4273 `(("pkg-config" ,pkg-config)
4274 ("python-sphinx" ,python-sphinx)
f3b98f4f 4275 ("python-docutils" ,python-docutils)))
9e099723
FB
4276 (propagated-inputs
4277 `(("python-xcffib" ,python-xcffib))) ; used at run time
4278 (arguments
89b5c60e 4279 `(#:phases
9e099723
FB
4280 (alist-cons-after
4281 'install 'install-doc
4282 (lambda* (#:key inputs outputs #:allow-other-keys)
4283 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4284 (doc (string-append data "/doc/" ,name "-" ,version))
4285 (html (string-append doc "/html")))
89b5c60e 4286 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4287 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4288 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4289 (setenv "LANG" "en_US.UTF-8")
4290 (mkdir-p html)
4291 (for-each (lambda (file)
4292 (copy-file (string-append "." file)
4293 (string-append doc file)))
4294 '("/README.rst" "/CHANGES" "/LICENSE"))
4295 (system* "python" "setup.py" "build_sphinx")
4296 (copy-recursively "docs/_build/html" html)))
4297 %standard-phases)))
4298 (home-page "https://github.com/SimonSapin/cairocffi")
4299 (synopsis "Python bindings and object-oriented API for Cairo")
4300 (description
4301 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4302Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4303graphics library with support for multiple backends including image buffers,
4304PNG, PostScript, PDF, and SVG file output.")
3f641af0 4305 (license license:bsd-3)))
9e099723
FB
4306
4307(define-public python2-cairocffi
4308 (package-with-python2 python-cairocffi))
4309
3cff95cb
RW
4310(define-public python-decorator
4311 (package
4312 (name "python-decorator")
eb6e2e81 4313 (version "4.0.9")
3cff95cb
RW
4314 (source
4315 (origin
4316 (method url-fetch)
e21338be 4317 (uri (pypi-uri "decorator" version))
3cff95cb 4318 (sha256
eb6e2e81 4319 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4320 (build-system python-build-system)
4321 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4322 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4323 (synopsis "Python module to simplify usage of decorators")
4324 (description
4325 "The aim of the decorator module is to simplify the usage of decorators
4326for the average programmer, and to popularize decorators usage giving examples
4327of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4328etc. The core of this module is a decorator factory.")
4329 (license license:expat)))
4330
4331(define-public python2-decorator
4332 (package-with-python2 python-decorator))
4333
2c0499ad
RW
4334(define-public python-drmaa
4335 (package
4336 (name "python-drmaa")
4337 (version "0.7.6")
4338 (source
4339 (origin
4340 (method url-fetch)
4341 (uri (string-append
4342 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4343 version ".tar.gz"))
4344 (sha256
4345 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4346 (build-system python-build-system)
4347 ;; The test suite requires libdrmaa which is provided by the cluster
4348 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4349 ;; should be set to the path of the libdrmaa library.
4350 (arguments '(#:tests? #f))
4351 (native-inputs
f3b98f4f 4352 `(("python-nose" ,python-nose)))
2c0499ad
RW
4353 (home-page "https://pypi.python.org/pypi/drmaa")
4354 (synopsis "Python bindings for the DRMAA library")
4355 (description
4356 "A Python package for Distributed Resource Management (DRM) job
4357submission and control. This package is an implementation of the DRMAA 1.0
4358Python language binding specification.")
3f641af0 4359 (license license:bsd-3)))
2c0499ad
RW
4360
4361(define-public python2-drmaa
4362 (package-with-python2 python-drmaa))
4363
d05c6da0
RW
4364(define-public python-gridmap
4365 (package
4366 (name "python-gridmap")
4367 (version "0.13.0")
4368 (source
4369 (origin
4370 (method url-fetch)
4371 (uri (string-append
4372 "https://github.com/pygridtools/gridmap/archive/v"
4373 version ".tar.gz"))
4374 (file-name (string-append name "-" version ".tar.gz"))
4375 (sha256
4376 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4377 (build-system python-build-system)
f22efa01 4378 (propagated-inputs
d05c6da0
RW
4379 `(("python-psutil" ,python-psutil)
4380 ("python-drmaa" ,python-drmaa)
4381 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4382 (home-page "https://github.com/pygridtools/gridmap")
4383 (synopsis "Create jobs on a cluster directly from Python")
4384 (description
4385 "Gridmap is a Python package to allow you to easily create jobs on the
4386cluster directly from Python. You can directly map Python functions onto the
4387cluster without needing to write any wrapper code yourself.")
3f641af0 4388 (license license:gpl3+)))
d05c6da0
RW
4389
4390(define-public python2-gridmap
4391 (package-with-python2 python-gridmap))
4392
cb6d5c54
RW
4393(define-public python-pexpect
4394 (package
4395 (name "python-pexpect")
4396 (version "3.3")
4397 (source
4398 (origin
4399 (method url-fetch)
4400 (uri (string-append "https://pypi.python.org/packages/source/p/"
4401 "pexpect/pexpect-" version ".tar.gz"))
4402 (sha256
4403 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4404 (build-system python-build-system)
4405 (arguments
4406 `(#:phases
4407 (modify-phases %standard-phases
4408 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4409 (native-inputs
4410 `(("python-nose" ,python-nose)))
4411 (home-page "http://pexpect.readthedocs.org/")
4412 (synopsis "Controlling interactive console applications")
4413 (description
4414 "Pexpect is a pure Python module for spawning child applications;
4415controlling them; and responding to expected patterns in their output.
4416Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4417child application and control it as if a human were typing commands.")
3f641af0 4418 (license license:isc)))
cb6d5c54
RW
4419
4420(define-public python2-pexpect
4421 (package-with-python2 python-pexpect))
4422
229ad120
RW
4423(define-public python-setuptools-scm
4424 (package
4425 (name "python-setuptools-scm")
42d6d0d0 4426 (version "1.11.1")
229ad120
RW
4427 (source (origin
4428 (method url-fetch)
383af6b0 4429 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4430 (sha256
4431 (base32
42d6d0d0 4432 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4433 (build-system python-build-system)
4434 (home-page "https://github.com/pypa/setuptools_scm/")
4435 (synopsis "Manage Python package versions in SCM metadata")
4436 (description
383af6b0 4437 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4438@dfn{software configuration management} (SCM) metadata instead of declaring
4439them as the version argument or in a SCM managed file.")
4440 (license license:expat)))
4441
4442(define-public python2-setuptools-scm
4443 (package-with-python2 python-setuptools-scm))
4444
b74270ee
RW
4445(define-public python-pathpy
4446 (package
4447 (name "python-pathpy")
4448 (version "8.1.1")
4449 (source
4450 (origin
4451 (method url-fetch)
4452 (uri (string-append "https://pypi.python.org/packages/source/p/"
4453 "path.py/path.py-" version ".tar.gz"))
4454 (sha256
4455 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4456 (outputs '("out" "doc"))
b74270ee
RW
4457 (build-system python-build-system)
4458 (propagated-inputs
4459 `(("python-appdirs" ,python-appdirs)))
4460 (native-inputs
f3b98f4f 4461 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4462 ("python-sphinx" ,python-sphinx)
4463 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4464 ("python-pytest" ,python-pytest)
4465 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4466 (arguments
4467 `(#:phases
4468 (modify-phases %standard-phases
4469 (add-after 'build 'build-doc
4470 (lambda _
4471 (setenv "LANG" "en_US.UTF-8")
4472 (zero? (system* "python" "setup.py" "build_sphinx"))))
4473 (add-after 'install 'install-doc
4474 (lambda* (#:key outputs #:allow-other-keys)
4475 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4476 (doc (string-append data "/doc/" ,name "-" ,version))
4477 (html (string-append doc "/html")))
4478 (mkdir-p html)
4479 (for-each (lambda (file)
4480 (copy-file file (string-append doc "/" file)))
4481 '("README.rst" "CHANGES.rst"))
4482 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4483 (home-page "http://github.com/jaraco/path.py")
4484 (synopsis "Python module wrapper for built-in os.path")
4485 (description
4486 "@code{path.py} implements path objects as first-class entities, allowing
4487common operations on files to be invoked on those path objects directly.")
4488 (license license:expat)))
4489
4490(define-public python2-pathpy
4491 (package-with-python2 python-pathpy))
4492
0d34e01b
RW
4493(define-public python-pickleshare
4494 (package
4495 (name "python-pickleshare")
4496 (version "0.5")
4497 (source
4498 (origin
4499 (method url-fetch)
4500 (uri (string-append "https://pypi.python.org/packages/source/p/"
4501 "pickleshare/pickleshare-" version ".tar.gz"))
4502 (sha256
4503 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4504 (build-system python-build-system)
4505 (propagated-inputs
4506 `(("python-pathpy" ,python-pathpy)))
4507 (home-page "https://github.com/vivainio/pickleshare")
4508 (synopsis "Tiny key value database with concurrency support")
4509 (description
4510 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4511Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4512shelve, many processes can access the database simultaneously. Changing a
4513value in database is immediately visible to other processes accessing the same
4514database. Concurrency is possible because the values are stored in separate
4515files. Hence the “database” is a directory where all files are governed by
4516PickleShare.")
4517 (license license:expat)))
4518
4519(define-public python2-pickleshare
4520 (package-with-python2 python-pickleshare))
4521
cd6e5189
RW
4522(define-public python-simplegeneric
4523 (package
4524 (name "python-simplegeneric")
4525 (version "0.8.1")
4526 (source
4527 (origin
4528 (method url-fetch)
4529 (uri (string-append "https://pypi.python.org/packages/source/s/"
4530 "simplegeneric/simplegeneric-" version ".zip"))
4531 (sha256
4532 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4533 (build-system python-build-system)
4534 (native-inputs
f3b98f4f 4535 `(("unzip" ,unzip)))
cd6e5189
RW
4536 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4537 (synopsis "Python module for simple generic functions")
4538 (description
4539 "The simplegeneric module lets you define simple single-dispatch generic
4540functions, akin to Python’s built-in generic functions like @code{len()},
4541@code{iter()} and so on. However, instead of using specially-named methods,
4542these generic functions use simple lookup tables, akin to those used by
4543e.g. @code{pickle.dump()} and other generic functions found in the Python
4544standard library.")
3f641af0 4545 (license license:zpl2.1)))
cd6e5189
RW
4546
4547(define-public python2-simplegeneric
4548 (package-with-python2 python-simplegeneric))
4549
ddc7d8ed 4550(define-public python-ipython-genutils
c4abbac3 4551 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4552 (package
4553 (name "python-ipython-genutils")
4554 (version "0.1.0")
4555 (source
4556 (origin
4557 (method url-fetch)
4558 (uri (string-append "https://pypi.python.org/packages/source/i/"
4559 "ipython_genutils/ipython_genutils-"
4560 version ".tar.gz"))
4561 (sha256
4562 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4563 (build-system python-build-system)
4564 (arguments `(#:tests? #f)) ; no tests
4565 (home-page "http://ipython.org")
4566 (synopsis "Vestigial utilities from IPython")
4567 (description
c4abbac3
HG
4568 "This package provides retired utilities from IPython. No packages
4569outside IPython/Jupyter should depend on it.
4570
4571This package shouldn't exist. It contains some common utilities shared by
4572Jupyter and IPython projects during The Big Split. As soon as possible, those
4573packages will remove their dependency on this, and this package will go
4574away.")
3f641af0 4575 (license license:bsd-3)))
ddc7d8ed
RW
4576
4577(define-public python2-ipython-genutils
4578 (package-with-python2 python-ipython-genutils))
4579
2b10eb48
RW
4580(define-public python-traitlets
4581 (package
4582 (name "python-traitlets")
a5ba1481 4583 (version "4.2.0")
2b10eb48
RW
4584 (source
4585 (origin
4586 (method url-fetch)
cc0c4fde 4587 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4588 (sha256
4589 (base32
a5ba1481 4590 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4591 (build-system python-build-system)
4592 (arguments
4593 `(#:phases
4594 (modify-phases %standard-phases
4595 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4596 (propagated-inputs
4597 `(("python-ipython-genutils" ,python-ipython-genutils)
4598 ("python-decorator" ,python-decorator)))
4599 (native-inputs
cc0c4fde
EF
4600 `(("python-mock" ,python-mock)
4601 ("python-nose" ,python-nose)))
2b10eb48
RW
4602 (home-page "http://ipython.org")
4603 (synopsis "Configuration system for Python applications")
4604 (description
4605 "Traitlets is a framework that lets Python classes have attributes with
4606type checking, dynamically calculated default values, and ‘on change’
4607callbacks. The package also includes a mechanism to use traitlets for
4608configuration, loading values from files or from command line arguments. This
4609is a distinct layer on top of traitlets, so you can use traitlets in your code
4610without using the configuration machinery.")
3f641af0 4611 (license license:bsd-3)))
2b10eb48
RW
4612
4613(define-public python2-traitlets
4614 (package-with-python2 python-traitlets))
4615
4263b06f
RW
4616(define-public python-jupyter-core
4617 (package
4618 (name "python-jupyter-core")
4619 (version "4.2.0")
4620 (source
4621 (origin
4622 (method url-fetch)
4623 (uri (string-append (pypi-uri "jupyter_core" version)))
4624 (sha256
4625 (base32
4626 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4627 (build-system python-build-system)
4628 ;; FIXME: not sure how to run the tests
4629 (arguments `(#:tests? #f))
4630 (propagated-inputs
4631 `(("python-traitlets" ,python-traitlets)))
4632 (home-page "http://jupyter.org/")
4633 (synopsis "Jupyter base package")
4634 (description
4635 "Jupyter core is the base package on which Jupyter projects rely.")
4636 (license license:bsd-3)))
4637
4638(define-public python2-jupyter-core
4639 (package-with-python2 python-jupyter-core))
4640
9ff01f2d
RW
4641(define-public python-jupyter-client
4642 (package
4643 (name "python-jupyter-client")
4644 (version "4.4.0")
4645 (source
4646 (origin
4647 (method url-fetch)
4648 (uri (pypi-uri "jupyter_client" version))
4649 (sha256
4650 (base32
4651 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4652 (build-system python-build-system)
4653 ;; Tests fail because of missing native python kernel which I assume is
4654 ;; provided by the ipython package, which we cannot use because it would
4655 ;; cause a dependency cycle.
4656 (arguments `(#:tests? #f))
4657 (propagated-inputs
4658 `(("python-pyzmq" ,python-pyzmq)
4659 ("python-traitlets" ,python-traitlets)
4660 ("python-jupyter-core" ,python-jupyter-core)))
4661 (home-page "http://jupyter.org/")
4662 (synopsis "Jupyter protocol implementation and client libraries")
4663 (description
4664 "The @code{jupyter_client} package contains the reference implementation
4665of the Jupyter protocol. It also provides client and kernel management APIs
4666for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4667installing @code{kernelspec}s for use with Jupyter frontends.")
4668 (license license:bsd-3)))
4669
4670(define-public python2-jupyter-client
4671 (package-with-python2 python-jupyter-client))
4672
ab526102
RW
4673(define-public python-ipykernel
4674 (package
4675 (name "python-ipykernel")
4676 (version "4.5.0")
4677 (source
4678 (origin
4679 (method url-fetch)
4680 (uri (pypi-uri "ipykernel" version))
4681 (sha256
4682 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4683 (build-system python-build-system)
4684 ;; The tests load a submodule of IPython. However, IPython itself depends
4685 ;; on ipykernel.
4686 (arguments `(#:tests? #f))
4687 (propagated-inputs
4688 ;; imported at runtime during connect
4689 `(("python-jupyter-client" ,python-jupyter-client)))
4690 (home-page "http://ipython.org")
4691 (synopsis "IPython Kernel for Jupyter")
4692 (description
4693 "This package provides the IPython kernel for Jupyter.")
4694 (license license:bsd-3)))
4695
4696(define-public python2-ipykernel
4697 (package-with-python2 python-ipykernel))
4698
5ff6effc
RW
4699(define-public python-testpath
4700 (package
4701 (name "python-testpath")
4702 (version "0.2")
4703 (source
4704 (origin
4705 (method url-fetch)
4706 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4707 version ".tar.gz"))
4708 (file-name (string-append name "-" version ".tar.gz"))
4709 (sha256
4710 (base32
4711 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4712 (build-system python-build-system)
4713 (arguments
4714 `(#:tests? #f ; this package does not even have a setup.py
4715 #:phases
4716 (modify-phases %standard-phases
4717 (delete 'install)
4718 (replace 'build
4719 (lambda* (#:key inputs outputs #:allow-other-keys)
4720 (let ((dir (string-append
4721 (assoc-ref outputs "out")
4722 "/lib/python"
4723 (string-take (string-take-right
4724 (assoc-ref inputs "python") 5) 3)
4725 "/site-packages/testpath")))
4726 (mkdir-p dir)
4727 (copy-recursively "testpath" dir))
4728 #t)))))
4729 (home-page "https://github.com/takluyver/testpath")
4730 (synopsis "Test utilities for code working with files and commands")
4731 (description
4732 "Testpath is a collection of utilities for Python code working with files
4733and commands. It contains functions to check things on the filesystem, and
4734tools for mocking system commands and recording calls to those.")
4735 (license license:expat)))
4736
4737(define-public python2-testpath
4738 (package-with-python2 python-testpath))
4739
ae1ab9fe
FB
4740(define-public python-ipython
4741 (package
4742 (name "python-ipython")
4dbc8ec4 4743 (version "4.0.3")
ae1ab9fe
FB
4744 (source
4745 (origin
fceac880 4746 (method url-fetch)
accd5f99 4747 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4748 (sha256
4dbc8ec4 4749 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4750 (build-system python-build-system)
4751 (outputs '("out" "doc"))
3a0b1b9a
FB
4752 (propagated-inputs
4753 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4754 ("python-terminado" ,python-terminado)
ae1ab9fe 4755 ("python-matplotlib" ,python-matplotlib)
5d26e542 4756 ("python-numpy" ,python-numpy)
ae1ab9fe 4757 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4758 ("python-jinja2" ,python-jinja2)
4759 ("python-mistune" ,python-mistune)
accd5f99
RW
4760 ("python-pexpect" ,python-pexpect)
4761 ("python-pickleshare" ,python-pickleshare)
4762 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4763 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4764 ("python-traitlets" ,python-traitlets)
4765 ("python-ipykernel" ,python-ipykernel)
4766 ("python-pygments" ,python-pygments)))
4767 (inputs
4768 `(("readline" ,readline)
4769 ("which" ,which)))
ae1ab9fe
FB
4770 (native-inputs
4771 `(("pkg-config" ,pkg-config)
accd5f99
RW
4772 ("python-requests" ,python-requests) ;; for tests
4773 ("python-testpath" ,python-testpath)
4774 ("python-nose" ,python-nose)
ae1ab9fe
FB
4775 ("python-sphinx" ,python-sphinx)
4776 ("texlive" ,texlive)
f3b98f4f 4777 ("texinfo" ,texinfo)))
ae1ab9fe 4778 (arguments
89b5c60e 4779 `(#:phases
3a0b1b9a
FB
4780 (modify-phases %standard-phases
4781 (add-after
4782 'install 'install-doc
4783 (lambda* (#:key inputs outputs #:allow-other-keys)
4784 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4785 (doc (string-append data "/doc/" ,name "-" ,version))
4786 (html (string-append doc "/html"))
4787 (man1 (string-append data "/man/man1"))
4788 (info (string-append data "/info"))
4789 (examples (string-append doc "/examples")))
afd3d931 4790 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4791 ;; Make installed package available for running the tests
4792 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4793 (with-directory-excursion "docs"
accd5f99
RW
4794 ;; FIXME: pdf fails to build
4795 ;;(system* "make" "pdf" "PAPER=a4")
4796 (system* "make" "html")
3a0b1b9a
FB
4797 (system* "make" "info"))
4798 (copy-recursively "docs/man" man1)
4799 (copy-recursively "examples" examples)
accd5f99 4800 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4801 ;; (copy-file "docs/build/latex/ipython.pdf"
4802 ;; (string-append doc "/ipython.pdf"))
4803 (mkdir-p info)
4804 (copy-file "docs/build/texinfo/ipython.info"
4805 (string-append info "/ipython.info"))
4806 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4807 ;; Tests can only be run after the library has been installed and not
4808 ;; within the source directory.
4809 (delete 'check)
4810 (add-after
4811 'install 'check
eee5cd04 4812 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4813 (if tests?
4814 (with-directory-excursion "/tmp"
eee5cd04
HG
4815 ;; Make installed package available for running the tests
4816 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4817 (setenv "HOME" "/tmp/") ;; required by a test
4818 (zero? (system* (string-append (assoc-ref outputs "out")
4819 "/bin/iptest"))))
4820 #t)))
4821 (add-before
4822 'install 'fix-tests
4823 (lambda* (#:key inputs #:allow-other-keys)
4824 (substitute* "./IPython/utils/_process_posix.py"
4825 (("/usr/bin/env', 'which") (which "which")))
4826 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4827 (("#!/usr/bin/env python")
4828 (string-append "#!" (which "python"))))
4829 ;; Disable 1 failing test
4830 (substitute* "./IPython/core/tests/test_magic.py"
4831 (("def test_dirops\\(\\):" all)
4832 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4833 (home-page "http://ipython.org")
4834 (synopsis "IPython is a tool for interactive computing in Python")
4835 (description
4836 "IPython provides a rich architecture for interactive computing with:
4837Powerful interactive shells, a browser-based notebook, support for interactive
4838data visualization, embeddable interpreters and tools for parallel
4839computing.")
135ba811
EF
4840 (license license:bsd-3)
4841 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4842
4843(define-public python2-ipython
135ba811 4844 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4845 (package
4846 (inherit ipython)
4847 ;; FIXME: some tests are failing
4848 (arguments
4849 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4850 ;; FIXME: add pyreadline once available.
e62600fe 4851 (native-inputs
135ba811 4852 `(("python2-mock" ,python2-mock)
77a6932a 4853 ,@(package-native-inputs ipython))))))
03411993
AE
4854
4855(define-public python-isodate
4856 (package
4857 (name "python-isodate")
b6785c2e 4858 (version "0.5.4")
03411993
AE
4859 (source
4860 (origin
4861 (method url-fetch)
b6785c2e 4862 (uri (pypi-uri "isodate" version))
03411993
AE
4863 (sha256
4864 (base32
b6785c2e 4865 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4866 (build-system python-build-system)
03411993
AE
4867 (home-page
4868 "http://cheeseshop.python.org/pypi/isodate")
4869 (synopsis
4870 "Python date parser and formatter")
4871 (description
4872 "Python-isodate is a python module for parsing and formatting
4873ISO 8601 dates, time and duration.")
3f641af0 4874 (license license:bsd-3)))
03411993
AE
4875
4876(define-public python2-isodate
4877 (package-with-python2 python-isodate))
673ab897
AE
4878
4879(define-public python-html5lib
4880 (package
4881 (name "python-html5lib")
a14061aa 4882 (version "1.0b10")
673ab897
AE
4883 (source
4884 (origin
4885 (method url-fetch)
fee04c19 4886 (uri (pypi-uri "html5lib" version))
673ab897
AE
4887 (sha256
4888 (base32
a14061aa 4889 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 4890 (build-system python-build-system)
3dd75476 4891 (propagated-inputs
4eb6ed28
MB
4892 `(("python-six" ,python-six)
4893 ("python-webencodings" ,python-webencodings)))
673ab897
AE
4894 (arguments
4895 `(#:test-target "check"))
4896 (home-page
4897 "https://github.com/html5lib/html5lib-python")
4898 (synopsis
4899 "Python HTML parser based on the WHATWG HTML specifcation")
4900 (description
4901 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4902and written in Python.")
bd3fa666 4903 (license license:expat)))
673ab897
AE
4904
4905(define-public python2-html5lib
4906 (package-with-python2 python-html5lib))
e99f4211 4907
8ee62c97
RW
4908;; Needed for python-bleach, a dependency of python-notebook
4909(define-public python-html5lib-0.9
4910 (package
4911 (inherit python-html5lib)
4912 (version "0.999")
4913 (source
4914 (origin
4915 (method url-fetch)
4916 (uri (pypi-uri "html5lib" version))
4917 (sha256
4918 (base32
4919 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4920
4921(define-public python2-html5lib-0.9
4922 (package-with-python2 python-html5lib-0.9))
4923
adbca19e
MB
4924(define-public python-webencodings
4925 (package
4926 (name "python-webencodings")
4927 (version "0.5")
4928 (source (origin
4929 (method url-fetch)
4930 (uri (pypi-uri "webencodings" version))
4931 (sha256
4932 (base32
4933 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
4934 (build-system python-build-system)
4935 (arguments
4936 '(#:phases
4937 (modify-phases %standard-phases
4938 (replace 'check
4939 (lambda _
4940 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
4941 (native-inputs
4942 `(("python-pytest" ,python-pytest)))
4943 (home-page "https://github.com/SimonSapin/python-webencodings")
4944 (synopsis "Character encoding aliases for legacy web content")
4945 (description
4946 "In order to be compatible with legacy web content when interpreting
4947something like @code{Content-Type: text/html; charset=latin1}, tools need
4948to use a particular set of aliases for encoding labels as well as some
4949overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
4950the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
4951or @code{UTF-16} BOM takes precedence over any other encoding declaration.
4952The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
4953defines all such details so that implementations do not have to
4954reverse-engineer each other.
4955
4956This module implements the Encoding standard and has encoding labels and
4957BOM detection, but the actual implementation for encoders and decoders
4958is Python’s.")
4959 (license license:bsd-3)))
4960
4961(define-public python2-webencodings
4962 (package-with-python2 python-webencodings))
4963
e99f4211
MW
4964(define-public python-urwid
4965 (package
4966 (name "python-urwid")
51ff41f6 4967 (version "1.3.1")
e99f4211
MW
4968 (source
4969 (origin
4970 (method url-fetch)
b97c1bfd 4971 (uri (pypi-uri "urwid" version))
e99f4211
MW
4972 (sha256
4973 (base32
51ff41f6 4974 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4975 (build-system python-build-system)
b97c1bfd
LF
4976 (arguments
4977 `(#:phases
4978 (modify-phases %standard-phases
4979 ;; Disable failing test. Bug filed upstream:
4980 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4981 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4982 (add-after 'unpack 'disable-failing-test
4983 (lambda _
4984 (substitute* "urwid/tests/test_event_loops.py"
4985 (("test_remove_watch_file")
4986 "disable_remove_watch_file")))))))
e99f4211
MW
4987 (home-page "http://urwid.org")
4988 (synopsis "Console user interface library for Python")
4989 (description
4990 "Urwid is a curses-based UI/widget library for Python. It includes many
4991features useful for text console applications.")
3f641af0 4992 (license license:lgpl2.1+)))
e99f4211
MW
4993
4994(define-public python2-urwid
4995 (package-with-python2 python-urwid))
d95a56c6 4996
47d0b292
TS
4997(define-public python-urwidtrees
4998 (package
4999 (name "python-urwidtrees")
37ec4623 5000 (version "1.0.2")
47d0b292
TS
5001 (source
5002 (origin
5003 (method url-fetch)
37ec4623
TS
5004 ;; package author intends on distributing via github rather than pypi:
5005 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5006 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5007 version ".tar.gz"))
5008 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5009 (sha256
5010 (base32
37ec4623 5011 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5012 (build-system python-build-system)
5013 (arguments
5014 '(#:tests? #f)) ; no tests
f22efa01 5015 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5016 (home-page "https://github.com/pazz/urwidtrees")
5017 (synopsis "Tree widgets for urwid")
5018 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5019toolkit. Use it to build trees of widgets.")
3f641af0 5020 (license license:gpl3+)))
47d0b292
TS
5021
5022(define-public python2-urwidtrees
5023 (package-with-python2 python-urwidtrees))
5024
d95a56c6
PAR
5025(define-public python-dbus
5026 (package
5027 (name "python-dbus")
5028 (version "1.2.0")
5029 (source
5030 (origin
5031 (method url-fetch)
5032 (uri (string-append
5cc3096c 5033 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5034 version ".tar.gz"))
5035 (sha256
5036 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5037 (build-system gnu-build-system)
6717c879
SB
5038 (arguments
5039 '(#:phases
5040 (modify-phases %standard-phases
5041 (add-before
5042 'check 'pre-check
5043 (lambda _
5044 ;; XXX: For the missing '/etc/machine-id'.
5045 (substitute* "test/run-test.sh"
5046 (("DBUS_FATAL_WARNINGS=1")
5047 "DBUS_FATAL_WARNINGS=0"))
5048 #t)))))
d95a56c6
PAR
5049 (native-inputs
5050 `(("pkg-config" ,pkg-config)))
5051 (inputs
5052 `(("python" ,python)
2e88d113 5053 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5054 (synopsis "Python bindings for D-bus")
5055 (description "python-dbus provides bindings for libdbus, the reference
5056implementation of D-Bus.")
5057 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5058 (license license:expat)))
b52af02b
MW
5059
5060(define-public python2-dbus
5061 (package (inherit python-dbus)
5062 (name "python2-dbus")
5063 (inputs `(("python" ,python-2)
5064 ,@(alist-delete "python"
5065 (package-inputs python-dbus)
5066 equal?)))
5067 ;; FIXME: on Python 2, the test_utf8 fails with:
5068 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5069 (arguments `(#:tests? #f))))
a6ac8332
AE
5070
5071(define-public python-apsw
5072 (package
5073 (name "python-apsw")
917708c2 5074 (version "3.9.2-r1")
a6ac8332
AE
5075 (source
5076 (origin
5077 (method url-fetch)
917708c2 5078 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5079 (sha256
5080 (base32
917708c2 5081 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5082 (build-system python-build-system)
5083 (inputs
f3b98f4f 5084 `(("sqlite" ,sqlite)))
a6ac8332
AE
5085 (arguments
5086 `(#:phases
5087 ;; swap check and install phases
5088 (alist-cons-after
5089 'install 'check
5090 (assoc-ref %standard-phases 'check)
5091 (alist-delete
5092 'check
5093 %standard-phases))))
5094 (home-page "https://github.com/rogerbinns/apsw/")
5095 (synopsis "Another Python SQLite Wrapper")
5096 (description "APSW is a Python wrapper for the SQLite
5097embedded relational database engine. In contrast to other wrappers such as
5098pysqlite it focuses on being a minimal layer over SQLite attempting just to
5099translate the complete SQLite API into Python.")
abde5f37 5100 (license license:zlib)))
a6ac8332
AE
5101
5102(define-public python2-apsw
5103 (package-with-python2 python-apsw))
26b307e2
AE
5104
5105(define-public python-lxml
5106 (package
5107 (name "python-lxml")
d58a3203 5108 (version "3.6.0")
26b307e2
AE
5109 (source
5110 (origin
5111 (method url-fetch)
97bbc480 5112 (uri (pypi-uri "lxml" version))
26b307e2 5113 (sha256
d58a3203
EF
5114 (base32
5115 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5116 (build-system python-build-system)
5117 (inputs
5118 `(("libxml2" ,libxml2)
f3b98f4f 5119 ("libxslt" ,libxslt)))
26b307e2
AE
5120 (home-page "http://lxml.de/")
5121 (synopsis
5122 "Python XML processing library")
5123 (description
5124 "The lxml XML toolkit is a Pythonic binding for the C libraries
5125libxml2 and libxslt.")
3f641af0 5126 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5127
5128(define-public python2-lxml
5129 (package-with-python2 python-lxml))
4ed20663 5130
b32a1e47
CAW
5131;; beautifulsoup4 has a totally different namespace than 3.x,
5132;; and pypi seems to put it under its own name, so I guess we should too
5133(define-public python-beautifulsoup4
5134 (package
5135 (name "python-beautifulsoup4")
67fd4a12 5136 (version "4.5.1")
b32a1e47
CAW
5137 (source
5138 (origin
5139 (method url-fetch)
5140 (uri (pypi-uri "beautifulsoup4" version))
5141 (sha256
5142 (base32
67fd4a12 5143 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5144 (build-system python-build-system)
5f37f0b6
LF
5145 (arguments
5146 `(#:phases
5147 (modify-phases %standard-phases
5148 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5149 ;; must use this conversion script when building with Python 3. The
5150 ;; conversion script also runs the tests.
5151 ;; For more information, see the file 'convert-py3k' in the source
5152 ;; distribution.
5153 (replace 'check
5154 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5155 (home-page
5156 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5157 (synopsis
5158 "Python screen-scraping library")
5159 (description
5160 "Beautiful Soup is a Python library designed for rapidly setting up
5161screen-scraping projects. It offers Pythonic idioms for navigating,
5162searching, and modifying a parse tree, providing a toolkit for
5163dissecting a document and extracting what you need. It automatically
5164converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5165 (license license:expat)))
b32a1e47
CAW
5166
5167(define-public python2-beautifulsoup4
5168 (package
5169 (inherit (package-with-python2
5170 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5171 (arguments `(#:python ,python-2))))
b32a1e47 5172
092e86f5
AE
5173(define-public python2-cssutils
5174 (package
5175 (name "python2-cssutils")
58d1d816 5176 (version "1.0.1")
092e86f5
AE
5177 (source
5178 (origin
5179 (method url-fetch)
58d1d816 5180 (uri (pypi-uri "cssutils" version))
092e86f5 5181 (sha256
58d1d816
EF
5182 (base32
5183 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5184 (build-system python-build-system)
5185 (native-inputs
5186 `(("python2-mock" ,python2-mock) ; for the tests
5187 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5188 (arguments
5189 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5190 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5191 ))
092e86f5
AE
5192 (home-page "http://cthedot.de/cssutils/")
5193 (synopsis
5194 "CSS Cascading Style Sheets library for Python")
5195 (description
5196 "Cssutils is a Python package for parsing and building CSS
5197Cascading Style Sheets. Currently it provides a DOM only and no rendering
5198options.")
3f641af0 5199 (license license:lgpl3+)))
880ff77c
AE
5200
5201(define-public python-cssselect
5202 (package
5203 (name "python-cssselect")
d5ccd9ab 5204 (version "0.9.2")
880ff77c
AE
5205 (source
5206 (origin
5207 (method url-fetch)
d5ccd9ab 5208 (uri (pypi-uri "cssselect" version))
880ff77c 5209 (sha256
d5ccd9ab
EF
5210 (base32
5211 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5212 (build-system python-build-system)
880ff77c
AE
5213 (arguments
5214 ;; tests fail with message
5215 ;; AttributeError: 'module' object has no attribute 'tests'
5216 `(#:tests? #f))
5217 (home-page
5218 "https://pythonhosted.org/cssselect/")
5219 (synopsis
5220 "CSS3 selector parser and translator to XPath 1.0")
5221 (description
5222 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5223them to XPath 1.0 expressions. Such expressions can be used in lxml or
5224another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5225 (license license:bsd-3)))
880ff77c
AE
5226
5227(define-public python2-cssselect
5228 (package-with-python2 python-cssselect))
60357f99
AE
5229
5230(define-public python-netifaces
5231 (package
5232 (name "python-netifaces")
5233 (version "0.10.4")
5234 (source
5235 (origin
5236 (method url-fetch)
5237 (uri (string-append
5238 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5239 version
5240 ".tar.gz"))
5241 (sha256
5242 (base32
5243 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5244 (build-system python-build-system)
60357f99
AE
5245 (home-page
5246 "https://bitbucket.org/al45tair/netifaces")
5247 (synopsis
5248 "Python module for portable network interface information")
5249 (description
5250 "Netifaces is a Python module providing information on network
5251interfaces in an easy and portable manner.")
5252 (license license:expat)))
5253
5254(define-public python2-netifaces
5255 (package-with-python2 python-netifaces))
92cb152b 5256
32f77c04
RW
5257(define-public python-networkx
5258 (package
5259 (name "python-networkx")
a4d9609c 5260 (version "1.11")
32f77c04
RW
5261 (source
5262 (origin
5263 (method url-fetch)
a4d9609c 5264 (uri (pypi-uri "networkx" version))
32f77c04 5265 (sha256
a4d9609c 5266 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5267 (build-system python-build-system)
5268 ;; python-decorator is needed at runtime
5269 (propagated-inputs
5270 `(("python-decorator" ,python-decorator)))
5271 (native-inputs
f3b98f4f 5272 `(("python-nose" ,python-nose)))
32f77c04
RW
5273 (home-page "http://networkx.github.io/")
5274 (synopsis "Python module for creating and manipulating graphs and networks")
5275 (description
5276 "NetworkX is a Python package for the creation, manipulation, and study
5277of the structure, dynamics, and functions of complex networks.")
3f641af0 5278 (license license:bsd-3)))
32f77c04
RW
5279
5280(define-public python2-networkx
5281 (package-with-python2 python-networkx))
5282
92cb152b
RW
5283(define-public snakemake
5284 (package
5285 (name "snakemake")
5286 (version "3.2.1")
5287 (source
5288 (origin
5289 (method url-fetch)
5290 (uri (string-append
5291 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5292 version ".tar.gz"))
5293 (sha256
5294 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5295 (build-system python-build-system)
92cb152b
RW
5296 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5297 (synopsis "Python-based execution environment for make-like workflows")
5298 (description
5299 "Snakemake aims to reduce the complexity of creating workflows by
5300providing a clean and modern domain specific specification language (DSL) in
5301Python style, together with a fast and comfortable execution environment.")
5302 (license license:expat)))
a1920bc9 5303
35de1fbd
RW
5304(define-public python-seaborn
5305 (package
5306 (name "python-seaborn")
fc899d4f 5307 (version "0.7.0")
35de1fbd
RW
5308 (source
5309 (origin
5310 (method url-fetch)
fc899d4f 5311 (uri (pypi-uri "seaborn" version))
35de1fbd 5312 (sha256
fc899d4f 5313 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5314 (build-system python-build-system)
5315 (propagated-inputs
5316 `(("python-pandas" ,python-pandas)
5317 ("python-matplotlib" ,python-matplotlib)
5318 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5319 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5320 (synopsis "Statistical data visualization")
5321 (description
5322 "Seaborn is a library for making attractive and informative statistical
5323graphics in Python. It is built on top of matplotlib and tightly integrated
5324with the PyData stack, including support for numpy and pandas data structures
5325and statistical routines from scipy and statsmodels.")
3f641af0 5326 (license license:bsd-3)
fc899d4f 5327 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5328
5329(define-public python2-seaborn
fc899d4f
EF
5330 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5331 (package
5332 (inherit base)
5333 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5334 ,@(package-propagated-inputs base))))))
35de1fbd 5335
90fc547f
RW
5336(define-public python-sympy
5337 (package
5338 (name "python-sympy")
5339 (version "0.7.6")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (string-append
5344 "https://github.com/sympy/sympy/releases/download/sympy-"
5345 version "/sympy-" version ".tar.gz"))
5346 (sha256
5347 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5348 (build-system python-build-system)
90fc547f
RW
5349 (home-page "http://www.sympy.org/")
5350 (synopsis "Python library for symbolic mathematics")
5351 (description
5352 "SymPy is a Python library for symbolic mathematics. It aims to become a
5353full-featured computer algebra system (CAS) while keeping the code as simple
5354as possible in order to be comprehensible and easily extensible.")
3f641af0 5355 (license license:bsd-3)))
90fc547f
RW
5356
5357(define-public python2-sympy
5358 (package-with-python2 python-sympy))
5359
e8c9b010
SR
5360(define-public python-q
5361 (package
5362 (name "python-q")
5363 (version "2.6")
5364 (source
5365 (origin
5366 (method url-fetch)
5367 (uri (pypi-uri "q" version))
5368 (sha256
5369 (base32
5370 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5371 (build-system python-build-system)
5372 (home-page "https://github.com/zestyping/q")
5373 (synopsis "Quick-and-dirty debugging output for tired programmers")
5374 (description
5375 "q is a Python module for \"print\" style of debugging Python code. It
5376provides convenient short API for print out of values, tracebacks, and
5377falling into the Python interpreter.")
f210e944 5378 (license license:asl2.0)))
e8c9b010
SR
5379
5380(define-public python2-q
f210e944 5381 (package-with-python2 python-q))
e8c9b010 5382
a1920bc9
FB
5383(define-public python-testlib
5384 (package
5385 (name "python-testlib")
5386 (version "0.6.5")
5387 (source
5388 (origin
5389 (method url-fetch)
5390 (uri (string-append
5391 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5392 version ".zip"))
5393 (sha256
5394 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5395 (build-system python-build-system)
a1920bc9 5396 (native-inputs
632735f2 5397 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5398 (synopsis "Python micro test suite harness")
5399 (description "A micro unittest suite harness for Python.")
5400 (home-page "https://github.com/trentm/testlib")
1cb9c006 5401 (license license:expat)))
a1920bc9
FB
5402
5403(define-public python2-testlib
5404 (package-with-python2 python-testlib))
db62afa5
LC
5405
5406(define-public python2-xlib
5407 (package
5408 (name "python2-xlib")
5409 (version "0.14")
5410 (source (origin
5411 (method url-fetch)
de67e922
LF
5412 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5413 "/" version "/"
db62afa5
LC
5414 "python-xlib-" version ".tar.gz"))
5415 (sha256
5416 (base32
5417 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5418 (build-system python-build-system)
5419 (arguments
5420 `(#:python ,python-2 ;Python 2 only
5421 #:tests? #f)) ;no tests
db62afa5
LC
5422 (home-page "http://python-xlib.sourceforge.net/")
5423 (synopsis "Python X11 client library")
5424 (description
5425 "The Python X Library is intended to be a fully functional X client
5426library for Python programs. It is useful to implement low-level X clients.
5427It is written entirely in Python.")
3f641af0 5428 (license license:gpl2+)))
0234ca06
DT
5429
5430(define-public python-singledispatch
5431 (package
5432 (name "python-singledispatch")
5433 (version "3.4.0.3")
5434 (source
5435 (origin
5436 (method url-fetch)
bdb67d84 5437 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5438 (sha256
5439 (base32
5440 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5441 (build-system python-build-system)
5e1c9d24
HG
5442 (native-inputs
5443 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5444 (home-page
5445 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5446 (synopsis "Backport of singledispatch feature from Python 3.4")
5447 (description
5448 "This library brings functools.singledispatch from Python 3.4 to Python
54492.6-3.3.")
5450 (license license:expat)))
5451
5452(define-public python2-singledispatch
5453 (package-with-python2 python-singledispatch))
feaae484 5454
310d218f
RW
5455(define-public python-tornado
5456 (package
5457 (name "python-tornado")
a724924b 5458 (version "4.3")
310d218f
RW
5459 (source
5460 (origin
5461 (method url-fetch)
a724924b 5462 (uri (pypi-uri "tornado" version))
310d218f 5463 (sha256
a724924b 5464 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5465 (build-system python-build-system)
3fe2c209
MB
5466 (arguments
5467 '(;; FIXME: Two tests error out with:
5468 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5469 ;; #:phases
5470 ;; (modify-phases %standard-phases
5471 ;; (replace 'check
5472 ;; (lambda _
5473 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5474 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5475 ;; (zero? (system* "python" "-m" "tornado.test")))))
5476 #:tests? #f))
310d218f 5477 (native-inputs
b455439b 5478 `(("python-certifi" ,python-certifi)))
f22efa01 5479 (propagated-inputs
b455439b 5480 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5481 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5482 (synopsis "Python web framework and asynchronous networking library")
5483 (description
5484 "Tornado is a Python web framework and asynchronous networking library,
5485originally developed at FriendFeed. By using non-blocking network I/O,
5486Tornado can scale to tens of thousands of open connections, making it ideal
5487for long polling, WebSockets, and other applications that require a long-lived
5488connection to each user.")
3f641af0 5489 (license license:asl2.0)
b455439b 5490 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5491
5492(define-public python2-tornado
b455439b 5493 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5494 (package (inherit tornado)
f22efa01 5495 (propagated-inputs
310d218f
RW
5496 `(("python2-backport-ssl-match-hostname"
5497 ,python2-backport-ssl-match-hostname)
b455439b 5498 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5499 ,@(package-propagated-inputs tornado))))))
310d218f 5500
6b59fc10
EF
5501;; the python- version can be removed with python-3.5
5502(define-public python-backports-abc
5503 (package
5504 (name "python-backports-abc")
5505 (version "0.4")
5506 (source
5507 (origin
5508 (method url-fetch)
5509 (uri (pypi-uri "backports_abc" version))
5510 (sha256
5511 (base32
5512 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5513 (build-system python-build-system)
6b59fc10 5514 (home-page "https://github.com/cython/backports_abc")
66e07664 5515 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5516 (description
5517 "Python-backports-abc provides a backport of additions to the
5518'collections.abc' module in Python-3.5.")
3f641af0 5519 (license license:psfl)))
6b59fc10
EF
5520
5521(define-public python2-backports-abc
5522 (package-with-python2 python-backports-abc))
5523
feaae484
SB
5524(define-public python-waf
5525 (package
5526 (name "python-waf")
7dd55dfe 5527 (version "1.9.5")
feaae484
SB
5528 (source (origin
5529 (method url-fetch)
bae67829 5530 (uri (string-append "https://waf.io/"
feaae484
SB
5531 "waf-" version ".tar.bz2"))
5532 (sha256
5533 (base32
7dd55dfe 5534 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5535 (build-system python-build-system)
5536 (arguments
5537 '(#:phases
5538 (modify-phases %standard-phases
5539 (replace 'build
7dd55dfe
EF
5540 (lambda _
5541 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5542 (replace 'check
7dd55dfe
EF
5543 (lambda _
5544 (zero? (system* "python" "waf" "--version"))))
feaae484 5545 (replace 'install
7dd55dfe
EF
5546 (lambda _
5547 (copy-file "waf" %output))))))
5548 (home-page "http://waf.io/")
feaae484
SB
5549 (synopsis "Python-based build system")
5550 (description
5551 "Waf is a Python-based framework for configuring, compiling and installing
5552applications.")
3f641af0 5553 (license license:bsd-3)))
feaae484
SB
5554
5555(define-public python2-waf
5556 (package-with-python2 python-waf))
45203542
RW
5557
5558(define-public python-pyzmq
5559 (package
5560 (name "python-pyzmq")
3655ee76 5561 (version "15.1.0")
45203542
RW
5562 (source
5563 (origin
5564 (method url-fetch)
3655ee76 5565 (uri (pypi-uri "pyzmq" version))
45203542 5566 (sha256
3655ee76 5567 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5568 (build-system python-build-system)
5569 (arguments
5570 `(#:configure-flags
5571 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5572 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5573 ;; --inplace' for 'python setup.py test' to work.
5574 #:tests? #f))
5575 (inputs
5576 `(("zeromq" ,zeromq)))
5577 (native-inputs
5578 `(("pkg-config" ,pkg-config)
f3b98f4f 5579 ("python-nose" ,python-nose)))
45203542
RW
5580 (home-page "http://github.com/zeromq/pyzmq")
5581 (synopsis "Python bindings for 0MQ")
5582 (description
5583 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5584 (license license:bsd-4)))
45203542
RW
5585
5586(define-public python2-pyzmq
5587 (package-with-python2 python-pyzmq))
d889e6c4
CR
5588
5589(define-public python-pep8
5590 (package
5591 (name "python-pep8")
db251311 5592 (version "1.7.0")
d889e6c4
CR
5593 (source
5594 (origin
5595 (method url-fetch)
db251311 5596 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5597 (sha256
5598 (base32
db251311 5599 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5600 (build-system python-build-system)
d889e6c4
CR
5601 (home-page "http://pep8.readthedocs.org/")
5602 (synopsis "Python style guide checker")
5603 (description
5604 "This tools checks Python code against some of the style conventions in
5605PEP 8.")
5606 (license license:expat)))
5607
5608(define-public python2-pep8
5609 (package-with-python2 python-pep8))
e31d7f44
CR
5610
5611(define-public python-pyflakes
5612 (package
5613 (name "python-pyflakes")
2abc3972 5614 (version "1.0.0")
e31d7f44
CR
5615 (source
5616 (origin
5617 (method url-fetch)
2abc3972 5618 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5619 (sha256
5620 (base32
2abc3972 5621 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5622 (build-system python-build-system)
e31d7f44
CR
5623 (home-page
5624 "https://github.com/pyflakes/pyflakes")
5625 (synopsis "Passive checker of Python programs")
5626 (description
5627 "Pyflakes statically checks Python source code for common errors.")
5628 (license license:expat)))
a59e017c 5629
7261d9eb
CR
5630(define-public python2-pyflakes
5631 (package-with-python2 python-pyflakes))
5632
a59e017c
CR
5633(define-public python-mccabe
5634 (package
5635 (name "python-mccabe")
c6ebd40d 5636 (version "0.4.0")
a59e017c
CR
5637 (source
5638 (origin
5639 (method url-fetch)
c6ebd40d 5640 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5641 (sha256
5642 (base32
c6ebd40d 5643 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5644 (build-system python-build-system)
328bb95d 5645 (native-inputs
c6ebd40d 5646 `(("python-pytest" ,python-pytest)
f3b98f4f 5647 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5648 (home-page "https://github.com/flintwork/mccabe")
5649 (synopsis "McCabe checker, plugin for flake8")
5650 (description
5651 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5652complexity of Python source code.")
7362371d 5653 (license license:expat)))
a59e017c
CR
5654
5655(define-public python2-mccabe
5656 (package-with-python2 python-mccabe))
e8df8f47 5657
7477fbb1
CR
5658(define-public python-mccabe-0.2.1
5659 (package (inherit python-mccabe)
5660 (version "0.2.1")
5661 (source
5662 (origin
5663 (method url-fetch)
5664 (uri (pypi-uri "mccabe" version))
5665 (sha256
5666 (base32
f3b98f4f 5667 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5668
5669(define-public python2-mccabe-0.2.1
5670 (package-with-python2 python-mccabe-0.2.1))
5671
e8df8f47
CR
5672;; Flake8 2.4.1 requires an older version of pep8.
5673;; This should be removed ASAP.
5674(define-public python-pep8-1.5.7
5675 (package (inherit python-pep8)
5676 (version "1.5.7")
5677 (source
5678 (origin
5679 (method url-fetch)
5680 (uri (string-append
5681 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5682 version
5683 ".tar.gz"))
5684 (sha256
5685 (base32
5686 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5687
5688(define-public python2-pep8-1.5.7
5689 (package-with-python2 python-pep8-1.5.7))
5690
5691;; Flake8 2.4.1 requires an older version of pyflakes.
5692;; This should be removed ASAP.
5693(define-public python-pyflakes-0.8.1
5694 (package (inherit python-pyflakes)
5695 (version "0.8.1")
5696 (source
5697 (origin
5698 (method url-fetch)
5699 (uri (string-append
5700 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5701 version
5702 ".tar.gz"))
5703 (sha256
5704 (base32
5705 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5706
5707(define-public python2-pyflakes-0.8.1
7261d9eb 5708 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5709
5710(define-public python-flake8
5711 (package
5712 (name "python-flake8")
43789136 5713 (version "2.5.4")
e8df8f47
CR
5714 (source
5715 (origin
5716 (method url-fetch)
1b995533 5717 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5718 (sha256
5719 (base32
011271c7
HG
5720 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5721 (modules '((guix build utils)))
5722 (snippet
5723 '(begin
5724 ;; Remove pre-compiled .pyc files from source.
5725 (for-each delete-file-recursively
5726 (find-files "." "__pycache__" #:directories? #t))
5727 (for-each delete-file (find-files "." "\\.pyc$"))
5728 #t))))
e8df8f47 5729 (build-system python-build-system)
482d9591 5730 (propagated-inputs
f3b98f4f 5731 `(("python-pep8" ,python-pep8)
43789136 5732 ("python-pyflakes" ,python-pyflakes)
482d9591 5733 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5734 (native-inputs
5735 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5736 ("python-nose" ,python-nose)))
5737 (home-page "https://gitlab.com/pycqa/flake8")
5738 (synopsis
5739 "The modular source code checker: pep8, pyflakes and co")
5740 (description
5741 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5742 (license license:expat)))
5743
5744(define-public python2-flake8
5745 (package-with-python2 python-flake8))
61b9ac53 5746
abf21efc
CR
5747;; This will only be needed by the python-hacking package and will not be
5748;; necessary once python-hacking > 0.10.2 is released.
5749(define-public python-flake8-2.2.4
5750 (package (inherit python-flake8)
482d9591 5751 (propagated-inputs
f3b98f4f 5752 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5753 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5754 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5755 (native-inputs
482d9591 5756 `(("python-mock" ,python-mock)
abf21efc
CR
5757 ("python-nose" ,python-nose)))
5758 (version "2.2.4")
5759 (source
5760 (origin
5761 (method url-fetch)
5762 (uri (pypi-uri "flake8" version))
5763 (sha256
5764 (base32
b9c8ccce
HG
5765 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5766 (modules '((guix build utils)))
5767 (snippet
5768 '(begin
5769 ;; Remove pre-compiled .pyc files from source.
5770 (for-each delete-file-recursively
5771 (find-files "." "__pycache__" #:directories? #t))
5772 (for-each delete-file (find-files "." "\\.pyc$"))
5773 #t))))))
abf21efc
CR
5774
5775(define-public python2-flake8-2.2.4
5776 (package-with-python2 python-flake8-2.2.4))
5777
61b9ac53
FB
5778(define-public python-mistune
5779 (package
5780 (name "python-mistune")
5781 (version "0.7")
5782 (source
5783 (origin
5784 (method url-fetch)
5785 (uri (string-append
5786 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5787 version
5788 ".tar.gz"))
5789 (sha256
5790 (base32
5791 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5792 (build-system python-build-system)
328bb95d 5793 (native-inputs
f3b98f4f 5794 `(("python-nose" ,python-nose)
61b9ac53
FB
5795 ("python-cython" ,python-cython)))
5796 (home-page "https://github.com/lepture/mistune")
5797 (synopsis "Markdown parser in pure Python")
5798 (description "This package provides a fast markdown parser in pure
5799Python.")
3f641af0 5800 (license license:bsd-3)))
61b9ac53
FB
5801
5802(define-public python2-mistune
5803 (package-with-python2 python-mistune))
6d992d07 5804
b9893908
EE
5805(define-public python-markdown
5806 (package
5807 (name "python-markdown")
5808 (version "2.6.5")
5809 (source
5810 (origin
5811 (method url-fetch)
5812 (uri (pypi-uri "Markdown" version))
5813 (sha256
5814 (base32
5815 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5816 (build-system python-build-system)
5817 (arguments
5818 `(#:phases
5819 (modify-phases %standard-phases
5820 (replace 'check
5821 (lambda _
5822 (zero? (system* "python" "run-tests.py")))))))
5823 (native-inputs
5824 `(("python-nose" ,python-nose)
5825 ("python-pyyaml" ,python-pyyaml)))
5826 (home-page "https://pythonhosted.org/Markdown/")
5827 (synopsis "Python implementation of Markdown")
5828 (description
5829 "This package provides a Python implementation of John Gruber's
5830Markdown. The library features international input, various Markdown
5831extensions, and several HTML output formats. A command line wrapper
5832markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5833 (license license:bsd-3)))
b9893908
EE
5834
5835(define-public python2-markdown
5836 (package-with-python2 python-markdown))
5837
6d992d07
FB
5838(define-public python-ptyprocess
5839 (package
5840 (name "python-ptyprocess")
5841 (version "0.5")
5842 (source
5843 (origin
5844 (method url-fetch)
5845 (uri (string-append
5846 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5847 version ".tar.gz"))
5848 (sha256
5849 (base32
5850 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5851 (build-system python-build-system)
328bb95d 5852 (native-inputs
f3b98f4f 5853 `(("python-nose" ,python-nose)))
6d992d07
FB
5854 (arguments
5855 `(#:phases
5856 (modify-phases %standard-phases
5857 (replace 'check
5858 (lambda _
5859 (zero? (system* "nosetests")))))))
5860 (home-page "https://github.com/pexpect/ptyprocess")
5861 (synopsis "Run a subprocess in a pseudo terminal")
5862 (description
5863 "This package provides a Python library used to launch a subprocess in a
5864pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5865 (license license:isc)))
6d992d07
FB
5866
5867(define-public python2-ptyprocess
5868 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5869
5870(define-public python-terminado
5871 (package
5872 (name "python-terminado")
783fb0a3 5873 (version "0.6")
4aadb1df
FB
5874 (source
5875 (origin
5876 (method url-fetch)
783fb0a3 5877 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5878 (sha256
5879 (base32
783fb0a3 5880 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5881 (build-system python-build-system)
5882 (propagated-inputs
5883 `(("python-tornado" ,python-tornado)
5884 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5885 (native-inputs
5886 `(("python-nose" ,python-nose)))
4aadb1df
FB
5887 (arguments
5888 `(#:phases
5889 (modify-phases %standard-phases
5890 (replace 'check
5891 (lambda _
5892 (zero? (system* "nosetests")))))))
5893 (home-page "https://github.com/takluyver/terminado")
5894 (synopsis "Terminals served to term.js using Tornado websockets")
5895 (description "This package provides a Tornado websocket backend for the
5896term.js Javascript terminal emulator library.")
3f641af0 5897 (license license:bsd-2)
783fb0a3 5898 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5899
5900(define-public python2-terminado
783fb0a3 5901 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5902 (package (inherit terminado)
783fb0a3
EF
5903 (propagated-inputs
5904 `(("python2-backport-ssl-match-hostname"
5905 ,python2-backport-ssl-match-hostname)
00e10c6e 5906 ,@(package-propagated-inputs terminado))))))
5faa5ce4 5907
d582eaac
SB
5908(define-public python-fonttools
5909 (package
5910 (name "python-fonttools")
5911 (version "2.5")
5912 (source (origin
5913 (method url-fetch)
5914 (uri (string-append
5915 "https://pypi.python.org/packages/source/F/FontTools/"
5916 "fonttools-" version ".tar.gz"))
5917 (sha256
5918 (base32
5919 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5920 (build-system python-build-system)
9e8c6a37
HG
5921 (arguments
5922 '(#:test-target "check"
5923 #:phases
5924 (modify-phases %standard-phases
5925 (add-after 'unpack 'patch-setuppy
5926 ;; Remove the undocumented "extra_path" argument, which adds an
5927 ;; intervening directories between site-packages and the package
5928 ;; directory.
5929 (lambda _
5930 (substitute* "setup.py"
5931 (("^[ \t]*extra_path *= *'FontTools',") ""))
5932 #t)))))
d582eaac
SB
5933 (home-page "http://github.com/behdad/fonttools")
5934 (synopsis "Tools to manipulate font files")
5935 (description
5936 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 5937supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
5938of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5939also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5940from an XML-based format.")
3f641af0
DC
5941 (license (license:non-copyleft
5942 "file://LICENSE.txt"
5943 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5944
5945(define-public python2-fonttools
5946 (package-with-python2 python-fonttools))
75710da6 5947
5faa5ce4
RW
5948(define-public python-ly
5949 (package
5950 (name "python-ly")
5135354f 5951 (version "0.9.4")
5faa5ce4
RW
5952 (source
5953 (origin
5954 (method url-fetch)
5135354f
RW
5955 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5956 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5957 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5958 (sha256
5959 (base32
5135354f 5960 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 5961 (build-system python-build-system)
5faa5ce4
RW
5962 (synopsis "Tool and library for manipulating LilyPond files")
5963 (description "This package provides a Python library to parse, manipulate
5964or create documents in LilyPond format. A command line program ly is also
5965provided that can be used to do various manipulations with LilyPond files.")
5966 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5967 (license license:gpl2+)))
7e7b27d9
CR
5968
5969(define-public python-appdirs
5970 (package
5971 (name "python-appdirs")
5972 (version "1.4.0")
5973 (source
5974 (origin
5975 (method url-fetch)
5976 (uri (string-append
5977 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5978 version
5979 ".tar.gz"))
5980 (sha256
5981 (base32
5982 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5983 (build-system python-build-system)
7e7b27d9
CR
5984 (home-page "http://github.com/ActiveState/appdirs")
5985 (synopsis
5986 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5987 (description
5988 "This module provides a portable way of finding out where user data
5989should be stored on various operating systems.")
5990 (license license:expat)))
5991
5992(define-public python2-appdirs
5993 (package-with-python2 python-appdirs))
89b2e0b0
LF
5994
5995(define-public python-llfuse
5996 (package
5997 (name "python-llfuse")
e36ace36 5998 (version "1.1.1")
89b2e0b0
LF
5999 (source (origin
6000 (method url-fetch)
6001 (uri (string-append
6002 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6003 "llfuse-" version ".tar.bz2"))
6004 (sha256
6005 (base32
e36ace36 6006 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6007 (build-system python-build-system)
6008 (inputs
6009 `(("fuse" ,fuse)
6010 ("attr" ,attr)))
6011 (native-inputs
f3b98f4f 6012 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6013 (synopsis "Python bindings for FUSE")
6014 (description
6015 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6016 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6017 (license license:lgpl2.0+)
cd0569c4 6018 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6019
6020(define-public python2-llfuse
cd0569c4
LF
6021 (package (inherit (package-with-python2
6022 (strip-python2-variant python-llfuse)))
6023 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6024
6025;; For attic-0.16
6026(define-public python-llfuse-0.41
6027 (package (inherit python-llfuse)
229b3661 6028 (version "0.41.1")
cd0569c4
LF
6029 (source (origin
6030 (method url-fetch)
6031 (uri (string-append
6032 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6033 "llfuse-" version ".tar.bz2"))
6034 (sha256
6035 (base32
229b3661 6036 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6037 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6038 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6039 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6040
6041(define-public python-msgpack
6042 (package
6043 (name "python-msgpack")
aed625bd 6044 (version "0.4.8")
641c9871
LF
6045 (source (origin
6046 (method url-fetch)
ae831df4 6047 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6048 (sha256
6049 (base32
aed625bd 6050 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6051 (build-system python-build-system)
641c9871
LF
6052 (synopsis "MessagePack (de)serializer")
6053 (description "MessagePack is a fast, compact binary serialization format,
6054suitable for similar data to JSON. This package provides CPython bindings for
6055reading and writing MessagePack data.")
6056 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6057 (license license:asl2.0)))
bd74be7b
LF
6058
6059(define-public python2-msgpack
f210e944 6060 (package-with-python2 python-msgpack))
641c9871 6061
6e5e39f4
CR
6062(define-public python-netaddr
6063 (package
6064 (name "python-netaddr")
6065 (version "0.7.18")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (string-append
6070 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6071 version
6072 ".tar.gz"))
6073 (sha256
6074 (base32
6075 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6076 (build-system python-build-system)
6077 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6078 (home-page "https://github.com/drkjam/netaddr/")
6079 (synopsis "Pythonic manipulation of network addresses")
6080 (description
6081 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6082and MAC network addresses.")
3f641af0 6083 (license license:bsd-3)))
6e5e39f4
CR
6084
6085(define-public python2-netaddr
6086 (package-with-python2 python-netaddr))
8c692a52
CR
6087
6088(define-public python-wrapt
6089 (package
6090 (name "python-wrapt")
6091 (version "1.10.5")
6092 (source
6093 (origin
6094 (method url-fetch)
6095 (uri (string-append
6096 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6097 version
6098 ".tar.gz"))
6099 (sha256
6100 (base32
6101 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6102 (build-system python-build-system)
6103 (arguments
6104 ;; Tests are not included in the tarball, they are only available in the
6105 ;; git repository.
6106 `(#:tests? #f))
8c692a52
CR
6107 (home-page "https://github.com/GrahamDumpleton/wrapt")
6108 (synopsis "Module for decorators, wrappers and monkey patching")
6109 (description
6110 "The aim of the wrapt module is to provide a transparent object proxy for
6111 Python, which can be used as the basis for the construction of function
6112 wrappers and decorator functions.")
3f641af0 6113 (license license:bsd-2)))
8c692a52
CR
6114
6115(define-public python2-wrapt
6116 (package-with-python2 python-wrapt))
b85c85be
CR
6117
6118(define-public python-iso8601
6119 (package
6120 (name "python-iso8601")
fe84bc9a 6121 (version "0.1.11")
b85c85be
CR
6122 (source
6123 (origin
6124 (method url-fetch)
fe84bc9a 6125 (uri (pypi-uri "iso8601" version))
b85c85be 6126 (sha256
fe84bc9a
EF
6127 (base32
6128 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6129 (build-system python-build-system)
b85c85be
CR
6130 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6131 (synopsis "Module to parse ISO 8601 dates")
6132 (description
6133 "This module parses the most common forms of ISO 8601 date strings (e.g.
6134@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6135 (license license:expat)))
6136
6137(define-public python2-iso8601
6138 (package-with-python2 python-iso8601))
5e412b63
CR
6139
6140(define-public python-monotonic
6141 (package
6142 (name "python-monotonic")
6143 (version "0.3")
6144 (source
6145 (origin
6146 (method url-fetch)
6147 (uri (string-append
6148 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6149 version
6150 ".tar.gz"))
6151 (sha256
6152 (base32
6153 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6154 (build-system python-build-system)
5e412b63
CR
6155 (home-page "https://github.com/atdt/monotonic")
6156 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6157 (description
6158 "This module provides a monotonic() function which returns the value (in
6159fractional seconds) of a clock which never goes backwards.")
3f641af0 6160 (license license:asl2.0)))
5e412b63
CR
6161
6162(define-public python2-monotonic
6163 (package-with-python2 python-monotonic))
de34afac
CR
6164
6165(define-public python-webob
6166 (package
6167 (name "python-webob")
b8834c21 6168 (version "1.5.1")
de34afac
CR
6169 (source
6170 (origin
6171 (method url-fetch)
b8834c21 6172 (uri (pypi-uri "WebOb" version))
de34afac
CR
6173 (sha256
6174 (base32
b8834c21 6175 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6176 (build-system python-build-system)
328bb95d 6177 (native-inputs
f3b98f4f 6178 `(("python-nose" ,python-nose)))
de34afac
CR
6179 (home-page "http://webob.org/")
6180 (synopsis "WSGI request and response object")
6181 (description
6182 "WebOb provides wrappers around the WSGI request environment, and an
6183object to help create WSGI responses.")
6184 (license license:expat)))
6185
6186(define-public python2-webob
6187 (package-with-python2 python-webob))
350ba0a3 6188
02a8a187
BW
6189(define-public python-xlrd
6190 (package
6191 (name "python-xlrd")
c2ad4d70 6192 (version "1.0.0")
02a8a187
BW
6193 (source (origin
6194 (method url-fetch)
e775f48e 6195 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6196 (sha256
6197 (base32
c2ad4d70 6198 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6199 (build-system python-build-system)
6200 (arguments
6201 `(#:phases
6202 (modify-phases %standard-phases
c2ad4d70 6203 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6204 ;; run tests instead for now.
6205 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6206 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6207 (home-page "http://www.python-excel.org/")
6208 (synopsis "Library for extracting data from Excel files")
6209 (description "This packages provides a library to extract data from
c598e35c 6210spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6211@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6212Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6213 (license license:bsd-3)))
02a8a187
BW
6214
6215(define-public python2-xlrd
6216 (package-with-python2 python-xlrd))
6217
350ba0a3
CR
6218(define-public python-prettytable
6219 (package
6220 (name "python-prettytable")
6221 (version "0.7.2")
6222 (source
6223 (origin
6224 (method url-fetch)
6225 (uri (string-append
6226 "https://pypi.python.org/packages/source/P/PrettyTable/"
6227 "prettytable-" version ".tar.bz2"))
6228 (sha256
6229 (base32
6230 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6231 (build-system python-build-system)
350ba0a3
CR
6232 (home-page "http://code.google.com/p/prettytable/")
6233 (synopsis "Display tabular data in an ASCII table format")
6234 (description
6235 "A library designed to represent tabular data in visually appealing ASCII
6236tables. PrettyTable allows for selection of which columns are to be printed,
6237independent alignment of columns (left or right justified or centred) and
6238printing of sub-tables by specifying a row range.")
3f641af0 6239 (license license:bsd-3)))
350ba0a3
CR
6240
6241(define-public python2-prettytable
6242 (package-with-python2 python-prettytable))
7a8ac75a 6243
9f8ee3fe
RW
6244(define-public python-tables
6245 (package
6246 (name "python-tables")
6247 (version "3.2.2")
6248 (source
6249 (origin
6250 (method url-fetch)
6251 (uri (pypi-uri "tables" version))
6252 (sha256
6253 (base32
bac23672
HG
6254 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6255 (modules '((guix build utils)))
6256 (snippet
6257 '(begin
6258 ;; Remove pre-compiled .pyc files from source.
6259 (for-each delete-file-recursively
6260 (find-files "." "__pycache__" #:directories? #t))
6261 (for-each delete-file (find-files "." "\\.pyc$"))
6262 #t))))
9f8ee3fe
RW
6263 (build-system python-build-system)
6264 (arguments
6265 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6266 ;; or "check", so we must override the build and check phases.
6267 #:phases
6268 (modify-phases %standard-phases
6269 (add-after 'unpack 'use-gcc
6270 (lambda _
6271 (substitute* "setup.py"
6272 (("compiler = new_compiler\\(\\)" line)
6273 (string-append line
6274 "\ncompiler.set_executables(compiler='gcc',"
6275 "compiler_so='gcc',"
6276 "linker_exe='gcc',"
6277 "linker_so='gcc -shared')")))
6278 #t))
6279 (replace 'build
6280 (lambda* (#:key inputs #:allow-other-keys)
6281 (zero? (system* "python" "setup.py" "build"
6282 (string-append "--hdf5="
6283 (assoc-ref inputs "hdf5"))))))
6284 (replace 'check
6285 (lambda* (#:key inputs #:allow-other-keys)
6286 (zero? (system* "python" "setup.py" "check"
6287 (string-append "--hdf5="
6288 (assoc-ref inputs "hdf5")))))))))
6289 (propagated-inputs
6290 `(("python-numexpr" ,python-numexpr)
6291 ("python-numpy" ,python-numpy)))
6292 (native-inputs
f3b98f4f 6293 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6294 ("pkg-config" ,pkg-config)))
6295 (inputs
6296 `(("hdf5" ,hdf5)
6297 ("bzip2" ,bzip2)
6298 ("zlib" ,zlib)))
6299 (home-page "http://www.pytables.org/")
6300 (synopsis "Hierarchical datasets for Python")
6301 (description "PyTables is a package for managing hierarchical datasets and
6302designed to efficently cope with extremely large amounts of data.")
3f641af0 6303 (license license:bsd-3)))
9f8ee3fe
RW
6304
6305(define-public python2-tables
6306 (package-with-python2 python-tables))
6307
7a8ac75a
RW
6308(define-public python-pyasn1
6309 (package
6310 (name "python-pyasn1")
caa0edb3 6311 (version "0.1.9")
7a8ac75a
RW
6312 (source
6313 (origin
6314 (method url-fetch)
caa0edb3 6315 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6316 (sha256
6317 (base32
caa0edb3 6318 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6319 (build-system python-build-system)
6320 (home-page "http://pyasn1.sourceforge.net/")
6321 (synopsis "ASN.1 types and codecs")
6322 (description
6323 "This is an implementation of ASN.1 types and codecs in Python. It is
6324suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6325 (license license:bsd-2)))
7a8ac75a
RW
6326
6327(define-public python2-pyasn1
6328 (package-with-python2 python-pyasn1))
9a49a535 6329
5988c299
EF
6330(define-public python-pyasn1-modules
6331 (package
6332 (name "python-pyasn1-modules")
6333 (version "0.0.8")
6334 (source
6335 (origin
6336 (method url-fetch)
6337 (uri (pypi-uri "pyasn1-modules" version))
6338 (sha256
6339 (base32
6340 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6341 (build-system python-build-system)
5988c299
EF
6342 (propagated-inputs
6343 `(("python-pyasn1" ,python-pyasn1)))
6344 (home-page "http://sourceforge.net/projects/pyasn1/")
6345 (synopsis "ASN.1 codec implementations")
6346 (description
6347 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6348implementations of ASN.1-based codecs and protocols.")
3f641af0 6349 (license license:bsd-3)))
5988c299
EF
6350
6351(define-public python2-pyasn1-modules
6352 (package-with-python2 python-pyasn1-modules))
6353
520af157 6354(define-public python-ipaddress
9a49a535 6355 (package
520af157
DC
6356 (name "python-ipaddress")
6357 (version "1.0.16")
6358 (source (origin
6359 (method url-fetch)
6360 (uri (pypi-uri "ipaddress" version))
6361 (sha256
6362 (base32
6363 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6364 (build-system python-build-system)
9a49a535
RW
6365 (home-page "https://github.com/phihag/ipaddress")
6366 (synopsis "IP address manipulation library")
6367 (description
520af157
DC
6368 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6369 in Python. This library is used to create, poke at, and manipulate IPv4 and
6370 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6371 module to older versions of Python.")
f210e944 6372 (license license:psfl)))
520af157
DC
6373
6374(define-public python2-ipaddress
f210e944 6375 (package-with-python2 python-ipaddress))
3f00e078 6376
4a238186
HG
6377(define-public python2-ipaddr
6378 (package
6379 (name "python2-ipaddr")
6380 (version "2.1.11")
6381 (source
6382 (origin
6383 (method url-fetch)
6384 (uri (pypi-uri "ipaddr" version))
6385 (sha256
6386 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6387 (build-system python-build-system)
6388 (arguments
6389 `(#:python ,python-2 ;version 2 only
6390 #:phases
6391 (modify-phases %standard-phases
6392 (replace 'check
6393 (lambda* _
6394 (zero? (system* "python" "ipaddr_test.py")))))))
6395 (home-page "https://github.com/google/ipaddr-py")
6396 (synopsis "IP address manipulation library")
6397 (description
6398 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6399IPv6 addresses and networks.
6400
6401For new implementations you may prefer to use the standard module
6402@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6403versions of Python.")
3f641af0 6404 (license license:asl2.0)))
4a238186 6405
3f00e078
RW
6406(define-public python-idna
6407 (package
6408 (name "python-idna")
6409 (version "2.0")
6410 (source
6411 (origin
6412 (method url-fetch)
6413 (uri (string-append "https://pypi.python.org/packages/source/i/"
6414 "idna/idna-" version ".tar.gz"))
6415 (sha256
6416 (base32
6417 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6418 (build-system python-build-system)
3f00e078
RW
6419 (home-page "https://github.com/kjd/idna")
6420 (synopsis "Internationalized domain names in applications")
6421 (description
6422 "This is a library to support the Internationalised Domain Names in
6423Applications (IDNA) protocol as specified in RFC 5891. This version of the
6424protocol is often referred to as “IDNA2008” and can produce different results
6425from the earlier standard from 2003. The library is also intended to act as a
6426suitable drop-in replacement for the “encodings.idna” module that comes with
6427the Python standard library but currently only supports the older 2003
6428specification.")
3f641af0 6429 (license license:bsd-4)))
3f00e078
RW
6430
6431(define-public python2-idna
6432 (package-with-python2 python-idna))
36ebf972
RW
6433
6434(define-public python-pretend
6435 (package
6436 (name "python-pretend")
6437 (version "1.0.8")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (string-append "https://pypi.python.org/packages/source/p/"
6442 "pretend/pretend-" version ".tar.gz"))
6443 (sha256
6444 (base32
6445 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6446 (build-system python-build-system)
36ebf972
RW
6447 (home-page "https://github.com/alex/pretend")
6448 (synopsis "Library for stubbing in Python")
6449 (description
6450 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6451technique for writing tests. You may hear the term mixed up with mocks,
6452fakes, or doubles. Basically, a stub is an object that returns pre-canned
6453responses, rather than doing any computation.")
3f641af0 6454 (license license:bsd-3)))
36ebf972
RW
6455
6456(define-public python2-pretend
6457 (package-with-python2 python-pretend))
aa759a51
RW
6458
6459(define-public python-cryptography-vectors
6460 (package
6461 (name "python-cryptography-vectors")
a6c47905 6462 (version "1.6")
aa759a51
RW
6463 (source
6464 (origin
6465 (method url-fetch)
9c509ca9 6466 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6467 (sha256
6468 (base32
a6c47905 6469 "0xgn3yvlmv5rs92wgjj39qscr6s7mwbbsx7j683sfa6ijmyb1k01"))))
aa759a51 6470 (build-system python-build-system)
aa759a51 6471 (home-page "https://github.com/pyca/cryptography")
66e07664 6472 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6473 (description
6474 "This package contains test vectors for the cryptography package.")
6475 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6476 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6477
6478(define-public python2-cryptography-vectors
6479 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6480
6481(define-public python-cryptography
6482 (package
6483 (name "python-cryptography")
a6c47905 6484 (version "1.6")
88b47cb0
RW
6485 (source
6486 (origin
6487 (method url-fetch)
9c509ca9 6488 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6489 (sha256
6490 (base32
a6c47905 6491 "0gwvmz6w5ml0bjbgmdiscsv5i948lrjd381z7h9qkz6kr398c3ad"))))
88b47cb0 6492 (build-system python-build-system)
470613f9
LF
6493 (arguments
6494 `(#:phases
6495 (modify-phases %standard-phases
6496 (add-before 'check 'disable-failing-test
6497 (lambda _
6498 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6499 ;; versions of python-cryptography:
6500 ;; https://github.com/pyca/cryptography/issues/3196
6501 ;; TODO: Try re-enabling the test when upgrading
6502 ;; python-cryptography.
6503 (substitute* "tests/hazmat/backends/test_openssl.py"
6504 (("def test_numeric_string_x509_name_entry")
6505 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6506 #t)))))
88b47cb0
RW
6507 (inputs
6508 `(("openssl" ,openssl)))
6509 (propagated-inputs
6510 `(("python-cffi" ,python-cffi)
6511 ("python-six" ,python-six)
6512 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6513 ("python-idna" ,python-idna)
6514 ("python-iso8601" ,python-iso8601)))
6515 (native-inputs
6516 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6517 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6518 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6519 ("python-pyasn1" ,python-pyasn1)
6520 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6521 ("python-pytz" ,python-pytz)
6522 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6523 (home-page "https://github.com/pyca/cryptography")
6524 (synopsis "Cryptographic recipes and primitives for Python")
6525 (description
6526 "cryptography is a package which provides cryptographic recipes and
6527primitives to Python developers. It aims to be the “cryptographic standard
6528library” for Python. The package includes both high level recipes, and low
6529level interfaces to common cryptographic algorithms such as symmetric ciphers,
6530message digests and key derivation functions.")
6531 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6532 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6533 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6534
6535(define-public python2-cryptography
519e2f4f
LF
6536 (let ((crypto (package-with-python2
6537 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6538 (package (inherit crypto)
6539 (propagated-inputs
6540 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6541 ("python2-backport-ssl-match-hostname"
6542 ,python2-backport-ssl-match-hostname)
68f1cdec 6543 ("python2-enum34" ,python2-enum34)
88b47cb0 6544 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6545
6546(define-public python-pyopenssl
6547 (package
6548 (name "python-pyopenssl")
61684de2 6549 (version "16.2.0")
5af999b8
RW
6550 (source
6551 (origin
6552 (method url-fetch)
eb68d268 6553 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6554 (sha256
6555 (base32
61684de2 6556 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6557 (build-system python-build-system)
5af999b8
RW
6558 (propagated-inputs
6559 `(("python-cryptography" ,python-cryptography)
6560 ("python-six" ,python-six)))
6561 (inputs
6562 `(("openssl" ,openssl)))
5af999b8
RW
6563 (home-page "https://github.com/pyca/pyopenssl")
6564 (synopsis "Python wrapper module around the OpenSSL library")
6565 (description
6566 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6567library.")
3f641af0 6568 (license license:asl2.0)))
5af999b8
RW
6569
6570(define-public python2-pyopenssl
519e2f4f 6571 (package-with-python2 python-pyopenssl))
643725a1
CR
6572
6573(define-public python-pip
6574 (package
6575 (name "python-pip")
6fb54e3b 6576 (version "8.0.2")
643725a1
CR
6577 (source
6578 (origin
6579 (method url-fetch)
6fb54e3b 6580 (uri (pypi-uri "pip" version))
643725a1
CR
6581 (sha256
6582 (base32
6fb54e3b 6583 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1 6584 (build-system python-build-system)
05e2e4cf
HG
6585 (native-inputs
6586 `(;; Tests
6587 ("python-virtualenv" ,python-virtualenv)
643725a1
CR
6588 ("python-mock" ,python-mock)
6589 ("python-pytest" ,python-pytest)
6590 ("python-scripttest" ,python-scripttest)))
6591 (home-page "https://pip.pypa.io/")
6592 (synopsis
6593 "Package manager for Python software")
6594 (description
6595 "Pip is a package manager for Python software, that finds packages on the
6596Python Package Index (PyPI).")
6597 (license license:expat)))
6598
6599(define-public python2-pip
6600 (package-with-python2 python-pip))
d8c4998f
LC
6601
6602(define-public python-tlsh
6603 (package
6604 (name "python-tlsh")
99b00dc7 6605 (version "3.4.4")
d8c4998f
LC
6606 (home-page "https://github.com/trendmicro/tlsh")
6607 (source (origin
99b00dc7
EF
6608 (method url-fetch)
6609 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6610 version ".tar.gz"))
d8c4998f
LC
6611 (sha256
6612 (base32
99b00dc7
EF
6613 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6614 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6615 (build-system cmake-build-system)
6616 (arguments
6617 '(#:out-of-source? #f
6618 #:phases (modify-phases %standard-phases
6619 (replace
6620 'install
6621 (lambda* (#:key outputs #:allow-other-keys)
6622 ;; Build and install the Python bindings. The underlying
6623 ;; C++ library is apparently not meant to be installed.
6624 (let ((out (assoc-ref outputs "out")))
6625 (with-directory-excursion "py_ext"
6626 (and (system* "python" "setup.py" "build")
6627 (system* "python" "setup.py" "install"
6628 (string-append "--prefix=" out))))))))))
6629 (inputs `(("python" ,python-wrapper))) ;for the bindings
6630 (synopsis "Fuzzy matching library for Python")
6631 (description
6632 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6633Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6634value which can be used for similarity comparisons. Similar objects have
6635similar hash values, which allows for the detection of similar objects by
6636comparing their hash values. The byte stream should have a sufficient amount
6637of complexity; for example, a byte stream of identical bytes will not generate
6638a hash value.")
3f641af0 6639 (license license:asl2.0)))
d8c4998f
LC
6640
6641(define-public python2-tlsh
6642 (package
6643 (inherit python-tlsh)
6644 (name "python2-tlsh")
6645 (inputs `(("python" ,python-2)))))
d96034ed 6646
67f66812
BW
6647(define-public python-termcolor
6648 (package
6649 (name "python-termcolor")
6650 (version "1.1.0")
6651 (source
6652 (origin
6653 (method url-fetch)
6654 (uri (pypi-uri "python-termcolor" version))
6655 (sha256
6656 (base32
6657 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6658 (build-system python-build-system)
6659 (arguments
6660 ;; There are no tests.
6661 `(#:tests? #f))
6662 (home-page "http://pypi.python.org/pypi/termcolor")
6663 (synopsis "ANSII Color formatting for terminal output")
6664 (description
6665 "This package provides ANSII Color formatting for output in terminals.")
6666 (license license:expat)))
6667
6668(define-public python2-termcolor
6669 (package-with-python2 python-termcolor))
6670
d96034ed
LC
6671(define-public python-libarchive-c
6672 (package
6673 (name "python-libarchive-c")
03fd001c 6674 (version "2.2")
d96034ed
LC
6675 (source (origin
6676 (method url-fetch)
03fd001c 6677 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6678 (sha256
6679 (base32
03fd001c 6680 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6681 (build-system python-build-system)
6682 (arguments
6683 '(#:phases (modify-phases %standard-phases
6684 (add-before
6685 'build 'reference-libarchive
6686 (lambda* (#:key inputs #:allow-other-keys)
6687 ;; Retain the absolute file name of libarchive.so.
6688 (let ((libarchive (assoc-ref inputs "libarchive")))
6689 (substitute* "libarchive/ffi.py"
6690 (("find_library\\('archive'\\)")
6691 (string-append "'" libarchive
b41a05ce 6692 "/lib/libarchive.so'")))))))))
d96034ed 6693 (inputs
f3b98f4f 6694 `(("libarchive" ,libarchive)))
d96034ed
LC
6695 (home-page "https://github.com/Changaco/python-libarchive-c")
6696 (synopsis "Python interface to libarchive")
6697 (description
6698 "This package provides Python bindings to libarchive, a C library to
6699access possibly compressed archives in many different formats. It uses
6700Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6701 (license license:lgpl2.0+)))
d96034ed
LC
6702
6703(define-public python2-libarchive-c
6704 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6705
6706(define-public python-file
6707 (package
6708 (inherit file)
6709 (name "python-file")
7ffa5d4a
LF
6710 (source (origin
6711 (inherit (package-source file))
6712 ;; This patch should not be applied to python2-file.
6713 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6714 (build-system python-build-system)
6715 (arguments
6716 '(#:tests? #f ;no tests
00bf74be 6717 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6718 #:phases (modify-phases %standard-phases
6719 (add-before 'build 'change-directory
6720 (lambda _
6721 (chdir "python")
6722 #t))
6723 (add-before 'build 'set-library-file-name
6724 (lambda* (#:key inputs #:allow-other-keys)
6725 (let ((file (assoc-ref inputs "file")))
6726 (substitute* "magic.py"
6727 (("find_library\\('magic'\\)")
6728 (string-append "'" file "/lib/libmagic.so'")))
6729 #t))))))
6730 (inputs `(("file" ,file)))
6731 (self-native-input? #f)
daeeea71
CM
6732 (synopsis "Python bindings to the libmagic file type guesser. Note that
6733this module and the python-magic module both provide a \"magic.py\" file;
6734these two modules, which are different and were developed separately, both
f210e944 6735serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6736
6737(define-public python2-file
f210e944 6738 (package-with-python2 python-file))
85d4aeac
LC
6739
6740(define-public python-debian
6741 (package
6742 (name "python-debian")
6743 (version "0.1.23")
6744 (source
6745 (origin
6746 (method url-fetch)
6747 (uri (string-append
6748 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6749 version ".tar.gz"))
6750 (sha256
6751 (base32
6752 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6753 (build-system python-build-system)
f22efa01 6754 (propagated-inputs
85d4aeac 6755 `(("python-six" ,python-six)))
85d4aeac
LC
6756 (home-page "http://packages.debian.org/sid/python-debian")
6757 (synopsis "Debian package related modules")
6758 (description
5c7bdc9a
LC
6759 ;; XXX: Use @enumerate instead of @itemize to work around
6760 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6761 "This package provides Python modules that abstract many formats of
6762Debian-related files, such as:
6763
5c7bdc9a 6764@enumerate
85d4aeac
LC
6765@item Debtags information;
6766@item @file{debian/changelog} files;
6767@item packages files, pdiffs;
6768@item control files of single or multiple RFC822-style paragraphs---e.g.
6769 @file{debian/control}, @file{.changes}, @file{.dsc};
6770@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6771 contained files and meta-information.
5c7bdc9a 6772@end enumerate\n")
85d4aeac
LC
6773
6774 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6775 (license license:gpl3+)))
85d4aeac
LC
6776
6777(define-public python2-debian
6778 (package-with-python2 python-debian))
816a6538 6779
2d321bb2
RW
6780(define-public python-nbformat
6781 (package
6782 (name "python-nbformat")
6783 (version "4.1.0")
6784 (source
6785 (origin
6786 (method url-fetch)
6787 (uri (pypi-uri "nbformat" version))
6788 (sha256
6789 (base32
6790 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6791 (build-system python-build-system)
6792 (arguments `(#:tests? #f)) ; no test target
6793 (propagated-inputs
6794 `(("python-ipython-genutils" ,python-ipython-genutils)
6795 ("python-jsonschema" ,python-jsonschema)
6796 ("python-jupyter-core" ,python-jupyter-core)
6797 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6798 (home-page "http://jupyter.org")
6799 (synopsis "Jupyter Notebook format")
6800 (description "This package provides the reference implementation of the
6801Jupyter Notebook format and Python APIs for working with notebooks.")
6802 (license license:bsd-3)))
6803
6804(define-public python2-nbformat
6805 (package-with-python2 python-nbformat))
6806
55436048
RW
6807(define-public python-bleach
6808 (package
6809 (name "python-bleach")
6810 (version "1.4.3")
6811 (source
6812 (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "bleach" version))
6815 (sha256
6816 (base32
6817 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6818 (build-system python-build-system)
6819 (propagated-inputs
6820 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6821 ("python-six" ,python-six)))
6822 (native-inputs
6823 `(("python-nose" ,python-nose)))
6824 (home-page "http://github.com/jsocol/bleach")
6825 (synopsis "Whitelist-based HTML-sanitizing tool")
6826 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6827 (license license:asl2.0)))
6828
6829(define-public python2-bleach
6830 (package-with-python2 python-bleach))
6831
60590a3a
RW
6832(define-public python-entrypoints
6833 (package
6834 (name "python-entrypoints")
6835 (version "0.2.2")
6836 (source
6837 (origin
6838 (method url-fetch)
6839 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6840 version ".tar.gz"))
6841 (file-name (string-append name "-" version ".tar.gz"))
6842 (sha256
6843 (base32
6844 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6845 (build-system python-build-system)
6846 ;; The package does not come with a setup.py file, so we have to generate
6847 ;; one ourselves.
6848 (arguments
6849 `(#:tests? #f
6850 #:phases
6851 (modify-phases %standard-phases
6852 (add-after 'unpack 'create-setup.py
6853 (lambda _
6854 (call-with-output-file "setup.py"
6855 (lambda (port)
6856 (format port "\
6857from setuptools import setup
6858setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6859" ,version))))))))
6860 (home-page "https://github.com/takluyver/entrypoints")
6861 (synopsis "Discover and load entry points from installed Python packages")
6862 (description "Entry points are a way for Python packages to advertise
6863objects with some common interface. The most common examples are
6864@code{console_scripts} entry points, which define shell commands by
6865identifying a Python function to run. The @code{entrypoints} module contains
6866functions to find and load entry points.")
6867 (license license:expat)))
6868
6869(define-public python2-entrypoints
6870 (package-with-python2 python-entrypoints))
6871
c60898a8
RW
6872(define-public python-nbconvert
6873 (package
6874 (name "python-nbconvert")
6875 (version "5.0.0b1")
6876 (source
6877 (origin
6878 (method url-fetch)
6879 (uri (pypi-uri "nbconvert" version))
6880 (sha256
6881 (base32
6882 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6883 (build-system python-build-system)
6884 ;; The "bdist_egg" target is disabled by default, causing the installation
6885 ;; to fail.
6886 (arguments `(#:configure-flags (list "bdist_egg")))
6887 (propagated-inputs
6888 `(("python-bleach" ,python-bleach)
6889 ("python-entrypoints" ,python-entrypoints)
6890 ("python-jinja2" ,python-jinja2)
6891 ("python-jupyter-core" ,python-jupyter-core)
6892 ("python-mistune" ,python-mistune)
6893 ("python-nbformat" ,python-nbformat)
6894 ("python-pygments" ,python-pygments)
c60898a8
RW
6895 ("python-traitlets" ,python-traitlets)))
6896 (home-page "http://jupyter.org")
6897 (synopsis "Converting Jupyter Notebooks")
6898 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6899notebooks to various other formats via Jinja templates. It allows you to
6900convert an @code{.ipynb} notebook file into various static formats including:
6901
6902@enumerate
6903@item HTML
6904@item LaTeX
6905@item PDF
6906@item Reveal JS
6907@item Markdown (md)
6908@item ReStructured Text (rst)
6909@item executable script
6910@end enumerate\n")
6911 (license license:bsd-3)))
6912
6913(define-public python2-nbconvert
6914 (package-with-python2 python-nbconvert))
6915
a0d62280
RW
6916(define-public python-notebook
6917 (package
6918 (name "python-notebook")
6919 (version "4.2.3")
6920 (source (origin
6921 (method url-fetch)
6922 (uri (pypi-uri "notebook" version))
6923 (sha256
6924 (base32
6925 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6926 (build-system python-build-system)
6927 (arguments
6928 `(#:phases
6929 (modify-phases %standard-phases
6930 (replace 'check
6931 (lambda _
6932 ;; HOME must be set for tests
6933 (setenv "HOME" "/tmp")
6934 (zero? (system* "nosetests")))))))
6935 (propagated-inputs
6936 `(("python-jupyter-core" ,python-jupyter-core)
6937 ("python-nbformat" ,python-nbformat)
6938 ("python-nbconvert" ,python-nbconvert)
6939 ("python-ipython" ,python-ipython)))
6940 (native-inputs
6941 `(("python-nose" ,python-nose)
6942 ("python-sphinx" ,python-sphinx)
6943 ("python-requests" ,python-requests)))
6944 (home-page "http://jupyter.org/")
6945 (synopsis "Web-based notebook environment for interactive computing")
6946 (description
6947 "The Jupyter HTML notebook is a web-based notebook environment for
6948interactive computing.")
3a735ecf 6949 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
6950 (license license:bsd-3)))
6951
6952(define-public python2-notebook
3a735ecf
HG
6953 (let ((base (package-with-python2
6954 (strip-python2-variant python-notebook))))
6955 (package (inherit base)
6956 (native-inputs
6957 `(("python2-mock" ,python2-mock)
6958 ,@(package-native-inputs base)))
6959 (arguments
6960 (substitute-keyword-arguments (package-arguments base)
6961 ((#:phases phases)
6962 `(modify-phases ,phases
6963 (add-before 'check 'disable-test-case
6964 ;; The test requires network access to localhost. Curiously it
6965 ;; fails with Python 2 only. Simply make the test-case return
6966 ;; immediately.
6967 (lambda _
6968 (substitute*
6969 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6970 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 6971
d55724ed
RW
6972(define-public python-widgetsnbextension
6973 (package
6974 (name "python-widgetsnbextension")
6975 (version "1.2.6")
6976 (source
6977 (origin
6978 (method url-fetch)
6979 (uri (pypi-uri "widgetsnbextension" version))
6980 (sha256
6981 (base32
6982 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6983 (build-system python-build-system)
6984 (propagated-inputs
6985 `(("python-notebook" ,python-notebook)))
6986 (native-inputs
f3b98f4f 6987 `(("python-nose" ,python-nose)))
d55724ed
RW
6988 (home-page "http://ipython.org")
6989 (synopsis "IPython HTML widgets for Jupyter")
6990 (description "This package provides interactive HTML widgets for Jupyter
6991notebooks.")
6992 (license license:bsd-3)))
6993
6994(define-public python2-widgetsnbextension
6995 (package-with-python2 python-widgetsnbextension))
6996
4fe2e344
RW
6997(define-public python-ipywidgets
6998 (package
6999 (name "python-ipywidgets")
7000 (version "5.2.2")
7001 (source
7002 (origin
7003 (method url-fetch)
7004 (uri (pypi-uri "ipywidgets" version))
7005 (sha256
7006 (base32
7007 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7008 (build-system python-build-system)
7009 ;; FIXME: it's not clear how to run the tests.
7010 (arguments `(#:tests? #f))
7011 (propagated-inputs
7012 `(("python-ipykernel" ,python-ipykernel)
7013 ("python-ipython" ,python-ipython)
4fe2e344
RW
7014 ("python-traitlets" ,python-traitlets)
7015 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7016 (home-page "http://ipython.org")
7017 (synopsis "IPython HTML widgets for Jupyter")
7018 (description "Ipywidgets are interactive HTML widgets for Jupyter
7019notebooks and the IPython kernel. Notebooks come alive when interactive
7020widgets are used. Users gain control of their data and can visualize changes
7021in the data.")
7022 (license license:bsd-3)))
7023
7024(define-public python2-ipywidgets
7025 (package-with-python2 python-ipywidgets))
7026
8ceebf8f
RW
7027(define-public python-jupyter-console
7028 (package
7029 (name "python-jupyter-console")
7030 (version "5.0.0")
7031 (source
7032 (origin
7033 (method url-fetch)
7034 (uri (pypi-uri "jupyter_console" version))
7035 (sha256
7036 (base32
7037 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7038 (build-system python-build-system)
7039 ;; FIXME: it's not clear how to run the tests.
7040 (arguments `(#:tests? #f))
7041 (propagated-inputs
7042 `(("python-ipykernel" ,python-ipykernel)
7043 ("python-ipython" ,python-ipython)
7044 ("python-jupyter-client" ,python-jupyter-client)
7045 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7046 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7047 (home-page "https://jupyter.org")
7048 (synopsis "Jupyter terminal console")
7049 (description "This package provides a terminal-based console frontend for
7050Jupyter kernels. It also allows for console-based interaction with non-Python
7051Jupyter kernels such as IJulia and IRKernel.")
7052 (license license:bsd-3)))
7053
7054(define-public python2-jupyter-console
7055 (package-with-python2 python-jupyter-console))
7056
c27ae827
RW
7057(define-public jupyter
7058 (package
7059 (name "jupyter")
7060 (version "1.0.0")
7061 (source
7062 (origin
7063 (method url-fetch)
7064 (uri (pypi-uri "jupyter" version))
7065 (sha256
7066 (base32
7067 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7068 (build-system python-build-system)
7069 ;; FIXME: it's not clear how to run the tests.
7070 (arguments `(#:tests? #f))
7071 (propagated-inputs
7072 `(("python-ipykernel" ,python-ipykernel)
7073 ("python-ipywidgets" ,python-ipywidgets)
7074 ("python-jupyter-console" ,python-jupyter-console)
7075 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7076 ("python-notebook" ,python-notebook)))
c27ae827
RW
7077 (home-page "http://jupyter.org")
7078 (synopsis "Web application for interactive documents")
7079 (description
7080 "The Jupyter Notebook is a web application that allows you to create and
7081share documents that contain live code, equations, visualizations and
7082explanatory text. Uses include: data cleaning and transformation, numerical
7083simulation, statistical modeling, machine learning and much more.")
7084 (license license:bsd-3)))
7085
816a6538
LC
7086(define-public python-chardet
7087 (package
7088 (name "python-chardet")
7089 (version "2.3.0")
7090 (source
7091 (origin
7092 (method url-fetch)
7093 (uri (string-append
7094 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7095 version
7096 ".tar.gz"))
7097 (sha256
7098 (base32
7099 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7100 (build-system python-build-system)
816a6538
LC
7101 (home-page "https://github.com/chardet/chardet")
7102 (synopsis "Universal encoding detector for Python 2 and 3")
7103 (description
7104 "This package provides @code{chardet}, a Python module that can
7105automatically detect a wide range of file encodings.")
3f641af0 7106 (license license:lgpl2.1+)))
816a6538
LC
7107
7108(define-public python2-chardet
7109 (package-with-python2 python-chardet))
2fc5f186 7110
1872f1bb
KM
7111(define-public python-docopt
7112 (package
7113 (name "python-docopt")
7114 (version "0.6.2")
7115 (source
7116 (origin
7117 (method url-fetch)
7118 ;; The release on PyPI does not include tests.
7119 (uri (string-append
7120 "https://github.com/docopt/docopt/archive/"
7121 version ".tar.gz"))
7122 (file-name (string-append name "-" version ".tar.gz"))
7123 (sha256
7124 (base32
7125 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7126 (build-system python-build-system)
7127 (native-inputs
f3b98f4f 7128 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7129 (arguments
7130 `(#:phases (alist-replace
7131 'check
7132 (lambda _ (zero? (system* "py.test")))
7133 %standard-phases)))
7134 (home-page "http://docopt.org")
7135 (synopsis "Command-line interface description language for Python")
7136 (description "This library allows the user to define a command-line
7137interface from a program's help message rather than specifying it
7138programatically with command-line parsers like @code{getopt} and
7139@code{argparse}.")
7140 (license license:expat)))
7141
7142(define-public python2-docopt
7143 (package-with-python2 python-docopt))
7144
2fc5f186
LF
7145(define-public python-zope-event
7146 (package
7147 (name "python-zope-event")
7148 (version "4.1.0")
7149 (source
7150 (origin
7151 (method url-fetch)
7152 (uri (string-append "https://pypi.python.org/packages/source/z"
7153 "/zope.event/zope.event-" version ".tar.gz"))
7154 (sha256
7155 (base32
7156 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7157 (build-system python-build-system)
2fc5f186
LF
7158 (home-page "http://pypi.python.org/pypi/zope.event")
7159 (synopsis "Event publishing system for Python")
7160 (description "Zope.event provides an event publishing API, intended for
7161use by applications which are unaware of any subscribers to their events. It
7162is a simple event-dispatching system on which more sophisticated event
7163dispatching systems can be built.")
3f641af0 7164 (license license:zpl2.1)))
2fc5f186
LF
7165
7166(define-public python2-zope-event
7167 (package-with-python2 python-zope-event))
97abe268
LF
7168
7169(define-public python-zope-interface
7170 (package
7171 (name "python-zope-interface")
7172 (version "4.1.3")
7173 (source
7174 (origin
7175 (method url-fetch)
7176 (uri (string-append "https://pypi.python.org/packages/source/z"
7177 "/zope.interface/zope.interface-" version ".tar.gz"))
7178 (sha256
7179 (base32
7180 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7181 (build-system python-build-system)
38d480a8 7182 (native-inputs
97abe268
LF
7183 `(("python-zope-event" ,python-zope-event)))
7184 (home-page "https://github.com/zopefoundation/zope.interface")
7185 (synopsis "Python implementation of the \"design by contract\"
7186methodology")
7187 (description "Zope.interface provides an implementation of \"object
7188interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7189conforming to a given API or contract.")
3f641af0 7190 (license license:zpl2.1)))
97abe268
LF
7191
7192(define-public python2-zope-interface
7193 (package-with-python2 python-zope-interface))
81f2373c
LF
7194
7195(define-public python-zope-exceptions
7196 (package
7197 (name "python-zope-exceptions")
7198 (version "4.0.8")
7199 (source
7200 (origin
7201 (method url-fetch)
7202 (uri (string-append "https://pypi.python.org/packages/source/z"
7203 "/zope.exceptions/zope.exceptions-"
7204 version ".tar.gz"))
7205 (sha256
7206 (base32
7207 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7208 (build-system python-build-system)
7209 (arguments
7210 '(#:tests? #f)) ; circular dependency with zope.testrunner
7211 (propagated-inputs
7212 `(("python-zope-interface" ,python-zope-interface)))
7213 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7214 (synopsis "Zope exceptions")
7215 (description "Zope.exceptions provides general-purpose exception types
7216that have uses outside of the Zope framework.")
3f641af0 7217 (license license:zpl2.1)))
81f2373c
LF
7218
7219(define-public python2-zope-exceptions
7220 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7221
7222(define-public python-zope-testing
7223 (package
7224 (name "python-zope-testing")
7225 (version "4.5.0")
7226 (source
7227 (origin
7228 (method url-fetch)
7229 (uri (string-append "https://pypi.python.org/packages/source/z"
7230 "/zope.testing/zope.testing-" version ".tar.gz"))
7231 (sha256
7232 (base32
b02f7a21
HG
7233 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7234 (modules '((guix build utils)))
7235 (snippet
7236 '(begin
7237 ;; Remove pre-compiled .pyc files backup files from source.
7238 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7239 #t))))
900e3c0e
LF
7240 (build-system python-build-system)
7241 (native-inputs
7242 `(("python-zope-exceptions" ,python-zope-exceptions)))
7243 (propagated-inputs
7244 `(("python-zope-interface" ,python-zope-interface)))
7245 (home-page "http://pypi.python.org/pypi/zope.testing")
7246 (synopsis "Zope testing helpers")
7247 (description "Zope.testing provides a number of testing utilities for HTML
7248forms, HTTP servers, regular expressions, and more.")
3f641af0 7249 (license license:zpl2.1)))
900e3c0e
LF
7250
7251(define-public python2-zope-testing
7252 (package-with-python2 python-zope-testing))
01614c4f
LF
7253
7254(define-public python-zope-testrunner
7255 (package
7256 (name "python-zope-testrunner")
7257 (version "4.4.9")
7258 (source
7259 (origin
7260 (method url-fetch)
7261 (uri (string-append "https://pypi.python.org/packages/source/z"
7262 "/zope.testrunner/zope.testrunner-"
7263 version ".zip"))
7264 (sha256
7265 (base32
7266 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7267 (build-system python-build-system)
7268 (native-inputs
7269 `(("python-six" ,python-six)
e408ffc3 7270 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7271 ("python-zope-exceptions" ,python-zope-exceptions)
7272 ("python-zope-testing" ,python-zope-testing)
7273 ("unzip" ,unzip)))
7274 (propagated-inputs
7275 `(("python-zope-interface" ,python-zope-interface)))
7276 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7277 (synopsis "Zope testrunner script")
7278 (description "Zope.testrunner provides a script for running Python
7279tests.")
3f641af0 7280 (license license:zpl2.1)))
01614c4f
LF
7281
7282(define-public python2-zope-testrunner
7283 (let ((base (package-with-python2 python-zope-testrunner)))
7284 (package
7285 (inherit base)
7286 (native-inputs
7287 (append (package-native-inputs base)
7288 `(("python2-subunit" ,python2-subunit)
7289 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7290
7291(define-public python-zope-i18nmessageid
7292 (package
7293 (name "python-zope-i18nmessageid")
7294 (version "4.0.3")
7295 (source
7296 (origin
7297 (method url-fetch)
7298 (uri (string-append
7299 "https://pypi.python.org/packages/source/z"
7300 "/zope.i18nmessageid/zope.i18nmessageid-"
7301 version ".tar.gz"))
7302 (sha256
7303 (base32
7304 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7305 (build-system python-build-system)
6a5c710c
LF
7306 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7307 (synopsis "Message identifiers for internationalization")
7308 (description "Zope.i18nmessageid provides facilities for declaring
7309internationalized messages within program source text.")
3f641af0 7310 (license license:zpl2.1)))
6a5c710c
LF
7311
7312(define-public python2-zope-i18nmessageid
7313 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7314
7315(define-public python-zope-schema
7316 (package
7317 (name "python-zope-schema")
7318 (version "4.4.2")
7319 (source
7320 (origin
7321 (method url-fetch)
7322 (uri (string-append "https://pypi.python.org/packages/source/z"
7323 "/zope.schema/zope.schema-" version ".tar.gz"))
7324 (sha256
7325 (base32
7326 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7327 (build-system python-build-system)
7328 (propagated-inputs
7329 `(("python-zope-event" ,python-zope-event)
7330 ("python-zope-interface" ,python-zope-interface)))
7331 (native-inputs
47f77210
HG
7332 `(("python-zope-testing" ,python-zope-testing)
7333 ("python-coverage" ,python-coverage)
7334 ("python-nose" ,python-nose)))
71fb09f3
LF
7335 (home-page "http://pypi.python.org/pypi/zope.schema")
7336 (synopsis "Zope data schemas")
7337 (description "Zope.scheme provides extensions to zope.interface for
7338defining data schemas.")
3f641af0 7339 (license license:zpl2.1)))
71fb09f3
LF
7340
7341(define-public python2-zope-schema
7342 (package-with-python2 python-zope-schema))
fbac9b17
LF
7343
7344(define-public python-zope-configuration
7345 (package
7346 (name "python-zope-configuration")
7347 (version "4.0.3")
7348 (source (origin
7349 (method url-fetch)
7350 (uri (string-append "https://pypi.python.org/packages/source/z"
7351 "/zope.configuration/zope.configuration-"
7352 version ".tar.gz"))
7353 (sha256
7354 (base32
7355 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7356 (build-system python-build-system)
7357 (propagated-inputs
7358 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7359 ("python-zope-schema" ,python-zope-schema)))
7360 (home-page "http://pypi.python.org/pypi/zope.configuration")
7361 (synopsis "Zope Configuration Markup Language")
7362 (description "Zope.configuration implements ZCML, the Zope Configuration
7363Markup Language.")
3f641af0 7364 (license license:zpl2.1)))
fbac9b17
LF
7365
7366(define-public python2-zope-configuration
7367 (package-with-python2 python-zope-configuration))
2ad52086
LF
7368
7369(define-public python-zope-proxy
7370 (package
7371 (name "python-zope-proxy")
7372 (version "4.1.6")
7373 (source
7374 (origin
7375 (method url-fetch)
7376 (uri (string-append "https://pypi.python.org/packages/source/z"
7377 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7378 (sha256
7379 (base32
7380 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7381 (build-system python-build-system)
7382 (propagated-inputs
7383 `(("python-zope-interface" ,python-zope-interface)))
7384 (home-page "http://pypi.python.org/pypi/zope.proxy")
7385 (synopsis "Generic, transparent proxies")
7386 (description "Zope.proxy provides generic, transparent proxies for Python.
7387Proxies are special objects which serve as mostly-transparent wrappers around
7388another object, intervening in the apparent behavior of the wrapped object
7389only when necessary to apply the policy (e.g., access checking, location
7390brokering, etc.) for which the proxy is responsible.")
3f641af0 7391 (license license:zpl2.1)))
2ad52086
LF
7392
7393(define-public python2-zope-proxy
7394 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7395
7396(define-public python-zope-location
7397 (package
7398 (name "python-zope-location")
7399 (version "4.0.3")
7400 (source
7401 (origin
7402 (method url-fetch)
7403 (uri (string-append "https://pypi.python.org/packages/source/z"
7404 "/zope.location/zope.location-" version ".tar.gz"))
7405 (sha256
7406 (base32
7407 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7408 (build-system python-build-system)
d27f176a 7409 (propagated-inputs
f404b5ea
LF
7410 `(("python-zope-proxy" ,python-zope-proxy)
7411 ("python-zope-schema" ,python-zope-schema)))
7412 (home-page "http://pypi.python.org/pypi/zope.location/")
7413 (synopsis "Zope location library")
7414 (description "Zope.location implements the concept of \"locations\" in
7415Zope3, which are are special objects that have a structural location.")
3f641af0 7416 (license license:zpl2.1)))
f404b5ea
LF
7417
7418(define-public python2-zope-location
7419 (package-with-python2 python-zope-location))
d4b77f36
LF
7420
7421(define-public python-zope-security
7422 (package
7423 (name "python-zope-security")
7424 (version "4.0.3")
7425 (source
7426 (origin
7427 (method url-fetch)
7428 (uri (string-append "https://pypi.python.org/packages/source/z"
7429 "/zope.security/zope.security-" version ".tar.gz"))
7430 (sha256
7431 (base32
7432 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7433 (build-system python-build-system)
7434 (propagated-inputs
7435 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7436 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7
HG
7437 ("python-zope-schema" ,python-zope-schema)))
7438 (native-inputs
7439 `(("python-zope-component" ,python-zope-component)
7440 ("python-zope-configuration" ,python-zope-configuration)
7441 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7442 ("python-zope-testrunner" ,python-zope-testrunner)
7443 ("python-zope-testing" ,python-zope-testing)))
7444 (home-page "http://pypi.python.org/pypi/zope.security")
7445 (synopsis "Zope security framework")
7446 (description "Zope.security provides a generic mechanism to implement
7447security policies on Python objects.")
3f641af0 7448 (license license:zpl2.1)))
d4b77f36
LF
7449
7450(define-public python2-zope-security
04417662
EF
7451 (let ((zope-security (package-with-python2 python-zope-security)))
7452 (package (inherit zope-security)
7453 (propagated-inputs
7454 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7455 ,@(alist-delete
7456 "python-zope-testrunner"
7457 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7458
7459(define-public python-zope-component
7460 (package
7461 (name "python-zope-component")
7462 (version "4.2.2")
7463 (source
7464 (origin
7465 (method url-fetch)
7466 (uri (string-append "https://pypi.python.org/packages/source/z"
7467 "/zope.component/zope.component-" version ".tar.gz"))
7468 (sha256
7469 (base32
7470 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7471 (build-system python-build-system)
7472 (arguments
7473 ;; Skip tests due to circular dependency with python-zope-security.
7474 '(#:tests? #f))
7475 (native-inputs
7476 `(("python-zope-testing" ,python-zope-testing)))
7477 (propagated-inputs
7478 `(("python-zope-event" ,python-zope-event)
7479 ("python-zope-interface" ,python-zope-interface)
7480 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7481 ("python-zope-configuration" ,python-zope-configuration)))
7482 (home-page "https://github.com/zopefoundation/zope.component")
7483 (synopsis "Zope Component Architecture")
7484 (description "Zope.component represents the core of the Zope Component
7485Architecture. Together with the zope.interface package, it provides
7486facilities for defining, registering and looking up components.")
3f641af0 7487 (license license:zpl2.1)))
a6b61b27
LF
7488
7489(define-public python2-zope-component
7490 (package-with-python2 python-zope-component))
3859ac12 7491
1ae44b80 7492(define-public python-pythondialog
b5f218be 7493 (package
1ae44b80 7494 (name "python-pythondialog")
42c4b246 7495 (version "3.4.0")
b5f218be
LF
7496 (source
7497 (origin
7498 (method url-fetch)
1ae44b80 7499 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7500 (sha256
7501 (base32
1ae44b80 7502 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7503 (build-system python-build-system)
7504 (arguments
7505 `(#:phases
7506 (modify-phases %standard-phases
7507 (add-after 'unpack 'patch-path
7508 (lambda* (#:key inputs #:allow-other-keys)
7509 (let* ((dialog (assoc-ref inputs "dialog")))
7510 ;; Since this library really wants to grovel the search path, we
7511 ;; must hardcode dialog's store path into it.
7512 (substitute* "dialog.py"
7513 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7514 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7515 #t))))
b5f218be
LF
7516 #:tests? #f)) ; no test suite
7517 (propagated-inputs
7518 `(("dialog" ,dialog)))
7519 (home-page "http://pythondialog.sourceforge.net/")
7520 (synopsis "Python interface to the UNIX dialog utility")
7521 (description "A Python wrapper for the dialog utility. Its purpose is to
7522provide an easy to use, pythonic and comprehensive Python interface to dialog.
7523This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7524 (license license:lgpl2.1)
1ae44b80
LF
7525 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7526
7527(define-public python2-pythondialog
7528 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7529 (package
7530 (inherit base)
7531 (version (package-version python-pythondialog))
7532 (source (origin
7533 (method url-fetch)
7534 (uri (pypi-uri "python2-pythondialog" version))
7535 (sha256
7536 (base32
7537 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7538
3859ac12
LF
7539(define-public python-pyrfc3339
7540 (package
7541 (name "python-pyrfc3339")
d9aa097b 7542 (version "1.0")
3859ac12
LF
7543 (source
7544 (origin
7545 (method url-fetch)
d9aa097b 7546 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7547 (sha256
7548 (base32
d9aa097b 7549 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7550 (build-system python-build-system)
7551 (propagated-inputs
7552 `(("python-pytz" ,python-pytz)))
7553 (native-inputs
f3b98f4f 7554 `(("python-nose" ,python-nose)))
3859ac12
LF
7555 (home-page "https://github.com/kurtraschke/pyRFC3339")
7556 (synopsis "Python timestamp library")
7557 (description "Python library for generating and parsing RFC 3339-compliant
7558timestamps.")
7559 (license license:expat)))
7560
7561(define-public python2-pyrfc3339
7562 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7563
7564(define-public python-werkzeug
7565 (package
7566 (name "python-werkzeug")
0580e383 7567 (version "0.11.11")
5eea2005
LF
7568 (source
7569 (origin
7570 (method url-fetch)
4b47cbfa 7571 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7572 (sha256
7573 (base32
0580e383 7574 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7575 (build-system python-build-system)
7576 (native-inputs
7577 `(("python-pytest" ,python-pytest)))
7578 (home-page "http://werkzeug.pocoo.org/")
7579 (synopsis "Utilities for WSGI applications")
7580 (description "One of the most advanced WSGI utility modules. It includes a
7581powerful debugger, full-featured request and response objects, HTTP utilities to
7582handle entity tags, cache control headers, HTTP dates, cookie handling, file
7583uploads, a powerful URL routing system and a bunch of community-contributed
7584addon modules.")
3f641af0 7585 (license license:x11)))
5eea2005
LF
7586
7587(define-public python2-werkzeug
7588 (package-with-python2 python-werkzeug))
99fffa8a
LF
7589
7590(define-public python-configobj
7591 (package
7592 (name "python-configobj")
7593 (version "5.0.6")
7594 (source (origin
7595 (method url-fetch)
7596 (uri (string-append
7597 "https://pypi.python.org/packages/source/c/configobj/"
7598 "configobj-" version ".tar.gz"))
7599 (sha256
7600 (base32
7601 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7602 ;; Patch setup.py so it looks for python-setuptools, which is
7603 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7604 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7605 (build-system python-build-system)
861f70c9 7606 (propagated-inputs
f3b98f4f 7607 `(("python-six" ,python-six)))
99fffa8a
LF
7608 (synopsis "Config file reading, writing and validation")
7609 (description "ConfigObj is a simple but powerful config file reader and
7610writer: an ini file round tripper. Its main feature is that it is very easy to
7611use, with a straightforward programmer’s interface and a simple syntax for
7612config files.")
7613 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7614 (license license:bsd-3)))
99fffa8a
LF
7615
7616(define-public python2-configobj
7617 (package-with-python2 python-configobj))
79e8a291
LF
7618
7619(define-public python-configargparse
7620 (package
7621 (name "python-configargparse")
7622 (version "0.10.0")
7623 (source (origin
7624 (method url-fetch)
7625 (uri (string-append
7626 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7627 "ConfigArgParse-" version ".tar.gz"))
7628 (sha256
7629 (base32
7630 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7631 (build-system python-build-system)
7632 (arguments
7633 ;; FIXME: Bug in test suite filed upstream:
7634 ;; https://github.com/bw2/ConfigArgParse/issues/32
7635 '(#:tests? #f))
7636 (synopsis "Replacement for argparse")
7637 (description "A drop-in replacement for argparse that allows options to also
7638be set via config files and/or environment variables.")
7639 (home-page "https://github.com/bw2/ConfigArgParse")
7640 (license license:expat)))
7641
7642(define-public python2-configargparse
7643 (package-with-python2 python-configargparse))
ab41f979
LF
7644
7645(define-public python-ndg-httpsclient
7646 (package
7647 (name "python-ndg-httpsclient")
7648 (version "0.4.0")
7649 (source (origin
7650 (method url-fetch)
7651 (uri (string-append
7652 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7653 "ndg_httpsclient-" version ".tar.gz"))
7654 (sha256
7655 (base32
7656 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7657 (build-system python-build-system)
a39cc016
LF
7658 (arguments
7659 '(;; The tests appear to require networking.
7660 #:tests? #f))
ab41f979
LF
7661 (propagated-inputs
7662 `(("python-pyopenssl" ,python-pyopenssl)))
7663 (synopsis "HTTPS support for Python's httplib and urllib2")
7664 (description "This is a HTTPS client implementation for httplib and urllib2
7665based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7666over the default provided with Python and importantly enables full verification
7667of the SSL peer.")
7668 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7669 (license license:bsd-3)))
ab41f979
LF
7670
7671;; python2-openssl requires special care, so package-with-python2 is
7672;; insufficient.
7673(define-public python2-ndg-httpsclient
7674 (package (inherit python-ndg-httpsclient)
7675 (name "python2-ndg-httpsclient")
7676 (arguments `(#:python ,python-2))
7677 (propagated-inputs
7678 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7679
7680(define-public python-contextlib2
7681 (package
7682 (name "python-contextlib2")
7683 (version "0.4.0")
7684 (source
7685 (origin
7686 (method url-fetch)
7687 (uri (pypi-uri "contextlib2" version))
7688 (sha256
7689 (base32
7690 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7691 (build-system python-build-system)
7692 (arguments
7693 `(#:phases
7694 (modify-phases %standard-phases
7695 (replace 'check
7696 (lambda _ (zero?
7697 (system*
b3546174 7698 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7699 (home-page "http://contextlib2.readthedocs.org/")
7700 (synopsis "Tools for decorators and context managers")
7701 (description "This module is primarily a backport of the Python
77023.2 contextlib to earlier Python versions. Like contextlib, it
7703provides utilities for common tasks involving decorators and context
7704managers. It also contains additional features that are not part of
7705the standard library.")
3f641af0 7706 (license license:psfl)))
03f964a5
CM
7707
7708(define-public python2-contextlib2
7709 (package-with-python2 python-contextlib2))
210bf497
DT
7710
7711(define-public python-texttable
7712 (package
7713 (name "python-texttable")
7714 (version "0.8.4")
7715 (source
7716 (origin
7717 (method url-fetch)
7718 (uri (pypi-uri "texttable" version))
7719 (sha256
7720 (base32
7721 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7722 (build-system python-build-system)
7723 (arguments '(#:tests? #f)) ; no tests
7724 (home-page "https://github.com/foutaise/texttable/")
7725 (synopsis "Python module for creating simple ASCII tables")
7726 (description "Texttable is a Python module for creating simple ASCII
7727tables.")
3f641af0 7728 (license license:lgpl2.1+)))
210bf497
DT
7729
7730(define-public python2-texttable
7731 (package-with-python2 python-texttable))
67c52bb3
DT
7732
7733(define-public python-websocket-client
7734 (package
7735 (name "python-websocket-client")
6b810897 7736 (version "0.37.0")
67c52bb3
DT
7737 (source
7738 (origin
7739 (method url-fetch)
6b810897 7740 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7741 (sha256
7742 (base32
6b810897 7743 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7744 (build-system python-build-system)
a5333f7c
HG
7745 (propagated-inputs
7746 `(("python-six" ,python-six)))
67c52bb3
DT
7747 (home-page "https://github.com/liris/websocket-client")
7748 (synopsis "WebSocket client for Python")
7749 (description "The Websocket-client module provides the low level APIs for
7750WebSocket usage in Python programs.")
3f641af0 7751 (license license:lgpl2.1+)))
67c52bb3
DT
7752
7753(define-public python2-websocket-client
7754 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7755
7756(define-public python-atomicwrites
7757 (package
7758 (name "python-atomicwrites")
4e92d76a 7759 (version "1.1.0")
5c6eea2a
LF
7760 (source (origin
7761 (method url-fetch)
7762 (uri (pypi-uri "atomicwrites" version))
7763 (sha256
7764 (base32
4e92d76a 7765 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7766 (build-system python-build-system)
7767 (synopsis "Atomic file writes in Python")
7768 (description "Library for atomic file writes using platform dependent tools
8f65585b 7769for atomic file system operations.")
5c6eea2a 7770 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7771 (license license:expat)))
9bb6d184
LF
7772
7773(define-public python2-atomicwrites
f210e944 7774 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7775
7776(define-public python-requests-toolbelt
7777 (package
7778 (name "python-requests-toolbelt")
c02af1c8 7779 (version "0.6.2")
561bb3cb
LF
7780 (source (origin
7781 (method url-fetch)
c02af1c8
LF
7782 (uri (string-append
7783 "https://pypi.python.org/packages/"
7784 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7785 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7786 (sha256
7787 (base32
c02af1c8 7788 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7789 (build-system python-build-system)
759aadd4
LF
7790 (native-inputs
7791 `(("python-betamax" ,python-betamax)
7792 ("python-mock" ,python-mock)
7793 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7794 (propagated-inputs
7795 `(("python-requests" ,python-requests)))
7796 (synopsis "Extensions to python-requests")
7797 (description "This is a toolbelt of useful classes and functions to be used
7798with python-requests.")
7799 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7800 (license license:asl2.0)))
d1deb90b
LF
7801
7802(define-public python-click-threading
7803 (package
7804 (name "python-click-threading")
3d2e0dbc 7805 (version "0.2.0")
d1deb90b
LF
7806 (source (origin
7807 (method url-fetch)
3d2e0dbc
LF
7808 (uri (string-append
7809 "https://pypi.python.org/packages/"
7810 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7811 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7812 (sha256
7813 (base32
3d2e0dbc 7814 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7815 (build-system python-build-system)
7816 (propagated-inputs
7817 `(("python-click" ,python-click)))
7818 (synopsis "Utilities for multithreading in Click")
7819 (description "This package provides utilities for multithreading in Click
7820applications.")
7821 (home-page "https://github.com/click-contrib/click-threading")
7822 (license license:expat)))
7b17cab9
LF
7823
7824(define-public python-click-log
7825 (package
7826 (name "python-click-log")
a9da8fec 7827 (version "0.1.3")
7b17cab9
LF
7828 (source (origin
7829 (method url-fetch)
7830 (uri (pypi-uri "click-log" version))
7831 (sha256
7832 (base32
a9da8fec 7833 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7834 (build-system python-build-system)
7835 (propagated-inputs
7836 `(("python-click" ,python-click)))
7837 (synopsis "Logging for click applications")
7838 (description "This package provides a Python library for logging Click
7839applications.")
7840 (home-page "https://github.com/click-contrib/click-log")
7841 (license license:expat)))
7b3a4ee4
LF
7842
7843(define-public python-apipkg
7844 (package
7845 (name "python-apipkg")
7846 (version "1.4")
7847 (source (origin
7848 (method url-fetch)
7849 (uri (pypi-uri "apipkg" version))
7850 (sha256
7851 (base32
7852 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7853 (build-system python-build-system)
328bb95d 7854 (native-inputs
7b3a4ee4
LF
7855 `(("python-pytest" ,python-pytest)))
7856 (synopsis "Namespace control and lazy-import mechanism")
7857 (description "With apipkg you can control the exported namespace of a Python
7858package and greatly reduce the number of imports for your users. It is a small
7859pure Python module that works on virtually all Python versions.")
7860 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 7861 (license license:expat)))
e08739c3
CAW
7862
7863(define-public python2-apipkg
f210e944 7864 (package-with-python2 python-apipkg))
848964fe
LF
7865
7866(define-public python-execnet
7867 (package
7868 (name "python-execnet")
7869 (version "1.4.1")
7870 (source (origin
7871 (method url-fetch)
7872 (uri (pypi-uri "execnet" version))
7873 (sha256
7874 (base32
7875 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7876 (build-system python-build-system)
ca0eee9d
LF
7877 (arguments
7878 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7879 ;; The two test failures are caused by the lack of an `ssh` executable.
7880 ;; The test suite can be run with pytest after the 'install' phase.
7881 #:tests? #f))
848964fe 7882 (native-inputs
ca0eee9d
LF
7883 `(("python-pytest" ,python-pytest)
7884 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 7885 (propagated-inputs
848964fe
LF
7886 `(("python-apipkg" ,python-apipkg)))
7887 (synopsis "Rapid multi-Python deployment")
7888 (description "Execnet provides a share-nothing model with
7889channel-send/receive communication for distributing execution across many
7890Python interpreters across version, platform and network barriers. It has a
7891minimal and fast API targetting the following uses:
7892@enumerate
7893@item distribute tasks to (many) local or remote CPUs
7894@item write and deploy hybrid multi-process applications
7895@item write scripts to administer multiple environments
7896@end enumerate")
7897 (home-page "http://codespeak.net/execnet/")
f210e944 7898 (license license:expat)))
16c84f90
CAW
7899
7900(define-public python2-execnet
f210e944 7901 (package-with-python2 python-execnet))
6720dbb4
LF
7902
7903;;; The software provided by this package was integrated into pytest 2.8.
7904(define-public python-pytest-cache
7905 (package
7906 (name "python-pytest-cache")
7907 (version "1.0")
7908 (source (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "pytest-cache" version))
7911 (sha256
7912 (base32
7913 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7914 (build-system python-build-system)
f22efa01 7915 (propagated-inputs
630d938f
EF
7916 `(("python-apipkg" ,python-apipkg)
7917 ("python-execnet" ,python-execnet)
7918 ("python-py" ,python-py)
7919 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7920 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7921 (description "The pytest-cache plugin provides tools to rerun failures from
7922the last py.test invocation.")
7923 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 7924 (license license:expat)))
0adc21c2
EF
7925
7926(define-public python2-pytest-cache
f210e944 7927 (package-with-python2 python-pytest-cache))
d7e729fe
LF
7928
7929(define-public python-pytest-localserver
7930 (package
7931 (name "python-pytest-localserver")
29f20168 7932 (version "0.3.5")
d7e729fe
LF
7933 (source (origin
7934 (method url-fetch)
29f20168 7935 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7936 (sha256
7937 (base32
29f20168 7938 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7939 (build-system python-build-system)
7940 (arguments
7941 `(#:phases (modify-phases %standard-phases
7942 (replace 'check
7943 (lambda _
7944 (zero? (system* "py.test" "--genscript=runtests.py"))
7945 (zero? (system* "py.test")))))))
7946 (native-inputs
d7e729fe
LF
7947 `(("python-pytest" ,python-pytest)
7948 ("python-requests" ,python-requests)
9ba40f05 7949 ("python-six" ,python-six)))
f22efa01 7950 (propagated-inputs
9ba40f05 7951 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7952 (synopsis "Py.test plugin to test server connections locally")
7953 (description "Pytest-localserver is a plugin for the pytest testing
7954framework which enables you to test server connections locally.")
7955 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7956 (license license:expat)))
28cecbb7
LF
7957
7958(define-public python-wsgi-intercept
7959 (package
7960 (name "python-wsgi-intercept")
909fbd2b 7961 (version "1.2.2")
28cecbb7
LF
7962 (source (origin
7963 (method url-fetch)
909fbd2b
LF
7964 (uri (string-append
7965 "https://pypi.python.org/packages/"
7966 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7967 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7968 (sha256
7969 (base32
909fbd2b 7970 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 7971 (build-system python-build-system)
b9fc496f
HG
7972 (propagated-inputs
7973 `(("python-six" ,python-six)))
28cecbb7 7974 (native-inputs
9d813ec1 7975 `(("python-pytest" ,python-pytest)
b9fc496f
HG
7976 ("python-httplib2" ,python-httplib2)
7977 ("python-requests" ,python-requests)
8757f050 7978 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
7979 (synopsis "Puts a WSGI application in place of a real URI for testing")
7980 (description "Wsgi_intercept installs a WSGI application in place of a real
7981URI for testing. Testing a WSGI application normally involves starting a
7982server at a local host and port, then pointing your test code to that address.
7983Instead, this library lets you intercept calls to any specific host/port
7984combination and redirect them into a WSGI application importable by your test
7985program. Thus, you can avoid spawning multiple processes or threads to test
7986your Web app.")
7987 (home-page "https://github.com/cdent/wsgi-intercept")
7988 (license license:expat)))
89b8a551
LF
7989
7990(define-public python-pytest-xprocess
7991 (package
7992 (name "python-pytest-xprocess")
7993 (version "0.9.1")
7994 (source (origin
7995 (method url-fetch)
7996 (uri (pypi-uri "pytest-xprocess" version))
7997 (sha256
7998 (base32
7999 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8000 (build-system python-build-system)
8001 (propagated-inputs
8002 `(("python-pytest" ,python-pytest)
8003 ("python-pytest-cache" ,python-pytest-cache)
8004 ("python-psutil" ,python-psutil)))
8005 (synopsis "Pytest plugin to manage external processes across test runs")
8006 (description "Pytest-xprocess is an experimental py.test plugin for managing
8007processes across test runs.")
8008 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8009 (license license:expat)))
5c299bf0
LF
8010
8011(define-public python-icalendar
8012 (package
8013 (name "python-icalendar")
25291aca 8014 (version "3.11")
5c299bf0
LF
8015 (source (origin
8016 (method url-fetch)
8017 (uri (pypi-uri "icalendar" version))
8018 (sha256
8019 (base32
25291aca 8020 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8021 (build-system python-build-system)
8022 (propagated-inputs
8023 `(("python-dateutil-2" ,python-dateutil-2)
8024 ("python-pytz" ,python-pytz)))
8025 (synopsis "Python library for parsing iCalendar files")
8026 (description "The icalendar package is a parser/generator of iCalendar
8027files for use with Python.")
8028 (home-page "https://github.com/collective/icalendar")
3f641af0 8029 (license license:bsd-2)))
6bbbb53e
LF
8030
8031(define-public python-sphinxcontrib-newsfeed
8032 (package
8033 (name "python-sphinxcontrib-newsfeed")
8034 (version "0.1.4")
8035 (source (origin
8036 (method url-fetch)
8037 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8038 (sha256
8039 (base32
8040 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8041 (build-system python-build-system)
8042 (propagated-inputs
251ed7f2 8043 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8044 (synopsis "News Feed extension for Sphinx")
8045 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8046Blog, News or Announcements section to a Sphinx website.")
8047 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8048 (license license:bsd-2)))
2216e15c
SB
8049
8050(define-public python-args
8051 (package
8052 (name "python-args")
8053 (version "0.1.0")
8054 (source (origin
8055 (method url-fetch)
8056 (uri (pypi-uri "args" version))
8057 (sha256
8058 (base32
8059 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8060 (build-system python-build-system)
2216e15c
SB
8061 (home-page "https://github.com/kennethreitz/args")
8062 (synopsis "Command-line argument parser")
8063 (description
8064 "This library provides a Python module to parse command-line arguments.")
3f641af0 8065 (license license:bsd-3)))
2216e15c
SB
8066
8067(define-public python2-args
8068 (package-with-python2 python-args))
c06a3de9
SB
8069
8070(define-public python-clint
8071 (package
8072 (name "python-clint")
8073 (version "0.5.1")
8074 (source (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "clint" version))
8077 (sha256
8078 (base32
8079 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8080 (build-system python-build-system)
f22efa01 8081 (propagated-inputs
f3b98f4f 8082 `(("python-args" ,python-args)))
c06a3de9
SB
8083 (home-page "https://github.com/kennethreitz/clint")
8084 (synopsis "Command-line interface tools")
8085 (description
8086 "Clint is a Python module filled with a set of tools for developing
8087command-line applications, including tools for colored and indented
8088output, progress bar display, and pipes.")
3f641af0 8089 (license license:isc)))
c06a3de9
SB
8090
8091(define-public python2-clint
8092 (package-with-python2 python-clint))
4ecdeef8
SB
8093
8094(define-public python-astor
8095 (package
8096 (name "python-astor")
8097 (version "0.5")
8098 (source (origin
8099 (method url-fetch)
8100 (uri (pypi-uri "astor" version))
8101 (sha256
8102 (base32
8103 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8104 (build-system python-build-system)
4ecdeef8
SB
8105 (home-page "https://github.com/berkerpeksag/astor")
8106 (synopsis "Read and write Python ASTs")
8107 (description
8108 "Astor is designed to allow easy manipulation of Python source via the
8109Abstract Syntax Tree.")
3f641af0 8110 (license license:bsd-3)))
4ecdeef8
SB
8111
8112(define-public python2-astor
8113 (package-with-python2 python-astor))
e224b7d0
SB
8114
8115(define-public python-rply
8116 (package
8117 (name "python-rply")
8118 (version "0.7.4")
8119 (source (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "rply" version))
8122 (sha256
8123 (base32
8124 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8125 (build-system python-build-system)
f22efa01 8126 (propagated-inputs
f3b98f4f 8127 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8128 (home-page "https://github.com/alex/rply")
8129 (synopsis "Parser generator for Python")
8130 (description
8131 "This package provides a pure Python based parser generator, that also
8132works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8133with a new public API, and RPython support.")
3f641af0 8134 (license license:bsd-3)))
e224b7d0
SB
8135
8136(define-public python2-rply
8137 (package-with-python2 python-rply))
c3e919d7
SB
8138
8139(define-public python-hy
8140 (package
8141 (name "python-hy")
8142 (version "0.11.1")
8143 (source (origin
8144 (method url-fetch)
8145 (uri (pypi-uri "hy" version))
8146 (sha256
8147 (base32
8148 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8149 (build-system python-build-system)
f22efa01 8150 (propagated-inputs
c3e919d7
SB
8151 `(("python-astor" ,python-astor)
8152 ("python-clint" ,python-clint)
f3b98f4f 8153 ("python-rply" ,python-rply)))
c3e919d7
SB
8154 (home-page "http://hylang.org/")
8155 (synopsis "Lisp frontend to Python")
8156 (description
8157 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8158its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8159Python at your fingertips, in Lisp form.")
8160 (license license:expat)))
8161
8162(define-public python2-hy
8163 (package-with-python2 python-hy))
7a5b944e 8164
81f7f297
EF
8165(define-public python-rauth
8166 (package
8167 (name "python-rauth")
8168 (version "0.7.2")
8169 (source
8170 (origin
8171 (method url-fetch)
8172 (uri (pypi-uri "rauth" version))
8173 (sha256
8174 (base32
8175 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8176 (build-system python-build-system)
8177 (arguments
8178 `(#:test-target "check"))
f22efa01 8179 (propagated-inputs
81f7f297
EF
8180 `(("python-requests" ,python-requests)))
8181 (home-page "https://github.com/litl/rauth")
8182 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8183 (description
8184 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8185provides service wrappers for convenient connection initialization and
8186authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8187 (license license:expat)
8188 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8189
8190(define-public python2-rauth
0848d8d3
EF
8191 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8192 (package
8193 (inherit base)
00e10c6e 8194 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8195 ,@(package-native-inputs base))))))
81f7f297 8196
1abe448d
EF
8197(define-public python2-functools32
8198 (package
8199 (name "python2-functools32")
8200 (version "3.2.3-2")
8201 (source
8202 (origin
8203 (method url-fetch)
8204 (uri (pypi-uri "functools32" version))
8205 (sha256
8206 (base32
8207 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8208 (build-system python-build-system)
8209 (arguments
8210 `(#:python ,python-2
8211 #:tests? #f)) ; no test target
1abe448d
EF
8212 (home-page "https://github.com/MiCHiLU/python-functools32")
8213 (synopsis
8214 "Backport of the functools module from Python 3.2.3")
8215 (description
8216 "This package is a backport of the @code{functools} module from Python
82173.2.3 for use with older versions of Python and PyPy.")
8218 (license license:expat)))
8219
877889f3 8220(define-public python2-futures
7a5b944e 8221 (package
877889f3 8222 (name "python2-futures")
7a5b944e
EF
8223 (version "3.0.3")
8224 (source
8225 (origin
8226 (method url-fetch)
8227 (uri (pypi-uri "futures" version))
8228 (sha256
8229 (base32
8230 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8231 (build-system python-build-system)
877889f3 8232 (arguments `(#:python ,python-2))
7a5b944e
EF
8233 (home-page "https://github.com/agronholm/pythonfutures")
8234 (synopsis
8235 "Backport of the concurrent.futures package from Python 3.2")
8236 (description
8237 "The concurrent.futures module provides a high-level interface for
8238asynchronously executing callables. This package backports the
8239concurrent.futures package from Python 3.2")
3f641af0 8240 (license license:bsd-3)))
7a5b944e 8241
5cb2fe44
EF
8242(define-public python-promise
8243 (package
8244 (name "python-promise")
8245 (version "0.4.2")
8246 (source
8247 (origin
8248 (method url-fetch)
8249 (uri (pypi-uri "promise" version))
8250 (sha256
8251 (base32
8252 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8253 (build-system python-build-system)
8254 ;; Tests wants python-futures, which is a python2 only program, and
8255 ;; can't be found by python-promise at test time.
8256 (arguments `(#:tests? #f))
8257 (home-page "https://github.com/syrusakbary/promise")
8258 (synopsis "Promises/A+ implementation for Python")
8259 (description
8260 "Promises/A+ implementation for Python")
8261 (properties `((python2-variant . ,(delay python2-promise))))
8262 (license license:expat)))
8263
8264(define-public python2-promise
8265 (let ((promise (package-with-python2
8266 (strip-python2-variant python-promise))))
8267 (package (inherit promise)
8268 (arguments (substitute-keyword-arguments (package-arguments promise)
8269 ((#:tests? _) #t)))
8270 (native-inputs
8271 `(("python2-futures" ,python2-futures)
8272 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8273 ,@(package-native-inputs promise))))))
8274
c18f6368
EF
8275(define-public python-urllib3
8276 (package
8277 (name "python-urllib3")
6178274d 8278 (version "1.18.1")
c18f6368
EF
8279 (source
8280 (origin
8281 (method url-fetch)
8282 (uri (pypi-uri "urllib3" version))
8283 (sha256
8284 (base32
6178274d 8285 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8286 (build-system python-build-system)
8287 (arguments `(#:tests? #f))
8288 (native-inputs
f3b98f4f 8289 `(;; some packages for tests
c18f6368
EF
8290 ("python-nose" ,python-nose)
8291 ("python-mock" ,python-mock)
8292 ("python-tornado" ,python-tornado)))
8293 (propagated-inputs
8322749a 8294 `(;; extra packages for https security
c18f6368
EF
8295 ("python-certifi" ,python-certifi)
8296 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8297 ("python-pyasn1" ,python-pyasn1)
8298 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8299 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8300 (synopsis "HTTP library with thread-safe connection pooling")
8301 (description
8302 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8303can reuse the same socket connection for multiple requests, it can POST files,
8304supports url redirection and retries, and also gzip and deflate decoding.")
8305 (license license:expat)))
8306
8307(define-public python2-urllib3
8308 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8309
8310(define-public python-colorama
8311 (package
8312 (name "python-colorama")
8313 (version "0.3.3")
8314 (source
8315 (origin
8316 (method url-fetch)
8317 (uri (pypi-uri "colorama" version))
8318 (sha256
8319 (base32
8320 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8321 (build-system python-build-system)
2b2f2fc1
DT
8322 (synopsis "colored terminal text rendering for Python")
8323 (description "Colorama is a Python library for rendering colored terminal
8324text.")
8325 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8326 (license license:bsd-3)))
2b2f2fc1
DT
8327
8328(define-public python2-colorama
8329 (package-with-python2 python-colorama))
f5bcec6e
DT
8330
8331(define-public python-rsa
8332 (package
8333 (name "python-rsa")
ecd68c53 8334 (version "3.4.2")
f5bcec6e
DT
8335 (source
8336 (origin
8337 (method url-fetch)
8338 (uri (pypi-uri "rsa" version))
8339 (sha256
8340 (base32
ecd68c53 8341 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8342 (build-system python-build-system)
f22efa01 8343 (propagated-inputs
f3b98f4f 8344 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8345 (synopsis "Pure-Python RSA implementation")
8346 (description "Python-RSA is a pure-Python RSA implementation. It supports
8347encryption and decryption, signing and verifying signatures, and key
8348generation according to PKCS#1 version 1.5. It can be used as a Python
8349library as well as on the command line.")
8350 (home-page "http://stuvel.eu/rsa")
3f641af0 8351 (license license:asl2.0)))
f5bcec6e
DT
8352
8353(define-public python2-rsa
8354 (package-with-python2 python-rsa))
c0aacfa5
DT
8355
8356(define-public python-pluggy
8357 (package
8358 (name "python-pluggy")
8359 (version "0.3.1")
8360 (source
8361 (origin
8362 (method url-fetch)
8363 (uri (pypi-uri "pluggy" version))
8364 (sha256
8365 (base32
8366 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8367 (build-system python-build-system)
c0aacfa5
DT
8368 (synopsis "Plugin and hook calling mechanism for Python")
8369 (description "Pluggy is an extraction of the plugin manager as used by
8370Pytest but stripped of Pytest specific details.")
8371 (home-page "https://pypi.python.org/pypi/pluggy")
8372 (license license:expat)))
8373
8374(define-public python2-pluggy
8375 (package-with-python2 python-pluggy))
a4af21ca
DT
8376
8377(define-public python-tox
8378 (package
8379 (name "python-tox")
8380 (version "2.3.1")
8381 (source
8382 (origin
8383 (method url-fetch)
8384 (uri (pypi-uri "tox" version))
8385 (sha256
8386 (base32
8387 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8388 (build-system python-build-system)
8389 (arguments
7ba07edf
HG
8390 ;; FIXME: Tests require pytest-timeout, which itself requires
8391 ;; pytest>=2.8.0 for installation.
a4af21ca 8392 '(#:tests? #f))
482d9591
HG
8393 (propagated-inputs
8394 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8395 ("python-py" ,python-py)
482d9591 8396 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8397 (native-inputs
7ba07edf
HG
8398 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8399 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8400 (home-page "http://tox.testrun.org/")
8401 (synopsis "Virtualenv-based automation of test activities")
8402 (description "Tox is a generic virtualenv management and test command line
8403tool. It can be used to check that a package installs correctly with
8404different Python versions and interpreters, or run tests in each type of
8405supported environment, or act as a frontend to continuous integration
8406servers.")
8407 (license license:expat)))
8408
8409(define-public python2-tox
8410 (package-with-python2 python-tox))
ba9da248
DT
8411
8412(define-public python-jmespath
8413 (package
8414 (name "python-jmespath")
8415 (version "0.9.0")
8416 (source
8417 (origin
8418 (method url-fetch)
8419 (uri (pypi-uri "jmespath" version))
8420 (sha256
8421 (base32
8422 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8423 (build-system python-build-system)
ba9da248
DT
8424 (synopsis "JSON Matching Expressions")
8425 (description "JMESPath (pronounced “james path”) is a Python library that
8426allows one to declaratively specify how to extract elements from a JSON
8427document.")
8428 (home-page "https://github.com/jmespath/jmespath.py")
8429 (license license:expat)))
8430
8431(define-public python2-jmespath
8432 (package-with-python2 python-jmespath))
935fcd5c
DT
8433
8434(define-public python-botocore
8435 (package
8436 (name "python-botocore")
e09f952d 8437 (version "1.4.62")
935fcd5c
DT
8438 (source
8439 (origin
8440 (method url-fetch)
8441 (uri (pypi-uri "botocore" version))
8442 (sha256
8443 (base32
e09f952d 8444 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8445 (build-system python-build-system)
482d9591 8446 (propagated-inputs
935fcd5c
DT
8447 `(("python-dateutil" ,python-dateutil-2)
8448 ("python-docutils" ,python-docutils)
482d9591 8449 ("python-jmespath" ,python-jmespath)))
8fa6890b 8450 (native-inputs
482d9591 8451 `(("python-mock" ,python-mock)
935fcd5c 8452 ("python-nose" ,python-nose)
482d9591 8453 ("behave" ,behave)
935fcd5c 8454 ("python-tox" ,python-tox)
482d9591 8455 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8456 (home-page "https://github.com/boto/botocore")
8457 (synopsis "Low-level interface to AWS")
8458 (description "Botocore is a Python library that provides a low-level
8459interface to the Amazon Web Services (AWS) API.")
3f641af0 8460 (license license:asl2.0)))
935fcd5c
DT
8461
8462(define-public python2-botocore
8463 (package-with-python2 python-botocore))
f861b8b8
DT
8464
8465(define-public awscli
8466 (package
8467 (name "awscli")
d5ccf71e 8468 (version "1.11.5")
f861b8b8
DT
8469 (source
8470 (origin
8471 (method url-fetch)
d5ccf71e 8472 (uri (pypi-uri name version))
f861b8b8
DT
8473 (sha256
8474 (base32
d5ccf71e 8475 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8476 (build-system python-build-system)
482d9591 8477 (propagated-inputs
f861b8b8 8478 `(("python-colorama" ,python-colorama)
482d9591
HG
8479 ("python-botocore" ,python-botocore)
8480 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8481 ("python-docutils" ,python-docutils)
482d9591 8482 ("python-rsa" ,python-rsa)))
d4649177 8483 (native-inputs
482d9591 8484 `(("python-mock" ,python-mock)
f861b8b8 8485 ("python-nose" ,python-nose)
f861b8b8
DT
8486 ("python-sphinx" ,python-sphinx)
8487 ("python-tox" ,python-tox)
482d9591 8488 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8489 (home-page "http://aws.amazon.com/cli/")
8490 (synopsis "Command line client for AWS")
8491 (description "AWS CLI provides a unified command line interface to the
8492Amazon Web Services (AWS) API.")
3f641af0 8493 (license license:asl2.0)))
6a44697d
LF
8494
8495(define-public python-hypothesis
8496 (package
8497 (name "python-hypothesis")
bea6d94d 8498 (version "3.1.0")
6a44697d
LF
8499 (source (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "hypothesis" version))
8502 (sha256
8503 (base32
bea6d94d 8504 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8505 (build-system python-build-system)
6a44697d
LF
8506 (propagated-inputs
8507 `(("python-flake8" ,python-flake8)
8508 ("python-pytest" ,python-pytest)))
8509 (synopsis "Library for property based testing")
8510 (description "Hypothesis is a library for testing your Python code against a
8511much larger range of examples than you would ever want to write by hand. It’s
8512based on the Haskell library, Quickcheck, and is designed to integrate
8513seamlessly into your existing Python unit testing work flow.")
8514 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8515 (license license:mpl2.0)
6f068e08 8516 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8517
8518(define-public python2-hypothesis
6f068e08
EF
8519 (let ((hypothesis (package-with-python2
8520 (strip-python2-variant python-hypothesis))))
8521 (package (inherit hypothesis)
8522 (native-inputs
f3b98f4f 8523 `(("python2-enum34" ,python2-enum34))))))
7517e73c
LF
8524
8525(define-public python-pytest-subtesthack
8526 (package
8527 (name "python-pytest-subtesthack")
8528 (version "0.1.1")
8529 (source (origin
8530 (method url-fetch)
8531 (uri (pypi-uri "pytest-subtesthack" version))
8532 (sha256
8533 (base32
8534 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8535 (build-system python-build-system)
7517e73c
LF
8536 (propagated-inputs
8537 `(("python-pytest" ,python-pytest)))
8538 (synopsis "Set-up and tear-down fixtures for unit tests")
8539 (description "This plugin allows you to set up and tear down fixtures within
8540unit test functions that use @code{py.test}. This is useful for using
8541@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8542function multiple times, without setting up or tearing down fixture state as is
8543normally the case.")
8544 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8545 (license license:unlicense)))
7517e73c
LF
8546
8547(define-public python2-pytest-subtesthack
8548 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8549
8550(define-public python2-xdo
8551 (package
8552 (name "python2-xdo")
8553 (version "0.2")
8554 (source (origin
8555 (method url-fetch)
8556 (uri (string-append
8557 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8558 "python-xdo_" version ".orig.tar.gz"))
8559 (sha256
8560 (base32
8561 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8562 (build-system python-build-system)
8563 (arguments
8564 `(#:python ,python-2
8565 #:tests? #f)) ; no tests provided
8566 (inputs
8567 `(("xdotool" ,xdotool)
8568 ("libX11" ,libx11)))
8569 (home-page "https://tracker.debian.org/pkg/python-xdo")
8570 (synopsis "Python library for simulating X11 keyboard/mouse input")
8571 (description "Provides bindings to libxdo for manipulating X11 via simulated
8572input. (Note that this is mostly a legacy library; you may wish to look at
8573python-xdo for newer bindings.)")
3f641af0 8574 (license license:bsd-3)))
0bdc1671 8575
cb34dc6c
CAW
8576(define-public python-wtforms
8577 (package
8578 (name "python-wtforms")
8579 (version "2.1")
8580 (source
8581 (origin
8582 (method url-fetch)
8583 (uri (pypi-uri "WTForms" version ".zip"))
8584 (sha256
8585 (base32
8586 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8587 (build-system python-build-system)
13c4d874
EF
8588 (arguments
8589 '(#:phases
8590 (modify-phases %standard-phases
8591 (add-after 'unpack 'remove-django-test
8592 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8593 (lambda _
8594 (substitute*
8595 "tests/runtests.py"
8596 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8597 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8598 #t)))))
cb34dc6c
CAW
8599 (native-inputs
8600 `(("unzip" ,unzip)))
8601 (home-page "http://wtforms.simplecodes.com/")
8602 (synopsis
8603 "Form validation and rendering library for Python web development")
8604 (description
8605 "WTForms is a flexible forms validation and rendering library
8606for Python web development. It is very similar to the web form API
8607available in Django, but is a standalone package.")
f210e944 8608 (license license:bsd-3)))
cb34dc6c
CAW
8609
8610(define-public python2-wtforms
f210e944 8611 (package-with-python2 python-wtforms))
50aaec25
DT
8612
8613(define-public python-mako
8614 (package
8615 (name "python-mako")
8616 (version "1.0.3")
8617 (source
8618 (origin
8619 (method url-fetch)
8620 (uri (pypi-uri "Mako" version))
8621 (sha256
8622 (base32
8623 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8624 (build-system python-build-system)
482d9591
HG
8625 (propagated-inputs
8626 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8627 (native-inputs
482d9591 8628 `(("python-mock" ,python-mock)
50aaec25
DT
8629 ("python-nose" ,python-nose)))
8630 (home-page "http://www.makotemplates.org/")
8631 (synopsis "Templating language for Python")
8632 (description "Mako is a templating language for Python that compiles
8633templates into Python modules.")
f210e944 8634 (license license:expat)))
50aaec25
DT
8635
8636(define-public python2-mako
f210e944 8637 (package-with-python2 python-mako))
ae00a41f
CAW
8638
8639(define-public python-waitress
8640 (package
8641 (name "python-waitress")
8642 (version "0.8.10")
8643 (source
8644 (origin
8645 (method url-fetch)
8646 (uri (pypi-uri "waitress" version))
8647 (sha256
8648 (base32
8649 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8650 (build-system python-build-system)
8651 (home-page "https://github.com/Pylons/waitress")
8652 (synopsis "Waitress WSGI server")
8653 (description "Waitress is meant to be a production-quality pure-Python WSGI
8654server with very acceptable performance.")
f210e944 8655 (license license:zpl2.1)))
ae00a41f
CAW
8656
8657(define-public python2-waitress
f210e944 8658 (package-with-python2 python-waitress))
778a284b
CAW
8659
8660(define-public python-wsgiproxy2
8661 (package
8662 (name "python-wsgiproxy2")
8663 (version "0.4.2")
8664 (source
8665 (origin
8666 (method url-fetch)
8667 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8668 (sha256
8669 (base32
8670 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8671 (build-system python-build-system)
e359b31a
LF
8672 (arguments
8673 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8674 ;; support Python 3:
8675 ;; https://github.com/benoitc/restkit/issues/140
8676 #:tests? #f))
778a284b
CAW
8677 (native-inputs
8678 `(("unzip" ,unzip)
8679 ("python-nose" ,python-nose)
8680 ("python-coverage" ,python-coverage)))
8681 (propagated-inputs
8682 `(("python-six" ,python-six)
8683 ("python-webob" ,python-webob)))
8684 (home-page
8685 "https://github.com/gawel/WSGIProxy2/")
8686 (synopsis "WSGI Proxy with various http client backends")
8687 (description "WSGI turns HTTP requests into WSGI function calls.
8688WSGIProxy turns WSGI function calls into HTTP requests.
8689It also includes code to sign requests and pass private data,
8690and to spawn subprocesses to handle requests.")
f210e944 8691 (license license:expat)))
778a284b
CAW
8692
8693(define-public python2-wsgiproxy2
f210e944 8694 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8695
8696(define-public python-pastedeploy
8697 (package
8698 (name "python-pastedeploy")
8699 (version "1.5.2")
8700 (source
8701 (origin
8702 (method url-fetch)
8703 (uri (pypi-uri "PasteDeploy" version))
8704 (sha256
8705 (base32
8706 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8707 (build-system python-build-system)
8708 (native-inputs
8709 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8710 (home-page "http://pythonpaste.org/deploy/")
8711 (synopsis
8712 "Load, configure, and compose WSGI applications and servers")
8713 (description
8714 "This tool provides code to load WSGI applications and servers from URIs;
8715these URIs can refer to Python Eggs for INI-style configuration files. Paste
8716Script provides commands to serve applications based on this configuration
8717file.")
8718 (license license:expat)))
8719
8720(define-public python2-pastedeploy
8721 (package-with-python2 python-pastedeploy))
1cf53652 8722
c4a7904c
CAW
8723(define-public python-paste
8724 (package
8725 (name "python-paste")
8726 (version "2.0.2")
8727 (source
8728 (origin
8729 (method url-fetch)
8730 (uri (pypi-uri "Paste" version))
8731 (sha256
8732 (base32
8733 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8734 (patches (search-patches "python-paste-remove-website-test.patch"
8735 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8736 (build-system python-build-system)
8737 (native-inputs
8738 `(("python-nose" ,python-nose)))
8739 (propagated-inputs
f3b98f4f 8740 `(("python-six" ,python-six)))
c4a7904c
CAW
8741 (arguments
8742 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8743 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8744 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8745 ;; still... things should be better by the next Paste release.)
8746 #:tests? #f))
8747 (home-page "http://pythonpaste.org")
8748 (synopsis
8749 "Python web development tools, focusing on WSGI")
8750 (description
8751 "Paste provides a variety of web development tools and middleware which
8752can be nested together to build web applications. Paste's design closely
8753follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8754 (license license:expat)
8755 (properties `((python2-variant . ,(delay python2-paste))))))
8756
8757(define-public python2-paste
8758 (let ((paste (package-with-python2
8759 (strip-python2-variant python-paste))))
8760 (package
8761 (inherit paste)
8762 (arguments
8763 ;; Tests are back for Python 2!
8764 `(#:tests? #t
8765 ,@(package-arguments paste))))))
8766
a8f20f63
CAW
8767(define-public python-pastescript
8768 (package
8769 (name "python-pastescript")
8770 (version "2.0.2")
8771 (source
8772 (origin
8773 (method url-fetch)
8774 (uri (pypi-uri "PasteScript" version))
8775 (sha256
8776 (base32
8777 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8778 (build-system python-build-system)
8779 (native-inputs
8780 `(("python-nose" ,python-nose)))
8781 (propagated-inputs
f3b98f4f 8782 `(("python-paste" ,python-paste)
a8f20f63
CAW
8783 ("python-pastedeploy" ,python-pastedeploy)))
8784 (home-page "http://pythonpaste.org/script/")
8785 (arguments
8786 '(;; Unfortunately, this requires the latest unittest2,
8787 ;; but that requires traceback2 which requires linecache2 which requires
8788 ;; unittest2. So we're skipping tests for now.
8789 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8790 ;; so in theory we could get around this situation somehow.)
8791 #:tests? #f))
8792 (synopsis
8793 "Pluggable command line tool for serving web applications and more")
8794 (description
8795 "PasteScript is a plugin-friendly command line tool which provides a
8796variety of features, from launching web applications to bootstrapping project
8797layouts.")
8798 (license license:expat)))
8799
8800(define-public python2-pastescript
8801 (package-with-python2 python-pastescript))
8802
1cf53652
CAW
8803(define-public python-pyquery
8804 (package
8805 (name "python-pyquery")
aab76e80 8806 (version "1.2.13")
1cf53652
CAW
8807 (source
8808 (origin
8809 (method url-fetch)
8810 (uri (pypi-uri "pyquery" version))
8811 (sha256
8812 (base32
aab76e80 8813 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8814 (build-system python-build-system)
2ddbfa8c
LF
8815 (native-inputs
8816 `(("python-webob" ,python-webob)
8817 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8818 (propagated-inputs
8819 `(("python-lxml" ,python-lxml)
8820 ("python-cssselect" ,python-cssselect)))
8821 (home-page "https://github.com/gawel/pyquery")
8822 (synopsis "Make jQuery-like queries on xml documents")
8823 (description "pyquery allows you to make jQuery queries on xml documents.
8824The API is as much as possible the similar to jQuery. pyquery uses lxml for
8825fast xml and html manipulation.")
f210e944 8826 (license license:bsd-3)))
1cf53652
CAW
8827
8828(define-public python2-pyquery
f210e944 8829 (package-with-python2 python-pyquery))
aa6313d6
CAW
8830
8831(define-public python-webtest
8832 (package
8833 (name "python-webtest")
8834 (version "2.0.20")
8835 (source
8836 (origin
8837 (method url-fetch)
8838 (uri (pypi-uri "WebTest" version))
8839 (sha256
8840 (base32
8841 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8842 (build-system python-build-system)
8843 (arguments
8844 `(;; Unfortunately we have to disable tests!
8845 ;; This release of WebTest is pinned to python-nose < 1.3,
8846 ;; but older versions of python-nose are plagued with the following
8847 ;; bug(s), which rears its ugly head during test execution:
8848 ;; https://github.com/nose-devs/nose/issues/759
8849 ;; https://github.com/nose-devs/nose/pull/811
8850 #:tests? #f))
8851 ;; Commented out code is no good, but in this case, once tests
8852 ;; are ready to be enabled again, we should put the following
8853 ;; in place:
8854 ;; (native-inputs
8855 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8856 ;; ; but see above comment
8857 ;; ("python-coverage" ,python-coverage)
8858 ;; ("python-mock" ,python-mock)
8859 ;; ("python-pastedeploy" ,python-pastedeploy)
8860 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8861 ;; ("python-pyquery" ,python-pyquery)))
8862 (propagated-inputs
8863 `(("python-waitress" ,python-waitress)
8864 ("python-webob" ,python-webob)
8865 ("python-six" ,python-six)
8866 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8867 (home-page "http://webtest.pythonpaste.org/")
8868 (synopsis "Helper to test WSGI applications")
8869 (description "Webtest allows you to test your Python web applications
8870without starting an HTTP server. It supports anything that supports the
8871minimum of WSGI.")
f210e944 8872 (license license:expat)))
aa6313d6
CAW
8873
8874(define-public python2-webtest
f210e944 8875 (package-with-python2 python-webtest))
4cb122cd
CAW
8876
8877(define-public python-anyjson
8878 (package
8879 (name "python-anyjson")
8880 (version "0.3.3")
8881 (source
8882 (origin
8883 (method url-fetch)
8884 (uri (pypi-uri "anyjson" version))
8885 (sha256
8886 (base32
8887 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8888 (build-system python-build-system)
8889 (arguments
8890 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8891 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8892 ;; whatever) so this transformation needs to be done before the tests
8893 ;; can be run. Maybe we could add a build step to transform beforehand
8894 ;; but it could be annoying/difficult.
8895 ;; We can enable tests for the Python 2 version, though, and do below.
8896 #:tests? #f))
8897 (home-page "http://bitbucket.org/runeh/anyjson/")
8898 (synopsis
8899 "Wraps best available JSON implementation in a common interface")
8900 (description
8901 "Anyjson loads whichever is the fastest JSON module installed
8902and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8903 (license license:bsd-3)
4cb122cd
CAW
8904 (properties `((python2-variant . ,(delay python2-anyjson))))))
8905
8906(define-public python2-anyjson
8907 (let ((anyjson (package-with-python2
8908 (strip-python2-variant python-anyjson))))
8909 (package
8910 (inherit anyjson)
8911 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8912 #:tests? #t
8913 ,@(package-arguments anyjson)))
00e10c6e 8914 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8915
8916(define-public python-amqp
8917 (package
8918 (name "python-amqp")
8919 (version "1.4.9")
8920 (source
8921 (origin
8922 (method url-fetch)
8923 (uri (pypi-uri "amqp" version))
8924 (sha256
8925 (base32
8926 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8927 (build-system python-build-system)
8928 (native-inputs
8929 `(("python-nose" ,python-nose)
8930 ("python-mock" ,python-mock)))
8931 (home-page "http://github.com/celery/py-amqp")
8932 (synopsis
8933 "Low-level AMQP client for Python (fork of amqplib)")
8934 (description
8935 "This is a fork of amqplib which was originally written by Barry Pederson.
8936It is maintained by the Celery project, and used by kombu as a pure python
8937alternative when librabbitmq is not available.")
3f641af0 8938 (license license:lgpl2.1+)
8dfceab7
CAW
8939 (properties `((python2-variant . ,(delay python2-amqp))))))
8940
8941(define-public python2-amqp
8942 (let ((amqp (package-with-python2
8943 (strip-python2-variant python-amqp))))
8944 (package
8945 (inherit amqp)
8946 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8947 ;; unmaintained. Weirdly, does not do this on the python 3
8948 ;; version?
8949 #:tests? #f
00e10c6e 8950 ,@(package-arguments amqp))))))
7d387305
CAW
8951
8952(define-public python-kombu
8953 (package
8954 (name "python-kombu")
0cb59822 8955 (version "3.0.37")
7d387305
CAW
8956 (source
8957 (origin
8958 (method url-fetch)
8959 (uri (pypi-uri "kombu" version))
8960 (sha256
8961 (base32
0cb59822 8962 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
8963 (build-system python-build-system)
8964 (native-inputs
8965 `(("python-mock" ,python-mock)
8966 ("python-nose" ,python-nose)))
8967 (propagated-inputs
8968 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
8969 ("python-amqp" ,python-amqp)
8970 ("python-redis" ,python-redis)))
7d387305
CAW
8971 (home-page "http://kombu.readthedocs.org")
8972 (synopsis "Message passing library for Python")
8973 (description "The aim of Kombu is to make messaging in Python as easy as
8974possible by providing an idiomatic high-level interface for the AMQ protocol,
8975and also provide proven and tested solutions to common messaging problems.
8976AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8977message orientation, queuing, routing, reliability and security, for which the
8978RabbitMQ messaging server is the most popular implementation.")
3f641af0 8979 (license license:bsd-3)
7d387305
CAW
8980 (properties `((python2-variant . ,(delay python2-kombu))))))
8981
8982(define-public python2-kombu
8983 (let ((kombu (package-with-python2
8984 (strip-python2-variant python-kombu))))
8985 (package
8986 (inherit kombu)
328bb95d
HG
8987 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8988 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
8989
8990(define-public python-billiard
8991 (package
8992 (name "python-billiard")
a6bb9e44 8993 (version "3.3.0.23")
b6f0b9fb
CAW
8994 (source
8995 (origin
8996 (method url-fetch)
8997 (uri (pypi-uri "billiard" version))
8998 (sha256
8999 (base32
a6bb9e44 9000 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9001 (build-system python-build-system)
9002 (native-inputs
9003 `(("python-nose" ,python-nose)))
9004 (home-page "http://github.com/celery/billiard")
9005 (synopsis
9006 "Python multiprocessing fork with improvements and bugfixes")
9007 (description
9008 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9009multiprocessing package itself is a renamed and updated version of R Oudkerk's
9010pyprocessing package. This standalone variant is intended to be compatible with
9011Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9012 (license license:bsd-3)
b6f0b9fb
CAW
9013 (properties `((python2-variant . ,(delay python2-billiard))))))
9014
9015(define-public python2-billiard
9016 (let ((billiard (package-with-python2
9017 (strip-python2-variant python-billiard))))
9018 (package
9019 (inherit billiard)
00e10c6e 9020 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9021 ("python2-mock" ,python2-mock)
9022 ,@(package-native-inputs billiard))))))
22df6419
CAW
9023
9024(define-public python-celery
9025 (package
9026 (name "python-celery")
9ebe87fe 9027 (version "3.1.24")
22df6419
CAW
9028 (source
9029 (origin
9030 (method url-fetch)
9031 (uri (pypi-uri "celery" version))
9032 (sha256
9033 (base32
9ebe87fe 9034 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9035 (build-system python-build-system)
9ebe87fe
LF
9036 (arguments
9037 `(#:phases
9038 (modify-phases %standard-phases
9039 ;; These tests break with Python 3.5:
9040 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9041 (replace 'check
9042 (lambda _
9043 (zero?
9044 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9045 (native-inputs
9046 `(("python-nose" ,python-nose)))
f22efa01 9047 (propagated-inputs
22df6419
CAW
9048 `(("python-pytz" ,python-pytz)
9049 ("python-billiard" ,python-billiard)
9050 ("python-kombu" ,python-kombu)))
9051 (home-page "http://celeryproject.org")
9052 (synopsis "Distributed Task Queue")
9053 (description "Celery is an asynchronous task queue/job queue based on
9054distributed message passing. It is focused on real-time operation, but
9055supports scheduling as well. The execution units, called tasks, are executed
9056concurrently on a single or more worker servers using multiprocessing,
9057Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9058synchronously (wait until ready).")
3f641af0 9059 (license license:bsd-3)
22df6419
CAW
9060 (properties `((python2-variant . ,(delay python2-celery))))))
9061
9062(define-public python2-celery
9063 (let ((celery (package-with-python2
9064 (strip-python2-variant python-celery))))
9065 (package
9066 (inherit celery)
00e10c6e 9067 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9068 ("python2-mock" ,python2-mock)
9069 ,@(package-native-inputs celery))))))
97e32948
CAW
9070
9071(define-public python-translitcodec
9072 (package
9073 (name "python-translitcodec")
9074 (version "0.4.0")
9075 (source
9076 (origin
9077 (method url-fetch)
9078 (uri (pypi-uri "translitcodec" version))
9079 (sha256
9080 (base32
9081 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9082 (build-system python-build-system)
9083 (arguments
9084 `(#:tests? #f)) ; no tests provided
9085 (home-page
9086 "https://github.com/claudep/translitcodec")
9087 (synopsis
9088 "Unicode to 8-bit charset transliteration codec")
9089 (description
9090 "This package contains codecs for transliterating ISO 10646 texts into
9091best-effort representations using smaller coded character sets (ASCII,
9092ISO 8859, etc.).")
f210e944 9093 (license license:expat)))
97e32948
CAW
9094
9095(define-public python2-translitcodec
f210e944 9096 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9097
9098(define-public python-editor
9099 (package
9100 (name "python-editor")
9101 (version "0.5")
9102 (source
9103 (origin
9104 (method url-fetch)
9105 (uri (pypi-uri "python-editor" version))
9106 (sha256
9107 (base32
9108 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9109 (build-system python-build-system)
9110 (home-page
9111 "https://github.com/fmoo/python-editor")
9112 (synopsis
9113 "Programmatically open an editor, capture the result")
9114 (description
9115 "python-editor is a library that provides the editor module for
9116programmatically interfacing with your system's $EDITOR.")
f210e944 9117 (license license:asl2.0)))
0c3b90d4
CAW
9118
9119(define-public python2-editor
f210e944 9120 (package-with-python2 python-editor))
3276517c
LF
9121
9122(define-public python-sphinxcontrib-programoutput
9123 (package
9124 (name "python-sphinxcontrib-programoutput")
9125 (version "0.8")
9126 (source (origin
9127 (method url-fetch)
9128 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9129 (sha256
9130 (base32
9131 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9132 (build-system python-build-system)
9133 (propagated-inputs
a0a09859 9134 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9135 (synopsis "Sphinx extension to include program output")
9136 (description "A Sphinx extension to literally insert the output of arbitrary
9137commands into documents, helping you to keep your command examples up to date.")
9138 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9139 (license license:bsd-2)))
3276517c
LF
9140
9141(define-public python2-sphinxcontrib-programoutput
f210e944 9142 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9143
9144(define-public python-sphinx-repoze-autointerface
9145 (package
9146 (name "python-sphinx-repoze-autointerface")
328ae341 9147 (version "0.8")
548d7165
LF
9148 (source (origin
9149 (method url-fetch)
9150 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9151 (sha256
9152 (base32
328ae341 9153 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9154 (build-system python-build-system)
9155 (propagated-inputs
47c7dc4a 9156 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9157 ("python-zope-interface" ,python-zope-interface)))
9158 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9159 (description "This package defines an extension for the Sphinx documentation
9160system. The extension allows generation of API documentation by
9161introspection of @code{zope.interface} instances in code.")
9162 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9163 (license license:repoze)))
548d7165
LF
9164
9165(define-public python2-sphinx-repoze-autointerface
9166 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9167
9168(define-public python-psycopg2
9169 (package
9170 (name "python-psycopg2")
9171 (version "2.6.1")
9172 (source
9173 (origin
9174 (method url-fetch)
9175 (uri (pypi-uri "psycopg2" version))
9176 (sha256
9177 (base32
9178 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9179 (build-system python-build-system)
9180 (arguments
9181 ;; Tests would require a postgresql database "psycopg2_test"
9182 ;; and a running postgresql database management service.
9183 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9184 (inputs
9185 `(("postgresql" ,postgresql))) ; libpq
9186 (home-page "http://initd.org/psycopg/")
9187 (synopsis "Python PostgreSQL adapter")
9188 (description
9189 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9190 (license license:lgpl3+)))
b31fbea5
DM
9191
9192(define-public python2-psycopg2
f210e944 9193 (package-with-python2 python-psycopg2))
eed1a61f
LF
9194
9195(define-public python-vobject
9196 (package
9197 (name "python-vobject")
9bed9b15 9198 (version "0.9.2")
eed1a61f
LF
9199 (source (origin
9200 (method url-fetch)
9201 (uri (pypi-uri "vobject" version))
9202 (sha256
9203 (base32
9bed9b15 9204 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9205 (build-system python-build-system)
a9871b7b
LF
9206 (arguments
9207 '(;; The test suite relies on some non-portable Windows interfaces.
9208 #:tests? #f))
f22efa01 9209 (propagated-inputs
eed1a61f
LF
9210 `(("python-dateutil-2" ,python-dateutil-2)
9211 ("python-pyicu" ,python-pyicu)))
9212 (synopsis "Parse and generate vCard and vCalendar files")
9213 (description "Vobject is intended to be a full featured Python package for
9214parsing and generating vCard and vCalendar files. Currently, iCalendar files
9215are supported and well tested. vCard 3.0 files are supported, and all data
9216should be imported, but only a few components are understood in a sophisticated
9217way.")
9218 (home-page "http://eventable.github.io/vobject/")
f210e944 9219 (license license:asl2.0)))
eed1a61f
LF
9220
9221(define-public python2-vobject
f210e944 9222 (package-with-python2 python-vobject))
cedac813
LF
9223
9224(define-public python-munkres
9225 (package
9226 (name "python-munkres")
38e81a2c 9227 (version "1.0.8")
cedac813
LF
9228 (source (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "munkres" version))
9231 (sha256
9232 (base32
38e81a2c 9233 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9234 (build-system python-build-system)
9235 (arguments
9236 '(#:tests? #f)) ; no test suite
9237 (home-page "http://software.clapper.org/munkres/")
9238 (synopsis "Implementation of the Munkres algorithm")
9239 (description "The Munkres module provides an implementation of the Munkres
9240algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9241useful for solving the Assignment Problem.")
3f641af0 9242 (license license:bsd-3)))
cedac813
LF
9243
9244(define-public python2-munkres
9245 (package-with-python2 python-munkres))
f3b3d78f
LF
9246
9247(define-public python-flask
9248 (package
9249 (name "python-flask")
c6c80104 9250 (version "0.11.1")
f3b3d78f
LF
9251 (source (origin
9252 (method url-fetch)
9253 (uri (pypi-uri "Flask" version))
9254 (sha256
9255 (base32
c6c80104 9256 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9257 (build-system python-build-system)
9258 (propagated-inputs
9259 `(("python-itsdangerous" ,python-itsdangerous)
9260 ("python-jinja2" ,python-jinja2)
8f35c030 9261 ("python-click" ,python-click)
f3b3d78f
LF
9262 ("python-werkzeug" ,python-werkzeug)))
9263 (home-page "https://github.com/mitsuhiko/flask/")
9264 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9265 (description "Flask is a micro web framework based on the Werkzeug toolkit
9266and Jinja2 template engine. It is called a micro framework because it does not
9267presume or force a developer to use a particular tool or library.")
f210e944 9268 (license license:bsd-3)))
f3b3d78f
LF
9269
9270(define-public python2-flask
f210e944 9271 (package-with-python2 python-flask))
603d665b
LF
9272
9273(define-public python-cookies
9274 (package
9275 (name "python-cookies")
9276 (version "2.2.1")
9277 (source (origin
9278 (method url-fetch)
9279 (uri (pypi-uri "cookies" version))
9280 (sha256
9281 (base32
9282 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9283 (build-system python-build-system)
9284 (arguments
9285 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9286 #:tests? #f))
9287 (native-inputs
9288 `(("python-pytest" ,python2-pytest)))
9289 (synopsis "HTTP cookie parser and renderer")
9290 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9291Python.")
9292 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9293 (license license:expat)))
603d665b
LF
9294
9295(define-public python2-cookies
f210e944 9296 (package-with-python2 python-cookies))
0efde7d6
LF
9297
9298(define-public python-responses
9299 (package
9300 (name "python-responses")
9301 (version "0.5.1")
9302 (source (origin
9303 (method url-fetch)
9304 (uri (pypi-uri "responses" version))
9305 (sha256
9306 (base32
9307 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9308 (build-system python-build-system)
9309 (arguments
9310 `(;; Test suite is not distributed:
9311 ;; https://github.com/getsentry/responses/issues/38
9312 #:tests? #f))
9313 (native-inputs
d8ea5f2f 9314 `(("python-mock" ,python-mock)))
0efde7d6
LF
9315 (propagated-inputs
9316 `(("python-requests" ,python-requests)
d8ea5f2f 9317 ("python-cookies" ,python-cookies)
0efde7d6
LF
9318 ("python-six" ,python-six)))
9319 (home-page "https://github.com/getsentry/responses")
9320 (synopsis "Utility for mocking out the `requests` Python library")
9321 (description "A utility library for mocking out the `requests` Python
9322library.")
f210e944 9323 (license license:asl2.0)))
0efde7d6
LF
9324
9325(define-public python2-responses
f210e944 9326 (package-with-python2 python-responses))
76b94885 9327
b7afd018
RW
9328(define-public python-whoosh
9329 (package
9330 (name "python-whoosh")
9331 (version "2.7.4")
9332 (source
9333 (origin
9334 (method url-fetch)
9335 (uri (pypi-uri "Whoosh" version))
9336 (sha256
9337 (base32
9338 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9339 (build-system python-build-system)
9340 (native-inputs
f3b98f4f 9341 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9342 (home-page "http://bitbucket.org/mchaput/whoosh")
9343 (synopsis "Full text indexing, search, and spell checking library")
9344 (description
9345 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9346checking library.")
9347 (license license:bsd-2)))
9348
9349(define-public python2-whoosh
9350 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9351 (package (inherit whoosh)
9352 (propagated-inputs
9353 `(("python2-backport-ssl-match-hostname"
9354 ,python2-backport-ssl-match-hostname)
9355 ,@(package-propagated-inputs whoosh))))))
9356
76b94885
LF
9357(define-public python-pathlib
9358 (package
9359 (name "python-pathlib")
9360 (version "1.0.1")
9361 (source (origin
9362 (method url-fetch)
9363 (uri (pypi-uri "pathlib" version))
9364 (sha256
9365 (base32
9366 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9367 (build-system python-build-system)
92a312dc
RW
9368 ;; The tests depend on the internal "test" module, which does not provide
9369 ;; a stable interface.
9370 (arguments `(#:tests? #f))
76b94885 9371 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9372 (synopsis "Object-oriented file system paths")
9373 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9374It offers the following advantages over using string objects:
9375
9376@enumerate
9377@item No more cumbersome use of os and os.path functions. Everything can
9378be done easily through operators, attribute accesses, and method calls.
9379@item Embodies the semantics of different path types. For example,
9380comparing Windows paths ignores casing.
9381@item Well-defined semantics, eliminating any inconsistencies or
9382ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9383@end enumerate
9384
9385Note: In Python 3.4, pathlib is now part of the standard library. For other
9386Python versions please consider python-pathlib2 instead, which tracks the
9387standard library module. This module (python-pathlib) isn't maintained
9388anymore.")
76b94885
LF
9389 (license license:expat)))
9390
9391(define-public python2-pathlib
9392 (package-with-python2 python-pathlib))
25a7db0a 9393
b7703c81
HG
9394(define-public python2-pathlib2
9395 (package
9396 (name "python2-pathlib2")
9397 (version "2.1.0")
9398 (source (origin
9399 (method url-fetch)
9400 (uri (pypi-uri "pathlib2" version))
9401 (sha256
9402 (base32
9403 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9404 (build-system python-build-system)
49a531f5
HG
9405 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9406 ;; version is 3.4 which already includes this package as part of the
9407 ;; standard library.
b7703c81
HG
9408 (arguments
9409 `(#:python ,python-2))
9410 (native-inputs
f3b98f4f 9411 `(("python2-six" ,python2-six)))
b7703c81
HG
9412 (home-page "http://pypi.python.org/pypi/pathlib2/")
9413 (synopsis "Object-oriented file system paths - backport of standard
9414pathlib module")
9415 (description "The goal of pathlib2 is to provide a backport of standard
9416pathlib module which tracks the standard library module, so all the newest
9417features of the standard pathlib can be used also on older Python versions.
9418
9419Pathlib offers a set of classes to handle file system paths. It offers the
9420following advantages over using string objects:
9421
9422@enumerate
9423@item No more cumbersome use of os and os.path functions. Everything can
9424be done easily through operators, attribute accesses, and method calls.
9425@item Embodies the semantics of different path types. For example,
9426comparing Windows paths ignores casing.
9427@item Well-defined semantics, eliminating any inconsistencies or
9428ambiguities (forward vs. backward slashes, etc.).
9429@end enumerate")
9430 (license license:expat)))
9431
25a7db0a
LF
9432(define-public python-jellyfish
9433 (package
9434 (name "python-jellyfish")
8c4964dd 9435 (version "0.5.6")
25a7db0a
LF
9436 (source (origin
9437 (method url-fetch)
9438 (uri (pypi-uri "jellyfish" version))
9439 (sha256
9440 (base32
8c4964dd 9441 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9442 (build-system python-build-system)
9443 (native-inputs
9444 `(("python-pytest" ,python-pytest)))
9445 (home-page "https://github.com/jamesturk/jellyfish")
9446 (synopsis "Approximate and phonetic matching of strings")
9447 (description "Jellyfish uses a variety of string comparison and phonetic
9448encoding algorithms to do fuzzy string matching.")
3f641af0 9449 (license license:bsd-2)
25a7db0a
LF
9450 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9451
9452(define-public python2-jellyfish
9453 (let ((jellyfish (package-with-python2
9454 (strip-python2-variant python-jellyfish))))
9455 (package (inherit jellyfish)
00e10c6e 9456 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9457 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9458
9459(define-public python2-unicodecsv
9460 (package
9461 (name "python2-unicodecsv")
9462 (version "0.14.1")
9463 (source (origin
9464 (method url-fetch)
9465 ;; The test suite is not included in the PyPi release.
9466 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9467 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9468 "archive/" version ".tar.gz"))
9469 (file-name (string-append name "-" version ".tar.gz"))
9470 (sha256
9471 (base32
9472 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9473 (build-system python-build-system)
9474 (arguments
9475 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9476 #:python ,python-2))
9477 (native-inputs
f3b98f4f 9478 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9479 (home-page "https://github.com/jdunck/python-unicodecsv")
9480 (synopsis "Unicode CSV module for Python 2")
9481 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9482module, adding support for Unicode strings.")
3f641af0 9483 (license license:bsd-2)))
064503aa
LF
9484
9485(define-public python-rarfile
9486 (package
9487 (name "python-rarfile")
67824447 9488 (version "2.8")
064503aa
LF
9489 (source (origin
9490 (method url-fetch)
9491 (uri (pypi-uri "rarfile" version))
9492 (sha256
9493 (base32
67824447 9494 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9495 (build-system python-build-system)
9496 (arguments
9497 '(#:phases
9498 (modify-phases %standard-phases
9499 (replace 'check
9500 ;; Many tests fail, but the installation proceeds.
9501 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9502 (native-inputs
9503 `(("which" ,which))) ; required for tests
9504 (propagated-inputs
9505 `(("libarchive" ,libarchive)))
9506 (home-page "https://github.com/markokr/rarfile")
9507 (synopsis "RAR archive reader for Python")
9508 (description "This is Python module for RAR archive reading. The interface
9509is made as zipfile like as possible.")
3f641af0 9510 (license license:isc)))
064503aa
LF
9511
9512(define-public python2-rarfile
9513 (package-with-python2 python-rarfile))
daeeea71
CM
9514
9515(define-public python-magic
9516 (package
9517 (name "python-magic")
9518 (version "0.4.3")
9519 (source
9520 (origin
9521 (method url-fetch)
9522 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9523 version ".tar.gz"))
9524 (sha256
9525 (base32
9526 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9527 (file-name (string-append name "-" version "-checkout"))))
9528 (build-system python-build-system)
9529 (arguments
9530 ;; The tests are unreliable, so don't run them. The tests fail
9531 ;; under Python3 because they were written for Python2 and
9532 ;; contain import statements that do not work in Python3. One of
9533 ;; the tests fails under Python2 because its assertions are
9534 ;; overly stringent; it relies on comparing output strings which
9535 ;; are brittle and can change depending on the version of
9536 ;; libmagic being used and the system on which the test is
9537 ;; running. In my case, under GuixSD 0.10.0, only one test
9538 ;; failed, and it seems to have failed only because the version
9539 ;; of libmagic that is packaged in Guix outputs a slightly
9540 ;; different (but not wrong) string than the one that the test
9541 ;; expected.
9542 '(#:tests? #f
9543 #:phases (modify-phases %standard-phases
9544 ;; Replace a specific method call with a hard-coded
9545 ;; path to the necessary libmagic.so file in the
9546 ;; store. If we don't do this, then the method call
9547 ;; will fail to find the libmagic.so file, which in
9548 ;; turn will cause any application using
9549 ;; python-magic to fail.
9550 (add-before 'build 'hard-code-path-to-libmagic
9551 (lambda* (#:key inputs #:allow-other-keys)
9552 (let ((file (assoc-ref inputs "file")))
9553 (substitute* "magic.py"
9554 (("ctypes.util.find_library\\('magic'\\)")
9555 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9556 #t)))
9557 (add-before 'install 'disable-egg-compression
9558 (lambda _
9559 (let ((port (open-file "setup.cfg" "a")))
9560 (display "\n[easy_install]\nzip_ok = 0\n"
9561 port)
9562 (close-port port)
9563 #t))))))
daeeea71
CM
9564 (inputs
9565 ;; python-magic needs to be able to find libmagic.so.
9566 `(("file" ,file)))
9567 (home-page "https://github.com/ahupp/python-magic")
9568 (synopsis "File type identification using libmagic")
9569 (description
9570 "This module uses ctypes to access the libmagic file type
9571identification library. It makes use of the local magic database and
9572supports both textual and MIME-type output. Note that this module and
9573the python-file module both provide a \"magic.py\" file; these two
9574modules, which are different and were developed separately, both serve
9575the same purpose: to provide Python bindings for libmagic.")
9576 (license license:expat)))
9577
9578(define-public python2-magic
9579 (package-with-python2 python-magic))
12af303f
CM
9580
9581(define-public python2-s3cmd
9582 (package
9583 (name "python2-s3cmd")
9584 (version "1.6.1")
9585 (source
9586 (origin
9587 (method url-fetch)
de67e922 9588 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9589 "s3cmd-" version ".tar.gz"))
9590 (sha256
9591 (base32
9592 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9593 (build-system python-build-system)
9594 (arguments
9595 ;; s3cmd is written for python2 only and contains no tests.
9596 `(#:python ,python-2
9597 #:tests? #f))
f22efa01 9598 (propagated-inputs
12af303f
CM
9599 `(("python2-dateutil" ,python2-dateutil)
9600 ;; The python-file package also provides a magic.py module.
9601 ;; This is an unfortunate state of affairs; however, s3cmd
9602 ;; fails to install if it cannot find specifically the
9603 ;; python-magic package. Thus we include it, instead of using
9604 ;; python-file. Ironically, s3cmd sometimes works better
9605 ;; without libmagic bindings at all:
9606 ;; https://github.com/s3tools/s3cmd/issues/198
9607 ("python2-magic" ,python2-magic)))
9608 (home-page "http://s3tools.org/s3cmd")
9609 (synopsis "Command line tool for S3-compatible storage services")
9610 (description
9611 "S3cmd is a command line tool for uploading, retrieving and managing data
9612in storage services that are compatible with the Amazon Simple Storage
9613Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9614GnuPG encryption, and more. It also supports management of Amazon's
9615CloudFront content delivery network.")
3f641af0 9616 (license license:gpl2+)))
4323a5f0
AE
9617
9618(define-public python-pkgconfig
9619 (package
9620 (name "python-pkgconfig")
9621 (version "1.1.0")
9622 (source
9623 (origin
9624 (method url-fetch)
9625 (uri (pypi-uri "pkgconfig" version))
9626 (sha256
9627 (base32
9628 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9629 (build-system python-build-system)
9630 (native-inputs
f3b98f4f 9631 `(("python-nose" ,python-nose)))
4323a5f0
AE
9632 (inputs
9633 `(("pkg-config" ,pkg-config)))
9634 (arguments
9635 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9636 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9637 #:tests? #f
4323a5f0
AE
9638 ;; Hard-code the path to pkg-config.
9639 #:phases
9640 (modify-phases %standard-phases
9641 (add-before
9642 'build 'patch
9643 (lambda _
9644 (substitute* "pkgconfig/pkgconfig.py"
9645 (("cmd = 'pkg-config")
9646 (string-append "cmd = '" (which "pkg-config"))))
9647 #t)))))
9648 (home-page "http://github.com/matze/pkgconfig")
9649 (synopsis "Python interface for pkg-config")
9650 (description "This module provides a Python interface to pkg-config. It
9651can be used to find all pkg-config packages, check if a package exists,
9652check if a package meets certain version requirements, query CFLAGS and
9653LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9654 (license license:expat)))
4323a5f0
AE
9655
9656(define-public python2-pkgconfig
9657 (package-with-python2 python-pkgconfig))
9658
2e697322
BW
9659(define-public python-bz2file
9660 (package
9661 (name "python-bz2file")
9662 (version "0.98")
9663 (source
9664 (origin
9665 (method url-fetch)
9666 (uri (pypi-uri "bz2file" version))
9667 (sha256
9668 (base32
9669 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9670 (build-system python-build-system)
9671 (arguments
124df723 9672 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9673 (home-page "https://github.com/nvawda/bz2file")
9674 (synopsis "Read and write bzip2-compressed files")
9675 (description
9676 "Bz2file is a Python library for reading and writing bzip2-compressed
9677files. It contains a drop-in replacement for the I/O interface in the
9678standard library's @code{bz2} module, including features from the latest
9679development version of CPython that are not available in older releases.")
3f641af0 9680 (license license:asl2.0)
2e697322
BW
9681 (properties `((python2-variant . ,(delay python2-bz2file))))))
9682
9683(define-public python2-bz2file
9684 (let ((base (package-with-python2
9685 (strip-python2-variant python-bz2file))))
9686 (package
9687 (inherit base)
124df723 9688 (arguments
752bb447
BW
9689 `(#:python ,python-2
9690 #:phases
124df723
BW
9691 (modify-phases %standard-phases
9692 ;; 'python setup.py test' does not work as of 0.98.
9693 ;; There is only the one test file, so we run it directly.
9694 (replace 'check
9695 (lambda _ (zero? (system* "python"
9696 "test_bz2file.py"))))))))))
2e697322 9697
da4ac1aa
BW
9698(define-public python-future
9699 (package
9700 (name "python-future")
9701 (version "0.15.2")
9702 (source
9703 (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "future" version))
9706 (sha256
9707 (base32
9708 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9709 (build-system python-build-system)
9710 ;; Many tests connect to the network or are otherwise flawed.
9711 ;; https://github.com/PythonCharmers/python-future/issues/210
9712 (arguments
9713 `(#:tests? #f))
9714 (home-page "http://python-future.org")
9715 (synopsis "Single-source support for Python 3 and 2")
9716 (description
9717 "@code{python-future} is the missing compatibility layer between Python 2 and
9718Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9719to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9720 (license license:expat)))
da4ac1aa
BW
9721
9722(define-public python2-future
f210e944 9723 (package-with-python2 python-future))
da4ac1aa 9724
8e451885
AE
9725(define-public python-cysignals
9726 (package
9727 (name "python-cysignals")
9728 (version "1.1.0")
9729 (source
9730 (origin
9731 (method url-fetch)
9732 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9733 (sha256
9734 (base32
9735 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9736 (build-system python-build-system)
9737 (native-inputs
9738 `(("python-cython" ,python-cython)
8e451885
AE
9739 ("python-sphinx" ,python-sphinx)))
9740 (inputs
9741 `(("pari-gp" ,pari-gp)))
9742 (arguments
9743 `(#:modules ((guix build python-build-system)
9744 ((guix build gnu-build-system) #:prefix gnu:)
9745 (guix build utils))
9746 ;; FIXME: Tests are executed after installation and currently fail
9747 ;; when not installing into standard locations; the author is working
9748 ;; on a fix.
9749 #:tests? #f
9750 #:phases
9751 (modify-phases %standard-phases
9752 (add-before
9753 'build 'configure
9754 (assoc-ref gnu:%standard-phases 'configure)))))
9755 (home-page
9756 "https://github.com/sagemath/cysignals")
9757 (synopsis
9758 "Handling of interrupts and signals for Cython")
9759 (description
9760 "The cysignals package provides mechanisms to handle interrupts (and
9761other signals and errors) in Cython code, using two related approaches,
9762for mixed Cython/Python code or external C libraries and pure Cython code,
9763respectively.")
3f641af0 9764 (license license:lgpl3+)))
8e451885
AE
9765
9766(define-public python2-cysignals
9767 (package-with-python2 python-cysignals))
9768
63bcec71
DM
9769(define-public python2-shedskin
9770 (package
9771 (name "python2-shedskin")
9772 (version "0.9.4")
9773 (source
9774 (origin
9775 (method url-fetch)
9776 (uri (string-append "https://github.com/shedskin/shedskin/"
9777 "releases/download/v" version
9778 "/shedskin-" version ".tgz"))
9779 (sha256
9780 (base32
9781 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9782 (build-system python-build-system)
9783 (arguments
9784 `(#:python ,python-2
9785 #:phases (modify-phases %standard-phases
9786 (add-after 'unpack 'fix-resulting-include-libs
9787 (lambda* (#:key inputs #:allow-other-keys)
9788 (let ((libgc (assoc-ref inputs "libgc"))
9789 (pcre (assoc-ref inputs "pcre")))
9790 (substitute* "shedskin/makefile.py"
9791 (("variable == 'CCFLAGS':[ ]*")
9792 (string-append "variable == 'CCFLAGS':\n"
9793 " line += ' -I " pcre "/include"
9794 " -I " libgc "/include'"))
9795 (("variable == 'LFLAGS':[ ]*")
9796 (string-append "variable == 'LFLAGS':\n"
9797 " line += ' -L" pcre "/lib"
9798 " -L " libgc "/lib'")))
9799 #t))))))
63bcec71
DM
9800 (inputs `(("pcre" ,pcre)
9801 ("libgc" ,libgc)))
9802 (home-page "https://shedskin.github.io/")
9803 (synopsis "Experimental Python-2 to C++ Compiler")
9804 (description (string-append "This is an experimental compiler for a subset of
9805Python. It generates C++ code and a Makefile."))
3f641af0 9806 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9807
9808(define-public python2-rope
9809 (package
9810 (name "python2-rope")
9811 (version "0.10.3")
9812 (source
9813 (origin
9814 (method url-fetch)
9815 (uri (pypi-uri "rope" version))
9816 (sha256
9817 (base32
9818 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9819 (arguments
9820 ;; Rope is currently python-2 only.
9821 ;; https://github.com/python-rope/rope/issues/57
9822 `(#:python ,python-2))
9823 (build-system python-build-system)
9824 (native-inputs
f3b98f4f 9825 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
9826 (home-page "https://github.com/python-rope/rope")
9827 (synopsis "Refactoring library for Python")
9828 (description "Rope is a refactoring library for Python. It facilitates
9829the renaming, moving and extracting of attributes, functions, modules, fields
9830and parameters in Python 2 source code. These refactorings can also be applied
9831to occurences in strings and comments.")
3f641af0 9832 (license license:gpl2)))
6ba8ca17
9833
9834(define-public python-py3status
9835 (package
9836 (name "python-py3status")
d2262d70 9837 (version "3.1")
6ba8ca17
9838 (source
9839 (origin
9840 (method url-fetch)
9841 (uri (pypi-uri "py3status" version))
9842 (sha256
9843 (base32
d2262d70 9844 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 9845 (build-system python-build-system)
6ba8ca17
9846 (home-page "https://github.com/ultrabug/py3status")
9847 (synopsis "Extensible i3status wrapper written in Python")
9848 (description "py3status is an i3status wrapper which extends i3status
9849functionality in a modular way, allowing you to extend your panel with your
9850own code, responding to click events and updating clock every second.")
3f641af0 9851 (license license:bsd-3)))
b8fdbca3
HG
9852
9853(define-public python-tblib
9854 (package
9855 (name "python-tblib")
9856 (version "1.3.0")
9857 (source (origin
9858 (method url-fetch)
9859 (uri (pypi-uri "tblib" version))
9860 (sha256 (base32
9861 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9862 (build-system python-build-system)
9863 (arguments
9864 `(#:phases
9865 (modify-phases %standard-phases
9866 (replace 'check
9867 (lambda _
9868 ;; Upstream runs tests after installation and the package itself
9869 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9870 ;; found.
9871 (setenv "PYTHONPATH"
9872 (string-append (getcwd) "/build/lib:"
9873 (getenv "PYTHONPATH")))
9874 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9875 (native-inputs
9876 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
9877 ("python-six" ,python-six)))
9878 (home-page "https://github.com/ionelmc/python-tblib")
9879 (synopsis "Traceback serialization library")
9880 (description
9881 "Traceback serialization allows you to:
9882
9883@enumerate
9884@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9885different processes. This allows better error handling when running code over
9886multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9887
9888@item Parse traceback strings and raise with the parsed tracebacks.
9889@end itemize")
3f641af0 9890 (license license:bsd-3)))
b8fdbca3
HG
9891
9892(define-public python2-tblib
9893 (package-with-python2 python-tblib))
1a024de4
HG
9894
9895(define-public python-sqlparse
9896 (package
9897 (name "python-sqlparse")
9898 (version "0.1.19")
9899 (source (origin
9900 (method url-fetch)
9901 (uri (pypi-uri "sqlparse" version))
9902 (sha256
9903 (base32
9904 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9905 (build-system python-build-system)
9906 (arguments
9907 `(#:phases
9908 (modify-phases %standard-phases
9909 (replace 'check
9910 (lambda* _
9911 ;; setup.py-integrated 2to3 only affects the build files, but
9912 ;; py.test is using the source files. So we need to convert them
9913 ;; manually.
9914 (when (zero? (system* "python3"))
9915 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9916 (zero? (system* "py.test")))))))
9917 (native-inputs
f3b98f4f 9918 `(("python-pytest" ,python-pytest)))
1a024de4
HG
9919 (home-page "https://github.com/andialbrecht/sqlparse")
9920 (synopsis "Non-validating SQL parser")
9921 (description "Sqlparse is a non-validating SQL parser for Python. It
9922provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9923 (license license:bsd-3)))
1a024de4
HG
9924
9925(define-public python2-sqlparse
9926 (package-with-python2 python-sqlparse))
68b9d242
SB
9927
9928(define-public python-greenlet
9929 (package
9930 (name "python-greenlet")
9931 (version "0.4.9")
9932 (source (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "greenlet" version))
9935 (sha256
9936 (base32
9937 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9938 (build-system python-build-system)
68b9d242
SB
9939 (home-page "https://greenlet.readthedocs.io/")
9940 (synopsis "Lightweight in-process concurrent programming")
9941 (description
9942 "Greenlet package is a spin-off of Stackless, a version of CPython
9943that supports micro-threads called \"tasklets\". Tasklets run
9944pseudo-concurrently (typically in a single or a few OS-level threads) and
9945are synchronized with data exchanges on \"channels\".")
3f641af0 9946 (license (list license:psfl license:expat))))
68b9d242
SB
9947
9948(define-public python2-greenlet
9949 (package-with-python2 python-greenlet))
d79a343b
SB
9950
9951(define-public python-gevent
9952 (package
9953 (name "python-gevent")
9954 (version "1.1.1")
9955 (source (origin
9956 (method url-fetch)
9957 (uri (pypi-uri "gevent" version))
9958 (sha256
9959 (base32
9960 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9961 (modules '((guix build utils)))
9962 (snippet
9963 '(begin
9964 ;; unbunding libev and c-ares
9965 (for-each delete-file-recursively '("libev" "c-ares"))
9966 ;; fixing testsuite
9967 (call-with-output-file "greentest/__init__.py" noop)
9968 (substitute* "greentest/testrunner.py"
9969 (("import util") "from . import util")
9970 (("from util import log") "from .util import log"))))))
9971 (build-system python-build-system)
9972 (propagated-inputs
9973 `(("python-greenlet" ,python-greenlet)))
9974 (native-inputs
f3b98f4f 9975 `(("python-six" ,python-six)))
d79a343b
SB
9976 (inputs
9977 `(("c-ares" ,c-ares)
9978 ("libev" ,libev)))
9979 (home-page "http://www.gevent.org/")
9980 (synopsis "Coroutine-based network library")
9981 (description
9982 "gevent is a coroutine-based Python networking library that uses greenlet
9983to provide a high-level synchronous API on top of the libev event loop.")
9984 (license license:expat)))
9985
9986(define-public python2-gevent
9987 (package-with-python2 python-gevent))
da3aeeb6
SB
9988
9989(define-public python-twisted
9990 (package
9991 (name "python-twisted")
9992 (version "16.2.0")
9993 (source (origin
9994 (method url-fetch)
8ea8e8d3 9995 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9996 (sha256
9997 (base32
9998 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9999 (build-system python-build-system)
45912170
SB
10000 (propagated-inputs
10001 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10002 (home-page "https://twistedmatrix.com/")
10003 (synopsis "Asynchronous networking framework written in Python")
10004 (description
10005 "Twisted is an extensible framework for Python programming, with special
10006focus on event-based network programming and multiprotocol integration.")
10007 (license license:expat)))
10008
10009(define-public python2-twisted
10010 (package-with-python2 python-twisted))
d0b6fed6 10011
4d3fa5a4
EF
10012(define-public python-pika
10013 (package
10014 (name "python-pika")
10015 (version "0.10.0")
10016 (source
10017 (origin
10018 (method url-fetch)
10019 (uri (pypi-uri "pika" version))
10020 (sha256
10021 (base32
10022 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10023 (build-system python-build-system)
10024 (native-inputs
269d9172
LF
10025 `(("python-pyev" ,python-pyev)
10026 ("python-tornado" ,python-tornado)
10027 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10028 (home-page "https://pika.readthedocs.org")
10029 (synopsis "Pure Python AMQP Client Library")
10030 (description
10031 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10032Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10033network support library.")
10034 (license license:bsd-3)))
10035
10036(define-public python2-pika
10037 (package-with-python2 python-pika))
10038
d0b6fed6
DM
10039(define-public python-ply
10040 (package
10041 (name "python-ply")
10042 (version "3.8")
10043 (source
10044 (origin
10045 (method url-fetch)
10046 (uri (string-append
10047 "https://pypi.python.org/packages/"
10048 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10049 "/ply-" version ".tar.gz"))
10050 (sha256
10051 (base32
10052 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10053 (build-system python-build-system)
10054 (home-page "http://www.dabeaz.com/ply/")
10055 (synopsis "Python Lex & Yacc")
10056 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10057It uses LR parsing and does extensive error checking.")
f210e944 10058 (license license:bsd-3)))
d0b6fed6
DM
10059
10060(define-public python2-ply
f210e944 10061 (package-with-python2 python-ply))
d951bd54
SB
10062
10063(define-public python-tabulate
10064 (package
10065 (name "python-tabulate")
10066 (version "0.7.5")
10067 (source (origin
10068 (method url-fetch)
10069 (uri (pypi-uri "tabulate" version))
10070 (sha256
10071 (base32
10072 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10073 ;; Fix tests
10074 (modules '((guix build utils)))
10075 (snippet '(substitute* '("test/test_cli.py"
10076 "test/test_input.py"
10077 "test/test_output.py"
10078 "test/test_regression.py")
10079 (("from common") "from nose.tools")))))
10080 (build-system python-build-system)
10081 (native-inputs
f3b98f4f 10082 `(;; For testing
d951bd54
SB
10083 ("python-nose" ,python-nose)))
10084 (home-page "https://bitbucket.org/astanin/python-tabulate")
10085 (synopsis "Pretty-print tabular data")
10086 (description
10087 "Tabulate is a library and command-line utility to pretty-print tabular
10088data in Python.")
10089 (license license:expat)))
10090
10091(define-public python2-tabulate
10092 (package-with-python2 python-tabulate))
1c4c8a33
SB
10093
10094(define-public python-kazoo
10095 (package
10096 (name "python-kazoo")
10097 (version "2.2.1")
10098 (source
10099 (origin
10100 (method url-fetch)
10101 (uri (pypi-uri "kazoo" version))
10102 (sha256
10103 (base32
10104 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10105 (build-system python-build-system)
10106 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10107 (propagated-inputs
10108 `(("python-six" ,python-six)))
1c4c8a33
SB
10109 (home-page "https://kazoo.readthedocs.org")
10110 (synopsis "High-level Zookeeper client library")
10111 (description
10112 "Kazoo is a Python client library for the Apache Zookeeper distributed
10113application service. It is designed to be easy to use and to avoid common
10114programming errors.")
3f641af0 10115 (license license:asl2.0)))
1c4c8a33
SB
10116
10117(define-public python2-kazoo
10118 (package-with-python2 python-kazoo))
45dda35e
SB
10119
10120(define-public python-pykafka
10121 (package
10122 (name "python-pykafka")
10123 (version "2.4.0")
10124 (source (origin
10125 (method url-fetch)
c6bccf71
EF
10126 (uri (string-append
10127 "https://pypi.python.org/packages/8b/3e/"
10128 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10129 "pykafka-" version ".tar.gz"))
45dda35e
SB
10130 (sha256
10131 (base32
10132 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10133 (build-system python-build-system)
10134 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10135 (propagated-inputs
45dda35e
SB
10136 `(("python-gevent" ,python-gevent)
10137 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10138 ("python-tabulate" ,python-tabulate)))
10139 (inputs
10140 `(("librdkafka" ,librdkafka)))
10141 (home-page "https://pykafka.readthedocs.io/")
10142 (synopsis "Apache Kafka client for Python")
10143 (description
10144 "PyKafka is a client for the Apache Kafka distributed messaging system.
10145It includes Python implementations of Kafka producers and consumers, which
10146are optionally backed by a C extension built on librdkafka.")
3f641af0 10147 (license license:asl2.0)))
45dda35e
SB
10148
10149(define-public python2-pykafka
10150 (package-with-python2 python-pykafka))
a44fd439
DM
10151
10152(define-public python-wcwidth
10153 (package
10154 (name "python-wcwidth")
10155 (version "0.1.6")
10156 (source
10157 (origin
10158 (method url-fetch)
10159 (uri (string-append
10160 "https://pypi.python.org/packages/"
10161 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10162 "wcwidth-" version ".tar.gz"))
10163 (sha256
10164 (base32
10165 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10166 (build-system python-build-system)
10167 (home-page "https://github.com/jquast/wcwidth")
66e07664 10168 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10169 (description "Wcwidth measures the number of terminal column cells of
10170wide-character codes. It is useful for those implementing a terminal emulator,
10171or programs that carefully produce output to be interpreted by one. It is a
10172Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10173specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10174 (license license:expat)))
a44fd439
DM
10175
10176(define-public python2-wcwidth
f210e944 10177 (package-with-python2 python-wcwidth))
0de78c95
DP
10178
10179(define-public python2-jsonrpclib
10180 (package
10181 (name "python2-jsonrpclib")
10182 (version "0.1.7")
10183 (source (origin
10184 (method url-fetch)
10185 (uri (string-append
10186 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10187 "jsonrpclib-" version ".tar.gz"))
10188 (sha256
10189 (base32
10190 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10191 (build-system python-build-system)
0de78c95
DP
10192 (arguments
10193 `(#:tests? #f
10194 #:python ,python-2))
10195 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10196 (synopsis "Implementation of JSON-RPC specification for Python")
10197 (description
10198 "This library is an implementation of the JSON-RPC specification.
10199It supports both the original 1.0 specification, as well as the
10200new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10201etc.")
3f641af0 10202 (license license:asl2.0)))
9250b0f3
SB
10203
10204(define-public python-chai
10205 (package
10206 (name "python-chai")
10207 (version "1.1.1")
10208 (source (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "chai" version))
10211 (sha256
10212 (base32
10213 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10214 (build-system python-build-system)
9250b0f3
SB
10215 (home-page "https://github.com/agoragames/chai")
10216 (synopsis "Mocking framework for Python")
10217 (description
10218 "Chai provides an api for mocking, stubbing and spying your python
10219objects, patterned after the Mocha library for Ruby.")
3f641af0 10220 (license license:bsd-3)))
9250b0f3
SB
10221
10222(define-public python2-chai
10223 (package-with-python2 python-chai))
10224
ae43baa8
SB
10225(define-public python-arrow
10226 (package
10227 (name "python-arrow")
10228 (version "0.8.0")
10229 (source (origin
10230 (method url-fetch)
10231 (uri (pypi-uri "arrow" version))
10232 (sha256
10233 (base32
10234 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10235 (build-system python-build-system)
10236 (native-inputs
f3b98f4f 10237 `(;; For testing
ae43baa8
SB
10238 ("python-chai" ,python-chai)
10239 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10240 (propagated-inputs
10241 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10242 (home-page "https://github.com/crsmithdev/arrow/")
10243 (synopsis "Dates and times for Python")
10244 (description
10245 "Arrow is a Python library to creating, manipulating, formatting and
10246converting dates, times, and timestamps. It implements and updates the
10247datetime type.")
3f641af0 10248 (license license:asl2.0)))
ae43baa8
SB
10249
10250(define-public python2-arrow
10251 (package-with-python2 python-arrow))
10252
1f2b62a4
SB
10253(define-public python-inflection
10254 (package
10255 (name "python-inflection")
10256 (version "0.3.1")
10257 (source
10258 (origin (method url-fetch)
10259 (uri (pypi-uri "inflection" version))
10260 (sha256
10261 (base32
10262 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10263 (build-system python-build-system)
1f2b62a4
SB
10264 (home-page "http://github.com/jpvanhal/inflection")
10265 (synopsis "Python string transformation library")
10266 (description
10267 "Inflection is a string transformation library. It singularizes
10268and pluralizes English words, and transforms strings from CamelCase to
10269underscored string.")
10270 (license license:expat)))
10271
10272(define-public python2-inflection
10273 (package-with-python2 python-inflection))
10274
18995566
SB
10275(define-public python-pylev
10276 (package
10277 (name "python-pylev")
10278 (version "1.3.0")
10279 (source (origin
10280 (method url-fetch)
10281 (uri (pypi-uri "pylev" version))
10282 (sha256
10283 (base32
10284 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10285 (build-system python-build-system)
18995566
SB
10286 (home-page "http://github.com/toastdriven/pylev")
10287 (synopsis "Levenshtein distance implementation in Python")
10288 (description "Pure Python Levenshtein implementation, based off the
10289Wikipedia code samples at
10290@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10291 (license license:bsd-3)))
18995566
SB
10292
10293(define-public python2-pylev
10294 (package-with-python2 python-pylev))
10295
f5deff7a
SB
10296(define-public python-cleo
10297 (package
10298 (name "python-cleo")
10299 (version "0.4.1")
10300 (source (origin
10301 (method url-fetch)
10302 (uri (pypi-uri "cleo" version))
10303 (sha256
10304 (base32
10305 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10306 (build-system python-build-system)
10307 (native-inputs
f3b98f4f 10308 `(;; For testing
f5deff7a
SB
10309 ("python-mock" ,python-mock)
10310 ("python-pytest" ,python-pytest)))
9403150a
SB
10311 (propagated-inputs
10312 `(("python-psutil" ,python-psutil)
10313 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10314 (home-page "https://github.com/sdispater/cleo")
10315 (synopsis "Command-line arguments library for Python")
10316 (description
10317 "Cleo allows you to create command-line commands with signature in
10318docstring and colored output.")
10319 (license license:expat)))
10320
10321(define-public python2-cleo
10322 (package-with-python2 python-cleo))
10323
77cadb43
SB
10324(define-public python-lazy-object-proxy
10325 (package
10326 (name "python-lazy-object-proxy")
10327 (version "1.2.2")
10328 (source (origin
10329 (method url-fetch)
10330 (uri (pypi-uri "lazy-object-proxy" version))
10331 (sha256
10332 (base32
10333 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10334 (build-system python-build-system)
77cadb43
SB
10335 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10336 (synopsis "Lazy object proxy for python")
10337 (description
10338 "Lazy object proxy is an object that wraps a callable but defers the call
10339until the object is actually required, and caches the result of said call.")
3f641af0 10340 (license license:bsd-2)))
77cadb43
SB
10341
10342(define-public python2-lazy-object-proxy
10343 (package-with-python2 python-lazy-object-proxy))
10344
5477e05f
SB
10345(define-public python-dnspython
10346 (package
10347 (name "python-dnspython")
6c514128 10348 (version "1.15.0")
5477e05f
SB
10349 (source (origin
10350 (method url-fetch)
10351 (uri (string-append "http://www.dnspython.org/kits/"
10352 version "/dnspython-" version ".tar.gz"))
10353 (sha256
10354 (base32
6c514128 10355 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10356 (build-system python-build-system)
10357 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10358 (home-page "http://www.dnspython.org")
10359 (synopsis "DNS toolkit for Python")
10360 (description
10361 "dnspython is a DNS toolkit for Python. It supports almost all record
10362types. It can be used for queries, zone transfers, and dynamic updates.
10363It supports TSIG authenticated messages and EDNS0.")
10364 (license license:expat)))
10365
10366(define-public python2-dnspython
10367 (package-with-python2 python-dnspython))
10368
22711e25
SB
10369(define-public python-email-validator
10370 (package
10371 (name "python-email-validator")
10372 (version "1.0.1")
10373 (source
10374 (origin (method url-fetch)
10375 (uri (pypi-uri "email_validator" version))
10376 (sha256
10377 (base32
10378 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10379 (build-system python-build-system)
10380 (arguments
10381 '(#:phases
10382 (modify-phases %standard-phases
10383 (add-before 'build 'use-dnspython
10384 (lambda _
10385 (substitute* "setup.py"
10386 (("dnspython3") "dnspython"))
10387 #t)))))
d42560bd 10388 (propagated-inputs
22711e25 10389 `(("python-dnspython" ,python-dnspython)
d42560bd 10390 ("python-idna" ,python-idna)))
22711e25
SB
10391 (home-page "https://github.com/JoshData/python-email-validator")
10392 (synopsis "Email address validation library for Python")
10393 (description
10394 "This library validates email address syntax and deliverability.")
3f641af0 10395 (license license:cc0)))
22711e25
SB
10396
10397(define-public python2-email-validator
10398 (package-with-python2 python-email-validator))
10399
8987d91e
SB
10400(define-public python-ukpostcodeparser
10401 (package
10402 (name "python-ukpostcodeparser")
10403 (version "1.0.3")
10404 (source (origin
10405 (method url-fetch)
10406 (uri (pypi-uri "UkPostcodeParser" version))
10407 (sha256
10408 (base32
10409 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10410 (build-system python-build-system)
8987d91e
SB
10411 (home-page "https://github.com/hamstah/ukpostcodeparser")
10412 (synopsis "UK Postcode parser for Python")
10413 (description
10414 "This library provides the @code{parse_uk_postcode} function for
10415parsing UK postcodes.")
10416 (license license:expat)))
10417
10418(define-public python2-ukpostcodeparser
10419 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10420
10421(define-public python-fake-factory
10422 (package
10423 (name "python-fake-factory")
7adc698f 10424 (version "0.7.2")
ea92ae01
SB
10425 (source (origin
10426 (method url-fetch)
10427 (uri (pypi-uri "fake-factory" version))
10428 (sha256
10429 (base32
7adc698f 10430 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10431 (build-system python-build-system)
ea92ae01 10432 (native-inputs
f3b98f4f 10433 `(;; For testing
ea92ae01
SB
10434 ("python-email-validator" ,python-email-validator)
10435 ("python-mock" ,python-mock)
10436 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10437 (propagated-inputs
10438 `(("python-dateutil" ,python-dateutil-2)
10439 ("python-six" ,python-six)))
7adc698f 10440 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10441 (synopsis "Python package that generates fake data")
10442 (description
10443 "Faker is a Python package that generates fake data such as names,
10444addresses, and phone numbers.")
10445 (license license:expat)
10446 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10447
10448(define-public python2-fake-factory
10449 (let ((base (package-with-python2 (strip-python2-variant
10450 python-fake-factory))))
10451 (package
10452 (inherit base)
24c9aa18 10453 (propagated-inputs
ea92ae01 10454 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10455 ,@(package-propagated-inputs base))))))
ea92ae01 10456
b49504fd
SB
10457(define-public python-pyaml
10458 (package
10459 (name "python-pyaml")
10460 (version "15.8.2")
10461 (source (origin
10462 (method url-fetch)
10463 (uri (pypi-uri "pyaml" version))
10464 (sha256
10465 (base32
10466 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10467 (build-system python-build-system)
b49504fd
SB
10468 (propagated-inputs
10469 `(("python-pyyaml" ,python-pyyaml)))
10470 (home-page "https://github.com/mk-fg/pretty-yaml")
10471 (synopsis "YAML pretty-print library for Python")
10472 (description
10473 "pyaml is a PyYAML based python module to produce pretty and readable
10474YAML-serialized data.")
3f641af0 10475 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10476
10477(define-public python2-pyaml
10478 (package-with-python2 python-pyaml))
10479
347175a2
SB
10480(define-public python-flexmock
10481 (package
10482 (name "python-flexmock")
10483 (version "0.10.2")
10484 (source (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "flexmock" version))
10487 (sha256
10488 (base32
10489 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10490 (build-system python-build-system)
347175a2
SB
10491 (home-page "https://flexmock.readthedocs.org")
10492 (synopsis "Testing library for Python")
10493 (description
10494 "flexmock is a testing library for Python that makes it easy to create
10495mocks, stubs and fakes.")
3f641af0 10496 (license license:bsd-3)))
347175a2
SB
10497
10498(define-public python2-flexmock
10499 (package-with-python2 python-flexmock))
10500
5a744191
SB
10501(define-public python-orator
10502 (package
10503 (name "python-orator")
10504 (version "0.8.2")
10505 (source (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "orator" version))
10508 (sha256
10509 (base32
10510 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10511 (build-system python-build-system)
10512 (arguments '(#:tests? #f)) ; no tests
b2676030 10513 (propagated-inputs
5a744191
SB
10514 `(("python-arrow" ,python-arrow)
10515 ("python-blinker" ,python-blinker)
10516 ("python-cleo" ,python-cleo)
10517 ("python-fake-factory" ,python-fake-factory)
10518 ("python-inflection" ,python-inflection)
10519 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10520 ("python-pyaml" ,python-pyaml)
5a744191
SB
10521 ("python-simplejson" ,python-simplejson)
10522 ("python-wrapt" ,python-wrapt)))
10523 (home-page "https://orator-orm.com/")
10524 (synopsis "ActiveRecord ORM for Python")
10525 (description
10526 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10527implementation for Python.")
10528 (license license:expat)
10529 (properties `((python2-variant . ,(delay python2-orator))))))
10530
10531(define-public python2-orator
10532 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10533 (package
10534 (inherit base)
06961617 10535 (propagated-inputs
5a744191 10536 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10537 ,@(package-propagated-inputs base))))))
f4155188
DM
10538
10539(define-public python-prompt-toolkit
10540 (package
10541 (name "python-prompt-toolkit")
d15e2ef0 10542 (version "1.0.7")
f4155188
DM
10543 (source
10544 (origin
10545 (method url-fetch)
d15e2ef0 10546 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10547 (sha256
10548 (base32
d15e2ef0 10549 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10550 (build-system python-build-system)
bae18710
LF
10551 (arguments
10552 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10553 (propagated-inputs
10554 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10555 ("python-six" ,python-six)
f22efa01 10556 ("python-pygments" ,python-pygments)))
f4155188
DM
10557 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10558 (synopsis "Library for building command line interfaces in Python")
10559 (description
10560 "Prompt-Toolkit is a library for building interactive command line
10561interfaces in Python. It's like GNU Readline but it also features syntax
10562highlighting while typing, out-of-the-box multi-line input editing, advanced
10563code completion, incremental search, support for Chinese double-width
10564characters, mouse support, and auto suggestions.")
f210e944 10565 (license license:bsd-3)))
f4155188
DM
10566
10567(define-public python2-prompt-toolkit
f210e944 10568 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10569
10570(define-public python-jedi
10571 (package
10572 (name "python-jedi")
10573 (version "0.9.0")
10574 (source
10575 (origin
10576 (method url-fetch)
10577 (uri (pypi-uri "jedi" version))
10578 (sha256
10579 (base32
10580 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10581 (build-system python-build-system)
10582 (home-page "https://github.com/davidhalter/jedi")
10583 (synopsis
10584 "Autocompletion for Python that can be used for text editors")
10585 (description
10586 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10587 (license license:expat)))
a502dfbf
DM
10588
10589(define-public python2-jedi
f210e944 10590 (package-with-python2 python-jedi))
c2f0dc6e
DM
10591
10592(define-public ptpython
10593 (package
10594 (name "ptpython")
10595 (version "0.34")
10596 (source (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "ptpython" version))
10599 (sha256
10600 (base32
10601 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10602 (build-system python-build-system)
f22efa01 10603 (propagated-inputs
c2f0dc6e
DM
10604 `(("python-docopt" ,python-docopt)
10605 ("python-jedi" ,python-jedi)
10606 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10607 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10608 (home-page "https://github.com/jonathanslenders/ptpython")
10609 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10610 (description
10611 "ptpython is a Python read-eval-print loop with IDE-like features.
10612It supports syntax highlighting, multiline editing, autocompletion, mouse,
10613color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10614etc.")
3f641af0 10615 (license license:bsd-3)
c2f0dc6e
DM
10616 (properties `((python2-variant . ,(delay ptpython-2))))))
10617
10618(define-public ptpython-2
10619 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10620 (package
10621 (inherit base)
10622 (name "ptpython2"))))
b227f0be 10623
b04a52a6
DJ
10624(define-public python-requests-oauthlib
10625 (package
10626 (name "python-requests-oauthlib")
10627 (version "0.6.2")
10628 (source
10629 (origin
10630 (method url-fetch)
10631 (uri (pypi-uri "requests-oauthlib" version))
10632 (sha256
10633 (base32
10634 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10635 (build-system python-build-system)
10636 (arguments
10637 `(#:phases
10638 (modify-phases %standard-phases
10639 ;; removes tests that require network access
10640 (add-before 'check 'pre-check
10641 (lambda _
10642 (delete-file "tests/test_core.py")
10643 #t)))))
10644 (native-inputs
10645 `(("python-requests-mock" ,python-requests-mock)
10646 ("python-mock" ,python-mock)))
f22efa01 10647 (propagated-inputs
b04a52a6
DJ
10648 `(("python-oauthlib" ,python-oauthlib)
10649 ("python-requests" ,python-requests)))
10650 (home-page
10651 "https://github.com/requests/requests-oauthlib")
10652 (synopsis
10653 "OAuthlib authentication support for Requests")
10654 (description
10655 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10656provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10657 (license license:isc)))
b04a52a6
DJ
10658
10659(define-public python2-requests-oauthlib
f210e944 10660 (package-with-python2 python-requests-oauthlib))
b04a52a6 10661
b227f0be 10662(define-public python-stem
10663 (package
10664 (name "python-stem")
10665 (version "1.4.1b")
10666 (source
10667 (origin
10668 (method url-fetch)
10669 (uri (pypi-uri "stem" version ".tar.bz2"))
10670 (sha256
10671 (base32
10672 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10673 (build-system python-build-system)
10674 (arguments
10675 `(#:phases
10676 (modify-phases %standard-phases
10677 (replace 'check
10678 (lambda _
10679 (zero? (system* "./run_tests.py" "--unit")))))))
10680 (native-inputs
10681 `(("python-mock" ,python-mock)
10682 ("python-pep8" ,python-pep8)
10683 ("python-pyflakes" ,python-pyflakes)))
f22efa01 10684 (propagated-inputs
b227f0be 10685 `(("python-pycrypto" ,python-pycrypto)))
10686 (home-page "https://stem.torproject.org/")
10687 (synopsis
10688 "Python controller library that allows applications to interact with Tor")
10689 (description
10690 "Stem is a Python controller library for Tor. With it you can use Tor's
10691control protocol to script against the Tor process and read descriptor data
10692relays publish about themselves.")
3f641af0 10693 (license license:lgpl3)))
b227f0be 10694
10695(define-public python2-stem
10696 (package-with-python2 python-stem))
517a6c0c
DM
10697
10698(define-public python-pyserial
10699 (package
10700 (name "python-pyserial")
10701 (version "3.1.1")
10702 (source
10703 (origin
10704 (method url-fetch)
10705 (uri (pypi-uri "pyserial" version))
10706 (sha256
10707 (base32
10708 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10709 (build-system python-build-system)
10710 (home-page
10711 "https://github.com/pyserial/pyserial")
10712 (synopsis "Python Serial Port Bindings")
10713 (description "@code{pyserial} provide serial port bindings for Python. It
10714supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10715and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10716 (license license:bsd-3)))
517a6c0c
DM
10717
10718(define-public python2-pyserial
f210e944 10719 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10720
10721(define-public python-kivy
10722 (package
10723 (name "python-kivy")
10724 (version "1.9.1")
10725 (source
10726 (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "kivy" version))
10729 (file-name (string-append name "-" version ".tar.gz"))
10730 (sha256
10731 (base32
10732 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10733 (build-system python-build-system)
10734 (arguments
10735 `(#:tests? #f ; Tests require many optional packages
10736 #:phases
10737 (modify-phases %standard-phases
10738 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10739 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10740 (lambda* (#:key inputs #:allow-other-keys)
10741 (setenv "KIVY_SDL2_PATH"
10742 (string-append (assoc-ref inputs "sdl-union")
10743 "/include/SDL2"))
10744 #t)))))
10745 (native-inputs
f2516de2
HG
10746 `(("pkg-config" ,pkg-config)
10747 ("python-cython" ,python-cython)))
6eb7af2a 10748 (inputs
f2516de2 10749 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10750 ("mesa" ,mesa)
10751 ("sdl-union"
10752 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10753 (home-page "http://kivy.org")
10754 (synopsis
10755 "Multitouch application framework")
10756 (description
10757 "A software library for rapid development of
10758hardware-accelerated multitouch applications.")
10759 (license license:expat)))
10760
10761(define-public python2-kivy
10762 (package-with-python2 python-kivy))
10763
10764(define-public python-kivy-next
10765 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10766 (revision "1"))
10767 (package (inherit python-kivy)
10768 (name "python-kivy-next")
d80a71eb 10769 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10770 (string-take commit 7)))
10771 (source
10772 (origin
10773 (method git-fetch)
10774 (uri (git-reference
10775 (url "https://github.com/kivy/kivy")
10776 (commit commit)))
10777 (file-name (string-append name "-" version "-checkout"))
10778 (sha256
10779 (base32
10780 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10781
10782(define-public python2-kivy-next
10783 (package-with-python2 python-kivy-next))
8794bd8b
DC
10784
10785(define-public python-binaryornot
10786 (package
10787 (name "python-binaryornot")
10788 (version "0.4.0")
10789 (source (origin
10790 (method url-fetch)
10791 (uri (pypi-uri "binaryornot" version))
10792 (sha256
10793 (base32
10794 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10795 (build-system python-build-system)
f22efa01 10796 (propagated-inputs
8794bd8b
DC
10797 `(("python-chardet" ,python-chardet)
10798 ("python-hypothesis" ,python-hypothesis)))
10799 (home-page "https://github.com/audreyr/binaryornot")
10800 (synopsis "Package to check if a file is binary or text")
10801 (description "Ultra-lightweight pure Python package to check if a file is
10802binary or text.")
10803 (license license:bsd-3)
10804 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10805
10806(define-public python2-binaryornot
10807 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10808 (package (inherit base)
f22efa01 10809 (propagated-inputs
8794bd8b 10810 `(("python2-enum34" ,python2-enum34)
f22efa01 10811 ,@(package-propagated-inputs base))))))
a9ac982a
DC
10812
10813(define-public python-nltk
10814 (package
10815 (name "python-nltk")
10816 (version "3.2.1")
10817 (source (origin
10818 (method url-fetch)
10819 (uri (pypi-uri "nltk" version))
10820 (sha256
10821 (base32
10822 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10823 (build-system python-build-system)
59f12985
LF
10824 (arguments
10825 '(;; The tests require some extra resources to be downloaded.
10826 ;; TODO Try packaging these resources.
10827 #:tests? #f))
a9ac982a
DC
10828 (home-page "http://nltk.org/")
10829 (synopsis "Natural Language Toolkit")
10830 (description "It provides interfaces to over 50 corpora and lexical
10831resources such as WordNet, along with a suite of text processing libraries
10832for classification, tokenization, stemming, tagging, parsing, and semantic
10833reasoning, wrappers for natural language processing libraries.")
f210e944 10834 (license license:asl2.0)))
a9ac982a
DC
10835
10836(define-public python2-nltk
f210e944 10837 (package-with-python2 python-nltk))
691cd90d
DC
10838
10839(define-public python-pymongo
10840 (package
10841 (name "python-pymongo")
10842 (version "3.3.0")
10843 (source (origin
10844 (method url-fetch)
10845 (uri (pypi-uri "pymongo" version))
10846 (sha256
10847 (base32
10848 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10849 (build-system python-build-system)
f22efa01 10850 (propagated-inputs
691cd90d
DC
10851 `(("python-certifi" ,python-certifi)))
10852 (home-page "http://github.com/mongodb/mongo-python-driver")
10853 (synopsis "Python driver for MongoDB")
10854 (description "Python driver for MongoDB.")
f210e944 10855 (license license:asl2.0)))
691cd90d
DC
10856
10857(define-public python2-pymongo
f210e944 10858 (package-with-python2 python-pymongo))
6a6c9d43
DC
10859
10860(define-public python-sh
10861 (package
10862 (name "python-sh")
10863 (version "1.11")
10864 (source (origin
10865 (method url-fetch)
10866 (uri (pypi-uri "sh" version))
10867 (sha256
10868 (base32
10869 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10870 (build-system python-build-system)
10871 (arguments
10872 `(#:tests? #f)) ; no tests
10873 (home-page "https://github.com/amoffat/sh")
10874 (synopsis "Python subprocess interface")
10875 (description "Abstracts process invocation by providing a function
10876interface for programs.")
f210e944 10877 (license license:expat)))
6a6c9d43
DC
10878
10879(define-public python2-sh
f210e944 10880 (package-with-python2 python-sh))
05b59190 10881
25702397
EF
10882(define-public python-consul
10883 (package
10884 (name "python-consul")
10885 (version "0.6.1")
10886 (source
10887 (origin
10888 (method url-fetch)
10889 (uri (pypi-uri "python-consul" version))
10890 (sha256
10891 (base32
10892 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10893 (build-system python-build-system)
10894 (native-inputs
fd1d6de7
HG
10895 `(("python-pytest" ,python-pytest)))
10896 (propagated-inputs
10897 `(("python-requests" ,python-requests)
25702397
EF
10898 ("python-six" ,python-six)))
10899 (home-page "https://github.com/cablehead/python-consul")
10900 (synopsis "Python client for Consul")
10901 (description
10902 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10903discovery, monitoring and configuration.")
10904 (license license:expat)))
10905
10906(define-public python2-consul
f210e944 10907 (package-with-python2 python-consul))
25702397 10908
05b59190
DC
10909(define-public python-schematics
10910 (package
10911 (name "python-schematics")
10912 (version "1.1.1")
10913 (source
10914 (origin
10915 (method url-fetch)
10916 (uri (string-append
10917 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10918 (file-name (string-append name "-" version ".tar.gz"))
10919 (sha256
10920 (base32
10921 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10922 (build-system python-build-system)
f22efa01 10923 (propagated-inputs
05b59190
DC
10924 `(("python-six" ,python-six)))
10925 (arguments
10926 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10927 ; version requirements (eg python-coveralls)
10928 (home-page "https://github.com/schematics/schematics")
10929 (synopsis "Python Data Structures for Humans")
10930 (description "Python Data Structures for Humans.")
f210e944 10931 (license license:bsd-3)))
05b59190
DC
10932
10933(define-public python2-schematics
f210e944 10934 (package-with-python2 python-schematics))
d6907ff7
DC
10935
10936(define-public python-publicsuffix
10937 (package
10938 (name "python-publicsuffix")
10939 (version "1.1.0")
10940 (source (origin
10941 (method url-fetch)
10942 (uri (pypi-uri "publicsuffix" version))
10943 (sha256
10944 (base32
10945 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10946 (build-system python-build-system)
10947 (arguments
10948 `(#:tests? #f)) ; tests use the internet
10949 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10950 (synopsis "Get suffix for a domain name")
10951 (description "Get a public suffix for a domain name using the Public Suffix
10952List.")
f210e944 10953 (license license:expat)))
d6907ff7
DC
10954
10955(define-public python2-publicsuffix
f210e944 10956 (package-with-python2 python-publicsuffix))
b2319996
DC
10957
10958(define-public python-publicsuffix2
10959 (package
10960 (name "python-publicsuffix2")
10961 (version "2.20160621")
10962 (source
10963 (origin
10964 (method url-fetch)
10965 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10966 (sha256
10967 (base32
10968 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10969 (build-system python-build-system)
10797a0a
LF
10970 (arguments
10971 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
10972 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10973 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10974 (description "Get a public suffix for a domain name using the Public Suffix
10975List. Forked from and using the same API as the publicsuffix package.")
f210e944 10976 (license (list license:expat license:mpl2.0))))
b2319996
DC
10977
10978(define-public python2-publicsuffix2
f210e944 10979 (package-with-python2 python-publicsuffix2))
81f1515d
DC
10980
10981(define-public python-url
10982 (package
10983 (name "python-url")
10984 (version "0.2.0")
10985 (source (origin
10986 (method url-fetch)
10987 (uri (pypi-uri "url" version))
10988 (sha256
10989 (base32
10990 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10991 (build-system python-build-system)
f22efa01 10992 (propagated-inputs
81f1515d
DC
10993 `(("python-publicsuffix" ,python-publicsuffix)))
10994 (native-inputs
10995 `(("python-coverage" ,python-coverage)
10996 ("python-nose" ,python-nose)))
10997 (arguments
10998 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10999 (home-page "http://github.com/seomoz/url-py")
11000 (synopsis "URL Parsing")
11001 (description "Library for parsing urls.")
11002 (license license:expat)
11003 (properties `((python2-variant . ,(delay python2-url))))))
11004
11005(define-public python2-url
11006 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11007 (package (inherit base)
f22efa01 11008 (propagated-inputs
f210e944 11009 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11010
11011(define-public python-freezegun
11012 (package
11013 (name "python-freezegun")
11014 (version "0.3.7")
11015 (source
11016 (origin
11017 (method url-fetch)
11018 (uri (pypi-uri "freezegun" version))
11019 (sha256
11020 (base32
11021 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11022 (build-system python-build-system)
11023 (native-inputs
11024 `(("python-mock" ,python-mock)
11025 ("python-nose" ,python-nose)
4e096968 11026 ("python-coverage" ,python-coverage)))
f22efa01 11027 (propagated-inputs
4e096968
HG
11028 `(("python-six" ,python-six)
11029 ("python-dateutil-2" ,python-dateutil-2)))
974ee2c1
TS
11030 (arguments
11031 `(#:phases (modify-phases %standard-phases
11032 ;; The tests are normally executed via `make test`, but the PyPi
11033 ;; package does not include the Makefile.
11034 (replace 'check
11035 (lambda _
11036 (zero? (system* "nosetests" "./tests/")))))))
11037 (home-page "https://github.com/spulec/freezegun")
11038 (synopsis "Test utility for mocking the datetime module")
11039 (description
11040 "FreezeGun is a library that allows your python tests to travel through
11041time by mocking the datetime module.")
11042 (license license:asl2.0)))
11043
11044(define-public python2-freezegun
f210e944
HG
11045 (package-with-python2 python-freezegun))
11046
dddcb25c
MB
11047
11048(define-public python-odfpy
11049 (package
11050 (name "python-odfpy")
11051 (version "1.3.3")
11052 (source (origin
11053 (method url-fetch)
11054 (uri (pypi-uri "odfpy" version))
11055 (sha256
11056 (base32
11057 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11058 (arguments
11059 `(#:modules ((srfi srfi-1)
11060 (guix build python-build-system)
11061 (guix build utils))
11062 #:phases
11063 (modify-phases %standard-phases
11064 (replace 'check
11065 ;; The test runner invokes python2 and python3 for test*.py.
11066 ;; To avoid having both in inputs, we replicate it here.
11067 (lambda _
11068 (every (lambda (test-file)
11069 (zero? (system* "python" test-file)))
11070 (find-files "tests" "^test.*\\.py$")))))))
11071 (build-system python-build-system)
11072 (home-page "https://github.com/eea/odfpy")
11073 (synopsis "Python API and tools to manipulate OpenDocument files")
11074 (description "Collection of libraries and utility programs written in
11075Python to manipulate OpenDocument 1.2 files.")
11076 (license
11077 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11078 ;; number of files with other licenses.
11079 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11080
11081(define-public python2-odfpy
11082 (package-with-python2 python-odfpy))
b30565bd
MB
11083
11084(define-public python-cachecontrol
11085 (package
11086 (name "python-cachecontrol")
11087 (version "0.11.6")
11088 (source
11089 (origin
11090 (method url-fetch)
11091 ;; Pypi does not have tests.
11092 (uri (string-append
11093 "https://github.com/ionrock/cachecontrol/archive/v"
11094 version ".tar.gz"))
11095 (file-name (string-append name "-" version ".tar.gz"))
11096 (sha256
11097 (base32
11098 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11099 (build-system python-build-system)
11100 (arguments
11101 `(#:phases
11102 (modify-phases %standard-phases
11103 (replace 'check
11104 (lambda _
11105 ;; Drop test that requires internet access.
11106 (delete-file "tests/test_regressions.py")
11107 (setenv "PYTHONPATH"
11108 (string-append (getcwd) "/build/lib:"
11109 (getenv "PYTHONPATH")))
11110 (zero? (system* "py.test" "-vv")))))))
11111 (native-inputs
11112 `(("python-pytest" ,python-pytest)
11113 ("python-redis" ,python-redis)
11114 ("python-webtest" ,python-webtest)
11115 ("python-mock" ,python-mock)))
11116 (propagated-inputs
11117 `(("python-requests" ,python-requests)
11118 ("python-lockfile" ,python-lockfile)))
11119 (home-page "https://github.com/ionrock/cachecontrol")
11120 (synopsis "The httplib2 caching algorithms for use with requests")
11121 (description "CacheControl is a port of the caching algorithms in
11122@code{httplib2} for use with @code{requests} session objects.")
f210e944 11123 (license license:asl2.0)))
b30565bd
MB
11124
11125(define-public python2-cachecontrol
f210e944 11126 (package-with-python2 python-cachecontrol))
243db824
DM
11127
11128(define-public python-lit
11129 (package
11130 (name "python-lit")
11131 (version "0.5.0")
11132 (source
11133 (origin
11134 (method url-fetch)
11135 (uri (pypi-uri "lit" version))
11136 (sha256
11137 (base32
11138 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11139 (build-system python-build-system)
11140 (home-page "http://llvm.org/")
11141 (synopsis "LLVM Software Testing Tool")
11142 (description "@code{lit} is a portable tool for executing LLVM and Clang
11143style test suites, summarizing their results, and providing indication of
11144failures.")
f210e944 11145 (license license:ncsa)))
243db824
DM
11146
11147(define-public python2-lit
f210e944 11148 (package-with-python2 python-lit))
66f95b20
MB
11149
11150(define-public python-pytest-pep8
11151 (package
11152 (name "python-pytest-pep8")
11153 (version "1.0.6")
11154 (source (origin
11155 (method url-fetch)
11156 (uri (pypi-uri "pytest-pep8" version))
11157 (sha256
11158 (base32
11159 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11160 (build-system python-build-system)
11161 (arguments
b41a05ce 11162 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11163 (native-inputs
11164 `(("python-pytest" ,python-pytest)))
11165 (propagated-inputs
11166 `(("python-pep8" ,python-pep8)))
11167 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11168 (synopsis "Py.test plugin to check PEP8 requirements")
11169 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11170 (license license:expat)))
66f95b20
MB
11171
11172(define-public python2-pytest-pep8
f210e944 11173 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11174
11175(define-public python-pytest-flakes
11176 (package
11177 (name "python-pytest-flakes")
11178 (version "1.0.1")
11179 (source (origin
11180 (method url-fetch)
11181 (uri (pypi-uri "pytest-flakes" version))
11182 (sha256
11183 (base32
11184 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11185 (build-system python-build-system)
11186 (arguments
b41a05ce 11187 `(#:phases
df94a6b5
MB
11188 (modify-phases %standard-phases
11189 (delete 'check)
11190 (add-after 'install 'check
05c2fd36
HG
11191 (lambda* (#:key outputs inputs #:allow-other-keys)
11192 ;; It's easier to run tests after install.
11193 ;; Make installed package available for running the tests
11194 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11195 (zero? (system* "py.test" "-vv")))))))
11196 (native-inputs
11197 `(("python-coverage" ,python-coverage)
11198 ("python-pytest" ,python-pytest)
11199 ("python-pytest-cache" ,python-pytest-cache)
11200 ("python-pytest-pep8" ,python-pytest-pep8)))
11201 (propagated-inputs
11202 `(("python-pyflakes" ,python-pyflakes)))
11203 (home-page "https://github.com/fschulze/pytest-flakes")
11204 (synopsis "Py.test plugin to check source code with pyflakes")
11205 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11206 (license license:expat)))
df94a6b5
MB
11207
11208(define-public python2-pytest-flakes
f210e944 11209 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11210
11211(define-public python-natsort
11212 (package
11213 (name "python-natsort")
11214 (version "5.0.1")
11215 (source (origin
11216 (method url-fetch)
11217 (uri (pypi-uri "natsort" version))
11218 (sha256
11219 (base32
11220 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11221 (build-system python-build-system)
11222 (arguments
11223 `(#:phases
11224 (modify-phases %standard-phases
11225 (add-before 'check 'set-cachedir
11226 ;; Tests require write access to $HOME by default
11227 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11228 (native-inputs
11229 `(("python-hypothesis" ,python-hypothesis)
11230 ("python-pytest-cache" ,python-pytest-cache)
11231 ("python-pytest-cov" ,python-pytest-cov)
11232 ("python-pytest-flakes" ,python-pytest-flakes)
11233 ("python-pytest-pep8" ,python-pytest-pep8)))
11234 (propagated-inputs ; TODO: Add python-fastnumbers.
11235 `(("python-pyicu" ,python-pyicu)))
11236 (home-page "https://github.com/SethMMorton/natsort")
11237 (synopsis "Natural sorting for python and shell")
11238 (description
11239 "Natsort lets you apply natural sorting on lists instead of
11240lexicographical. If you use the built-in @code{sorted} method in python
11241on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11242returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11243function @code{natsorted} that identifies numbers and sorts them separately
11244from strings. It can also sort version numbers, real numbers, mixed types
11245and more, and comes with a shell command @command{natsort} that exposes this
11246functionality in the command line.")
11247 (license license:expat)
11248 (properties `((python2-variant . ,(delay python2-natsort))))))
11249
11250(define-public python2-natsort
11251 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11252 (package (inherit base)
11253 (native-inputs
00e10c6e 11254 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11255 ("python2-mock" ,python2-mock)
11256 ("python2-enum34" ,python2-enum34)
11257 ,@(package-native-inputs base))))))
4efb9c54
SR
11258
11259(define-public python-glances
11260 (package
11261 (name "python-glances")
11262 (version "2.7.1")
11263 (source
11264 (origin
11265 (method url-fetch)
11266 (uri (pypi-uri "Glances" version))
11267 (sha256
11268 (base32
11269 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11270 (build-system python-build-system)
f22efa01 11271 (propagated-inputs
4efb9c54
SR
11272 `(("python-psutil" ,python-psutil)))
11273 (home-page
11274 "https://github.com/nicolargo/glances")
11275 (synopsis
11276 "A cross-platform curses-based monitoring tool")
11277 (description
11278 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11279Glances uses the PsUtil library to get information from your system. It monitors
11280CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11281 (license license:lgpl3+)))
4efb9c54
SR
11282
11283(define-public python2-glances
f210e944 11284 (package-with-python2 python-glances))
05b7a593
EF
11285
11286(define-public python-graphql-core
11287 (package
11288 (name "python-graphql-core")
11289 (version "0.5.3")
11290 (source
11291 (origin
11292 (method url-fetch)
11293 (uri (pypi-uri "graphql-core" version))
11294 (sha256
11295 (base32
11296 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11297 (build-system python-build-system)
11298 (arguments
326f8285
LF
11299 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11300 #:phases
05b7a593
EF
11301 (modify-phases %standard-phases
11302 (add-after 'unpack 'patch-hardcoded-version
11303 (lambda _ (substitute*
11304 "setup.py"
11305 (("'gevent==1.1rc1'") "'gevent'"))
11306 #t)))))
11307 (native-inputs
11308 `(("python-gevent" ,python-gevent)
11309 ("python-mock" ,python-mock)
11310 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11311 (propagated-inputs
05b7a593
EF
11312 `(("python-promise" ,python-promise)
11313 ("python-six" ,python-six)))
11314 (home-page "https://github.com/graphql-python/graphql-core")
11315 (synopsis "GraphQL implementation for Python")
11316 (description
11317 "GraphQL implementation for Python. GraphQL is a data query language and
11318runtime designed and used to request and deliver data to mobile and web apps.
11319This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11320to Python.")
05b7a593
EF
11321 (license license:expat)))
11322
11323(define-public python2-graphql-core
f210e944 11324 (package-with-python2 python-graphql-core))
7ee51575
EF
11325
11326(define-public python-graphql-relay
11327 (package
11328 (name "python-graphql-relay")
11329 (version "0.4.4")
11330 (source
11331 (origin
11332 (method url-fetch)
11333 (uri (pypi-uri "graphql-relay" version))
11334 (sha256
11335 (base32
11336 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11337 (build-system python-build-system)
11338 (native-inputs
11339 `(("python-pytest" ,python-pytest)))
f22efa01 11340 (propagated-inputs
7ee51575
EF
11341 `(("python-graphql-core" ,python-graphql-core)
11342 ("python-promise" ,python-promise)
11343 ("python-six" ,python-six)))
11344 (home-page "https://github.com/graphql-python/graphql-relay-py")
11345 (synopsis "Relay implementation for Python")
11346 (description
11347 "This is a library to allow the easy creation of Relay-compliant servers
11348using the GraphQL Python reference implementation of a GraphQL server. It
11349should be noted that the code is a exact port of the original
11350@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11351from Facebook.")
7ee51575
EF
11352 (license license:expat)))
11353
11354(define-public python2-graphql-relay
f210e944 11355 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11356
11357(define-public python-graphene
11358 (package
11359 (name "python-graphene")
11360 (version "0.10.2")
11361 (source
11362 (origin
11363 (method url-fetch)
11364 (uri (pypi-uri "graphene" version))
11365 (sha256
11366 (base32
11367 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11368 (build-system python-build-system)
11369 (native-inputs
11370 `(("python-django-filter" ,python-django-filter)
11371 ("python-mock" ,python-mock)
11372 ("python-psycopg2" ,python-psycopg2)
11373 ("python-pytest-django" ,python-pytest-django)
11374 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11375 (propagated-inputs
ddc63a56
EF
11376 `(("python-graphql-core" ,python-graphql-core)
11377 ("python-graphql-relay" ,python-graphql-relay)
11378 ("python-iso8601" ,python-iso8601)
11379 ("python-promise" ,python-promise)
11380 ("python-six" ,python-six)))
11381 (home-page "http://graphene-python.org/")
11382 (synopsis "GraphQL Framework for Python")
11383 (description
11384 "Graphene is a Python library for building GraphQL schemas/types.
11385A GraphQL schema describes your data model, and provides a GraphQL server
11386with an associated set of resolve methods that know how to fetch data.")
11387 (properties `((python2-variant . ,(delay python2-graphene))))
11388 (license license:expat)))
11389
11390(define-public python2-graphene
11391 (let ((base (package-with-python2
11392 (strip-python2-variant python-graphene))))
11393 (package (inherit base)
11394 (native-inputs
00e10c6e 11395 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11396 ,@(package-native-inputs base))))))
d488d5d6
EF
11397
11398(define-public python-nautilus
11399 (package
11400 (name "python-nautilus")
11401 (version "0.4.9")
11402 (source
11403 (origin
11404 (method url-fetch)
11405 (uri (pypi-uri "nautilus" version))
11406 (sha256
11407 (base32
11408 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11409 (build-system python-build-system)
11410 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11411 (propagated-inputs
d488d5d6
EF
11412 `(("python-bcrypt" ,python-bcrypt)
11413 ("python-click" ,python-click)
11414 ("python-consul" ,python-consul)
d488d5d6
EF
11415 ("python-graphene" ,python-graphene)
11416 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11417 ("python-peewee" ,python-peewee)
11418 ("python-pika" ,python-pika)
d488d5d6
EF
11419 ("python-tornado" ,python-tornado)
11420 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11421 (native-inputs
11422 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11423 (home-page "https://github.com/AlecAivazis/nautilus")
11424 (synopsis "Library for creating microservice applications")
11425 (description
11426 "Nautilus is a framework for flux based microservices that looks to
11427provide extendible implementations of common aspects of a cloud so that you can
11428focus on building massively scalable web applications.")
11429 (license license:expat)))
94cffc63 11430
66d3f50a
LF
11431(define-public python-betamax
11432 (package
11433 (name "python-betamax")
11434 (version "0.8.0")
11435 (source
11436 (origin
11437 (method url-fetch)
11438 (uri (pypi-uri "betamax" version))
11439 (sha256
11440 (base32
11441 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11442 (build-system python-build-system)
11443 (arguments
11444 '(;; Many tests fail because they require networking.
11445 #:tests? #f))
c415f763 11446 (propagated-inputs
66d3f50a
LF
11447 `(("python-requests" ,python-requests)))
11448 (home-page "https://github.com/sigmavirus24/betamax")
11449 (synopsis "Record HTTP interactions with python-requests")
11450 (description "Betamax will record your test suite's HTTP interactions and
11451replay them during future tests. It is designed to work with python-requests.")
f210e944 11452 (license license:expat)))
66d3f50a
LF
11453
11454(define-public python2-betamax
f210e944 11455 (package-with-python2 python-betamax))
ca0635b4 11456
94cffc63
LF
11457(define-public python-s3transfer
11458 (package
11459 (name "python-s3transfer")
11460 (version "0.1.8")
11461 (source (origin
11462 (method url-fetch)
11463 (uri (pypi-uri "s3transfer" version))
11464 (sha256
11465 (base32
11466 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11467 (build-system python-build-system)
fad8bf97
LF
11468 (arguments
11469 `(#:phases
11470 (modify-phases %standard-phases
11471 (replace 'check
11472 (lambda _
11473 ;; 7 of the 'integration' tests require network access or login
11474 ;; credentials.
11475 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11476 (native-inputs
fad8bf97
LF
11477 `(("python-docutils" ,python-docutils)
11478 ("python-mock" ,python-mock)
11479 ("python-nose" ,python-nose)))
f22efa01 11480 (propagated-inputs
94cffc63
LF
11481 `(("python-botocore" ,python-botocore)))
11482 (synopsis "Amazon S3 Transfer Manager")
11483 (description "S3transfer is a Python library for managing Amazon S3
11484transfers.")
11485 (home-page "https://github.com/boto/s3transfer")
11486 (license license:asl2.0)
11487 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11488
11489(define-public python2-s3transfer
11490 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11491 (package
11492 (inherit base)
11493 (native-inputs
11494 `(("python2-futures" ,python2-futures)
94cffc63 11495 ,@(package-native-inputs base))))))
8ab59181
HG
11496
11497(define-public python-setproctitle
11498(package
11499 (name "python-setproctitle")
11500 (version "1.1.10")
11501 (source
11502 (origin
11503 (method url-fetch)
11504 (uri (pypi-uri "setproctitle" version))
11505 (sha256
11506 (base32
11507 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11508 (build-system python-build-system)
11509 (arguments
11510 '(#:phases
11511 (modify-phases %standard-phases
11512 (add-before 'check 'patch-Makefile
11513 ;; Stricly this is only required for the python2 variant.
11514 ;; But adding a phase in an inherited package seems to be
11515 ;; cumbersum. So we patch even for python3.
11516 (lambda _
11517 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11518 (when nose
11519 (substitute* "Makefile"
11520 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11521 (string-append nose "/bin/nosetests "))))
11522 #t)))
11523 (replace 'check
11524 (lambda _
11525 (setenv "PYTHON" (or (which "python3") (which "python")))
11526 (setenv "PYCONFIG" (or (which "python3-config")
11527 (which "python-config")))
11528 (setenv "CC" "gcc")
11529 ;; No need to extend PYTHONPATH to find the built package, since
11530 ;; the Makefile will build anyway
11531 (zero? (system* "make" "check")))))))
11532 (native-inputs
11533 `(("procps" ,procps))) ; required for tests
11534 (home-page
11535 "https://github.com/dvarrazzo/py-setproctitle")
11536 (synopsis
11537 "Setproctitle implementation for Python to customize the process title")
11538 (description "The library allows a process to change its title (as displayed
11539by system tools such as ps and top).
11540
11541Changing the title is mostly useful in multi-process systems, for
11542example when a master process is forked: changing the children's title
11543allows to identify the task each process is busy with. The technique
11544is used by PostgreSQL and the OpenSSH Server for example.")
11545 (license license:bsd-3)
11546 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11547
11548(define-public python2-setproctitle
11549 (let ((base (package-with-python2
11550 (strip-python2-variant python-setproctitle))))
11551 (package
11552 (inherit base)
11553 (native-inputs `(("python2-nose" ,python2-nose)
11554 ,@(package-native-inputs base))))))
162e42d8
HG
11555
11556(define-public python-validictory
11557 (package
11558 (name "python-validictory")
11559 (version "1.0.1")
11560 (source
11561 (origin
11562 (method url-fetch)
11563 (uri (pypi-uri "validictory" version))
11564 (sha256
11565 (base32
11566 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11567 (build-system python-build-system)
11568 (arguments
11569 '(#:phases
11570 (modify-phases %standard-phases
11571 (add-after 'unpack 'bootstrap
11572 ;; Move the tests out of the package directory to avoid
11573 ;; packaging them.
11574 (lambda* _
11575 (rename-file "validictory/tests" "tests")
11576 (delete-file "tests/__init__.py")))
11577 (replace 'check
11578 (lambda _
11579 ;; Extend PYTHONPATH so the built package will be found.
11580 (setenv "PYTHONPATH"
11581 (string-append (getcwd) "/build/lib:"
11582 (getenv "PYTHONPATH")))
11583 (zero? (system* "py.test" "-vv" )))))))
11584 (native-inputs
11585 `(("python-pytest" ,python-pytest)))
11586 (home-page
11587 "https://github.com/jamesturk/validictory")
11588 (synopsis "General purpose Python data validator")
11589 (description "It allows validation of arbitrary Python data structures.
11590
11591The schema format is based on the JSON Schema
11592proposal (http://json-schema.org), so combined with json the library is also
11593useful as a validator for JSON data.")
f210e944 11594 (license license:expat)))
162e42d8
HG
11595
11596(define-public python2-validictory
f210e944 11597 (package-with-python2 python-validictory))
0990edfe
DM
11598
11599(define-public python-aniso8601
11600 (package
11601 (name "python-aniso8601")
11602 (version "1.1.0")
11603 (source
11604 (origin
11605 (method url-fetch)
11606 (uri (pypi-uri "aniso8601" version))
11607 (sha256
11608 (base32
11609 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11610 (build-system python-build-system)
11611 (propagated-inputs
11612 `(("python-dateutil-2" ,python-dateutil-2)))
11613 (home-page
11614 "https://bitbucket.org/nielsenb/aniso8601")
11615 (synopsis
11616 "Python library for parsing ISO 8601 strings")
11617 (description
11618 "This package contains a library for parsing ISO 8601 datetime strings.")
11619 (license license:bsd-3)))
999d964d
DM
11620
11621(define-public python-flask-restful
11622 (package
11623 (name "python-flask-restful")
11624 (version "0.3.5")
11625 (source
11626 (origin
11627 (method url-fetch)
11628 (uri (pypi-uri "Flask-RESTful" version))
11629 (sha256
11630 (base32
11631 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11632 (build-system python-build-system)
11633 (propagated-inputs
11634 `(("python-aniso8601" ,python-aniso8601)
11635 ("python-flask" ,python-flask)
11636 ("python-pycrypto" ,python-pycrypto)
11637 ("python-pytz" ,python-pytz)))
11638 (native-inputs
11639 `(;; Optional dependency of Flask. Tests need it.
11640 ("python-blinker" ,python-blinker)
11641 ("python-mock" ,python-mock) ; For tests
11642 ("python-nose" ,python-nose) ; For tests
11643 ("python-sphinx" ,python-sphinx)))
11644 (home-page
11645 "https://www.github.com/flask-restful/flask-restful/")
11646 (synopsis
11647 "Flask module for creating REST APIs")
11648 (description
11649 "This package contains a Flask module for creating REST APIs.")
11650 (license license:bsd-3)))
31288222
DM
11651
11652(define-public python-flask-basicauth
11653 (package
11654 (name "python-flask-basicauth")
11655 (version "0.2.0")
11656 (source
11657 (origin
11658 (method url-fetch)
11659 (uri (pypi-uri "Flask-BasicAuth" version))
11660 (sha256
11661 (base32
11662 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11663 (build-system python-build-system)
11664 (propagated-inputs
11665 `(("python-flask" ,python-flask)))
11666 (home-page
11667 "https://github.com/jpvanhal/flask-basicauth")
11668 (synopsis
11669 "HTTP basic access authentication for Flask")
11670 (description
11671 "This package provides HTTP basic access authentication for Flask.")
11672 (license license:bsd-3)))
903276d0
DM
11673
11674(define-public python-flask-sqlalchemy
11675 (package
11676 (name "python-flask-sqlalchemy")
11677 (version "2.1")
11678 (source
11679 (origin
11680 (method url-fetch)
11681 (uri (pypi-uri "Flask-SQLAlchemy" version))
11682 (sha256
11683 (base32
11684 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11685 (build-system python-build-system)
11686 (propagated-inputs
11687 `(("python-flask" ,python-flask)
11688 ("python-sqlalchemy" ,python-sqlalchemy)))
11689 (home-page
11690 "http://github.com/mitsuhiko/flask-sqlalchemy")
11691 (synopsis
11692 "Module adding SQLAlchemy support to your Flask application")
11693 (description
11694 "This package adds SQLAlchemy support to your Flask application.")
11695 (license license:bsd-3)))
329b4b3b
LF
11696
11697(define-public python-pyev
11698 (package
11699 (name "python-pyev")
11700 (version "0.9.0")
11701 (source
11702 (origin
11703 (method url-fetch)
11704 (uri (pypi-uri "pyev" version))
11705 (sha256
11706 (base32
11707 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11708 (build-system python-build-system)
11709 (arguments
11710 `(#:tests? #f ; no test suite
11711 #:phases
11712 (modify-phases %standard-phases
11713 (add-after 'unpack 'patch
11714 (lambda* (#:key inputs #:allow-other-keys)
11715 (let ((libev (string-append (assoc-ref inputs "libev")
11716 "/lib/libev.so.4")))
11717 (substitute* "setup.py"
11718 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11719 (string-append "libev_dll_name = \"" libev "\"")))))))))
11720 (inputs
11721 `(("libev" ,libev)))
11722 (home-page "http://pythonhosted.org/pyev/")
11723 (synopsis "Python libev interface")
11724 (description "Pyev provides a Python interface to libev.")
11725 (license license:gpl3)))
11726
11727(define-public python2-pyev
11728 (package-with-python2 python-pyev))
45b4f127
DM
11729
11730(define-public python-imagesize
11731 (package
11732 (name "python-imagesize")
11733 (version "0.7.1")
11734 (source
11735 (origin
11736 (method url-fetch)
11737 (uri (pypi-uri "imagesize" version))
11738 (sha256
11739 (base32
11740 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11741 (build-system python-build-system)
9422c98a
LF
11742 (arguments
11743 '(;; Test files are not distributed on PyPi:
11744 ;; https://github.com/shibukawa/imagesize_py/issues/7
11745 #:tests? #f))
45b4f127
DM
11746 (home-page "https://github.com/shibukawa/imagesize_py")
11747 (synopsis "Gets image size of files in variaous formats in Python")
11748 (description
11749 "This package allows determination of image size from
11750PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11751 (license license:expat)))
45b4f127
DM
11752
11753(define-public python2-imagesize
f210e944 11754 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11755
11756(define-public python-axolotl-curve25519
11757 (package
11758 (name "python-axolotl-curve25519")
11759 (version "0.1")
11760 (source
11761 (origin
11762 (method git-fetch)
11763 (uri (git-reference
11764 (url "git://github.com/tgalal/python-axolotl-curve25519")
11765 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11766 (file-name (string-append name "-" version "-checkout"))
11767 (sha256
11768 (base32
11769 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11770 (build-system python-build-system)
11771 (arguments
11772 `(;; Prevent creation of the egg. This works around
11773 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11774 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11775 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11776 (synopsis "Python wrapper for curve25519 library")
11777 (description "This is a python wrapper for the curve25519 library
11778with ed25519 signatures. The C code was pulled from
11779libaxolotl-android. At the moment this wrapper is meant for use by
11780python-axolotl.")
11781 (license (list license:gpl3 ; Most files
683cdbf5 11782 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11783
11784(define-public python2-axolotl-curve25519
11785 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11786
11787(define-public python-axolotl
11788 (package
11789 (name "python-axolotl")
11790 (version "0.1.35")
11791 (source
11792 (origin
11793 (method url-fetch)
11794 (uri (string-append
11795 "https://github.com/tgalal/python-axolotl/archive/"
11796 version ".tar.gz"))
11797 (file-name (string-append name "-" version ".tar.gz"))
11798 (sha256
11799 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11800 (build-system python-build-system)
11801 (arguments
11802 `(#:phases
11803 (modify-phases %standard-phases
11804 ;; Don't install tests
11805 (add-before 'install 'remove-tests
11806 (lambda _
11807 (for-each delete-file-recursively
11808 '("axolotl/tests" "build/lib/axolotl/tests"))
11809 #t)))
11810 ;; Prevent creation of the egg. This works around
11811 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11812 #:configure-flags '("--root=/")))
06ff0837
AI
11813 (propagated-inputs
11814 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11815 ("python-dateutil" ,python-dateutil)
11816 ("python-protobuf" ,python-protobuf)
11817 ("python-pycrypto" ,python-pycrypto)))
11818 (home-page "https://github.com/tgalal/python-axolotl")
11819 (synopsis "Python port of libaxolotl-android")
11820 (description "This is a python port of libaxolotl-android. This
11821is a ratcheting forward secrecy protocol that works in synchronous and
11822asynchronous messaging environments.")
11823 (license license:gpl3)))
11824
11825(define-public python2-axolotl
11826 (package-with-python2 python-axolotl))
e2fca490
DM
11827
11828(define-public python-termstyle
11829 (package
11830 (name "python-termstyle")
11831 (version "0.1.11")
11832 (source
11833 (origin
11834 (method url-fetch)
11835 (uri (pypi-uri "termstyle" version))
11836 (sha256
11837 (base32
11838 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11839 (build-system python-build-system)
11840 (home-page "http://github.com/gfxmonk/termstyle")
11841 (synopsis "Console text coloring for Python")
11842 (description "This package provides console text coloring for Python.")
11843 (license license:bsd-3)))
1e6112d8
DM
11844
11845(define-public python-rednose
11846 (package
11847 (name "python-rednose")
11848 (version "1.2.1")
11849 (source
11850 (origin
11851 (method url-fetch)
11852 (uri (pypi-uri "rednose" version))
11853 (sha256
11854 (base32
11855 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11856 (build-system python-build-system)
11857 (arguments
11858 `(#:phases
11859 (modify-phases %standard-phases
11860 (add-after 'unpack 'fix-deps
11861 (lambda _
11862 ;; See <https://github.com/JBKahn/rednose/issues/12>
11863 (substitute* "setup.py"
11864 (("python-termstyle") "termstyle"))
11865 #t)))))
11866 (propagated-inputs
11867 `(("python-colorama" ,python-colorama)
11868 ("python-termstyle" ,python-termstyle)))
11869 (native-inputs
11870 `(("python-six" ,python-six)
11871 ("python-nose" ,python-nose)))
11872 (home-page "https://github.com/JBKahn/rednose")
11873 (synopsis "Colored output for Python nosetests")
11874 (description "This package provides colored output for the
11875@command{nosetests} command of the Python Nose unit test framework.")
11876 (license license:bsd-3)))
0a7f17f0
DM
11877
11878(define-public python-flask-restplus
11879 (package
11880 (name "python-flask-restplus")
11881 (version "0.9.2")
11882 (source
11883 (origin
11884 (method url-fetch)
11885 (uri (pypi-uri "flask-restplus" version))
11886 (sha256
11887 (base32
11888 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11889 (build-system python-build-system)
11890 (propagated-inputs
11891 `(("python-aniso8601" ,python-aniso8601)
11892 ("python-flask" ,python-flask)
11893 ("python-jsonschema" ,python-jsonschema)
11894 ("python-pytz" ,python-pytz)
11895 ("python-six" ,python-six)))
11896 (native-inputs
11897 `(("python-tzlocal" ,python-tzlocal)
11898 ("python-blinker" ,python-blinker)
11899 ("python-nose" ,python-nose)
11900 ("python-rednose" ,python-rednose)))
11901 (home-page "https://github.com/noirbizarre/flask-restplus")
11902 (synopsis "Framework for documented API development with Flask")
11903 (description "This package provides a framework for API development with
11904the Flask web framework in Python. It is similar to package
11905@code{python-flask-restful} but supports the @code{python-swagger}
11906documentation builder.")
11907 (license license:expat)))
1ed21519
DM
11908
11909(define-public python-sadisplay
11910 (package
11911 (name "python-sadisplay")
11912 (version "0.4.6")
11913 (source
11914 (origin
11915 (method url-fetch)
11916 (uri (pypi-uri "sadisplay" version))
11917 (sha256
11918 (base32
11919 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
11920 (build-system python-build-system)
11921 (propagated-inputs
11922 `(("python-sqlalchemy" ,python-sqlalchemy)))
11923 (native-inputs
11924 `(("python-nose" ,python-nose)))
11925 (home-page "https://bitbucket.org/estin/sadisplay")
11926 (synopsis "SQLAlchemy schema displayer")
11927 (description "This package provides a program to build Entity
11928Relationship diagrams from a SQLAlchemy model (or directly from the
11929database).")
11930 (license license:bsd-3)))
11931
11932(define-public python2-sadisplay
11933 (package-with-python2 python-sadisplay))
444a79b6
DM
11934
11935(define-public python-flask-restful-swagger
11936 (package
11937 (name "python-flask-restful-swagger")
11938 (version "0.19")
11939 (source
11940 (origin
11941 (method url-fetch)
11942 (uri (pypi-uri "flask-restful-swagger" version))
11943 (sha256
11944 (base32
11945 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
11946 (build-system python-build-system)
11947 (propagated-inputs
11948 `(("python-flask-restful" ,python-flask-restful)))
11949 (home-page "https://github.com/rantav/flask-restful-swagger")
11950 (synopsis "Extract Swagger specs from Flask-Restful projects")
11951 (description "This package lets you extract Swagger API documentation
11952specs from your Flask-Restful projects.")
11953 (license license:expat)))
11954
11955(define-public python2-flask-restful-swagger
11956 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
11957
11958(define-public python-argcomplete
11959 (package
11960 (name "python-argcomplete")
11961 (version "1.7.0")
11962 (source
11963 (origin
11964 (method url-fetch)
11965 (uri (pypi-uri "argcomplete" version))
11966 (sha256
11967 (base32
11968 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11969 (build-system python-build-system)
11970 (home-page "https://github.com/kislyuk/argcomplete")
11971 (synopsis "Shell tab completion for Python argparse")
11972 (description "argcomplete provides extensible command line tab completion
11973of arguments and options for Python scripts using @code{argparse}. It's
11974particularly useful for programs with many options or sub-parsers that can
11975dynamically suggest completions; for example, when browsing resources over the
11976network.")
11977 (license license:asl2.0)))
11978
11979(define-public python2-argcomplete
11980 (package-with-python2 python-argcomplete))