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