gnu: python-rdflib: Disable tests.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
6a44697d 14;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
42c4b246 26;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
dddcb25c 29;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
2f6dd9cd 33;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
d3eff97a 34;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
6c2e82bc 35;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
a01b6da7
NK
36;;;
37;;; This file is part of GNU Guix.
38;;;
39;;; GNU Guix is free software; you can redistribute it and/or modify it
40;;; under the terms of the GNU General Public License as published by
41;;; the Free Software Foundation; either version 3 of the License, or (at
42;;; your option) any later version.
43;;;
44;;; GNU Guix is distributed in the hope that it will be useful, but
45;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47;;; GNU General Public License for more details.
48;;;
49;;; You should have received a copy of the GNU General Public License
50;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
1ffa7090 52(define-module (gnu packages python)
3f641af0 53 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 54 #:use-module (gnu packages)
8e451885 55 #:use-module (gnu packages algebra)
d79a343b 56 #:use-module (gnu packages adns)
89b2e0b0 57 #:use-module (gnu packages attr)
d96034ed 58 #:use-module (gnu packages backup)
3969ca54 59 #:use-module (gnu packages bash)
1ffa7090 60 #:use-module (gnu packages compression)
4ed20663 61 #:use-module (gnu packages databases)
ddc63a56 62 #:use-module (gnu packages django)
5e1c9367 63 #:use-module (gnu packages file)
4ed20663 64 #:use-module (gnu packages fontutils)
4ed20663
AE
65 #:use-module (gnu packages gcc)
66 #:use-module (gnu packages ghostscript)
6eb7af2a 67 #:use-module (gnu packages gl)
4ed20663 68 #:use-module (gnu packages glib)
6eb7af2a 69 #:use-module (gnu packages gstreamer)
4ed20663 70 #:use-module (gnu packages gtk)
421a80a2 71 #:use-module (gnu packages icu4c)
c937562e 72 #:use-module (gnu packages image)
4ed20663 73 #:use-module (gnu packages imagemagick)
d79a343b 74 #:use-module (gnu packages libevent)
b10ab723 75 #:use-module (gnu packages libffi)
89b2e0b0 76 #:use-module (gnu packages linux)
0da98533 77 #:use-module (gnu packages maths)
4ed20663 78 #:use-module (gnu packages multiprecision)
45203542 79 #:use-module (gnu packages networking)
be7134bf 80 #:use-module (gnu packages ncurses)
b04a52a6 81 #:use-module (gnu packages openstack)
d488d5d6 82 #:use-module (gnu packages password-utils)
c9b1b4f9 83 #:use-module (gnu packages pcre)
4ed20663 84 #:use-module (gnu packages perl)
b10ab723 85 #:use-module (gnu packages pkg-config)
06ff0837 86 #:use-module (gnu packages protobuf)
4ed20663 87 #:use-module (gnu packages readline)
6eb7af2a 88 #:use-module (gnu packages sdl)
c9b1b4f9 89 #:use-module (gnu packages statistics)
8f9ac901 90 #:use-module (gnu packages tex)
1c65314c 91 #:use-module (gnu packages texinfo)
cc2b77df 92 #:use-module (gnu packages tls)
e25f0174 93 #:use-module (gnu packages version-control)
02f8f804 94 #:use-module (gnu packages video)
8d12be1e 95 #:use-module (gnu packages web)
ce0614dd 96 #:use-module (gnu packages base)
26b307e2 97 #:use-module (gnu packages xml)
6fa14469 98 #:use-module (gnu packages xorg)
0bdc1671 99 #:use-module (gnu packages xdisorg)
4ed20663 100 #:use-module (gnu packages zip)
afa181ff 101 #:use-module (gnu packages tcl)
63bcec71 102 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
103 #:use-module (guix packages)
104 #:use-module (guix download)
ea5456c8 105 #:use-module (guix git-download)
11bb85a1 106 #:use-module (guix utils)
acc26ff1 107 #:use-module (guix build-system gnu)
d8c4998f 108 #:use-module (guix build-system cmake)
898238b9 109 #:use-module (guix build-system python)
1c65314c
FB
110 #:use-module (guix build-system trivial)
111 #:use-module (srfi srfi-1))
a01b6da7 112
45848023 113(define-public python-2.7
a01b6da7
NK
114 (package
115 (name "python")
f0499100 116 (version "2.7.12")
a01b6da7
NK
117 (source
118 (origin
119 (method url-fetch)
9b43a0ff 120 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
121 version "/Python-" version ".tar.xz"))
122 (sha256
123 (base32
f0499100 124 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
125 (patches (search-patches "python-2.7-search-paths.patch"
126 "python-2-deterministic-build-info.patch"
15e57f57 127 "python-2.7-site-prefixes.patch"
c3052d6b 128 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
129 (modules '((guix build utils)))
130 ;; suboptimal to delete failing tests here, but if we delete them in the
131 ;; arguments then we need to make sure to strip out that phase when it
132 ;; gets inherited by python and python-minimal.
133 (snippet
134 '(begin
135 (for-each delete-file
136 '("Lib/test/test_compileall.py"
f0499100 137 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
138 "Lib/test/test_distutils.py"
139 "Lib/test/test_import.py"
140 "Lib/test/test_shutil.py"
141 "Lib/test/test_socket.py"
1bb163b0 142 "Lib/test/test_subprocess.py"))
10a42aa2 143 #t))))
02f0c3b2
LC
144 (outputs '("out"
145 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 146 (build-system gnu-build-system)
3fdc99da 147 (arguments
10a42aa2 148 `(;; 356 tests OK.
e7e7a1eb
EF
149 ;; 6 tests failed:
150 ;; test_compileall test_distutils test_import test_shutil test_socket
151 ;; test_subprocess
152 ;; 39 tests skipped:
ff6f33cf
ED
153 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
154 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
155 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
156 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
157 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
158 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
159 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
160 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
161 ;; test_winreg test_winsound test_zipfile64
162 ;; 4 skips unexpected on linux2:
163 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 164 #:test-target "test"
3fdc99da 165 #:configure-flags
6a20289d
LC
166 (list "--enable-shared" ;allow embedding
167 "--with-system-ffi" ;build ctypes
aaf75c89 168 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
169 (string-append "LDFLAGS=-Wl,-rpath="
170 (assoc-ref %outputs "out") "/lib"))
fd982732 171
d2cc9c7c
LC
172 #:modules ((ice-9 ftw) (ice-9 match)
173 (guix build utils) (guix build gnu-build-system))
fd982732 174 #:phases
46472ecd
MW
175 (modify-phases %standard-phases
176 (add-before
177 'configure 'patch-lib-shells
178 (lambda _
179 ;; Filter for existing files, since some may not exist in all
180 ;; versions of python that are built with this recipe.
181 (substitute* (filter file-exists?
182 '("Lib/subprocess.py"
183 "Lib/popen2.py"
184 "Lib/distutils/tests/test_spawn.py"
185 "Lib/test/test_subprocess.py"))
186 (("/bin/sh") (which "sh")))
dedc8320
LC
187
188 ;; Use zero as the timestamp in .pyc files so that builds are
189 ;; deterministic. TODO: Remove it when this variable is set in
190 ;; gnu-build-system.scm.
a665996f 191 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 192 #t))
5b4e2791
LC
193 (add-before 'configure 'do-not-record-configure-flags
194 (lambda* (#:key configure-flags #:allow-other-keys)
195 ;; Remove configure flags from the installed '_sysconfigdata.py'
196 ;; and 'Makefile' so we don't end up keeping references to the
197 ;; build tools.
198 ;;
199 ;; Preserve at least '--with-system-ffi' since otherwise the
200 ;; thing tries to build libffi, fails, and we end up with a
201 ;; Python that lacks ctypes.
202 (substitute* "configure"
203 (("^CONFIG_ARGS=.*$")
204 (format #f "CONFIG_ARGS='~a'\n"
205 (if (member "--with-system-ffi" configure-flags)
206 "--with-system-ffi"
207 ""))))
208 #t))
46472ecd
MW
209 (add-before
210 'check 'pre-check
211 (lambda _
212 ;; 'Lib/test/test_site.py' needs a valid $HOME
213 (setenv "HOME" (getcwd))
214 #t))
215 (add-after
216 'unpack 'set-source-file-times-to-1980
217 ;; XXX One of the tests uses a ZIP library to pack up some of the
218 ;; source tree, and fails with "ZIP does not support timestamps
219 ;; before 1980". Work around this by setting the file times in the
220 ;; source tree to sometime in early 1980.
221 (lambda _
222 (let ((circa-1980 (* 10 366 24 60 60)))
223 (ftw "." (lambda (file stat flag)
224 (utime file circa-1980 circa-1980)
225 #t))
02f0c3b2 226 #t)))
9ffe61b0
LC
227 (add-after 'install 'remove-tests
228 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
229 ;; because these files are used by some libraries out there.
230 (lambda* (#:key outputs #:allow-other-keys)
231 (let ((out (assoc-ref outputs "out")))
232 (match (scandir (string-append out "/lib")
233 (lambda (name)
234 (string-prefix? "python" name)))
235 ((pythonX.Y)
236 (let ((testdir (string-append out "/lib/" pythonX.Y
237 "/test")))
238 (with-directory-excursion testdir
239 (for-each delete-file-recursively
240 (scandir testdir
241 (match-lambda
242 ((or "." "..") #f)
243 (file
244 (not
245 (string-prefix? "test_support."
246 file))))))
247 (call-with-output-file "__init__.py" (const #t))
248 #t)))))))
216c283b
LC
249 (add-before 'strip 'make-libraries-writable
250 (lambda* (#:key outputs #:allow-other-keys)
251 ;; Make .so files writable so they can be stripped.
252 (let ((out (assoc-ref outputs "out")))
253 (for-each (lambda (file)
254 (chmod file #o755))
255 (find-files (string-append out "/lib")
256 "\\.so"))
257 #t)))
02f0c3b2
LC
258 (add-after 'install 'move-tk-inter
259 (lambda* (#:key outputs #:allow-other-keys)
260 ;; When Tkinter support is built move it to a separate output so
261 ;; that the main output doesn't contain a reference to Tcl/Tk.
262 (let ((out (assoc-ref outputs "out"))
263 (tk (assoc-ref outputs "tk")))
264 (when tk
265 (match (find-files out "tkinter.*\\.so")
266 ((tkinter.so)
267 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
268 ;; want it under TK/lib/pythonX.Y/site-packages.
269 (let* ((len (string-length out))
270 (target (string-append
271 tk "/"
272 (string-drop
273 (dirname (dirname tkinter.so))
274 len)
275 "/site-packages")))
276 (install-file tkinter.so target)
277 (delete-file tkinter.so)))))
278 #t))))))
a01b6da7 279 (inputs
3fdc99da
CR
280 `(("bzip2" ,bzip2)
281 ("gdbm" ,gdbm)
b10ab723 282 ("libffi" ,libffi) ; for ctypes
b88e1b0a 283 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 284 ("openssl" ,openssl)
3fdc99da 285 ("readline" ,readline)
afa181ff
LC
286 ("zlib" ,zlib)
287 ("tcl" ,tcl)
288 ("tk" ,tk))) ; for tkinter
b10ab723
CR
289 (native-inputs
290 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
291 (native-search-paths
292 (list (search-path-specification
293 (variable "PYTHONPATH")
af070955 294 (files '("lib/python2.7/site-packages")))))
f0499100 295 (home-page "https://www.python.org")
afa181ff 296 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
297 (description
298 "Python is a remarkably powerful dynamic programming language that
299is used in a wide variety of application domains. Some of its key
300distinguishing features include: clear, readable syntax; strong
301introspection capabilities; intuitive object orientation; natural
302expression of procedural code; full modularity, supporting hierarchical
303packages; exception-based error handling; and very high level dynamic
304data types.")
3f641af0 305 (license license:psfl)))
acc26ff1 306
45848023
HG
307;; Current 2.x version.
308(define-public python-2 python-2.7)
309
72df6680 310(define-public python-3.5
b24d1cfc 311 (package (inherit python-2)
72df6680 312 (version "3.5.2")
717003e3
LC
313 (source (origin
314 (method url-fetch)
315 (uri (string-append "https://www.python.org/ftp/python/"
316 version "/Python-" version ".tar.xz"))
fc1adab1
AK
317 (patches (search-patches
318 "python-fix-tests.patch"
72df6680 319 "python-3.5-fix-tests.patch"
fc1adab1
AK
320 "python-3-deterministic-build-info.patch"
321 "python-3-search-paths.patch"))
717003e3
LC
322 (patch-flags '("-p0"))
323 (sha256
324 (base32
72df6680 325 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
326 (arguments (substitute-keyword-arguments (package-arguments python-2)
327 ((#:tests? _) #t)))
1aebc0cb
AE
328 (native-search-paths
329 (list (search-path-specification
330 (variable "PYTHONPATH")
0e05d01e
SB
331 (files (list (string-append "lib/python"
332 (version-major+minor version)
333 "/site-packages"))))))))
f26a77ff 334
72df6680
LF
335(define-public python-3.4
336 (package (inherit python-3.5)
337 (version "3.4.5")
338 (source (origin
339 (method url-fetch)
340 (uri (string-append "https://www.python.org/ftp/python/"
341 version "/Python-" version ".tar.xz"))
342 (patches (search-patches
343 "python-fix-tests.patch"
344 "python-3.4-fix-tests.patch"
345 "python-3-deterministic-build-info.patch"
346 "python-3-search-paths.patch"))
347 (patch-flags '("-p0"))
348 (sha256
349 (base32
350 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
351
45848023 352;; Current 3.x version.
72df6680 353(define-public python-3 python-3.5)
45848023
HG
354
355;; Current major version.
356(define-public python python-3)
357
95288fcc
LC
358;; Minimal variants of Python, mostly used to break the cycle between Tk and
359;; Python (Tk -> libxcb -> Python.)
360
361(define-public python2-minimal
362 (package (inherit python-2)
363 (name "python-minimal")
02f0c3b2 364 (outputs '("out"))
95288fcc
LC
365 (arguments
366 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
367 ((#:configure-flags cf)
368 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
369 (inputs '()))) ;none of the optional dependencies
370
371(define-public python-minimal
898238b9 372 (package (inherit python)
95288fcc 373 (name "python-minimal")
02f0c3b2 374 (outputs '("out"))
95288fcc 375
d0b73960 376 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
377 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
378 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
379 (inputs `(("libffi" ,libffi)
380 ("openssl" ,openssl)
95288fcc
LC
381 ("zlib" ,zlib)))))
382
64cb064c
LC
383(define* (wrap-python3 python
384 #:optional
385 (name (string-append (package-name python) "-wrapper")))
898238b9 386 (package (inherit python)
95288fcc 387 (name name)
898238b9
AE
388 (source #f)
389 (build-system trivial-build-system)
02f0c3b2 390 (outputs '("out"))
3969ca54 391 (inputs `(("bash" ,bash)))
3c0f2329 392 (propagated-inputs `(("python" ,python)))
898238b9
AE
393 (arguments
394 `(#:modules ((guix build utils))
395 #:builder
396 (begin
397 (use-modules (guix build utils))
398 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
399 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
400 (mkdir-p bin)
401 (for-each
402 (lambda (old new)
403 (symlink (string-append python old)
404 (string-append bin "/" new)))
3969ca54
SB
405 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
406 `("python" ,"pydoc" ,"idle" ,"pip"))
407 ;; python-config outputs search paths based upon its location,
408 ;; use a bash wrapper to avoid changing its outputs.
409 (let ((bash (string-append (assoc-ref %build-inputs "bash")
410 "/bin/bash"))
411 (old (string-append python "python3-config"))
412 (new (string-append bin "/python-config")))
413 (with-output-to-file new
414 (lambda ()
415 (format #t "#!~a~%" bash)
416 (format #t "exec \"~a\" \"$@\"~%" old)
417 (chmod new #o755)
418 #t)))))))
0d56e3e1
LC
419 (synopsis "Wrapper for the Python 3 commands")
420 (description
421 "This package provides wrappers for the commands of Python@tie{}3.x such
422that they can be invoked under their usual name---e.g., @command{python}
423instead of @command{python3}.")))
424
95288fcc
LC
425(define-public python-wrapper (wrap-python3 python))
426(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 427
aaf625b8
RW
428(define-public python-psutil
429 (package
430 (name "python-psutil")
88535a44 431 (version "4.3.0")
aaf625b8
RW
432 (source
433 (origin
434 (method url-fetch)
f56777be 435 (uri (pypi-uri "psutil" version))
aaf625b8
RW
436 (sha256
437 (base32
88535a44 438 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 439 (build-system python-build-system)
fb08c4fe
MB
440 (arguments
441 ;; FIXME: some tests does not return and times out.
442 '(#:tests? #f))
88535a44 443 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
444 (synopsis "Library for retrieving information on running processes")
445 (description
446 "psutil (Python system and process utilities) is a library for retrieving
447information on running processes and system utilization (CPU, memory, disks,
448network) in Python. It is useful mainly for system monitoring, profiling and
449limiting process resources and management of running processes. It implements
450many functionalities offered by command line tools such as: ps, top, lsof,
451netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
452pidof, tty, taskset, pmap.")
3f641af0 453 (license license:bsd-3)))
aaf625b8
RW
454
455(define-public python2-psutil
456 (package-with-python2 python-psutil))
898238b9 457
f9da1d8a
ED
458(define-public python-passlib
459 (package
460 (name "python-passlib")
1c9f78ec 461 (version "1.7.0")
f9da1d8a
ED
462 (source
463 (origin
464 (method url-fetch)
690e8c66 465 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
466 (sha256
467 (base32
1c9f78ec 468 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
469 (build-system python-build-system)
470 (native-inputs
f3b98f4f 471 `(("python-nose" ,python-nose)))
f22efa01 472 (propagated-inputs
f9da1d8a
ED
473 `(("python-py-bcrypt" ,python-py-bcrypt)))
474 (arguments
475 `(#:phases
476 (alist-cons-before
477 'check 'set-PYTHON_EGG_CACHE
478 ;; some tests require access to "$HOME/.cython"
479 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
480 %standard-phases)))
481 (home-page "https://bitbucket.org/ecollins/passlib")
482 (synopsis
483 "Comprehensive password hashing framework")
484 (description
485 "Passlib is a password hashing library for Python 2 & 3, which provides
486cross-platform implementations of over 30 password hashing algorithms, as well
487as a framework for managing existing password hashes. It's designed to be
488useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
489to providing full-strength password hashing for multi-user application.")
3f641af0 490 (license license:bsd-3)))
f9da1d8a
ED
491
492(define-public python2-passlib
493 (package-with-python2 python-passlib))
494
feb0d9c3
ED
495(define-public python-py-bcrypt
496 (package
497 (name "python-py-bcrypt")
498 (version "0.4")
499 (source
500 (origin
501 (method url-fetch)
502 (uri (string-append
503 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
504 version
505 ".tar.gz"))
506 (sha256
507 (base32
508 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
509 (build-system python-build-system)
feb0d9c3
ED
510 (home-page "https://code.google.com/p/py-bcrypt")
511 (synopsis
512 "Bcrypt password hashing and key derivation")
513 (description
514 "A python wrapper of OpenBSD's Blowfish password hashing code. This
515system hashes passwords using a version of Bruce Schneier's Blowfish block
516cipher with modifications designed to raise the cost of off-line password
517cracking and frustrate fast hardware implementation. The computation cost of
518the algorithm is parametised, so it can be increased as computers get faster.
519The intent is to make a compromise of a password database less likely to
520result in an attacker gaining knowledge of the plaintext passwords (e.g. using
521John the Ripper).")
522 ;; "sha2.c" is under BSD-3;
523 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
524 ;; the rest is under ISC.
3f641af0 525 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
526
527(define-public python2-py-bcrypt
528 (package-with-python2 python-py-bcrypt))
529
530
429fdea1
ED
531(define-public python-paramiko
532 (package
533 (name "python-paramiko")
81b9bbbd 534 (version "1.16.0")
429fdea1
ED
535 (source
536 (origin
537 (method url-fetch)
81b9bbbd 538 (uri (pypi-uri "paramiko" version))
429fdea1
ED
539 (sha256
540 (base32
81b9bbbd 541 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 542 (build-system python-build-system)
a3fc12da 543 (propagated-inputs
f22efa01
HG
544 `(("python-pycrypto" ,python-pycrypto)
545 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
546 (home-page "http://www.paramiko.org/")
547 (synopsis "SSHv2 protocol library")
548 (description "Paramiko is a python implementation of the SSHv2 protocol,
549providing both client and server functionality. While it leverages a Python C
550extension for low level cryptography (PyCrypto), Paramiko itself is a pure
551Python interface around SSH networking concepts.")
3f641af0 552 (license license:lgpl2.1+)))
429fdea1
ED
553
554(define-public python2-paramiko
555 (package-with-python2 python-paramiko))
556
557
de73dbf6
ED
558(define-public python-httplib2
559 (package
560 (name "python-httplib2")
286f1bac 561 (version "0.9.2")
de73dbf6
ED
562 (source
563 (origin
564 (method url-fetch)
286f1bac 565 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
566 (sha256
567 (base32
286f1bac 568 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 569 (build-system python-build-system)
286f1bac 570 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
571 (synopsis "Comprehensive HTTP client library")
572 (description
573 "A comprehensive HTTP client library supporting many features left out of
574other HTTP libraries.")
575 (license license:expat)))
576
577(define-public python2-httplib2
578 (package-with-python2 python-httplib2))
579
67039875
ED
580(define-public python-ecdsa
581 (package
582 (name "python-ecdsa")
583 (version "0.13")
584 (source
585 (origin
586 (method url-fetch)
587 (uri (string-append
588 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
589 version
590 ".tar.gz"))
591 (sha256
592 (base32
593 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
594 (build-system python-build-system)
67039875
ED
595 (inputs
596 `(("openssl" ,openssl)))
597 (home-page
598 "http://github.com/warner/python-ecdsa")
599 (synopsis
600 "ECDSA cryptographic signature library (pure python)")
601 (description
602 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
603Curve Digital Signature Algorithm), implemented purely in Python. With this
604library, you can quickly create keypairs (signing key and verifying key), sign
605messages, and verify the signatures. The keys and signatures are very short,
606making them easy to handle and incorporate into other protocols.")
607 (license license:expat)))
608
609(define-public python2-ecdsa
610 (package-with-python2 python-ecdsa))
611
52323f32
ED
612(define-public python-ccm
613 (package
614 (name "python-ccm")
db5567f7 615 (version "2.1.6")
52323f32
ED
616 (source
617 (origin
618 (method url-fetch)
db5567f7 619 (uri (pypi-uri "ccm" version))
52323f32
ED
620 (sha256
621 (base32
db5567f7 622 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 623 (build-system python-build-system)
f22efa01 624 (propagated-inputs
52323f32 625 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
626 ;; Not listed in setup.py, but used in ccmlib/node.py for full
627 ;; functionality
628 ("python-psutil" ,python-psutil)
52323f32
ED
629 ("python-six" ,python-six)))
630 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
631 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
632localhost")
633 (description "Cassandra Cluster Manager is a development tool for testing
634local Cassandra clusters. It creates, launches and removes Cassandra clusters
635on localhost.")
3f641af0 636 (license license:asl2.0)))
52323f32
ED
637
638(define-public python2-ccm
639 (package-with-python2 python-ccm))
640
89114f39 641(define-public python-pytz
acc26ff1 642 (package
89114f39 643 (name "python-pytz")
61c9babb 644 (version "2016.3")
acc26ff1
CR
645 (source
646 (origin
647 (method url-fetch)
61c9babb 648 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
649 (sha256
650 (base32
61c9babb 651 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 652 (build-system python-build-system)
8498b8cf 653 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 654 (home-page "http://pythonhosted.org/pytz")
9e771e3b 655 (synopsis "Python timezone library")
acc26ff1
CR
656 (description
657 "This library allows accurate and cross platform timezone calculations
658using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 659 (license license:expat)))
5ace6e2f 660
89114f39 661(define-public python2-pytz
11bb85a1 662 (package-with-python2 python-pytz))
89114f39 663
fc50e9c6 664
89114f39 665(define-public python-babel
5ace6e2f 666 (package
89114f39 667 (name "python-babel")
3f37db6b 668 (version "2.3.2")
5ace6e2f
CR
669 (source
670 (origin
671 (method url-fetch)
b850a6d8 672 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
673 (sha256
674 (base32
3f37db6b 675 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f 676 (build-system python-build-system)
f22efa01 677 (propagated-inputs
f3b98f4f 678 `(("python-pytz" ,python-pytz)))
8498b8cf 679 (arguments `(#:tests? #f)) ; no test target
e1804763 680 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
681 (synopsis
682 "Tools for internationalizing Python applications")
683 (description
684 "Babel is composed of two major parts:
685- tools to build and work with gettext message catalogs
686- a Python interface to the CLDR (Common Locale Data Repository), providing
687access to various locale display names, localized number and date formatting,
688etc. ")
3f641af0 689 (license license:bsd-3)))
89114f39
AE
690
691(define-public python2-babel
11bb85a1 692 (package-with-python2 python-babel))
73adf220 693
ed377cc6
RW
694(define-public python2-backport-ssl-match-hostname
695 (package
696 (name "python2-backport-ssl-match-hostname")
f2d06d46 697 (version "3.5.0.1")
ed377cc6
RW
698 (source
699 (origin
700 (method url-fetch)
701 (uri (string-append
702 "https://pypi.python.org/packages/source/b/"
703 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
704 version ".tar.gz"))
705 (sha256
706 (base32
f2d06d46 707 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 708 (build-system python-build-system)
f2d06d46
EF
709 (arguments
710 `(#:python ,python-2
711 #:tests? #f)) ; no test target
f2d06d46
EF
712 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
713 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
714 (description
715 "This backport brings the ssl.match_hostname() function to users of
716earlier versions of Python. The function checks the hostname in the
717certificate returned by the server to which a connection has been established,
718and verifies that it matches the intended target hostname.")
3f641af0 719 (license license:psfl)))
ed377cc6 720
ef5cbf9b
RW
721(define-public python-h5py
722 (package
723 (name "python-h5py")
fe147c41 724 (version "2.6.0")
ef5cbf9b
RW
725 (source
726 (origin
727 (method url-fetch)
fe147c41 728 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
729 (sha256
730 (base32
fe147c41 731 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 732 (build-system python-build-system)
797e1401
RW
733 (arguments
734 `(#:tests? #f ; no test target
735 #:phases
736 (modify-phases %standard-phases
737 (add-after 'unpack 'fix-hdf5-paths
738 (lambda* (#:key inputs #:allow-other-keys)
739 (let ((prefix (assoc-ref inputs "hdf5")))
740 (substitute* "setup_build.py"
741 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
742 (string-append "['" prefix "/lib" "']"))
743 (("'/opt/local/include', '/usr/local/include'")
744 (string-append "'" prefix "/include" "'")))
745 (substitute* "setup_configure.py"
746 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
747 (string-append "['" prefix "/lib" "']")))
748 #t))))))
3c4010b1 749 (propagated-inputs
69866690
HG
750 `(("python-six" ,python-six)
751 ("python-numpy" ,python-numpy)))
ef5cbf9b 752 (inputs
69866690 753 `(("hdf5" ,hdf5)))
ef5cbf9b 754 (native-inputs
fe147c41
EF
755 `(("python-cython" ,python-cython)
756 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
757 (home-page "http://www.h5py.org/")
758 (synopsis "Read and write HDF5 files from Python")
759 (description
760 "The h5py package provides both a high- and low-level interface to the
761HDF5 library from Python. The low-level interface is intended to be a
762complete wrapping of the HDF5 API, while the high-level component supports
763access to HDF5 files, datasets and groups using established Python and NumPy
764concepts.")
9820a028 765 (license license:bsd-3)))
ef5cbf9b
RW
766
767(define-public python2-h5py
9820a028 768 (package-with-python2 python-h5py))
ef5cbf9b 769
c1448c69
EB
770(define-public python-lockfile
771 (package
772 (name "python-lockfile")
692add53 773 (version "0.12.2")
c1448c69
EB
774 (source
775 (origin
776 (method url-fetch)
777 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
778 "lockfile-" version ".tar.gz"))
779 (sha256
780 (base32
692add53 781 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
782 (build-system python-build-system)
783 (arguments '(#:test-target "check"))
692add53
BW
784 (native-inputs
785 `(("python-pbr" ,python-pbr)))
6a8f26a4 786 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
787 (synopsis "Platform-independent file locking module")
788 (description
789 "The lockfile package exports a LockFile class which provides a simple
790API for locking files.")
f210e944 791 (license license:expat)))
c1448c69
EB
792
793(define-public python2-lockfile
f210e944 794 (package-with-python2 python-lockfile))
c1448c69 795
5a1a4bf6
EB
796(define-public python-mock
797 (package
798 (name "python-mock")
799 (version "1.0.1")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
804 "mock-" version ".tar.gz"))
805 (sha256
806 (base32
807 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
808 (build-system python-build-system)
809 (arguments '(#:test-target "check"))
07af3e5e 810 (home-page "http://code.google.com/p/mock/")
9e771e3b 811 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
812 (description
813 "Mock is a library for testing in Python. It allows you to replace parts
814of your system under test with mock objects and make assertions about how they
815have been used.")
bd3fa666 816 (license license:expat)))
5a1a4bf6
EB
817
818(define-public python2-mock
819 (package-with-python2 python-mock))
820
fc50e9c6 821
73adf220
AE
822(define-public python-setuptools
823 (package
824 (name "python-setuptools")
d660f7be 825 (version "31.0.0")
73adf220
AE
826 (source
827 (origin
828 (method url-fetch)
d660f7be 829 (uri (pypi-uri "setuptools" version))
73adf220
AE
830 (sha256
831 (base32
d660f7be 832 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
833 (modules '((guix build utils)))
834 (snippet
835 '(begin
836 ;; Remove included binaries which are used to build self-extracting
837 ;; installers for Windows.
838 ;; TODO: Find some way to build them ourself so we can include them.
839 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
840 #t))))
73adf220 841 (build-system python-build-system)
d3d656c5
AE
842 ;; FIXME: Tests require pytest, which itself relies on setuptools.
843 ;; One could bootstrap with an internal untested setuptools.
73adf220 844 (arguments
824af8ca 845 `(#:tests? #f))
73adf220
AE
846 (home-page "https://pypi.python.org/pypi/setuptools")
847 (synopsis
848 "Library designed to facilitate packaging Python projects")
849 (description
850 "Setuptools is a fully-featured, stable library designed to facilitate
851packaging Python projects, where packaging includes:
852Python package and module definitions,
853distribution package metadata,
854test hooks,
855project installation,
856platform-specific details,
857Python 3 support.")
d660f7be
MB
858 ;; TODO: setuptools now bundles the following libraries:
859 ;; packaging, pyparsing, six and appdirs. How to unbundle?
860 (license (list license:psfl ; setuptools itself
861 license:expat ; six, appdirs, pyparsing
862 license:asl2.0 ; packaging is dual ASL2/BSD-2
863 license:bsd-2))))
73adf220
AE
864
865(define-public python2-setuptools
866 (package-with-python2 python-setuptools))
fc50e9c6
AE
867
868
cafc3f5a
EB
869(define-public python-pycrypto
870 (package
871 (name "python-pycrypto")
872 (version "2.6.1")
873 (source
874 (origin
875 (method url-fetch)
876 (uri (string-append "https://pypi.python.org/packages/source/p/"
877 "pycrypto/pycrypto-" version ".tar.gz"))
878 (sha256
879 (base32
880 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
881 (build-system python-build-system)
cafc3f5a
EB
882 (inputs
883 `(("python" ,python)
884 ("gmp" ,gmp)))
885 (arguments
886 `(#:phases
887 (alist-cons-before
888 'build 'set-build-env
889 ;; pycrypto runs an autoconf configure script behind the scenes
890 (lambda _
891 (setenv "CONFIG_SHELL" (which "bash")))
892 %standard-phases)))
893 (home-page "http://www.pycrypto.org/")
894 (synopsis "Cryptographic modules for Python")
895 (description
896 "Pycrypto is a collection of both secure hash functions (such as SHA256
897and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 898etc.). The package is structured to make adding new modules easy.")
3f641af0 899 (license license:public-domain)))
cafc3f5a 900
345f0611 901(define-public python2-pycrypto
1c0059da
EF
902 (let ((pycrypto (package-with-python2 python-pycrypto)))
903 (package (inherit pycrypto)
904 (inputs
905 `(("python" ,python-2)
906 ,@(alist-delete
907 "python"
908 (package-inputs pycrypto)))))))
345f0611 909
cafc3f5a
EB
910(define-public python-keyring
911 (package
912 (name "python-keyring")
13f3ff35 913 (version "8.7")
cafc3f5a
EB
914 (source
915 (origin
916 (method url-fetch)
664e6c3a 917 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
918 (sha256
919 (base32
13f3ff35 920 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
921 (build-system python-build-system)
922 (native-inputs
13f3ff35 923 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 924 (propagated-inputs
cafc3f5a
EB
925 `(("python-pycrypto" ,python-pycrypto)))
926 (arguments
664e6c3a 927 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 928 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
929 (synopsis "Store and access your passwords safely")
930 (description
931 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 932service from python. It can be used in any application that needs safe
cafc3f5a
EB
933password storage.")
934 ;; "MIT" and PSF dual license
f210e944 935 (license license:x11)))
cafc3f5a 936
d7af1069 937(define-public python2-keyring
f210e944 938 (package-with-python2 python-keyring))
d7af1069 939
a480bc41
EB
940(define-public python-six
941 (package
942 (name "python-six")
b6ab89ef 943 (version "1.10.0")
a480bc41
EB
944 (source
945 (origin
946 (method url-fetch)
b6ab89ef 947 (uri (pypi-uri "six" version))
a480bc41
EB
948 (sha256
949 (base32
b6ab89ef 950 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 951 (build-system python-build-system)
4fd129ee
MB
952 (native-inputs
953 `(("python-py" ,python-py)
954 ("python-pytest" ,python-pytest)))
a480bc41
EB
955 (home-page "http://pypi.python.org/pypi/six/")
956 (synopsis "Python 2 and 3 compatibility utilities")
957 (description
35b9e423 958 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
959functions for smoothing over the differences between the Python versions with
960the goal of writing Python code that is compatible on both Python versions.
35b9e423 961Six supports every Python version since 2.5. It is contained in only one
a480bc41 962Python file, so it can be easily copied into your project.")
3f641af0 963 (license license:x11)))
a480bc41 964
0c20025c
AE
965(define-public python2-six
966 (package-with-python2 python-six))
967
cafc3f5a
EB
968(define-public python-dateutil-2
969 (package
970 (name "python-dateutil")
394b8060 971 (version "2.5.2")
cafc3f5a
EB
972 (source
973 (origin
974 (method url-fetch)
394b8060 975 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
976 (sha256
977 (base32
394b8060 978 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 979 (build-system python-build-system)
f22efa01 980 (propagated-inputs
394b8060 981 `(("python-six" ,python-six)))
b5a5fb19 982 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
983 (synopsis "Extensions to the standard datetime module")
984 (description
985 "The dateutil module provides powerful extensions to the standard
986datetime module, available in Python 2.3+.")
f210e944 987 (license license:bsd-3)))
cafc3f5a
EB
988
989(define-public python2-dateutil-2
f210e944 990 (package-with-python2 python-dateutil-2))
cafc3f5a 991
fc50e9c6
AE
992(define-public python-dateutil
993 (package
994 (name "python-dateutil")
995 (version "1.5") ; last version for python < 3
996 (source
997 (origin
998 (method url-fetch)
cafc3f5a
EB
999 (uri (string-append "http://labix.org/download/python-dateutil/"
1000 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
1001 (sha256
1002 (base32
1003 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1004 (build-system python-build-system)
b5a5fb19 1005 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 1006 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
1007 (description
1008 "The dateutil module provides powerful extensions to the standard
1009datetime module, available in Python 2.3+.")
3f641af0 1010 (license license:psfl)))
fc50e9c6
AE
1011
1012(define-public python2-dateutil
1013 (package-with-python2 python-dateutil))
1d08c01f 1014
cafc3f5a
EB
1015(define-public python-parsedatetime
1016 (package
1017 (name "python-parsedatetime")
eebf6f01 1018 (version "2.1")
cafc3f5a
EB
1019 (source
1020 (origin
1021 (method url-fetch)
eebf6f01 1022 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1023 (sha256
1024 (base32
eebf6f01 1025 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1026 (build-system python-build-system)
1027 (native-inputs
eebf6f01
EF
1028 `(("python-nose" ,python-nose)
1029 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1030 (home-page "http://github.com/bear/parsedatetime/")
1031 (synopsis
1032 "Parse human-readable date/time text")
1033 (description
e881752c 1034 "Parse human-readable date/time text.")
f210e944 1035 (license license:asl2.0)))
cafc3f5a 1036
38b8f9b2 1037(define-public python2-parsedatetime
f210e944 1038 (package-with-python2 python-parsedatetime))
38b8f9b2 1039
d072efcb
RW
1040(define-public python-pandas
1041 (package
1042 (name "python-pandas")
7d0c3c8d 1043 (version "0.18.1")
d072efcb
RW
1044 (source
1045 (origin
1b96f069 1046 (method url-fetch)
7d0c3c8d
EF
1047 (uri (string-append
1048 "https://pypi.python.org/packages/11/09/"
1049 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1050 "pandas-" version ".tar.gz"))
1b96f069 1051 (sha256
7d0c3c8d 1052 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1053 (build-system python-build-system)
d072efcb 1054 (propagated-inputs
f22efa01
HG
1055 `(("python-numpy" ,python-numpy)
1056 ("python-pytz" ,python-pytz)
d072efcb
RW
1057 ("python-dateutil" ,python-dateutil-2)))
1058 (native-inputs
abcc7a0e
HG
1059 `(("python-nose" ,python-nose)
1060 ("python-cython" ,python-cython)))
d072efcb
RW
1061 (home-page "http://pandas.pydata.org")
1062 (synopsis "Data structures for data analysis, time series, and statistics")
1063 (description
1064 "Pandas is a Python package providing fast, flexible, and expressive data
1065structures designed to make working with structured (tabular,
1066multidimensional, potentially heterogeneous) and time series data both easy
1067and intuitive. It aims to be the fundamental high-level building block for
1068doing practical, real world data analysis in Python.")
f210e944 1069 (license license:bsd-3)))
d072efcb
RW
1070
1071(define-public python2-pandas
f210e944 1072 (package-with-python2 python-pandas))
d072efcb 1073
cafc3f5a
EB
1074(define-public python-tzlocal
1075 (package
1076 (name "python-tzlocal")
ed80839b 1077 (version "1.2.2")
cafc3f5a
EB
1078 (source
1079 (origin
1080 (method url-fetch)
226d3331 1081 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1082 (sha256
1083 (base32
ed80839b 1084 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1085 (build-system python-build-system)
f22efa01
HG
1086 (propagated-inputs
1087 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1088 (home-page "https://github.com/regebro/tzlocal")
1089 (synopsis
35b9e423 1090 "Local timezone information for Python")
cafc3f5a
EB
1091 (description
1092 "Tzlocal returns a tzinfo object with the local timezone information.
1093This module attempts to fix a glaring hole in pytz, that there is no way to
1094get the local timezone information, unless you know the zoneinfo name, and
1095under several distributions that's hard or impossible to figure out.")
3f641af0 1096 (license license:cc0)))
cafc3f5a 1097
1d08c01f
AE
1098(define-public python2-pysqlite
1099 (package
1100 (name "python2-pysqlite")
fe476868 1101 (version "2.8.1")
1d08c01f
AE
1102 (source
1103 (origin
1104 (method url-fetch)
fe476868 1105 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1106 (sha256
1107 (base32
fe476868 1108 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1109 (build-system python-build-system)
1110 (inputs
1111 `(("sqlite" ,sqlite)))
1112 (arguments
1113 `(#:python ,python-2 ; incompatible with Python 3
1114 #:tests? #f)) ; no test target
fe476868 1115 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1116 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1117 (description
1118 "Pysqlite provides SQLite bindings for Python that comply to the
1119Database API 2.0T.")
ed0cdf83 1120 (license license:zlib)))
1d08c01f 1121
2875caf5
AE
1122
1123(define-public python2-mechanize
1124 (package
1125 (name "python2-mechanize")
1126 (version "0.2.5")
1127 (source
1128 (origin
1129 (method url-fetch)
1130 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1131 version ".tar.gz"))
1132 (sha256
1133 (base32
1134 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1135 (build-system python-build-system)
2875caf5
AE
1136 (arguments
1137 `(#:python ,python-2 ; apparently incompatible with Python 3
1138 #:tests? #f))
1139 ;; test fails with message
1140 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1141 ;; (python-3.3.2) or
1142 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1143 ;; (python-2.7.5).
1144 ;; The source code is from March 2011 and probably not up-to-date
1145 ;; with respect to python unit tests.
1146 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1147 (synopsis
1148 "Stateful programmatic web browsing in Python")
1149 (description
1150 "Mechanize implements stateful programmatic web browsing in Python,
1151after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1152 (license (license:non-copyleft
1153 "file://COPYING"
1154 "See COPYING in the distribution."))))
2875caf5 1155
0352532e
AE
1156
1157(define-public python-simplejson
1158 (package
1159 (name "python-simplejson")
b2e6e150 1160 (version "3.10.0")
0352532e
AE
1161 (source
1162 (origin
1163 (method url-fetch)
988d1bad 1164 (uri (pypi-uri "simplejson" version))
0352532e
AE
1165 (sha256
1166 (base32
b2e6e150 1167 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1168 (build-system python-build-system)
1169 (home-page "http://simplejson.readthedocs.org/en/latest/")
1170 (synopsis
1171 "Json library for Python")
1172 (description
e881752c
AK
1173 "JSON (JavaScript Object Notation) is a subset of JavaScript
1174syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1175format.
0352532e
AE
1176
1177Simplejson exposes an API familiar to users of the standard library marshal
1178and pickle modules. It is the externally maintained version of the json
1179library contained in Python 2.6, but maintains compatibility with Python 2.5
1180and (currently) has significant performance advantages, even without using
1181the optional C extension for speedups. Simplejson is also supported on
1182Python 3.3+.")
3f641af0 1183 (license license:x11)))
0352532e
AE
1184
1185(define-public python2-simplejson
1186 (package-with-python2 python-simplejson))
421a80a2
AE
1187
1188
ed07b08d 1189(define-public python-pyicu
421a80a2 1190 (package
ed07b08d 1191 (name "python-pyicu")
d3b29319 1192 (version "1.9.2")
421a80a2
AE
1193 (source
1194 (origin
1195 (method url-fetch)
1196 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1197 version ".tar.gz"))
1198 (sha256
1199 (base32
d3b29319 1200 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1201 (build-system python-build-system)
1202 (inputs
1203 `(("icu4c" ,icu4c)))
421a80a2 1204 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1205 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1206 (description
1207 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1208 (license license:x11)))
ed07b08d
LF
1209
1210(define-public python2-pyicu
f210e944 1211 (package-with-python2 python-pyicu))
cc20a22a
LC
1212
1213(define-public python2-dogtail
1214 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1215 ;; spaces in indentation" with Python 3.
1216 (package
1217 (name "python2-dogtail")
1218 (version "0.8.2")
1219 (source (origin
1220 (method url-fetch)
1221 (uri (string-append
1222 "https://fedorahosted.org/released/dogtail/dogtail-"
1223 version ".tar.gz"))
1224 (sha256
1225 (base32
1226 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1227 (build-system python-build-system)
1228 (arguments `(#:python ,python-2
1229 #:tests? #f)) ; invalid command "test"
1230 (home-page "https://fedorahosted.org/dogtail/")
1231 (synopsis "GUI test tool and automation framework written in ​Python")
1232 (description
35b9e423 1233 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1234It uses Accessibility (a11y) technologies to communicate with desktop
1235applications. dogtail scripts are written in Python and executed like any
1236other Python program.")
3f641af0 1237 (license license:gpl2+)))
515e6878 1238
011b18c3
LC
1239(define-public python2-empy
1240 (package
1241 (name "python2-empy")
1242 (version "3.3")
1243 (source (origin
1244 (method url-fetch)
1245 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1246 version ".tar.gz"))
1247 (sha256
1248 (base32
1249 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1250 (build-system python-build-system)
1251 (arguments
1252 `(#:python ,python-2
1253 #:phases (alist-replace
1254 'check
1255 (lambda _
1256 (zero? (system* "./test.sh")))
1257 %standard-phases)))
1258 (home-page "http://www.alcyone.com/software/empy/")
1259 (synopsis "Templating system for Python")
1260 (description
1261 "EmPy is a system for embedding Python expressions and statements in
1262template text; it takes an EmPy source file, processes it, and produces
1263output. This is accomplished via expansions, which are special signals to the
1cd4027c 1264EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1265EmPy can expand arbitrary Python expressions and statements in this way, as
1266well as a variety of special forms. Textual data not explicitly delimited in
1267this way is sent unaffected to the output, allowing Python to be used in
1268effect as a markup language. Also supported are callbacks via hooks,
1269recording and playback via diversions, and dynamic, chainable filters. The
1270system is highly configurable via command line options and embedded
1271commands.")
3f641af0 1272 (license license:lgpl2.1+)))
011b18c3 1273
8deeda0c
LC
1274(define-public python2-element-tree
1275 (package
1276 (name "python2-element-tree")
1277 (version "1.2.6")
1278 (source (origin
1279 (method url-fetch)
1280 (uri (string-append
1281 "http://effbot.org/media/downloads/elementtree-"
1282 version "-20050316.tar.gz"))
1283 (sha256
1284 (base32
1285 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1286 (build-system python-build-system)
1287 (arguments
1288 `(#:python ,python-2 ; seems to be part of Python 3
1289 #:tests? #f)) ; no 'test' sub-command
1290 (synopsis "Toolkit for XML processing in Python")
1291 (description
1292 "ElementTree is a Python library supporting lightweight XML processing.")
1293 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1294 (license (license:x11-style
1295 "http://docs.python.org/2/license.html"
1296 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1297
1298(define-public python2-pybugz
1299 (package
1300 (name "python2-pybugz")
1301 (version "0.6.11")
1302 (source (origin
1303 (method url-fetch)
1304 (uri (string-append
1305 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1306 version ".tar.gz"))
1307 (sha256
1308 (base32
6f194a1e 1309 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1310 (patches (search-patches "pybugz-stty.patch"
1311 "pybugz-encode-error.patch"))))
8deeda0c
LC
1312 (build-system python-build-system)
1313 (arguments
1314 `(#:python ,python-2 ; SyntaxError with Python 3
1315 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1316 (propagated-inputs
1317 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1318 (synopsis "Python and command-line interface to Bugzilla")
1319 (description
1320 "PyBugz is a Python library and command-line tool to query the Bugzilla
1321bug tracking system. It is meant as an aid to speed up interaction with the
1322bug tracker.")
1323 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1324 (license license:gpl2)))
8deeda0c 1325
a480bc41
EB
1326(define-public python-enum34
1327 (package
1328 (name "python-enum34")
d39ae1e5 1329 (version "1.1.0")
a480bc41
EB
1330 (source
1331 (origin
1332 (method url-fetch)
d39ae1e5 1333 (uri (pypi-uri "enum34" version))
a480bc41
EB
1334 (sha256
1335 (base32
d39ae1e5 1336 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1337 (build-system python-build-system)
a480bc41
EB
1338 (arguments
1339 `(#:phases
1340 (alist-replace
1341 'check
1342 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1343 %standard-phases)))
1344 (home-page "https://pypi.python.org/pypi/enum34")
1345 (synopsis "Backported Python 3.4 Enum")
1346 (description
1347 "Enum34 is the new Python stdlib enum module available in Python 3.4
1348backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1349 (license license:bsd-3)))
a480bc41 1350
820acd1b
LF
1351(define-public python2-enum34
1352 (package-with-python2 python-enum34))
1353
a480bc41
EB
1354(define-public python-parse-type
1355 (package
1356 (name "python-parse-type")
1357 (version "0.3.4")
1358 (source
1359 (origin
1360 (method url-fetch)
1361 (uri (string-append "https://pypi.python.org/packages/source/p/"
1362 "parse_type/parse_type-" version ".tar.gz"))
1363 (sha256
1364 (base32
1365 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1366 (build-system python-build-system)
f22efa01 1367 (propagated-inputs
f3b98f4f 1368 `(("python-six" ,python-six)
68f1cdec 1369 ("python-parse" ,python-parse)))
a480bc41
EB
1370 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1371 (home-page "https://github.com/jenisys/parse_type")
1372 (synopsis "Extended parse module")
1373 (description
1374 "Parse_type extends the python parse module.")
3f641af0 1375 (license license:bsd-3)))
a480bc41
EB
1376
1377(define-public python-parse
1378 (package
1379 (name "python-parse")
eb3d3503 1380 (version "1.6.6")
a480bc41
EB
1381 (source
1382 (origin
1383 (method url-fetch)
eb3d3503 1384 (uri (pypi-uri "parse" version))
a480bc41
EB
1385 (sha256
1386 (base32
aa6c09ed
EF
1387 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1388 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1389 (build-system python-build-system)
1390 (arguments
1391 `(#:phases
f9a65318
EF
1392 (modify-phases %standard-phases
1393 (replace 'check
1394 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1395 (home-page "https://github.com/r1chardj0n3s/parse")
1396 (synopsis "Parse strings")
1397 (description
1398 "Parse strings using a specification based on the Python format()
1399syntax.")
3f641af0 1400 (license license:x11)))
a480bc41 1401
d3eff97a
JL
1402(define-public python-polib
1403 (package
1404 (name "python-polib")
1405 (version "1.0.8")
1406 (source (origin
1407 (method url-fetch)
1408 (uri (pypi-uri "polib" version))
1409 (sha256
1410 (base32
1411 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1412 (build-system python-build-system)
1413 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1414 (synopsis "Manipulate, create and modify gettext files")
1415 (description "Polib can manipulate any gettext format (po, pot and mo)
1416files. It can be used to create po files from scratch or to modify
1417existing ones.")
1418 (license license:expat)))
1419
1420(define-public python2-polib
1421 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1422 (package
1423 (inherit base)
1424 (arguments `(,@(package-arguments base)
1425 ;; Tests don't work with python2.
1426 #:tests? #f)))))
a480bc41 1427
515e6878
LC
1428(define-public scons
1429 (package
1430 (name "scons")
a3f61425 1431 (version "2.3.4")
515e6878
LC
1432 (source (origin
1433 (method url-fetch)
de67e922
LF
1434 (uri (string-append "mirror://sourceforge/scons/scons/" version
1435 "/scons-" version ".tar.gz"))
515e6878
LC
1436 (sha256
1437 (base32
a3f61425 1438 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1439 (build-system python-build-system)
1440 (arguments
1441 ;; With Python 3.x, fails to build with a syntax error.
1442 `(#:python ,python-2
b3e8b4bd 1443 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1444 #:tests? #f)) ; no 'python setup.py test' command
1445 (home-page "http://scons.org/")
1446 (synopsis "Software construction tool written in Python")
1447 (description
1448 "SCons is a software construction tool. Think of SCons as an improved,
1449cross-platform substitute for the classic Make utility with integrated
1450functionality similar to autoconf/automake and compiler caches such as ccache.
1451In short, SCons is an easier, more reliable and faster way to build
1452software.")
3f641af0 1453 (license license:x11)))
011b18c3 1454
c15a5c0e
DT
1455(define-public python-extras
1456 (package
1457 (name "python-extras")
1458 (version "0.0.3")
1459 (source
1460 (origin
1461 (method url-fetch)
1462 (uri (string-append
1463 "https://pypi.python.org/packages/source/e/extras/extras-"
1464 version ".tar.gz"))
1465 (sha256
1466 (base32
1467 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1468 (build-system python-build-system)
c15a5c0e
DT
1469 (arguments
1470 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1471 '(#:tests? #f))
1472 (home-page "https://github.com/testing-cabal/extras")
1473 (synopsis "Useful extensions to the Python standard library")
1474 (description
1475 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1476 (license license:expat)))
c15a5c0e
DT
1477
1478(define-public python2-extras
1479 (package-with-python2 python-extras))
1480
56ea0efd
DT
1481(define-public python-mimeparse
1482 (package
1483 (name "python-mimeparse")
1484 (version "0.1.4")
1485 (source
1486 (origin
1487 (method url-fetch)
1488 (uri (string-append
1489 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1490 version ".tar.gz"))
1491 (sha256
1492 (base32
1493 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1494 (build-system python-build-system)
56ea0efd
DT
1495 (arguments
1496 '(#:tests? #f)) ; no setup.py test command
1497 (home-page
1498 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1499 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1500 (description
1501 "Mimeparse provides basic functions for parsing MIME type names and
1502matching them against a list of media-ranges.")
bd3fa666 1503 (license license:expat)))
56ea0efd
DT
1504
1505(define-public python2-mimeparse
1506 (package-with-python2 python-mimeparse))
1507
4435427e
DT
1508(define-public python-nose
1509 (package
1510 (name "python-nose")
f7cb9841 1511 (version "1.3.7")
4435427e
DT
1512 (source
1513 (origin
1514 (method url-fetch)
f7cb9841 1515 (uri (pypi-uri "nose" version))
4435427e
DT
1516 (sha256
1517 (base32
f7cb9841 1518 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1519 (build-system python-build-system)
4435427e
DT
1520 (arguments
1521 '(#:tests? #f)) ; FIXME: test suite fails
1522 (home-page "http://readthedocs.org/docs/nose/")
1523 (synopsis "Python testing library")
1524 (description
1525 "Nose extends the unittest library to make testing easier.")
3f641af0 1526 (license license:lgpl2.0+)))
4435427e
DT
1527
1528(define-public python2-nose
1529 (package-with-python2 python-nose))
1530
0aea283a
EF
1531(define-public python-nose2
1532 (package
1533 (name "python-nose2")
1534 (version "0.6.5")
1535 (source
1536 (origin
1537 (method url-fetch)
1538 (uri (pypi-uri "nose2" version))
1539 (sha256
1540 (base32
1541 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1542 (build-system python-build-system)
1543 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1544 (propagated-inputs
0aea283a
EF
1545 `(("python-cov-core" ,python-cov-core)
1546 ("python-pytest-cov" ,python-pytest-cov)
1547 ("python-six" ,python-six)))
1548 (home-page "https://github.com/nose-devs/nose2")
1549 (synopsis "Next generation of nicer testing for Python")
1550 (description
1551 "Nose2 is the next generation of nicer testing for Python, based on the
1552plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1553better plugin api, being easier for users to configure, and simplifying internal
1554interfaces and processes.")
1555 (license license:bsd-2)))
1556
1557(define-public python2-nose2
1558 (package-with-python2 python-nose2))
1559
6cd9c356
DT
1560(define-public python-unittest2
1561 (package
1562 (name "python-unittest2")
1563 (version "0.5.1")
1564 (source
1565 (origin
1566 (method url-fetch)
1567 (uri (string-append
1568 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1569 version ".tar.gz"))
1570 (sha256
1571 (base32
1572 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1573 (build-system python-build-system)
6cd9c356
DT
1574 (home-page "http://pypi.python.org/pypi/unittest2")
1575 (synopsis "Python unit testing library")
1576 (description
1577 "Unittest2 is a replacement for the unittest module in the Python
1578standard library.")
3f641af0 1579 (license license:psfl)))
6cd9c356
DT
1580
1581(define-public python2-unittest2
1582 (package (inherit python-unittest2)
1583 (name "python2-unittest2")
1584 (version "0.5.1")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (string-append
1589 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1590 version ".tar.gz"))
1591 (sha256
1592 (base32
1593 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1594 (arguments
1595 `(#:python ,python-2
1596 #:tests? #f)))) ; no setup.py test command
1597
02f8f804 1598(define-public python-pafy
1599 (package
1600 (name "python-pafy")
1601 (version "0.5.2")
1602 (source
1603 (origin
1604 (method url-fetch)
1605 (uri (pypi-uri "pafy" version))
1606 (sha256
1607 (base32
1608 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1609 (build-system python-build-system)
ed3fee5f 1610 (arguments
1611 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1612 (propagated-inputs
1613 ;; Youtube-dl is a python package which is imported in the file
1614 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1615 `(("youtube-dl" ,youtube-dl)))
1616 (home-page "https://np1.github.io/pafy/")
1617 (synopsis "Retrieve YouTube content and metadata")
1618 (description
1619 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1620 (license license:lgpl3+)))
1621
542ad60f
DT
1622(define-public python-py
1623 (package
1624 (name "python-py")
71c8a804 1625 (version "1.4.31")
542ad60f
DT
1626 (source
1627 (origin
1628 (method url-fetch)
71c8a804 1629 (uri (pypi-uri "py" version))
542ad60f
DT
1630 (sha256
1631 (base32
71c8a804 1632 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1633 (build-system python-build-system)
dcb0da7b
MB
1634 (arguments
1635 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1636 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1637 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1638 ;; Is this module globally installed?"
1639 '(#:tests? #f))
542ad60f
DT
1640 (home-page "http://pylib.readthedocs.org/")
1641 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1642 (description
1643 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1644code introspection, and logging.")
bd3fa666 1645 (license license:expat)))
542ad60f
DT
1646
1647(define-public python2-py
1648 (package-with-python2 python-py))
1649
855d4761
DT
1650(define-public python-pytest
1651 (package
1652 (name "python-pytest")
61a4332d 1653 (version "2.7.3")
855d4761
DT
1654 (source
1655 (origin
1656 (method url-fetch)
1657 (uri (string-append
1658 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1659 version ".tar.gz"))
1660 (sha256
1661 (base32
61a4332d 1662 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1663 (modules '((guix build utils)))
1664 (snippet
1665 ;; One of the tests involves the /usr directory, so it fails.
1666 '(substitute* "testing/test_argcomplete.py"
1667 (("def test_remove_dir_prefix\\(self\\):")
1668 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1669 (build-system python-build-system)
482d9591
HG
1670 (propagated-inputs
1671 `(("python-py" ,python-py)))
e7881f3d 1672 (native-inputs
482d9591 1673 `(("python-nose" ,python-nose)
855d4761
DT
1674 ("python-mock" ,python-mock)))
1675 (home-page "http://pytest.org")
1676 (synopsis "Python testing library")
1677 (description
1678 "Pytest is a testing tool that provides auto-discovery of test modules
1679and functions, detailed info on failing assert statements, modular fixtures,
1680and many external plugins.")
bd3fa666 1681 (license license:expat)))
855d4761
DT
1682
1683(define-public python2-pytest
1684 (package-with-python2 python-pytest))
1685
fca4ff35
LF
1686;; This package is used by Borg until we can upgrade all our Python packages to
1687;; use a more recent pytest.
1688(define-public python-pytest-2.9.2
1689 (package
1690 (inherit python-pytest)
1691 (name "python-pytest")
1692 (version "2.9.2")
1693 (source (origin
1694 (method url-fetch)
1695 (uri (pypi-uri "pytest" version))
1696 (sha256
1697 (base32
1698 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1699 (arguments
1700 `(#:phases
1701 (modify-phases %standard-phases
1702 (add-before 'check 'disable-invalid-test
1703 (lambda _
1704 (substitute* "testing/test_argcomplete.py"
1705 (("def test_remove_dir_prefix" line)
1706 (string-append "@pytest.mark.skip"
1707 "(reason=\"Assumes that /usr exists.\")\n "
1708 line)))
1709 #t)))))))
1710
358c3d61
EF
1711(define-public python-pytest-cov
1712 (package
1713 (name "python-pytest-cov")
545f4a1c 1714 (version "2.2.1")
358c3d61
EF
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (pypi-uri "pytest-cov" version))
1719 (sha256
545f4a1c
EF
1720 (base32
1721 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1722 (build-system python-build-system)
ce40b383
HG
1723 (arguments
1724 `(#:phases
1725 (modify-phases %standard-phases
1726 (replace 'check
1727 (lambda _
1728 ;; options taken from tox.ini
1729 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1730 ;; with "Duplicate implicit target name"
1731 (zero? (system* "python" "./setup.py" "check"
1732 "--strict" "--metadata")))))))
f22efa01 1733 (propagated-inputs
10468636
EF
1734 `(("python-coverage" ,python-coverage)
1735 ("python-pytest" ,python-pytest)))
10468636
EF
1736 (home-page "https://github.com/pytest-dev/pytest-cov")
1737 (synopsis "Pytest plugin for measuring coverage")
1738 (description
1739 "Pytest-cov produces coverage reports. It supports centralised testing and
1740distributed testing in both @code{load} and @code{each} modes. It also
1741supports coverage of subprocesses.")
f210e944 1742 (license license:expat)))
358c3d61
EF
1743
1744(define-public python2-pytest-cov
f210e944 1745 (package-with-python2 python-pytest-cov))
358c3d61 1746
6784f2e3
RW
1747(define-public python-pytest-runner
1748 (package
1749 (name "python-pytest-runner")
1750 (version "2.6.2")
1751 (source
1752 (origin
1753 (method url-fetch)
54cd239b 1754 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1755 (sha256
1756 (base32
1757 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1758 (build-system python-build-system)
1759 (arguments
1760 `(#:phases
1761 (modify-phases %standard-phases
1762 ;; The fancy way of setting the version with setuptools_scm does not
1763 ;; seem to work here.
1764 (add-after 'unpack 'set-version
1765 (lambda _
1766 (substitute* "docs/conf.py"
1767 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1768 (string-append "version = \"" ,version "\"")))
1769 #t)))))
1770 (native-inputs
1771 `(("python-pytest" ,python-pytest)
1772 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1773 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1774 (synopsis "Invoke py.test as a distutils command")
1775 (description
1776 "This package provides a @command{pytest-runner} command that
1777@file{setup.py} files can use to run tests.")
f210e944 1778 (license license:expat)))
54cd239b
EF
1779
1780(define-public python2-pytest-runner
f210e944 1781 (package-with-python2 python-pytest-runner))
6784f2e3 1782
44547e51
EF
1783(define-public python-pytest-mock
1784 (package
1785 (name "python-pytest-mock")
1786 (version "1.2")
1787 (source
1788 (origin
1789 (method url-fetch)
1790 (uri (pypi-uri "pytest-mock" version ".zip"))
1791 (sha256
1792 (base32
1793 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1794 (build-system python-build-system)
1795 (native-inputs
1796 `(("unzip" ,unzip)))
f22efa01 1797 (propagated-inputs
d5e41cf2 1798 `(("python-pytest" ,python-pytest)))
44547e51
EF
1799 (home-page "https://github.com/pytest-dev/pytest-mock/")
1800 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1801 (description
1802 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1803around the patching API provided by the @code{mock} package, but with the
1804benefit of not having to worry about undoing patches at the end of a test.
1805The mocker fixture has the same API as @code{mock.patch}, supporting the
1806same arguments.")
1807 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1808 (license license:expat)))
1809
1810(define-public python2-pytest-mock
1811 (let ((base (package-with-python2
1812 (strip-python2-variant python-pytest-mock))))
1813 (package (inherit base)
f22efa01 1814 (propagated-inputs
44547e51 1815 `(("python2-mock" ,python2-mock)
f22efa01 1816 ,@(package-propagated-inputs base))))))
44547e51 1817
8fa58fc9
CAW
1818(define-public python-pytest-xdist
1819 (package
1820 (name "python-pytest-xdist")
1821 (version "1.14")
1822 (source
1823 (origin
1824 (method url-fetch)
1825 (uri (pypi-uri "pytest-xdist" version ".zip"))
1826 (sha256
1827 (base32
de585a7e
HG
1828 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1829 (modules '((guix build utils)))
1830 (snippet
1831 '(begin
1832 ;; Remove pre-compiled .pyc files from source.
1833 (for-each delete-file-recursively
1834 (find-files "." "__pycache__" #:directories? #t))
1835 (for-each delete-file (find-files "." "\\.pyc$"))
1836 #t))))
8fa58fc9
CAW
1837 (build-system python-build-system)
1838 (native-inputs
1839 `(("unzip" ,unzip)
8fa58fc9 1840 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1841 (propagated-inputs
c4516ad2 1842 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1843 ("python-pytest" ,python-pytest)
1844 ("python-py" ,python-py)))
1845 (home-page
1846 "https://github.com/pytest-dev/pytest-xdist")
1847 (synopsis
1848 "Plugin for py.test with distributed testing and loop-on-failing modes")
1849 (description
1850 "The pytest-xdist plugin extends py.test with some unique test execution
1851modes: parallelization, running tests in boxed subprocesses, the ability
1852to run tests repeatedly when failed, and the ability to run tests on multiple
1853Python interpreters or platforms. It uses rsync to copy the existing
1854program code to a remote location, executes there, and then syncs the
1855result back.")
f210e944 1856 (license license:expat)))
8fa58fc9
CAW
1857
1858(define-public python2-pytest-xdist
f210e944 1859 (package-with-python2 python-pytest-xdist))
8fa58fc9 1860
84d24017
DT
1861(define-public python-scripttest
1862 (package
1863 (name "python-scripttest")
1864 (version "1.3")
1865 (source
1866 (origin
1867 (method url-fetch)
1868 (uri (string-append
1869 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1870 version ".tar.gz"))
1871 (sha256
1872 (base32
1873 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1874 (build-system python-build-system)
521b7772 1875 (native-inputs
f3b98f4f 1876 `(("python-pytest" ,python-pytest)))
84d24017
DT
1877 (home-page "http://pythonpaste.org/scripttest/")
1878 (synopsis "Python library to test command-line scripts")
1879 (description "Scripttest is a Python helper library for testing
1880interactive command-line applications. With it you can run a script in a
1881subprocess and see the output as well as any file modifications.")
bd3fa666 1882 (license license:expat)))
84d24017
DT
1883
1884(define-public python2-scripttest
1885 (package-with-python2 python-scripttest))
1886
d8fa80e1
DT
1887(define-public python-testtools
1888 (package
1889 (name "python-testtools")
1890 (version "1.0.0")
1891 (source
1892 (origin
1893 (method url-fetch)
1894 (uri (string-append
1895 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1896 version ".tar.gz"))
1897 (sha256
1898 (base32
1899 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1900 (build-system python-build-system)
0e88cbf8 1901 (propagated-inputs
f22efa01
HG
1902 `(("python-mimeparse" ,python-mimeparse)
1903 ("python-extras" ,python-extras)))
d8fa80e1
DT
1904 (home-page "https://github.com/testing-cabal/testtools")
1905 (synopsis
1906 "Extensions to the Python standard library unit testing framework")
1907 (description
1908 "Testtools extends the Python standard library unit testing framework to
1909provide matchers, more debugging information, and cross-Python
1910compatibility.")
3f641af0 1911 (license license:psfl)))
d8fa80e1
DT
1912
1913(define-public python2-testtools
1914 (package-with-python2 python-testtools))
1915
5bf3afea
DT
1916(define-public python-testscenarios
1917 (package
1918 (name "python-testscenarios")
1919 (version "0.4")
1920 (source
1921 (origin
1922 (method url-fetch)
1923 (uri (string-append
1924 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1925 version ".tar.gz"))
1926 (sha256
1927 (base32
1928 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1929 (build-system python-build-system)
f22efa01 1930 (propagated-inputs
8e73d3ba 1931 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
1932 (home-page "https://launchpad.net/testscenarios")
1933 (synopsis "Pyunit extension for dependency injection")
1934 (description
1935 "Testscenarios provides clean dependency injection for Python unittest
1936style tests.")
3f641af0 1937 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1938
1939(define-public python2-testscenarios
1940 (package-with-python2 python-testscenarios))
1941
dac79ecc
DT
1942(define-public python-testresources
1943 (package
1944 (name "python-testresources")
1945 (version "0.2.7")
1946 (source
1947 (origin
1948 (method url-fetch)
1949 (uri (string-append
1950 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1951 version ".tar.gz"))
1952 (sha256
1953 (base32
1954 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1955 (build-system python-build-system)
dac79ecc
DT
1956 (home-page "https://launchpad.net/testresources")
1957 (synopsis
1958 "Pyunit extension for managing test resources")
1959 (description
1960 "Testresources is an extension to Python's unittest to allow declarative
1961use of resources by test cases.")
3f641af0 1962 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1963
1964(define-public python2-testresources
1965 (package-with-python2 python-testresources))
1966
070ab058
DT
1967(define-public python-subunit
1968 (package
1969 (name "python-subunit")
1970 (version "0.0.21")
1971 (source
1972 (origin
1973 (method url-fetch)
1974 (uri (string-append
1975 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1976 version ".tar.gz"))
1977 (sha256
1978 (base32
1979 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1980 (build-system python-build-system)
f22efa01 1981 (propagated-inputs
b52ad371
HG
1982 `(("python-extras" ,python-extras)
1983 ("python-mimeparse" ,python-mimeparse)))
1984 (native-inputs
1985 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
1986 (home-page "http://launchpad.net/subunit")
1987 (synopsis "Python implementation of the subunit protocol")
1988 (description
1989 "Python-subunit is a Python implementation of the subunit test streaming
1990protocol.")
3f641af0 1991 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1992
1993(define-public python2-subunit
1994 (package-with-python2 python-subunit))
1995
d2a8db92
HG
1996;; Recent versions of python-fixtures and python-testrepository need
1997;; python-pbr for packaging, which itself needs these two packages for
1998;; testing.
1999;; To fix this circular dependency, we use a build of python-pbr, based on the
2000;; same source, just without any test dependencies and with tests disabled.
2001;; python-pbr-minmal is then used to package python-fixtures and
2002;; python-testrepository.
2003;; Strictly speaking we currently could remove the test-requirements from the
2004;; normal python-pbr package (and save this package) since test are disabled
2005;; there anyway. But this may change in future.
2006(define python-pbr-minimal
cd49454b 2007 (package
d2a8db92
HG
2008 (name "python-pbr-minimal")
2009 (version "1.8.1")
7787ef76
CR
2010 (source
2011 (origin
2012 (method url-fetch)
d2a8db92 2013 (uri (pypi-uri "pbr" version))
7787ef76
CR
2014 (sha256
2015 (base32
d2a8db92 2016 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
2017 (build-system python-build-system)
2018 (arguments
d2a8db92
HG
2019 `(#:tests? #f))
2020 (home-page "http://docs.openstack.org/developer/pbr/")
2021 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2022 (description
d2a8db92 2023 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2024 (license license:asl2.0)))
7787ef76 2025
d2a8db92
HG
2026(define python2-pbr-minimal
2027 (package-with-python2 python-pbr-minimal))
7787ef76 2028
1ef09c0c 2029(define-public python-pbr
e25f0174 2030 (package
d2a8db92 2031 (inherit python-pbr-minimal)
e25f0174 2032 (name "python-pbr")
e25f0174
BW
2033 (arguments
2034 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2035 (propagated-inputs
d2a8db92
HG
2036 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2037 (native-inputs
e25f0174 2038 `(("python-fixtures" ,python-fixtures)
d2a8db92 2039 ;; discover, coverage, hacking, subunit
e25f0174 2040 ("python-mock" ,python-mock)
d2a8db92 2041 ("python-six" ,python-six)
e25f0174
BW
2042 ("python-sphinx" ,python-sphinx)
2043 ("python-testrepository" ,python-testrepository)
2044 ("python-testresources" ,python-testresources)
2045 ("python-testscenarios" ,python-testscenarios)
2046 ("python-testtools" ,python-testtools)
2047 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2048 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2049 (description
2050 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2051and sensible default behaviors into your setuptools run. It will set
2052versions, process requirements files and generate AUTHORS and ChangeLog file
2053from git information.
2054")))
1ef09c0c
BW
2055
2056(define-public python2-pbr
e25f0174 2057 (package-with-python2 python-pbr))
1ef09c0c 2058
7787ef76
CR
2059(define-public python-fixtures
2060 (package
2061 (name "python-fixtures")
13fcc6df 2062 (version "1.4.0")
7787ef76
CR
2063 (source
2064 (origin
2065 (method url-fetch)
13fcc6df 2066 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2067 (sha256
2068 (base32
13fcc6df 2069 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2070 (build-system python-build-system)
f6c1ef18
MB
2071 (arguments
2072 '(#:phases
2073 (modify-phases %standard-phases
2074 (replace 'check
2075 (lambda _
2076 (zero? (system* "python" "-m" "testtools.run"
2077 "fixtures.test_suite")))))))
7787ef76 2078 (propagated-inputs
ae92cadd 2079 `(("python-six" ,python-six)))
e7881f3d 2080 (native-inputs
f6c1ef18
MB
2081 `(("python-mock" ,python-mock)
2082 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2083 ("python-testtools" ,python-testtools)))
7787ef76
CR
2084 (home-page "https://launchpad.net/python-fixtures")
2085 (synopsis "Python test fixture library")
2086 (description
2087 "Fixtures provides a way to create reusable state, useful when writing
2088Python tests.")
3f641af0 2089 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2090
cd49454b
DT
2091(define-public python2-fixtures
2092 (package-with-python2 python-fixtures))
2093
b24a0c00
DT
2094(define-public python-testrepository
2095 (package
2096 (name "python-testrepository")
2097 (version "0.0.20")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (string-append
2102 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2103 version ".tar.gz"))
2104 (sha256
2105 (base32
2106 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2107 (build-system python-build-system)
90110ef9
MB
2108 (arguments
2109 ;; FIXME: Many tests are failing.
2110 '(#:tests? #f))
05de40c5 2111 (propagated-inputs
b2e66edf
HG
2112 `(("python-fixtures" ,python-fixtures)
2113 ("python-subunit" ,python-subunit)
b52ad371
HG
2114 ("python-testtools" ,python-testtools)))
2115 (native-inputs
2116 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2117 ("python-mimeparse" ,python-mimeparse)))
2118 (home-page "https://launchpad.net/testrepository")
2119 (synopsis "Database for Python test results")
2120 (description "Testrepository provides a database of test results which can
2121be used as part of a developer's workflow to check things such as what tests
2122have failed since the last commit or what tests are currently failing.")
3f641af0 2123 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2124
2125(define-public python2-testrepository
2126 (package-with-python2 python-testrepository))
2127
243a009a
DT
2128(define-public python-coverage
2129 (package
2130 (name "python-coverage")
4d4cf3dd 2131 (version "4.1")
243a009a
DT
2132 (source
2133 (origin
2134 (method url-fetch)
82a3c582 2135 (uri (pypi-uri "coverage" version))
243a009a
DT
2136 (sha256
2137 (base32
4d4cf3dd 2138 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2139 (build-system python-build-system)
bd10e677
MB
2140 (arguments
2141 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2142 '(#:tests? #f))
243a009a
DT
2143 (home-page "http://nedbatchelder.com/code/coverage")
2144 (synopsis "Code coverage measurement for Python")
2145 (description
2146 "Coverage measures code coverage, typically during test execution. It
2147uses the code analysis tools and tracing hooks provided in the Python standard
2148library to determine which lines are executable, and which have been
2149executed.")
3f641af0 2150 (license license:bsd-3)))
243a009a
DT
2151
2152(define-public python2-coverage
2153 (package-with-python2 python-coverage))
2154
12f839fd
EF
2155(define-public python-cov-core
2156 (package
2157 (name "python-cov-core")
2158 (version "1.15.0")
2159 (source
2160 (origin
2161 (method url-fetch)
2162 (uri (pypi-uri "cov-core" version))
2163 (sha256
2164 (base32
2165 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2166 (build-system python-build-system)
f78e1c27 2167 (propagated-inputs
12f839fd
EF
2168 `(("python-coverage" ,python-coverage)))
2169 (home-page "https://github.com/schlamar/cov-core")
2170 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2171 (description
2172 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2173It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2174 (license license:expat)))
12f839fd
EF
2175
2176(define-public python2-cov-core
f210e944 2177 (package-with-python2 python-cov-core))
12f839fd 2178
041358fb
DT
2179(define-public python-discover
2180 (package
2181 (name "python-discover")
2182 (version "0.4.0")
2183 (source
2184 (origin
2185 (method url-fetch)
2186 (uri (string-append
2187 "https://pypi.python.org/packages/source/d/discover/discover-"
2188 version ".tar.gz"))
2189 (sha256
2190 (base32
2191 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2192 (build-system python-build-system)
041358fb
DT
2193 (home-page "http://pypi.python.org/pypi/discover/")
2194 (synopsis
2195 "Python test discovery for unittest")
2196 (description
2197 "Discover provides test discovery for unittest, a feature that has been
e881752c 2198backported from Python 2.7 for Python 2.4+.")
3f641af0 2199 (license license:bsd-3)))
041358fb
DT
2200
2201(define-public python2-discover
2202 (package-with-python2 python-discover))
2203
a480bc41
EB
2204(define-public behave
2205 (package
2206 (name "behave")
287cfd1a 2207 (version "1.2.5")
a480bc41
EB
2208 (source (origin
2209 (method url-fetch)
287cfd1a 2210 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2211 (sha256
2212 (base32
287cfd1a 2213 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2214 (build-system python-build-system)
f22efa01 2215 (propagated-inputs
f3b98f4f 2216 `(("python-six" ,python-six)
a480bc41
EB
2217 ("python-parse" ,python-parse)
2218 ("python-parse-type" ,python-parse-type)))
2219 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2220 ;PyHamcrest>=1.8
2221 (home-page "http://github.com/behave/behave")
2222 (synopsis "Python behavior-driven development")
2223 (description
2224 "Behave is a tool for behavior-driven development in python.
2225Behavior-driven development (or BDD) is an agile software development
2226technique that encourages collaboration between developers, QA and
2227non-technical or business participants in a software project. Behave uses
2228tests written in a natural language style, backed up by Python code.")
3f641af0 2229 (license license:x11)))
c7303d3c
DT
2230
2231(define-public python-exif-read
2232 (package
2233 (name "python-exif-read")
2a2d0981 2234 (version "2.1.2")
c7303d3c
DT
2235 (source (origin
2236 (method url-fetch)
2a2d0981 2237 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2238 (sha256
2239 (base32
2a2d0981 2240 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2241 (build-system python-build-system)
c7303d3c
DT
2242 (arguments `(#:tests? #f)) ; no tests
2243 (home-page "https://github.com/ianare/exif-py")
2244 (synopsis "Python library to extract EXIF data from image files")
2245 (description
2246 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2247files.")
3f641af0 2248 (license license:bsd-3)))
c7303d3c
DT
2249
2250(define-public python2-exif-read
2251 (package-with-python2 python-exif-read))
d5f89b22
DT
2252
2253(define-public python-pyld
2254 (package
2255 (name "python-pyld")
8957af32 2256 (version "0.7.1")
d5f89b22
DT
2257 (source (origin
2258 (method url-fetch)
af1ab773 2259 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2260 (sha256
2261 (base32
8957af32 2262 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2263 (build-system python-build-system)
d5f89b22
DT
2264 (arguments `(#:tests? #f)) ; no tests
2265 (home-page "http://github.com/digitalbazaar/pyld")
2266 (synopsis "Python implementation of the JSON-LD specification")
2267 (description
2268 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2269 (license license:bsd-3)))
d5f89b22
DT
2270
2271(define-public python2-pyld
2272 (package-with-python2 python-pyld))
3a1f9a68
DT
2273
2274(define-public python-certifi
2275 (package
2276 (name "python-certifi")
b2a2232c 2277 (version "2016.8.31")
3a1f9a68
DT
2278 (source (origin
2279 (method url-fetch)
9a41f443 2280 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2281 (sha256
2282 (base32
b2a2232c 2283 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2284 (build-system python-build-system)
3a1f9a68
DT
2285 (arguments `(#:tests? #f)) ; no tests
2286 (home-page "http://python-requests.org/")
2287 (synopsis "Python CA certificate bundle")
2288 (description
2289 "Certifi is a Python library that contains a CA certificate bundle, which
2290is used by the Requests library to verify HTTPS requests.")
3f641af0 2291 (license license:asl2.0)))
3a1f9a68
DT
2292
2293(define-public python2-certifi
2294 (package-with-python2 python-certifi))
e6cfbd36 2295
12c270dd
RW
2296(define-public python-click
2297 (package
2298 (name "python-click")
43accb58 2299 (version "6.6")
12c270dd
RW
2300 (source
2301 (origin
2302 (method url-fetch)
375f224b 2303 (uri (pypi-uri "click" version))
12c270dd 2304 (sha256
43accb58
LF
2305 (base32
2306 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2307 (build-system python-build-system)
e2ab5a09
BW
2308 (arguments
2309 `(#:phases
2310 (modify-phases %standard-phases
2311 (add-after 'unpack 'fix-paths
2312 (lambda* (#:key inputs #:allow-other-keys)
2313 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2314 "cross-libc" "libc"))))
2315 (substitute* "click/_unicodefun.py"
2316 (("'locale'")
2317 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2318 #t))
2319 (replace 'check
2320 (lambda _
2321 (zero? (system* "make" "test")))))))
2322 (native-inputs
2323 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2324 (home-page "http://click.pocoo.org")
2325 (synopsis "Command line library for Python")
2326 (description
2327 "Click is a Python package for creating command line interfaces in a
2328composable way with as little code as necessary. Its name stands for
2329\"Command Line Interface Creation Kit\". It's highly configurable but comes
2330with sensible defaults out of the box.")
3f641af0 2331 (license license:bsd-3)))
12c270dd
RW
2332
2333(define-public python2-click
2334 (package-with-python2 python-click))
2335
addc808d
EF
2336(define-public python-wheel
2337 (package
2338 (name "python-wheel")
40981b5c 2339 (version "0.29.0")
e1ba0749
EF
2340 (source
2341 (origin
2342 (method url-fetch)
2343 (uri (pypi-uri "wheel" version))
2344 (sha256
2345 (base32
40981b5c 2346 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2347 (build-system python-build-system)
2348 (native-inputs
f3b98f4f 2349 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2350 ("python-pytest-cov" ,python-pytest-cov)))
2351 (home-page "https://bitbucket.org/pypa/wheel/")
2352 (synopsis "Format for built Python packages")
2353 (description
2354 "A wheel is a ZIP-format archive with a specially formatted filename and
2355the @code{.whl} extension. It is designed to contain all the files for a PEP
2356376 compatible install in a way that is very close to the on-disk format. Many
2357packages will be properly installed with only the @code{Unpack} step and the
2358unpacked archive preserves enough information to @code{Spread} (copy data and
2359scripts to their final locations) at any later time. Wheel files can be
2360installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2361 (license license:expat)
2362 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2363
2364(define-public python2-wheel
8ad4ae20
LF
2365 (let ((wheel (package-with-python2
2366 (strip-python2-variant python-wheel))))
264ae686 2367 (package (inherit wheel)
8ad4ae20
LF
2368 (native-inputs `(("python2-functools32" ,python2-functools32)
2369 ,@(package-native-inputs wheel))))))
2370
addc808d 2371
ae641128 2372(define-public python-requests
e6cfbd36 2373 (package
ae641128 2374 (name "python-requests")
74a066f9 2375 (version "2.9.1")
e6cfbd36
DT
2376 (source (origin
2377 (method url-fetch)
5d691657 2378 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2379 (sha256
2380 (base32
74a066f9 2381 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
cff0ccf9 2382 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2383 (build-system python-build-system)
cff0ccf9
MB
2384 (arguments
2385 ;; FIXME: Some tests require network access.
2386 '(#:tests? #f))
e6cfbd36
DT
2387 (home-page "http://python-requests.org/")
2388 (synopsis "Python HTTP library")
2389 (description
2390 "Requests is a Python HTTP client library. It aims to be easier to use
2391than Python’s urllib2 library.")
3f641af0 2392 (license license:asl2.0)))
864b5211 2393
e9005180
DT
2394;; Some software requires an older version of Requests, notably Docker
2395;; Compose.
2396(define-public python-requests-2.7
2397 (package (inherit python-requests)
2398 (version "2.7.0")
2399 (source (origin
2400 (method url-fetch)
2401 (uri (pypi-uri "requests" version))
2402 (sha256
2403 (base32
2404 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2405
ae641128 2406(define-public python2-requests
8ad4ae20 2407 (package-with-python2 python-requests))
ae641128 2408
ea521b42
DT
2409(define-public python-vcversioner
2410 (package
2411 (name "python-vcversioner")
538fe019 2412 (version "2.16.0.0")
ea521b42
DT
2413 (source
2414 (origin
2415 (method url-fetch)
2416 (uri (pypi-uri "vcversioner" version))
2417 (sha256
2418 (base32
538fe019 2419 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2420 (build-system python-build-system)
ea521b42
DT
2421 (synopsis "Python library for version number discovery")
2422 (description "Vcversioner is a Python library that inspects tagging
2423information in a variety of version control systems in order to discover
2424version numbers.")
2425 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2426 (license license:isc)))
ea521b42
DT
2427
2428(define-public python2-vcversioner
f210e944 2429 (package-with-python2 python-vcversioner))
ae641128 2430
864b5211
DT
2431(define-public python-jsonschema
2432 (package
2433 (name "python-jsonschema")
b3667afb 2434 (version "2.5.1")
864b5211
DT
2435 (source (origin
2436 (method url-fetch)
2437 (uri
2438 (string-append
2439 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2440 version ".tar.gz"))
2441 (sha256
2442 (base32
b3667afb 2443 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2444 (build-system python-build-system)
8bcd6b91
EF
2445 (arguments
2446 '(#:phases
2447 (modify-phases %standard-phases
2448 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2449 (native-inputs
8bcd6b91
EF
2450 `(("python-nose" ,python-nose)
2451 ("python-vcversioner" ,python-vcversioner)))
2452 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2453 (synopsis "Implementation of JSON Schema for Python")
2454 (description
2455 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2456 (license license:expat)
2457 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2458
2459(define-public python2-jsonschema
a14600ec
LF
2460 (let ((jsonschema (package-with-python2
2461 (strip-python2-variant python-jsonschema))))
264ae686 2462 (package (inherit jsonschema)
eaba9d66 2463 (native-inputs
8bcd6b91 2464 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2465 ,@(package-native-inputs jsonschema)))
2466 (propagated-inputs
2467 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2468
2469(define-public python-unidecode
2470 (package
2471 (name "python-unidecode")
8925d4f3 2472 (version "0.04.18")
850189b8
DT
2473 (source (origin
2474 (method url-fetch)
8925d4f3 2475 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2476 (sha256
2477 (base32
8925d4f3 2478 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2479 (build-system python-build-system)
850189b8
DT
2480 (home-page "https://pypi.python.org/pypi/Unidecode")
2481 (synopsis "ASCII transliterations of Unicode text")
2482 (description
2483 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2484useful when integrating with legacy code that doesn't support Unicode, or for
2485ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2486machine identifiers from human-readable Unicode strings that should still be
2487somewhat intelligeble.")
3f641af0 2488 (license license:gpl2+)))
850189b8
DT
2489
2490(define-public python2-unidecode
2491 (package-with-python2 python-unidecode))
6d45fef4
DT
2492
2493(define-public python-pyjwt
2494 (package
2495 (name "python-pyjwt")
eb31d4b4 2496 (version "1.4.0")
6d45fef4
DT
2497 (source
2498 (origin
2499 (method url-fetch)
eb31d4b4 2500 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2501 (sha256
2502 (base32
eb31d4b4 2503 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2504 (build-system python-build-system)
eb31d4b4 2505 (native-inputs
130fe994
HG
2506 `(("python-pytest" ,python-pytest)
2507 ("python-pytest-cov" ,python-pytest-cov)
2508 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2509 (home-page "http://github.com/progrium/pyjwt")
2510 (synopsis "JSON Web Token implementation in Python")
2511 (description
2512 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2513 (license license:expat)))
6d45fef4
DT
2514
2515(define-public python2-pyjwt
2516 (package-with-python2 python-pyjwt))
2517
2cec1f6f
DT
2518(define-public python-oauthlib
2519 (package
2520 (name "python-oauthlib")
bde2171d 2521 (version "1.0.3")
2cec1f6f
DT
2522 (source (origin
2523 (method url-fetch)
bde2171d 2524 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2525 (sha256
2526 (base32
bde2171d 2527 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2528 (build-system python-build-system)
bde2171d 2529 (native-inputs
bb06aa34 2530 `(("python-nose" ,python-nose)
bde2171d 2531 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2532 ("python-pyjwt" ,python-pyjwt)
2533 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2534 (home-page "https://github.com/idan/oauthlib")
2535 (synopsis "OAuth implementation for Python")
2536 (description
2537 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2538OAuth request-signing logic.")
3f641af0 2539 (license license:bsd-3)
59f151ec 2540 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2541
2542(define-public python2-oauthlib
59f151ec 2543 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2544 (package
2545 (inherit base)
00e10c6e 2546 (native-inputs `(("python2-unittest2" ,python2-unittest2)
bb06aa34 2547 ("python2-mock" ,python2-mock)
59f151ec 2548 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2549
2550(define-public python-itsdangerous
2551 (package
2552 (name "python-itsdangerous")
2553 (version "0.24")
2554 (source
2555 (origin
2556 (method url-fetch)
2557 (uri (string-append
2558 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2559 version ".tar.gz"))
2560 (sha256
2561 (base32
2562 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2563 (build-system python-build-system)
ec5dbb5c
DT
2564 (home-page "http://github.com/mitsuhiko/itsdangerous")
2565 (synopsis "Python library for passing data to/from untrusted environments")
2566 (description
2567 "Itsdangerous provides various helpers to pass trusted data to untrusted
2568environments and back.")
f210e944 2569 (license license:bsd-3)))
ec5dbb5c
DT
2570
2571(define-public python2-itsdangerous
f210e944 2572 (package-with-python2 python-itsdangerous))
5731cae3 2573
8d12be1e
RW
2574(define-public python-pyyaml
2575 (package
2576 (name "python-pyyaml")
2577 (version "3.11")
2578 (source
2579 (origin
2580 (method url-fetch)
2581 (uri (string-append
2582 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2583 version ".tar.gz"))
2584 (sha256
2585 (base32
2586 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2587 (build-system python-build-system)
2588 (inputs
2589 `(("libyaml" ,libyaml)))
8d12be1e
RW
2590 (home-page "http://pyyaml.org/wiki/PyYAML")
2591 (synopsis "YAML parser and emitter for Python")
2592 (description
2593 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2594complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2595API, and sensible error messages. PyYAML supports standard YAML tags and
2596provides Python-specific tags that allow to represent an arbitrary Python
2597object.")
2598 (license license:expat)))
2599
2600(define-public python2-pyyaml
2601 (package-with-python2 python-pyyaml))
2602
5731cae3
DT
2603(define-public python-virtualenv
2604 (package
2605 (name "python-virtualenv")
58d04dba 2606 (version "15.0.3")
5731cae3
DT
2607 (source
2608 (origin
2609 (method url-fetch)
17804240 2610 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2611 (sha256
2612 (base32
58d04dba 2613 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2614 (build-system python-build-system)
17804240
EF
2615 (arguments
2616 `(#:phases
2617 (modify-phases %standard-phases
58d04dba
RW
2618 (replace 'check
2619 (lambda _
2620 ;; Disable failing test. See upstream bug report
2621 ;; https://github.com/pypa/virtualenv/issues/957
2622 (substitute* "tests/test_virtualenv.py"
2623 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2624 (zero? (system* "py.test")))))))
e7881f3d 2625 (native-inputs
f3b98f4f 2626 `(("python-mock" ,python-mock)
17804240 2627 ("python-pytest" ,python-pytest)))
5731cae3
DT
2628 (home-page "https://virtualenv.pypa.io/")
2629 (synopsis "Virtual Python environment builder")
2630 (description
2631 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2632 (license license:expat)))
5731cae3
DT
2633
2634(define-public python2-virtualenv
2635 (package-with-python2 python-virtualenv))
8176d4d5
DT
2636
2637(define-public python-markupsafe
2638 (package
2639 (name "python-markupsafe")
2640 (version "0.23")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (string-append
2645 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2646 version ".tar.gz"))
2647 (sha256
2648 (base32
2649 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2650 (build-system python-build-system)
8176d4d5
DT
2651 (home-page "http://github.com/mitsuhiko/markupsafe")
2652 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2653 (description
2654 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2655for Python.")
3f641af0 2656 (license license:bsd-3)))
8176d4d5
DT
2657
2658(define-public python2-markupsafe
2659 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2660
2661(define-public python-jinja2
2662 (package
2663 (name "python-jinja2")
e98149b3 2664 (version "2.8")
fe34f0d1
DT
2665 (source
2666 (origin
2667 (method url-fetch)
e98149b3 2668 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2669 (sha256
2670 (base32
e98149b3 2671 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2672 (build-system python-build-system)
f22efa01 2673 (propagated-inputs
f3b98f4f 2674 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2675 (home-page "http://jinja.pocoo.org/")
2676 (synopsis "Python template engine")
2677 (description
2678 "Jinja2 is a small but fast and easy to use stand-alone template engine
2679written in pure Python.")
3f641af0 2680 (license license:bsd-3)))
fe34f0d1
DT
2681
2682(define-public python2-jinja2
2683 (package-with-python2 python-jinja2))
3580ab8b 2684
f7d17ac7
EE
2685(define-public python-pystache
2686 (package
2687 (name "python-pystache")
2688 (version "0.5.4")
2689 (source (origin
2690 (method url-fetch)
2691 (uri (pypi-uri "pystache" version))
2692 (sha256
2693 (base32
2694 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2695 (build-system python-build-system)
f7d17ac7
EE
2696 (home-page "http://defunkt.io/pystache/")
2697 (synopsis "Python logic-less template engine")
2698 (description
2699 "Pystache is a Python implementation of the framework agnostic,
2700logic-free templating system Mustache.")
2701 (license license:expat)))
2702
2703(define-public python2-pystache
2704 (package-with-python2 python-pystache))
2705
1285119b
RW
2706(define-public python-joblib
2707 (package
2708 (name "python-joblib")
f34ef331 2709 (version "0.10.3")
1285119b
RW
2710 (source (origin
2711 (method url-fetch)
f34ef331 2712 (uri (pypi-uri "joblib" version))
1285119b
RW
2713 (sha256
2714 (base32
6aa5f1ca
HG
2715 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2716 (modules '((guix build utils)))
2717 (snippet
2718 '(begin
2719 ;; Remove pre-compiled .pyc files from source.
2720 (for-each delete-file-recursively
2721 (find-files "." "__pycache__" #:directories? #t))
2722 (for-each delete-file (find-files "." "\\.pyc$"))
2723 #t))))
1285119b 2724 (build-system python-build-system)
a8dd960a
RW
2725 (arguments
2726 `(#:phases
2727 (modify-phases %standard-phases
2728 (add-before 'check 'disable-failing-tests
2729 (lambda _
2730 ;; This numpydoc tests fails for unknown reasons
2731 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2732 ;; This numpydoc test depends on matplotlib, which is not a
2733 ;; required input.
2734 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2735 ;; These tests fail to execute sys.executable
2736 (substitute* "joblib/test/test_parallel.py"
2737 (("import nose" line)
2738 (string-append "from nose.plugins.skip import SkipTest\n" line))
2739 (("def test_nested_parallel_warnings" line)
2740 (string-append "@SkipTest\n" line))
2741 (("def test_parallel_with_interactively_defined_functions" line)
2742 (string-append "@SkipTest\n" line)))
2743 #t)))))
f052ec9a 2744 ;; Provide nose to enable tests command
1285119b 2745 (native-inputs
f3b98f4f 2746 `(("python-nose" ,python-nose)
f34ef331
RW
2747 ("python-sphinx" ,python-sphinx)
2748 ("python-docutils" ,python-docutils)
2749 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2750 (home-page "http://pythonhosted.org/joblib/")
2751 (synopsis "Using Python functions as pipeline jobs")
2752 (description
2753 "Joblib is a set of tools to provide lightweight pipelining in Python.
2754In particular, joblib offers: transparent disk-caching of the output values
2755and lazy re-evaluation (memoize pattern), easy simple parallel computing
2756logging and tracing of the execution.")
3f641af0 2757 (license license:bsd-3)))
1285119b
RW
2758
2759(define-public python2-joblib
2760 (package-with-python2 python-joblib))
2761
3580ab8b
DT
2762(define-public python-docutils
2763 (package
2764 (name "python-docutils")
2765 (version "0.12")
2766 (source
2767 (origin
2768 (method url-fetch)
2769 (uri (string-append
2770 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2771 version ".tar.gz"))
2772 (sha256
2773 (base32
2774 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2775 (build-system python-build-system)
3580ab8b
DT
2776 (arguments
2777 '(#:tests? #f)) ; no setup.py test command
2778 (home-page "http://docutils.sourceforge.net/")
2779 (synopsis "Python Documentation Utilities")
2780 (description
2781 "Docutils is a modular system for processing documentation into useful
2782formats, such as HTML, XML, and LaTeX. For input Docutils supports
2783reStructuredText.")
2784 ;; Most of the source code is public domain, but some source files are
2785 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2786 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2787
2788(define-public python2-docutils
2789 (package-with-python2 python-docutils))
fb35b7c0
DT
2790
2791(define-public python-pygments
2792 (package
2793 (name "python-pygments")
9f442285 2794 (version "2.0.2")
fb35b7c0
DT
2795 (source
2796 (origin
2797 (method url-fetch)
9f442285 2798 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2799 (sha256
2800 (base32
9f442285 2801 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2802 (build-system python-build-system)
995cb99e
MB
2803 (arguments
2804 ;; FIXME: Tests require sphinx, which depends on this.
2805 '(#:tests? #f))
fb35b7c0
DT
2806 (home-page "http://pygments.org/")
2807 (synopsis "Syntax highlighting")
2808 (description
2809 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2810 (license license:bsd-2)))
fb35b7c0
DT
2811
2812(define-public python2-pygments
2813 (package-with-python2 python-pygments))
9dd6078d
DT
2814
2815(define-public python-sphinx
2816 (package
2817 (name "python-sphinx")
2818 (version "1.2.3")
2819 (source
2820 (origin
2821 (method url-fetch)
2822 (uri (string-append
2823 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2824 version ".tar.gz"))
2825 (sha256
2826 (base32
2827 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2828 (build-system python-build-system)
03cb5f9e
MB
2829 (arguments
2830 ;; FIXME: Missing dependencies.
2831 '(#:tests? #f))
f22efa01 2832 (propagated-inputs
f3b98f4f 2833 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2834 ("python-docutils" ,python-docutils)
2835 ("python-pygments" ,python-pygments)))
2836 (home-page "http://sphinx-doc.org/")
2837 (synopsis "Python documentation generator")
2838 (description "Sphinx is a tool that makes it easy to create documentation
2839for Python projects or other documents consisting of multiple reStructuredText
2840sources.")
3f641af0 2841 (license license:bsd-3)))
9dd6078d
DT
2842
2843(define-public python2-sphinx
2844 (package-with-python2 python-sphinx))
6888830b 2845
ad320b20
RW
2846(define-public python-sphinx-rtd-theme
2847 (package
2848 (name "python-sphinx-rtd-theme")
2849 (version "0.1.6")
2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (string-append "https://pypi.python.org/packages/source/s/"
2854 "sphinx_rtd_theme/sphinx_rtd_theme-"
2855 version ".tar.gz"))
2856 (sha256
2857 (base32
2858 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2859 (build-system python-build-system)
9d3a15b4
LF
2860 (propagated-inputs
2861 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
2862 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2863 (synopsis "ReadTheDocs.org theme for Sphinx")
2864 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2865 (license license:expat)))
ad320b20
RW
2866
2867(define-public python2-sphinx-rtd-theme
2868 (package-with-python2 python-sphinx-rtd-theme))
2869
fe94cf0c
HG
2870(define-public python-rst.linker
2871 (package
2872 (name "python-rst.linker")
2873 (version "1.7")
2874 (source
2875 (origin
2876 (method url-fetch)
2877 (uri (pypi-uri "rst.linker" version))
2878 (sha256
2879 (base32
2880 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2881 (build-system python-build-system)
2882 (propagated-inputs
2883 `(("python-dateutil" ,python-dateutil-2)
2884 ("python-six" ,python-six)))
2885 (native-inputs
2886 `(("python-setuptools-scm" ,python-setuptools-scm)))
2887 ;; Test would require path.py, which would introduce a cyclic dependence.
2888 (arguments `(#:tests? #f))
2889 ;; Note: As of version 1.7 the documentation is not worth building.
2890 (home-page "https://github.com/jaraco/rst.linker")
2891 (synopsis "Sphinx plugin to add links and timestamps")
2892 (description "rst.linker allows to automatically replace text by a
2893reStructuredText external reference or timestamps. It's primary purpose is to
2894augment the changelog, but it can be used for other documents, too.")
2895 (license license:expat)))
2896
2897(define-public python2-rst.linker
2898 (package-with-python2 python-rst.linker))
2899
f4de5b3b
CAW
2900(define-public python-feedgenerator
2901 (package
2902 (name "python-feedgenerator")
f0412aa2 2903 (version "1.8")
f4de5b3b 2904 (source
f4de5b3b 2905 (origin
f0412aa2
EF
2906 (method url-fetch)
2907 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2908 (sha256
2909 (base32
7c88bcf4
HG
2910 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2911 (modules '((guix build utils)))
2912 (snippet
2913 '(begin
2914 ;; Remove pre-compiled .pyc files from source.
2915 (for-each delete-file-recursively
2916 (find-files "." "__pycache__" #:directories? #t))
2917 (for-each delete-file (find-files "." "\\.pyc$"))
2918 #t))))
f4de5b3b 2919 (build-system python-build-system)
dae73d9b 2920 (propagated-inputs
f3b98f4f 2921 `(("python-pytz" ,python-pytz)
f4de5b3b 2922 ("python-six" ,python-six)))
f0412aa2 2923 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2924 (synopsis
2925 "Standalone version of Django's Atom/RSS feed generator")
2926 (description
2927 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2928which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2929 (license license:bsd-3)))
f4de5b3b
CAW
2930
2931(define-public python2-feedgenerator
2932 (package-with-python2 python-feedgenerator))
2933
59ad30e3
CAW
2934(define-public python-blinker
2935 (package
2936 (name "python-blinker")
7fb9ff4d 2937 (version "1.4")
59ad30e3
CAW
2938 (source
2939 (origin
2940 (method url-fetch)
7fb9ff4d 2941 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2942 (sha256
2943 (base32
7fb9ff4d 2944 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 2945 (build-system python-build-system)
59ad30e3
CAW
2946 (home-page "http://pythonhosted.org/blinker/")
2947 (synopsis "Fast, simple object-to-object and broadcast signaling")
2948 (description
2949 "Blinker provides a fast dispatching system that allows any number of
2950interested parties to subscribe to events, or \"signals\".")
2951 (license license:expat)))
2952
2953(define-public python2-blinker
2954 (package-with-python2 python-blinker))
2955
b8050e71
CAW
2956(define-public pelican
2957 (package
2958 (name "pelican")
11f97c27 2959 (version "3.6.3")
b8050e71
CAW
2960 (source
2961 (origin
2962 (method url-fetch)
11f97c27 2963 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2964 (sha256
2965 (base32
11f97c27 2966 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2967 (build-system python-build-system)
f22efa01 2968 (propagated-inputs
b8050e71
CAW
2969 `(("python-feedgenerator" ,python-feedgenerator)
2970 ("python-jinja2" ,python-jinja2)
2971 ("python-pygments" ,python-pygments)
2972 ("python-docutils" ,python-docutils)
2973 ("python-pytz" ,python-pytz)
2974 ("python-blinker" ,python-blinker)
2975 ("python-unidecode" ,python-unidecode)
2976 ("python-six" ,python-six)
2977 ("python-dateutil-2" ,python-dateutil-2)))
2978 (home-page "http://getpelican.com/")
2979 (arguments
2980 `(;; XXX Requires a lot more packages to do unit tests :P
2981 #:tests? #f
2982 #:phases (modify-phases %standard-phases
2983 (add-before
2984 'install 'adjust-requires
2985 ;; Since feedgenerator is installed from git, it doesn't
2986 ;; conform to the version requirements.
2987 ;;
2988 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2989 ;; version requirement so setuptools doesn't get confused.
2990 (lambda _
2991 (substitute* "setup.py"
2992 (("['\"]feedgenerator.*?['\"]")
2993 "'feedgenerator'")))))))
2994 (synopsis "Python-based static site publishing system")
2995 (description
2996 "Pelican is a tool to generate a static blog from reStructuredText,
2997Markdown input files, and more. Pelican uses Jinja2 for templating
2998and is very extensible.")
3f641af0 2999 (license license:agpl3+)))
b8050e71 3000
240ca4aa
RW
3001(define-public python-scikit-learn
3002 (package
3003 (name "python-scikit-learn")
be0a4c26 3004 (version "0.16.1")
240ca4aa
RW
3005 (source
3006 (origin
3007 (method url-fetch)
3008 (uri (string-append
3009 "https://github.com/scikit-learn/scikit-learn/archive/"
3010 version ".tar.gz"))
7e21b9fb 3011 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3012 (sha256
3013 (base32
be0a4c26 3014 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
3015 (build-system python-build-system)
3016 (arguments
3017 `(#:phases
3018 (alist-cons-before
2f6b3d2e
RW
3019 'check 'set-HOME
3020 ;; some tests require access to "$HOME"
3021 (lambda _ (setenv "HOME" "/tmp"))
3022 ;; Tests can only be run after the library has been installed and not
3023 ;; within the source directory.
3024 (alist-cons-after
3025 'install 'check
3026 (lambda _
3027 (with-directory-excursion "/tmp"
3028 ;; With Python 3 one test of 3334 fails
3029 ;; (sklearn.tests.test_common.test_transformers); see
3030 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3031 (system* "nosetests" "-v" "sklearn")))
3032 (alist-delete 'check %standard-phases)))))
240ca4aa 3033 (inputs
328bb95d
HG
3034 `(("openblas" ,openblas)))
3035 (native-inputs
3036 `(("python-nose" ,python-nose)))
240ca4aa
RW
3037 (propagated-inputs
3038 `(("python-numpy" ,python-numpy)
3039 ("python-scipy" ,python-scipy)))
3040 (home-page "http://scikit-learn.org/")
3041 (synopsis "Machine Learning in Python")
3042 (description
3043 "Scikit-learn provides simple and efficient tools for data
3044mining and data analysis.")
1b5241c5 3045 (license license:bsd-3)))
240ca4aa
RW
3046
3047(define-public python2-scikit-learn
1b5241c5 3048 (package-with-python2 python-scikit-learn))
240ca4aa 3049
12f8f9bb
RW
3050(define-public python-scikit-image
3051 (package
3052 (name "python-scikit-image")
3053 (version "0.11.3")
3054 (source
3055 (origin
3056 (method url-fetch)
3057 (uri (string-append
3058 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3059 version ".tar.gz"))
3060 (sha256
3061 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3062 (build-system python-build-system)
b83e2333 3063 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3064 (propagated-inputs
3065 `(("python-matplotlib" ,python-matplotlib)
3066 ("python-networkx" ,python-networkx)
12f8f9bb 3067 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3068 ("python-pillow" ,python-pillow)))
3069 (native-inputs
b83e2333
HG
3070 `(("python-numpy" ,python-numpy)
3071 ("python-cython" ,python-cython)
3072 ("python-six" ,python-six)))
12f8f9bb
RW
3073 (home-page "http://scikit-image.org/")
3074 (synopsis "Image processing in Python")
3075 (description
e881752c 3076 "Scikit-image is a collection of algorithms for image processing.")
12733594 3077 (license license:bsd-3)))
12f8f9bb
RW
3078
3079(define-public python2-scikit-image
12733594 3080 (package-with-python2 python-scikit-image))
12f8f9bb 3081
5394a6a6
RW
3082(define-public python-redis
3083 (package
3084 (name "python-redis")
3085 (version "2.10.3")
3086 (source
3087 (origin
3088 (method url-fetch)
3089 (uri (string-append
3090 "https://pypi.python.org/packages/source/r/redis/redis-"
3091 version ".tar.gz"))
3092 (sha256
3093 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3094 (build-system python-build-system)
3095 ;; Tests require a running Redis server
3096 (arguments '(#:tests? #f))
cf8124b0
HG
3097 ;; As long as we are not running test, we do not need this input :-)
3098 ;;(native-inputs
3099 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3100 (home-page "https://github.com/andymccurdy/redis-py")
3101 (synopsis "Redis Python client")
3102 (description
3103 "This package provides a Python interface to the Redis key-value store.")
3104 (license license:expat)))
3105
3106(define-public python2-redis
3107 (package-with-python2 python-redis))
3108
748cef5b
RW
3109(define-public python-rq
3110 (package
3111 (name "python-rq")
3112 (version "0.5.2")
3113 (source
3114 (origin
3115 (method url-fetch)
3116 (uri (string-append
3117 "https://pypi.python.org/packages/source/r/rq/rq-"
3118 version ".tar.gz"))
3119 (sha256
3120 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3121 (build-system python-build-system)
3122 (propagated-inputs
3123 `(("python-click" ,python-click)
3124 ("python-redis" ,python-redis)))
748cef5b
RW
3125 (home-page "http://python-rq.org/")
3126 (synopsis "Simple job queues for Python")
3127 (description
3128 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3129processing them in the background with workers. It is backed by Redis and it
3130is designed to have a low barrier to entry.")
3f641af0 3131 (license license:bsd-2)))
748cef5b
RW
3132
3133(define-public python2-rq
3134 (package-with-python2 python-rq))
3135
6888830b
FB
3136(define-public python-cython
3137 (package
3138 (name "python-cython")
dd22efef 3139 (version "0.24.1")
6888830b
FB
3140 (source
3141 (origin
3142 (method url-fetch)
56918e26 3143 (uri (pypi-uri "Cython" version))
6888830b
FB
3144 (sha256
3145 (base32
dd22efef 3146 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3147 (build-system python-build-system)
3148 ;; we need the full python package and not just the python-wrapper
3149 ;; because we need libpython3.3m.so
3150 (inputs
3151 `(("python" ,python)))
3152 (arguments
3153 `(#:phases
b92f651b
EF
3154 (modify-phases %standard-phases
3155 (add-before 'check 'set-HOME
3156 ;; some tests require access to "$HOME/.cython"
3157 (lambda _ (setenv "HOME" "/tmp")))
3158 (replace 'check
3159 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3160 (home-page "http://cython.org/")
3161 (synopsis "C extensions for Python")
3162 (description "Cython is an optimising static compiler for both the Python
3163programming language and the extended Cython programming language. It makes
3164writing C extensions for Python as easy as Python itself.")
3f641af0 3165 (license license:asl2.0)
48b311b1 3166 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3167
3168(define-public python2-cython
48b311b1
LC
3169 (package (inherit (package-with-python2
3170 (strip-python2-variant python-cython)))
6888830b
FB
3171 (name "python2-cython")
3172 (inputs
3173 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3174
ee5fb7ee
AV
3175;; The RPython toolchain currently does not support Python 3.
3176(define-public python2-rpython
3177 (package
3178 (name "python2-rpython")
3179 (version "0.1.4")
3180 (source
3181 (origin
3182 (method url-fetch)
3183 (uri (pypi-uri "rpython" version))
3184 (sha256
3185 (base32
3186 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3187 (build-system python-build-system)
3188 (arguments `(#:python ,python-2))
3189 (native-inputs
f3b98f4f 3190 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3191 (home-page "https://rpython.readthedocs.org")
3192 (synopsis "Framework for implementing interpreters and virtual machines")
3193 (description "RPython is a translation and support framework for
3194producing implementations of dynamic languages, emphasizing a clean separation
3195between language specification and implementation aspects.")
3196 (license license:expat)))
3197
0da98533
FB
3198;; This version of numpy is missing the documentation and is only used to
3199;; build matplotlib which is required to build numpy's documentation.
3200(define python-numpy-bootstrap
3201 (package
3202 (name "python-numpy-bootstrap")
ef9b4c04 3203 (version "1.10.4")
0da98533
FB
3204 (source
3205 (origin
3206 (method url-fetch)
de67e922 3207 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3208 "/numpy-" version ".tar.gz"))
3209 (sha256
3210 (base32
ef9b4c04 3211 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3212 (build-system python-build-system)
3213 (inputs
328bb95d 3214 `(("openblas" ,openblas)
cba256f8 3215 ("lapack" ,lapack)))
0da98533 3216 (native-inputs
2efabc55
HG
3217 `(("python-nose" ,python-nose)
3218 ("gfortran" ,gfortran)))
0da98533
FB
3219 (arguments
3220 `(#:phases
2efabc55
HG
3221 (modify-phases %standard-phases
3222 (add-before 'build 'set-environment-variables
3223 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3224 (call-with-output-file "site.cfg"
3225 (lambda (port)
cba256f8
RW
3226 (format port
3227 "[openblas]
dbdfe515
RW
3228libraries = openblas
3229library_dirs = ~a/lib
3230include_dirs = ~a/include
cba256f8 3231
2efabc55
HG
3232# backslash-n to make emacs happy
3233\n[lapack]
cba256f8
RW
3234lapack_libs = lapack
3235library_dirs = ~a/lib
3236include_dirs = ~a/include
3237"
3238 (assoc-ref inputs "openblas")
3239 (assoc-ref inputs "openblas")
3240 (assoc-ref inputs "lapack")
3241 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3242 ;; Use "gcc" executable, not "cc".
3243 (substitute* "numpy/distutils/system_info.py"
3244 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3245 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3246 #t))
6a843168
FB
3247 ;; Tests can only be run after the library has been installed and not
3248 ;; within the source directory.
2efabc55
HG
3249 (delete 'check)
3250 (add-after 'install 'check
3251 (lambda* (#:key outputs inputs #:allow-other-keys)
3252 ;; Make installed package available for running the tests
3253 (add-installed-pythonpath inputs outputs)
6a843168 3254 (with-directory-excursion "/tmp"
89b5c60e 3255 (zero? (system* "python" "-c"
2efabc55 3256 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3257 (home-page "http://www.numpy.org/")
3258 (synopsis "Fundamental package for scientific computing with Python")
3259 (description "NumPy is the fundamental package for scientific computing
e881752c 3260with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3261object, sophisticated (broadcasting) functions, tools for integrating C/C++
3262and Fortran code, useful linear algebra, Fourier transform, and random number
3263capabilities.")
3f641af0 3264 (license license:bsd-3)))
0da98533
FB
3265
3266(define python2-numpy-bootstrap
3267 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3268
3a1bfe18
RW
3269(define-public python2-fastlmm
3270 (package
3271 (name "python2-fastlmm")
b074e7d4 3272 (version "0.2.21")
3a1bfe18
RW
3273 (source
3274 (origin
3275 (method url-fetch)
b074e7d4 3276 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3277 (sha256
3278 (base32
b074e7d4 3279 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3280 (build-system python-build-system)
3281 (arguments
3282 `(#:python ,python-2)) ; only Python 2.7 is supported
3283 (propagated-inputs
3284 `(("python2-numpy" ,python2-numpy)
3285 ("python2-scipy" ,python2-scipy)
3286 ("python2-matplotlib" ,python2-matplotlib)
3287 ("python2-pandas" ,python2-pandas)
3288 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3289 ("python2-pysnptools" ,python2-pysnptools)))
3290 (native-inputs
3291 `(("unzip" ,unzip)
2efabc55 3292 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3293 ("python2-mock" ,python2-mock)
3294 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3295 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3296 (synopsis "Perform genome-wide association studies on large data sets")
3297 (description
3298 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3299Models, is a program for performing both single-SNP and SNP-set genome-wide
3300association studies (GWAS) on extremely large data sets.")
3f641af0 3301 (license license:asl2.0)))
3a1bfe18 3302
2ee8869a
FB
3303(define-public python-numpy
3304 (package (inherit python-numpy-bootstrap)
3305 (name "python-numpy")
3306 (outputs '("out" "doc"))
89b5c60e 3307 (inputs
b0aa6ede
HG
3308 `(("which" ,which)
3309 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3310 (propagated-inputs
3311 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3312 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3313 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3314 (native-inputs
3315 `(("pkg-config" ,pkg-config)
2efabc55
HG
3316 ("python-sphinx" ,python-sphinx)
3317 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3318 ("texlive" ,texlive)
3319 ("texinfo" ,texinfo)
3320 ("perl" ,perl)
3321 ,@(package-native-inputs python-numpy-bootstrap)))
3322 (arguments
89b5c60e 3323 `(,@(substitute-keyword-arguments
2ee8869a
FB
3324 (package-arguments python-numpy-bootstrap)
3325 ((#:phases phases)
3326 `(alist-cons-after
3327 'install 'install-doc
2efabc55
HG
3328 (lambda* (#:key inputs outputs #:allow-other-keys)
3329 ;; Make installed package available for building the
3330 ;; documentation
3331 (add-installed-pythonpath inputs outputs)
2ee8869a 3332 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3333 (doc (string-append
3334 data "/doc/" ,name "-"
2ee8869a
FB
3335 ,(package-version python-numpy-bootstrap)))
3336 (info (string-append data "/info"))
3337 (html (string-append doc "/html"))
3338 (pyver ,(string-append "PYVER=")))
3339 (with-directory-excursion "doc"
3340 (mkdir-p html)
3341 (system* "make" "html" pyver)
3342 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3343 (system* "make" "-C" "build/latex"
2ee8869a
FB
3344 "all-pdf" "PAPER=a4" pyver)
3345 ;; FIXME: Generation of the info file fails.
3346 ;; (system* "make" "info" pyver)
3347 ;; (mkdir-p info)
3348 ;; (copy-file "build/texinfo/numpy.info"
3349 ;; (string-append info "/numpy.info"))
3350 (for-each (lambda (file)
3351 (copy-file (string-append "build/latex" file)
3352 (string-append doc file)))
3353 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3354 (with-directory-excursion "build/html"
3355 (for-each (lambda (file)
3356 (let* ((dir (dirname file))
3357 (tgt-dir (string-append html "/" dir)))
3358 (unless (equal? "." dir)
3359 (mkdir-p tgt-dir))
96c46210 3360 (install-file file html)))
2ee8869a
FB
3361 (find-files "." ".*"))))))
3362 ,phases)))))))
3363
764c077b 3364(define-public python2-numpy
57b7b8cd 3365 (package-with-python2 python-numpy))
2ee8869a 3366
15bfe6d6
FB
3367(define-public python-pyparsing
3368 (package
3369 (name "python-pyparsing")
e0669289 3370 (version "2.0.3")
15bfe6d6
FB
3371 (source
3372 (origin
3373 (method url-fetch)
de67e922
LF
3374 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3375 "/pyparsing-" version
15bfe6d6
FB
3376 "/pyparsing-" version ".tar.gz"))
3377 (sha256
3378 (base32
e0669289 3379 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3380 (build-system python-build-system)
3381 (outputs '("out" "doc"))
3382 (arguments
3383 `(#:tests? #f ; no test target
3384 #:modules ((guix build python-build-system)
3385 (guix build utils))
3386 #:phases
3387 (alist-cons-after
3388 'install 'install-doc
3389 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3390 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3391 "/share/doc/" ,name "-" ,version))
3392 (html-doc (string-append doc "/html"))
3393 (examples (string-append doc "/examples")))
3394 (mkdir-p html-doc)
3395 (mkdir-p examples)
89b5c60e 3396 (for-each
15bfe6d6 3397 (lambda (dir tgt)
89b5c60e 3398 (map (lambda (file)
96c46210 3399 (install-file file tgt))
15bfe6d6
FB
3400 (find-files dir ".*")))
3401 (list "docs" "htmldoc" "examples")
3402 (list doc html-doc examples))))
3403 %standard-phases)))
3404 (home-page "http://pyparsing.wikispaces.com")
3405 (synopsis "Python parsing class library")
3406 (description
3407 "The pyparsing module is an alternative approach to creating and
3408executing simple grammars, vs. the traditional lex/yacc approach, or the use
3409of regular expressions. The pyparsing module provides a library of classes
3410that client code uses to construct the grammar directly in Python code.")
bd3fa666 3411 (license license:expat)))
15bfe6d6
FB
3412
3413(define-public python2-pyparsing
3414 (package-with-python2 python-pyparsing))
3415
ec00de35
FB
3416(define-public python-numpydoc
3417 (package
3418 (name "python-numpydoc")
3419 (version "0.5")
3420 (source
3421 (origin
3422 (method url-fetch)
89b5c60e 3423 (uri (string-append
ec00de35
FB
3424 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3425 version ".tar.gz"))
3426 (sha256
3427 (base32
5e4d8f67
AE
3428 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3429 (modules '((guix build utils)))
3430 (snippet
3431 '(begin
3432 ;; Drop a test requiring matplotlib, which we cannot add as an
3433 ;; input since it would create a circular dependency: Extend the
3434 ;; test for Python 3, where it is already dropped, to Python 2.
3435 (substitute* "numpydoc/tests/test_plot_directive.py"
3436 (("3") "2"))))))
ec00de35 3437 (build-system python-build-system)
fe4a8da4 3438 (propagated-inputs
213d1745
HG
3439 `(("python-sphinx" ,python-sphinx)))
3440 (native-inputs
3441 `(("python-nose" ,python-nose)))
ec00de35
FB
3442 (home-page "https://pypi.python.org/pypi/numpydoc")
3443 (synopsis
3444 "Numpy's Sphinx extensions")
3445 (description
3446 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3447 (license license:bsd-2)))
ec00de35
FB
3448
3449(define-public python2-numpydoc
5e4d8f67 3450 (package-with-python2 python-numpydoc))
1c65314c 3451
1e656049
RW
3452(define-public python-numexpr
3453 (package
3454 (name "python-numexpr")
26112c0a 3455 (version "2.6.0")
1e656049
RW
3456 (source
3457 (origin
3458 (method url-fetch)
26112c0a 3459 (uri (pypi-uri "numexpr" version))
1e656049
RW
3460 (sha256
3461 (base32
26112c0a 3462 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3463 (build-system python-build-system)
3464 (arguments `(#:tests? #f)) ; no tests included
3465 (propagated-inputs
3466 `(("python-numpy" ,python-numpy)))
3467 (home-page "https://github.com/pydata/numexpr")
3468 (synopsis "Fast numerical expression evaluator for NumPy")
3469 (description
3470 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3471expressions that operate on arrays are accelerated and use less memory than
3472doing the same calculation in Python. In addition, its multi-threaded
3473capabilities can make use of all your cores, which may accelerate
3474computations, most specially if they are not memory-bounded (e.g. those using
3475transcendental functions).")
f210e944 3476 (license license:expat)))
1e656049
RW
3477
3478(define-public python2-numexpr
f210e944 3479 (package-with-python2 python-numexpr))
1e656049 3480
1c65314c
FB
3481(define-public python-matplotlib
3482 (package
3483 (name "python-matplotlib")
1bbc659f 3484 (version "1.4.3")
1c65314c
FB
3485 (source
3486 (origin
3487 (method url-fetch)
de67e922
LF
3488 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3489 "/matplotlib-" version
1c65314c
FB
3490 "/matplotlib-" version ".tar.gz"))
3491 (sha256
3492 (base32
1bbc659f 3493 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3494 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3495 (build-system python-build-system)
3496 (outputs '("out" "doc"))
25f9a068
FB
3497 (propagated-inputs ; the following packages are all needed at run time
3498 `(("python-pyparsing" ,python-pyparsing)
3499 ("python-pygobject" ,python-pygobject)
3500 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3501 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3502 ("python-dateutil" ,python-dateutil-2)
3503 ("python-numpy" ,python-numpy-bootstrap)
3504 ("python-pillow" ,python-pillow)
3505 ("python-pytz" ,python-pytz)
3506 ("python-six" ,python-six)
25f9a068
FB
3507 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3508 ;; from 'gtk+') provides the required 'typelib' files used by
3509 ;; 'gobject-introspection'. The location of these files is set with the
3510 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3511 ;; is done automatically by a 'native-search-path' procedure. However,
3512 ;; at run-time the user must set this variable as follows:
3513 ;;
3514 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3515 ("gtk+" ,gtk+)
3516 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3517 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3518 ;; object. For this reason we need to import both libraries.
3519 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3520 ("python-pycairo" ,python-pycairo)
3521 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3522 (inputs
ca33a3ad 3523 `(("libpng" ,libpng)
1c65314c
FB
3524 ("imagemagick" ,imagemagick)
3525 ("freetype" ,freetype)
25f9a068
FB
3526 ("cairo" ,cairo)
3527 ("glib" ,glib)
1c65314c 3528 ;; FIXME: Add backends when available.
1c65314c
FB
3529 ;("python-wxpython" ,python-wxpython)
3530 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3531 ("tcl" ,tcl)
3532 ("tk" ,tk)))
1c65314c
FB
3533 (native-inputs
3534 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3535 ("python-sphinx" ,python-sphinx)
3536 ("python-numpydoc" ,python-numpydoc)
3537 ("python-nose" ,python-nose)
3538 ("python-mock" ,python-mock)
1c65314c
FB
3539 ("texlive" ,texlive)
3540 ("texinfo" ,texinfo)))
3541 (arguments
3542 `(#:phases
25f9a068
FB
3543 (alist-cons-before
3544 'build 'configure-environment
3545 (lambda* (#:key outputs inputs #:allow-other-keys)
3546 (let ((cairo (assoc-ref inputs "cairo"))
3547 (gtk+ (assoc-ref inputs "gtk+")))
3548 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3549 ;; has not effect.
25f9a068
FB
3550 (setenv "LD_LIBRARY_PATH"
3551 (string-append cairo "/lib:" gtk+ "/lib"))
3552 (setenv "HOME" (getcwd))
3553 (call-with-output-file "setup.cfg"
3554 (lambda (port)
1bbc659f
FB
3555 (format port "[directories]~%
3556basedirlist = ~a,~a~%
57b7b8cd 3557 [rc_options]~%
1bbc659f
FB
3558backend = TkAgg~%"
3559 (assoc-ref inputs "tcl")
3560 (assoc-ref inputs "tk"))))))
25f9a068
FB
3561 (alist-cons-after
3562 'install 'install-doc
ca33a3ad 3563 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3564 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3565 (doc (string-append data "/doc/" ,name "-" ,version))
3566 (info (string-append data "/info"))
3567 (html (string-append doc "/html")))
ca33a3ad
HG
3568 ;; Make installed package available for building the
3569 ;; documentation
3570 (add-installed-pythonpath inputs outputs)
25f9a068 3571 (with-directory-excursion "doc"
25f9a068
FB
3572 ;; Produce pdf in 'A4' format.
3573 (substitute* (find-files "." "conf\\.py")
3574 (("latex_paper_size = 'letter'")
3575 "latex_paper_size = 'a4'"))
3576 (mkdir-p html)
3577 (mkdir-p info)
3578 ;; The doc recommends to run the 'html' target twice.
3579 (system* "python" "make.py" "html")
3580 (system* "python" "make.py" "html")
18b31516 3581 (copy-recursively "build/html" html)
25f9a068
FB
3582 (system* "python" "make.py" "latex")
3583 (system* "python" "make.py" "texinfo")
18b31516
FB
3584 (symlink (string-append html "/_images")
3585 (string-append info "/matplotlib-figures"))
3586 (with-directory-excursion "build/texinfo"
3587 (substitute* "matplotlib.texi"
3588 (("@image\\{([^,]*)" all file)
3589 (string-append "@image{matplotlib-figures/" file)))
3590 (symlink (string-append html "/_images")
3591 "./matplotlib-figures")
3592 (system* "makeinfo" "--no-split"
3593 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3594 (copy-file "build/texinfo/matplotlib.info"
3595 (string-append info "/matplotlib.info"))
3596 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3597 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3598 %standard-phases))))
1c65314c
FB
3599 (home-page "http://matplotlib.org")
3600 (synopsis "2D plotting library for Python")
3601 (description
3602 "Matplotlib is a Python 2D plotting library which produces publication
3603quality figures in a variety of hardcopy formats and interactive environments
3604across platforms. Matplotlib can be used in Python scripts, the python and
3605ipython shell, web application servers, and six graphical user interface
3606toolkits.")
3f641af0 3607 (license license:psfl)
57b7b8cd 3608 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3609
764c077b 3610(define-public python2-matplotlib
57b7b8cd
LC
3611 (let ((matplotlib (package-with-python2
3612 (strip-python2-variant python-matplotlib))))
764c077b 3613 (package (inherit matplotlib)
88c26834
AE
3614 ;; Make sure to use special packages for Python 2 instead
3615 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3616 (propagated-inputs
7ca0dbc3 3617 `(("python2-pycairo" ,python2-pycairo)
764c077b 3618 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3619 ("python2-tkinter" ,python-2 "tk")
3620 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3621 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3622
0dde6232
RW
3623(define-public python2-pysnptools
3624 (package
3625 (name "python2-pysnptools")
a800018e 3626 (version "0.3.9")
0dde6232
RW
3627 (source
3628 (origin
3629 (method url-fetch)
3f2e9675 3630 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3631 (sha256
3632 (base32
a800018e 3633 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3634 (build-system python-build-system)
3635 (arguments
3636 `(#:python ,python-2)) ; only Python 2.7 is supported
3637 (propagated-inputs
3638 `(("python2-numpy" ,python2-numpy)
3639 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3640 ("python2-pandas" ,python2-pandas)))
3641 (native-inputs
3642 `(("python2-cython" ,python2-cython)))
0dde6232 3643 (native-inputs
f3b98f4f 3644 `(("unzip" ,unzip)))
0dde6232
RW
3645 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3646 (synopsis "Library for reading and manipulating genetic data")
3647 (description
3648 "PySnpTools is a library for reading and manipulating genetic data. It
3649can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3650those files. It can also efficiently manipulate ranges of integers using set
3651operators such as union, intersection, and difference.")
3f641af0 3652 (license license:asl2.0)))
0dde6232 3653
c9b1b4f9
RW
3654(define-public python-rpy2
3655 (package
3656 (name "python-rpy2")
ec3bcbc7 3657 (version "2.7.6")
c9b1b4f9
RW
3658 (source
3659 (origin
3660 (method url-fetch)
ec3bcbc7 3661 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3662 (sha256
3663 (base32
ec3bcbc7 3664 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3665 (build-system python-build-system)
482d9591
HG
3666 (propagated-inputs
3667 `(("python-six" ,python-six)))
c9b1b4f9 3668 (inputs
482d9591 3669 `(("readline" ,readline)
c9b1b4f9
RW
3670 ("icu4c" ,icu4c)
3671 ("pcre" ,pcre)
3672 ("r" ,r)))
3673 (native-inputs
f3b98f4f 3674 `(("zlib" ,zlib)))
c9b1b4f9
RW
3675 (home-page "http://rpy.sourceforge.net/")
3676 (synopsis "Python interface to the R language")
3677 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3678low-level interface to R from Python, a proposed high-level interface,
3679including wrappers to graphical libraries, as well as R-like structures and
3680functions.")
3f641af0 3681 (license license:gpl3+)))
c9b1b4f9
RW
3682
3683(define-public python2-rpy2
3684 (let ((rpy2 (package-with-python2 python-rpy2)))
3685 (package (inherit rpy2)
3686 (native-inputs
3687 `(("python2-singledispatch" ,python2-singledispatch)
3688 ,@(package-native-inputs rpy2))))))
3689
bb986599
FB
3690(define-public python-scipy
3691 (package
3692 (name "python-scipy")
ba8a0824 3693 (version "0.16.0")
bb986599
FB
3694 (source
3695 (origin
3696 (method url-fetch)
de67e922
LF
3697; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3698 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3699 "/scipy-" version ".tar.xz"))
bb986599
FB
3700 (sha256
3701 (base32
ba8a0824 3702 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3703 (build-system python-build-system)
dd86c0d1 3704 (propagated-inputs
bb986599
FB
3705 `(("python-numpy" ,python-numpy)
3706 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3707 ("python-pyparsing" ,python-pyparsing)))
3708 (inputs
3709 `(("lapack" ,lapack)
719b01c1 3710 ("openblas" ,openblas)))
bb986599 3711 (native-inputs
dd86c0d1
RW
3712 `(("python-nose" ,python-nose)
3713 ("python-sphinx" ,python-sphinx)
5248d49e 3714 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3715 ("gfortran" ,gfortran)
bb986599
FB
3716 ("texlive" ,texlive)
3717 ("perl" ,perl)))
3718 (outputs '("out" "doc"))
3719 (arguments
3720 `(#:phases
3721 (alist-cons-before
719b01c1 3722 'build 'configure-openblas
bb986599 3723 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3724 (call-with-output-file "site.cfg"
3725 (lambda (port)
3726 (format port
3727 "[blas]
3728libraries = openblas
3729library_dirs = ~a/lib
3730include_dirs = ~a/include
d548e6aa
HG
3731
3732# backslash-n to make emacs happy
3733\n[atlas]
719b01c1
RW
3734library_dirs = ~a/lib
3735atlas_libs = openblas
3736"
3737 (assoc-ref inputs "openblas")
3738 (assoc-ref inputs "openblas")
3739 (assoc-ref inputs "openblas"))))
3740 #t)
bb986599
FB
3741 (alist-cons-after
3742 'install 'install-doc
d548e6aa 3743 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3744 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3745 (doc (string-append data "/doc/" ,name "-" ,version))
3746 (html (string-append doc "/html"))
3747 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3748 ;; Make installed package available for building the
3749 ;; documentation
3750 (add-installed-pythonpath inputs outputs)
bb986599 3751 (with-directory-excursion "doc"
bb986599
FB
3752 ;; Fix generation of images for mathematical expressions.
3753 (substitute* (find-files "source" "conf\\.py")
3754 (("pngmath_use_preview = True")
3755 "pngmath_use_preview = False"))
3756 (mkdir-p html)
3757 (system* "make" "html" pyver)
3758 (system* "make" "latex" "PAPER=a4" pyver)
3759 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3760 (copy-file "build/latex/scipy-ref.pdf"
3761 (string-append doc "/scipy-ref.pdf"))
3762 (with-directory-excursion "build/html"
3763 (for-each (lambda (file)
3764 (let* ((dir (dirname file))
3765 (tgt-dir (string-append html "/" dir)))
96c46210 3766 (install-file file html)))
bb986599
FB
3767 (find-files "." ".*"))))))
3768 ;; Tests can only be run after the library has been installed and not
3769 ;; within the source directory.
3770 (alist-cons-after
3771 'install 'check
89b5c60e 3772 (lambda _
bb986599
FB
3773 (with-directory-excursion "/tmp"
3774 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3775 (alist-delete
3776 'check
4f9ff21e
RW
3777 (alist-cons-after
3778 'unpack 'fix-tests
3779 (lambda _
3780 (substitute* "scipy/integrate/tests/test_quadpack.py"
3781 (("libm.so") "libm.so.6"))
3782 #t)
3783 %standard-phases)))))))
bb986599
FB
3784 (home-page "http://www.scipy.org/")
3785 (synopsis "The Scipy library provides efficient numerical routines")
3786 (description "The SciPy library is one of the core packages that make up
3787the SciPy stack. It provides many user-friendly and efficient numerical
3788routines such as routines for numerical integration and optimization.")
3f641af0 3789 (license license:bsd-3)))
bb986599 3790
764c077b 3791(define-public python2-scipy
57b7b8cd 3792 (package-with-python2 python-scipy))
bb986599 3793
73acc193 3794(define-public python-socksipy-branch
3795 (package
3796 (name "python-socksipy-branch")
3797 (version "1.01")
3798 (source
3799 (origin
3800 (method url-fetch)
3801 (uri (pypi-uri "SocksiPy-branch" version))
3802 (sha256
3803 (base32
3804 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3805 (build-system python-build-system)
3806 (arguments
3807 `(#:tests? #f)) ; There are no tests
3808 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3809 (synopsis "Python SOCKS module")
3810 (description
3811 "SocksiPy - A Python SOCKS client module. It provides a
3812socket-like interface that supports connections to any TCP
3813service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3814The original version was developed by Dan Haim, this is a
3815branch created by Mario Vilas to address some open issues,
3816as the original project seems to have been abandoned circa 2007.")
3817 (license license:bsd-3)))
3818
3819(define-public python2-socksipy-branch
3820 (package-with-python2 python-socksipy-branch))
3821
94914805
EB
3822(define-public python-sqlalchemy
3823 (package
3824 (name "python-sqlalchemy")
a4ba286b 3825 (version "1.0.12")
94914805
EB
3826 (source
3827 (origin
3828 (method url-fetch)
3829 (uri (string-append "https://pypi.python.org/packages/source/S/"
3830 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3831 (sha256
3832 (base32
a4ba286b 3833 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3834 (build-system python-build-system)
3835 (native-inputs
3836 `(("python-cython" ,python-cython) ;for c extensions
3837 ("python-pytest" ,python-pytest)
3838 ("python-mock" ,python-mock))) ;for tests
3839 (arguments
3840 `(#:phases (alist-replace
3841 'check
3842 (lambda _ (zero? (system* "py.test")))
3843 %standard-phases)))
3844 (home-page "http://www.sqlalchemy.org")
3845 (synopsis "Database abstraction library")
3846 (description
3847 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3848gives application developers the full power and flexibility of SQL. It
3849provides a full suite of well known enterprise-level persistence patterns,
3850designed for efficient and high-performing database access, adapted into a
3851simple and Pythonic domain language.")
3f641af0 3852 (license license:x11)))
94914805
EB
3853
3854(define-public python2-sqlalchemy
3855 (package-with-python2 python-sqlalchemy))
c937562e 3856
4a093330
DM
3857(define-public python-pycodestyle
3858 (package
3859 (name "python-pycodestyle")
3860 (version "2.0.0")
3861 (source
3862 (origin
3863 (method url-fetch)
3864 (uri (pypi-uri "pycodestyle" version))
3865 (sha256
3866 (base32
3867 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3868 (build-system python-build-system)
3869 (home-page "https://pycodestyle.readthedocs.io/")
3870 (synopsis "Python style guide checker")
3871 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3872Python code against some of the style conventions in
3873@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3874 (license license:expat)))
4a093330
DM
3875
3876(define-public python2-pycodestyle
f210e944 3877 (package-with-python2 python-pycodestyle))
b91912c4
DM
3878
3879(define-public python-orderedmultidict
3880 (package
3881 (name "python-orderedmultidict")
3882 (version "0.7.10")
3883 (source
3884 (origin
3885 (method url-fetch)
3886 (uri (pypi-uri "orderedmultidict" version))
3887 (sha256
3888 (base32
3889 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3890 (build-system python-build-system)
3891 (arguments
3892 `(#:phases
3893 (modify-phases %standard-phases
3894 (add-after 'unpack 'fix-tests
3895 (lambda _
3896 ;; The package uses nosetest for running the tests.
3897 ;; Adding this initfile allows to run the test suite
3898 ;; without requiring nosetest.
3899 (zero? (system* "touch" "tests/__init__.py")))))))
3900 (propagated-inputs
3901 `(("python-six" ,python-six)))
3902 (native-inputs
3903 `(("python-pycodestyle" ,python-pycodestyle)))
3904 (home-page "https://github.com/gruns/orderedmultidict")
3905 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3906 (description "This package contains a library for ordered multivalue
3907dictionaries. A multivalue dictionary is a dictionary that can store
3908multiple values for the same key. An ordered multivalue dictionary is a
3909multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3910 (license license:unlicense)))
b91912c4
DM
3911
3912(define-public python2-orderedmultidict
f210e944 3913 (package-with-python2 python-orderedmultidict))
9dede065
DM
3914
3915(define-public python-furl
3916 (package
3917 (name "python-furl")
3918 (version "0.5.6")
3919 (source
3920 (origin
3921 (method url-fetch)
3922 (uri (pypi-uri "furl" version))
3923 (sha256
3924 (base32
3925 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3926 (build-system python-build-system)
3927 (propagated-inputs
3928 `(("python-six" ,python-six)
3929 ("python-orderedmultidict" ,python-orderedmultidict)))
3930 (native-inputs
3931 `(("python-pycodestyle" ,python-pycodestyle)))
3932 (home-page "https://github.com/gruns/furl")
3933 (synopsis "URL manipulation in Python")
3934 (description "Furl provides an easy-to-use alternative to the
3935@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3936 (license license:unlicense)))
9dede065
DM
3937
3938(define-public python2-furl
f210e944 3939 (package-with-python2 python-furl))
462bf271
DM
3940
3941(define-public python-flask-babel
3942 (package
3943 (name "python-flask-babel")
3944 (version "0.11.1")
3945 (source
3946 (origin
3947 (method url-fetch)
3948 (uri (pypi-uri "Flask-Babel" version))
3949 (sha256
3950 (base32
3951 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3952 (build-system python-build-system)
3953 (propagated-inputs
3954 `(("python-flask" ,python-flask)
3955 ("python-babel" ,python-babel)
3956 ("python-jinja2" ,python-jinja2)
3957 ("python-pytz" ,python-pytz)))
3958 (home-page "https://github.com/python-babel/flask-babel")
3959 (synopsis "Add i18n/l10n support to Flask applications")
3960 (description "This package implements internationalization and localization
3961support for Flask. This is based on the Python babel module as well as pytz -
3962both of which are installed automatically if you install this library.")
f210e944 3963 (license license:bsd-3)))
462bf271
DM
3964
3965(define-public python2-flask-babel
f210e944 3966 (package-with-python2 python-flask-babel))
4a093330 3967
de2966cf
EF
3968(define-public python-sqlalchemy-utils
3969 (package
3970 (name "python-sqlalchemy-utils")
bb4b1706 3971 (version "0.32.11")
de2966cf
EF
3972 (source
3973 (origin
3974 (method url-fetch)
3975 (uri (pypi-uri "SQLAlchemy-Utils" version))
3976 (sha256
3977 (base32
bb4b1706 3978 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 3979 (build-system python-build-system)
c22b4f87 3980 (propagated-inputs
de2966cf
EF
3981 `(("python-six" ,python-six)
3982 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
3983 (native-inputs
3984 `(("python-pytest" ,python-pytest)))
de2966cf
EF
3985 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3986 (synopsis "Various utility functions for SQLAlchemy")
3987 (description
3988 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
3989for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3990
3991You might also want to install the following optional dependencies:
3992@enumerate
3993@item @code{python-passlib}
3994@item @code{python-babel}
3995@item @code{python-cryptography}
3996@item @code{python-pytz}
3997@item @code{python-psycopg2}
3998@item @code{python-furl}
3999@item @code{python-flask-babel}
4000@end enumerate
4001")
de2966cf
EF
4002 (license license:bsd-3)))
4003
4004(define-public python2-sqlalchemy-utils
f210e944 4005 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4006
af5a4602
CAW
4007(define-public python-alembic
4008 (package
4009 (name "python-alembic")
bb484529 4010 (version "0.8.7")
af5a4602
CAW
4011 (source
4012 (origin
4013 (method url-fetch)
4014 (uri (pypi-uri "alembic" version))
4015 (sha256
4016 (base32
bb484529 4017 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4018 (build-system python-build-system)
4019 (native-inputs
4020 `(("python-mock" ,python-mock)
4021 ("python-pytest-cov" ,python-pytest-cov)))
4022 (propagated-inputs
4023 `(("python-sqlalchemy" ,python-sqlalchemy)
4024 ("python-mako" ,python-mako)
4025 ("python-editor" ,python-editor)))
4026 (home-page "http://bitbucket.org/zzzeek/alembic")
4027 (synopsis
4028 "Database migration tool for SQLAlchemy")
4029 (description
4030 "Alembic is a lightweight database migration tool for usage with the
4031SQLAlchemy Database Toolkit for Python.")
f210e944 4032 (license license:expat)))
af5a4602
CAW
4033
4034(define-public python2-alembic
f210e944 4035 (package-with-python2 python-alembic))
af5a4602 4036
1671c07c
EB
4037(define-public python-distutils-extra
4038 (package
4039 (name "python-distutils-extra")
4040 (version "2.38")
4041 (source
4042 (origin
4043 (method url-fetch)
4044 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4045 version "/+download/python-distutils-extra-"
4046 version ".tar.gz"))
4047 (sha256
4048 (base32
4049 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4050 (build-system python-build-system)
1671c07c
EB
4051 (home-page "https://launchpad.net/python-distutils-extra/")
4052 (synopsis "Enhancements to Python's distutils")
4053 (description
4054 "The python-distutils-extra module enables you to easily integrate
4055gettext support, themed icons, and scrollkeeper-based documentation into
4056Python's distutils.")
3f641af0 4057 (license license:gpl2)))
1671c07c
EB
4058
4059(define-public python2-distutils-extra
4060 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4061
4062(define-public python2-elib.intl
4063 (package
4064 (name "python2-elib.intl")
4065 (version "0.0.3")
4066 (source
4067 (origin
4068 ;; This project doesn't tag releases or publish tarballs, so we take
4069 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4070 (method git-fetch)
4071 (uri (git-reference
4072 (url "https://github.com/dieterv/elib.intl.git")
4073 (commit "d09997cfef")))
4074 (sha256
4075 (base32
4076 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4077 (build-system python-build-system)
ea5456c8
EB
4078 (arguments
4079 ;; incompatible with Python 3 (exception syntax)
4080 `(#:python ,python-2
b41a05ce 4081 #:tests? #f))
ea5456c8
EB
4082 (home-page "https://github.com/dieterv/elib.intl")
4083 (synopsis "Enhanced internationalization for Python")
4084 (description
4085 "The elib.intl module provides enhanced internationalization (I18N)
4086services for your Python modules and applications.")
3f641af0 4087 (license license:lgpl3+)))
ea5456c8 4088
c937562e
EB
4089(define-public python-pillow
4090 (package
4091 (name "python-pillow")
aba5182c 4092 (version "3.3.3")
c937562e
EB
4093 (source
4094 (origin
4095 (method url-fetch)
f1d9231d 4096 (uri (pypi-uri "Pillow" version))
c937562e
EB
4097 (sha256
4098 (base32
aba5182c 4099 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4100 (build-system python-build-system)
4101 (native-inputs
f3b98f4f 4102 `(("python-nose" ,python-nose)))
c937562e 4103 (inputs
5ff408d9
SB
4104 `(("freetype" ,freetype)
4105 ("lcms" ,lcms)
c937562e
EB
4106 ("zlib" ,zlib)
4107 ("libjpeg" ,libjpeg)
4108 ("openjpeg" ,openjpeg)
5ff408d9
SB
4109 ("libtiff" ,libtiff)
4110 ("libwebp" ,libwebp)))
c937562e 4111 (arguments
e5358a6b 4112 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4113 (add-after
4114 'install 'check-installed
6151120a 4115 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4116 (begin
4117 (setenv "HOME" (getcwd))
6151120a
HG
4118 ;; Make installed package available for running the
4119 ;; tests
4120 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4121 (and (zero? (system* "python" "selftest.py"
4122 "--installed"))
4123 (zero? (system* "python" "test-installed.py"))))))
4124 (delete 'check))))
c937562e
EB
4125 (home-page "https://pypi.python.org/pypi/Pillow")
4126 (synopsis "Fork of the Python Imaging Library")
4127 (description
4128 "The Python Imaging Library adds image processing capabilities to your
4129Python interpreter. This library provides extensive file format support, an
4130efficient internal representation, and fairly powerful image processing
4131capabilities. The core image library is designed for fast access to data
4132stored in a few basic pixel formats. It should provide a solid foundation for
4133a general image processing tool.")
3f641af0 4134 (license (license:x11-style
c937562e
EB
4135 "http://www.pythonware.com/products/pil/license.htm"
4136 "The PIL Software License"))))
4137
4138(define-public python2-pillow
4139 (package-with-python2 python-pillow))
bb986599 4140
a415f036
FB
4141(define-public python-pycparser
4142 (package
4143 (name "python-pycparser")
38eb6919 4144 (version "2.14")
a415f036
FB
4145 (source
4146 (origin
4147 (method url-fetch)
38eb6919 4148 (uri (pypi-uri "pycparser" version))
a415f036
FB
4149 (sha256
4150 (base32
38eb6919 4151 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4152 (outputs '("out" "doc"))
4153 (build-system python-build-system)
4154 (native-inputs
f3b98f4f 4155 `(("pkg-config" ,pkg-config)))
a415f036 4156 (arguments
89b5c60e 4157 `(#:phases
a415f036
FB
4158 (alist-replace
4159 'check
4160 (lambda _
4161 (with-directory-excursion "tests"
4162 (zero? (system* "python" "all_tests.py"))))
4163 (alist-cons-after
4164 'install 'install-doc
4165 (lambda* (#:key outputs #:allow-other-keys)
4166 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4167 (doc (string-append data "/doc/" ,name "-" ,version))
4168 (examples (string-append doc "/examples")))
4169 (mkdir-p examples)
4170 (for-each (lambda (file)
4171 (copy-file (string-append "." file)
4172 (string-append doc file)))
4173 '("/README.rst" "/CHANGES" "/LICENSE"))
4174 (copy-recursively "examples" examples)))
4175 %standard-phases))))
4176 (home-page "https://github.com/eliben/pycparser")
4177 (synopsis "C parser in Python")
4178 (description
4179 "Pycparser is a complete parser of the C language, written in pure Python
4180using the PLY parsing library. It parses C code into an AST and can serve as
4181a front-end for C compilers or analysis tools.")
3f641af0 4182 (license license:bsd-3)))
a415f036
FB
4183
4184(define-public python2-pycparser
4185 (package-with-python2 python-pycparser))
57c3f716
FB
4186
4187(define-public python-cffi
4188 (package
4189 (name "python-cffi")
2d3a437c 4190 (version "1.4.2")
57c3f716
FB
4191 (source
4192 (origin
4193 (method url-fetch)
2d3a437c 4194 (uri (pypi-uri "cffi" version))
89b5c60e 4195 (sha256
2d3a437c 4196 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4197 (build-system python-build-system)
4198 (outputs '("out" "doc"))
4199 (inputs
4200 `(("libffi" ,libffi)))
4201 (propagated-inputs ; required at run-time
4202 `(("python-pycparser" ,python-pycparser)))
4203 (native-inputs
4204 `(("pkg-config" ,pkg-config)
4205 ("python-sphinx" ,python-sphinx)
f3b98f4f 4206 ("python-pytest" ,python-pytest)))
57c3f716 4207 (arguments
4179f952 4208 `(#:phases
57c3f716
FB
4209 (alist-cons-after
4210 'install 'install-doc
4211 (lambda* (#:key outputs #:allow-other-keys)
4212 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4213 (doc (string-append data "/doc/" ,name "-" ,version))
4214 (html (string-append doc "/html")))
4215 (with-directory-excursion "doc"
4216 (system* "make" "html")
4217 (mkdir-p html)
4218 (copy-recursively "build/html" html))
4219 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4220 %standard-phases)))
4221 (home-page "http://cffi.readthedocs.org")
4222 (synopsis "Foreign function interface for Python")
4223 (description
4224 "Foreign Function Interface for Python calling C code.")
bd3fa666 4225 (license license:expat)))
57c3f716
FB
4226
4227(define-public python2-cffi
4228 (package-with-python2 python-cffi))
6fa14469
FB
4229
4230(define-public python-xcffib
4231 (package
4232 (name "python-xcffib")
4233 (version "0.1.9")
4234 (source
4235 (origin
4236 (method url-fetch)
4237 (uri (string-append "https://pypi.python.org/packages/source/x/"
4238 "xcffib/xcffib-" version ".tar.gz"))
4239 (sha256
4240 (base32
4241 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4242 (build-system python-build-system)
4243 (inputs
482d9591 4244 `(("libxcb" ,libxcb)))
6fa14469 4245 (propagated-inputs
482d9591
HG
4246 `(("python-cffi" ,python-cffi) ; used at run time
4247 ("python-six" ,python-six)))
6fa14469 4248 (arguments
e2816ac7
MB
4249 `(;; FIXME: Tests cannot load libxcb.so.1
4250 #:tests? #f
4251 #:phases
c8cd850c
MB
4252 (modify-phases %standard-phases
4253 (add-after 'install 'install-doc
4254 (lambda* (#:key outputs #:allow-other-keys)
4255 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4256 "/doc/" ,name "-" ,version)))
4257 (mkdir-p doc)
4258 (copy-file "README.md"
4259 (string-append doc "/README.md"))
4260 #t))))))
6fa14469
FB
4261 (home-page "https://github.com/tych0/xcffib")
4262 (synopsis "XCB Python bindings")
4263 (description
4264 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4265support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4266 (license license:expat)))
6fa14469
FB
4267
4268(define-public python2-xcffib
4269 (package-with-python2 python-xcffib))
4270
9e099723
FB
4271(define-public python-cairocffi
4272 (package
4273 (name "python-cairocffi")
4274 (version "0.6")
4275 (source
4276 (origin
4277 (method url-fetch)
4278 ;; The archive on pypi is missing the 'utils' directory!
4279 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4280 version ".tar.gz"))
f586c877 4281 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4282 (sha256
4283 (base32
4284 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4285 (build-system python-build-system)
4286 (outputs '("out" "doc"))
4287 (inputs
4288 `(("gdk-pixbuf" ,gdk-pixbuf)
4289 ("cairo" ,cairo)))
4290 (native-inputs
4291 `(("pkg-config" ,pkg-config)
4292 ("python-sphinx" ,python-sphinx)
f3b98f4f 4293 ("python-docutils" ,python-docutils)))
9e099723
FB
4294 (propagated-inputs
4295 `(("python-xcffib" ,python-xcffib))) ; used at run time
4296 (arguments
a792e1aa
MB
4297 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4298 #:tests? #f
4299 #:phases
6734c7ba
MB
4300 (modify-phases %standard-phases
4301 (add-after 'install 'install-doc
4302 (lambda* (#:key inputs outputs #:allow-other-keys)
4303 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4304 (doc (string-append data "/doc/" ,name "-" ,version))
4305 (html (string-append doc "/html")))
4306 (setenv "LD_LIBRARY_PATH"
4307 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4308 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4309 (setenv "LANG" "en_US.UTF-8")
4310 (mkdir-p html)
4311 (for-each (lambda (file)
4312 (copy-file (string-append "." file)
4313 (string-append doc file)))
4314 '("/README.rst" "/CHANGES" "/LICENSE"))
4315 (system* "python" "setup.py" "build_sphinx")
4316 (copy-recursively "docs/_build/html" html)
4317 #t))))))
9e099723
FB
4318 (home-page "https://github.com/SimonSapin/cairocffi")
4319 (synopsis "Python bindings and object-oriented API for Cairo")
4320 (description
4321 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4322Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4323graphics library with support for multiple backends including image buffers,
4324PNG, PostScript, PDF, and SVG file output.")
3f641af0 4325 (license license:bsd-3)))
9e099723
FB
4326
4327(define-public python2-cairocffi
4328 (package-with-python2 python-cairocffi))
4329
3cff95cb
RW
4330(define-public python-decorator
4331 (package
4332 (name "python-decorator")
eb6e2e81 4333 (version "4.0.9")
3cff95cb
RW
4334 (source
4335 (origin
4336 (method url-fetch)
e21338be 4337 (uri (pypi-uri "decorator" version))
3cff95cb 4338 (sha256
eb6e2e81 4339 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4340 (build-system python-build-system)
4341 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4342 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4343 (synopsis "Python module to simplify usage of decorators")
4344 (description
4345 "The aim of the decorator module is to simplify the usage of decorators
4346for the average programmer, and to popularize decorators usage giving examples
4347of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4348etc. The core of this module is a decorator factory.")
4349 (license license:expat)))
4350
4351(define-public python2-decorator
4352 (package-with-python2 python-decorator))
4353
2c0499ad
RW
4354(define-public python-drmaa
4355 (package
4356 (name "python-drmaa")
4357 (version "0.7.6")
4358 (source
4359 (origin
4360 (method url-fetch)
4361 (uri (string-append
4362 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4363 version ".tar.gz"))
4364 (sha256
4365 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4366 (build-system python-build-system)
4367 ;; The test suite requires libdrmaa which is provided by the cluster
4368 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4369 ;; should be set to the path of the libdrmaa library.
4370 (arguments '(#:tests? #f))
4371 (native-inputs
f3b98f4f 4372 `(("python-nose" ,python-nose)))
2c0499ad
RW
4373 (home-page "https://pypi.python.org/pypi/drmaa")
4374 (synopsis "Python bindings for the DRMAA library")
4375 (description
4376 "A Python package for Distributed Resource Management (DRM) job
4377submission and control. This package is an implementation of the DRMAA 1.0
4378Python language binding specification.")
3f641af0 4379 (license license:bsd-3)))
2c0499ad
RW
4380
4381(define-public python2-drmaa
4382 (package-with-python2 python-drmaa))
4383
d05c6da0
RW
4384(define-public python-gridmap
4385 (package
4386 (name "python-gridmap")
4387 (version "0.13.0")
4388 (source
4389 (origin
4390 (method url-fetch)
4391 (uri (string-append
4392 "https://github.com/pygridtools/gridmap/archive/v"
4393 version ".tar.gz"))
4394 (file-name (string-append name "-" version ".tar.gz"))
4395 (sha256
4396 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4397 (build-system python-build-system)
f22efa01 4398 (propagated-inputs
d05c6da0
RW
4399 `(("python-psutil" ,python-psutil)
4400 ("python-drmaa" ,python-drmaa)
4401 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4402 (home-page "https://github.com/pygridtools/gridmap")
4403 (synopsis "Create jobs on a cluster directly from Python")
4404 (description
4405 "Gridmap is a Python package to allow you to easily create jobs on the
4406cluster directly from Python. You can directly map Python functions onto the
4407cluster without needing to write any wrapper code yourself.")
3f641af0 4408 (license license:gpl3+)))
d05c6da0
RW
4409
4410(define-public python2-gridmap
4411 (package-with-python2 python-gridmap))
4412
cb6d5c54
RW
4413(define-public python-pexpect
4414 (package
4415 (name "python-pexpect")
4416 (version "3.3")
4417 (source
4418 (origin
4419 (method url-fetch)
4420 (uri (string-append "https://pypi.python.org/packages/source/p/"
4421 "pexpect/pexpect-" version ".tar.gz"))
4422 (sha256
4423 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4424 (build-system python-build-system)
4425 (arguments
4426 `(#:phases
4427 (modify-phases %standard-phases
4428 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4429 (native-inputs
4430 `(("python-nose" ,python-nose)))
4431 (home-page "http://pexpect.readthedocs.org/")
4432 (synopsis "Controlling interactive console applications")
4433 (description
4434 "Pexpect is a pure Python module for spawning child applications;
4435controlling them; and responding to expected patterns in their output.
4436Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4437child application and control it as if a human were typing commands.")
3f641af0 4438 (license license:isc)))
cb6d5c54
RW
4439
4440(define-public python2-pexpect
4441 (package-with-python2 python-pexpect))
4442
229ad120
RW
4443(define-public python-setuptools-scm
4444 (package
4445 (name "python-setuptools-scm")
42d6d0d0 4446 (version "1.11.1")
229ad120
RW
4447 (source (origin
4448 (method url-fetch)
383af6b0 4449 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4450 (sha256
4451 (base32
42d6d0d0 4452 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4453 (build-system python-build-system)
4454 (home-page "https://github.com/pypa/setuptools_scm/")
4455 (synopsis "Manage Python package versions in SCM metadata")
4456 (description
383af6b0 4457 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4458@dfn{software configuration management} (SCM) metadata instead of declaring
4459them as the version argument or in a SCM managed file.")
4460 (license license:expat)))
4461
4462(define-public python2-setuptools-scm
4463 (package-with-python2 python-setuptools-scm))
4464
b74270ee
RW
4465(define-public python-pathpy
4466 (package
4467 (name "python-pathpy")
4468 (version "8.1.1")
4469 (source
4470 (origin
4471 (method url-fetch)
4472 (uri (string-append "https://pypi.python.org/packages/source/p/"
4473 "path.py/path.py-" version ".tar.gz"))
4474 (sha256
4475 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4476 (outputs '("out" "doc"))
b74270ee
RW
4477 (build-system python-build-system)
4478 (propagated-inputs
4479 `(("python-appdirs" ,python-appdirs)))
4480 (native-inputs
f3b98f4f 4481 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4482 ("python-sphinx" ,python-sphinx)
4483 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4484 ("python-pytest" ,python-pytest)
4485 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4486 (arguments
4487 `(#:phases
4488 (modify-phases %standard-phases
4489 (add-after 'build 'build-doc
4490 (lambda _
4491 (setenv "LANG" "en_US.UTF-8")
4492 (zero? (system* "python" "setup.py" "build_sphinx"))))
4493 (add-after 'install 'install-doc
4494 (lambda* (#:key outputs #:allow-other-keys)
4495 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4496 (doc (string-append data "/doc/" ,name "-" ,version))
4497 (html (string-append doc "/html")))
4498 (mkdir-p html)
4499 (for-each (lambda (file)
4500 (copy-file file (string-append doc "/" file)))
4501 '("README.rst" "CHANGES.rst"))
4502 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4503 (home-page "http://github.com/jaraco/path.py")
4504 (synopsis "Python module wrapper for built-in os.path")
4505 (description
4506 "@code{path.py} implements path objects as first-class entities, allowing
4507common operations on files to be invoked on those path objects directly.")
4508 (license license:expat)))
4509
4510(define-public python2-pathpy
4511 (package-with-python2 python-pathpy))
4512
0d34e01b
RW
4513(define-public python-pickleshare
4514 (package
4515 (name "python-pickleshare")
4516 (version "0.5")
4517 (source
4518 (origin
4519 (method url-fetch)
4520 (uri (string-append "https://pypi.python.org/packages/source/p/"
4521 "pickleshare/pickleshare-" version ".tar.gz"))
4522 (sha256
4523 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4524 (build-system python-build-system)
4525 (propagated-inputs
4526 `(("python-pathpy" ,python-pathpy)))
4527 (home-page "https://github.com/vivainio/pickleshare")
4528 (synopsis "Tiny key value database with concurrency support")
4529 (description
4530 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4531Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4532shelve, many processes can access the database simultaneously. Changing a
4533value in database is immediately visible to other processes accessing the same
4534database. Concurrency is possible because the values are stored in separate
4535files. Hence the “database” is a directory where all files are governed by
4536PickleShare.")
4537 (license license:expat)))
4538
4539(define-public python2-pickleshare
4540 (package-with-python2 python-pickleshare))
4541
cd6e5189
RW
4542(define-public python-simplegeneric
4543 (package
4544 (name "python-simplegeneric")
4545 (version "0.8.1")
4546 (source
4547 (origin
4548 (method url-fetch)
4549 (uri (string-append "https://pypi.python.org/packages/source/s/"
4550 "simplegeneric/simplegeneric-" version ".zip"))
4551 (sha256
4552 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4553 (build-system python-build-system)
4554 (native-inputs
f3b98f4f 4555 `(("unzip" ,unzip)))
cd6e5189
RW
4556 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4557 (synopsis "Python module for simple generic functions")
4558 (description
4559 "The simplegeneric module lets you define simple single-dispatch generic
4560functions, akin to Python’s built-in generic functions like @code{len()},
4561@code{iter()} and so on. However, instead of using specially-named methods,
4562these generic functions use simple lookup tables, akin to those used by
4563e.g. @code{pickle.dump()} and other generic functions found in the Python
4564standard library.")
3f641af0 4565 (license license:zpl2.1)))
cd6e5189
RW
4566
4567(define-public python2-simplegeneric
4568 (package-with-python2 python-simplegeneric))
4569
ddc7d8ed 4570(define-public python-ipython-genutils
c4abbac3 4571 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4572 (package
4573 (name "python-ipython-genutils")
4574 (version "0.1.0")
4575 (source
4576 (origin
4577 (method url-fetch)
4578 (uri (string-append "https://pypi.python.org/packages/source/i/"
4579 "ipython_genutils/ipython_genutils-"
4580 version ".tar.gz"))
4581 (sha256
4582 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4583 (build-system python-build-system)
4584 (arguments `(#:tests? #f)) ; no tests
4585 (home-page "http://ipython.org")
4586 (synopsis "Vestigial utilities from IPython")
4587 (description
c4abbac3
HG
4588 "This package provides retired utilities from IPython. No packages
4589outside IPython/Jupyter should depend on it.
4590
4591This package shouldn't exist. It contains some common utilities shared by
4592Jupyter and IPython projects during The Big Split. As soon as possible, those
4593packages will remove their dependency on this, and this package will go
4594away.")
3f641af0 4595 (license license:bsd-3)))
ddc7d8ed
RW
4596
4597(define-public python2-ipython-genutils
4598 (package-with-python2 python-ipython-genutils))
4599
2b10eb48
RW
4600(define-public python-traitlets
4601 (package
4602 (name "python-traitlets")
a5ba1481 4603 (version "4.2.0")
2b10eb48
RW
4604 (source
4605 (origin
4606 (method url-fetch)
cc0c4fde 4607 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4608 (sha256
4609 (base32
a5ba1481 4610 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4611 (build-system python-build-system)
4612 (arguments
4613 `(#:phases
4614 (modify-phases %standard-phases
4615 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4616 (propagated-inputs
4617 `(("python-ipython-genutils" ,python-ipython-genutils)
4618 ("python-decorator" ,python-decorator)))
4619 (native-inputs
cc0c4fde
EF
4620 `(("python-mock" ,python-mock)
4621 ("python-nose" ,python-nose)))
2b10eb48
RW
4622 (home-page "http://ipython.org")
4623 (synopsis "Configuration system for Python applications")
4624 (description
4625 "Traitlets is a framework that lets Python classes have attributes with
4626type checking, dynamically calculated default values, and ‘on change’
4627callbacks. The package also includes a mechanism to use traitlets for
4628configuration, loading values from files or from command line arguments. This
4629is a distinct layer on top of traitlets, so you can use traitlets in your code
4630without using the configuration machinery.")
3f641af0 4631 (license license:bsd-3)))
2b10eb48
RW
4632
4633(define-public python2-traitlets
4634 (package-with-python2 python-traitlets))
4635
4263b06f
RW
4636(define-public python-jupyter-core
4637 (package
4638 (name "python-jupyter-core")
4639 (version "4.2.0")
4640 (source
4641 (origin
4642 (method url-fetch)
4643 (uri (string-append (pypi-uri "jupyter_core" version)))
4644 (sha256
4645 (base32
4646 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4647 (build-system python-build-system)
4648 ;; FIXME: not sure how to run the tests
4649 (arguments `(#:tests? #f))
4650 (propagated-inputs
4651 `(("python-traitlets" ,python-traitlets)))
4652 (home-page "http://jupyter.org/")
4653 (synopsis "Jupyter base package")
4654 (description
4655 "Jupyter core is the base package on which Jupyter projects rely.")
4656 (license license:bsd-3)))
4657
4658(define-public python2-jupyter-core
4659 (package-with-python2 python-jupyter-core))
4660
9ff01f2d
RW
4661(define-public python-jupyter-client
4662 (package
4663 (name "python-jupyter-client")
4664 (version "4.4.0")
4665 (source
4666 (origin
4667 (method url-fetch)
4668 (uri (pypi-uri "jupyter_client" version))
4669 (sha256
4670 (base32
4671 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4672 (build-system python-build-system)
4673 ;; Tests fail because of missing native python kernel which I assume is
4674 ;; provided by the ipython package, which we cannot use because it would
4675 ;; cause a dependency cycle.
4676 (arguments `(#:tests? #f))
4677 (propagated-inputs
4678 `(("python-pyzmq" ,python-pyzmq)
4679 ("python-traitlets" ,python-traitlets)
4680 ("python-jupyter-core" ,python-jupyter-core)))
4681 (home-page "http://jupyter.org/")
4682 (synopsis "Jupyter protocol implementation and client libraries")
4683 (description
4684 "The @code{jupyter_client} package contains the reference implementation
4685of the Jupyter protocol. It also provides client and kernel management APIs
4686for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4687installing @code{kernelspec}s for use with Jupyter frontends.")
4688 (license license:bsd-3)))
4689
4690(define-public python2-jupyter-client
4691 (package-with-python2 python-jupyter-client))
4692
ab526102
RW
4693(define-public python-ipykernel
4694 (package
4695 (name "python-ipykernel")
4696 (version "4.5.0")
4697 (source
4698 (origin
4699 (method url-fetch)
4700 (uri (pypi-uri "ipykernel" version))
4701 (sha256
4702 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4703 (build-system python-build-system)
4704 ;; The tests load a submodule of IPython. However, IPython itself depends
4705 ;; on ipykernel.
4706 (arguments `(#:tests? #f))
4707 (propagated-inputs
4708 ;; imported at runtime during connect
4709 `(("python-jupyter-client" ,python-jupyter-client)))
4710 (home-page "http://ipython.org")
4711 (synopsis "IPython Kernel for Jupyter")
4712 (description
4713 "This package provides the IPython kernel for Jupyter.")
4714 (license license:bsd-3)))
4715
4716(define-public python2-ipykernel
4717 (package-with-python2 python-ipykernel))
4718
5ff6effc
RW
4719(define-public python-testpath
4720 (package
4721 (name "python-testpath")
4722 (version "0.2")
4723 (source
4724 (origin
4725 (method url-fetch)
4726 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4727 version ".tar.gz"))
4728 (file-name (string-append name "-" version ".tar.gz"))
4729 (sha256
4730 (base32
4731 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4732 (build-system python-build-system)
4733 (arguments
4734 `(#:tests? #f ; this package does not even have a setup.py
4735 #:phases
4736 (modify-phases %standard-phases
4737 (delete 'install)
4738 (replace 'build
4739 (lambda* (#:key inputs outputs #:allow-other-keys)
4740 (let ((dir (string-append
4741 (assoc-ref outputs "out")
4742 "/lib/python"
4743 (string-take (string-take-right
4744 (assoc-ref inputs "python") 5) 3)
4745 "/site-packages/testpath")))
4746 (mkdir-p dir)
4747 (copy-recursively "testpath" dir))
4748 #t)))))
4749 (home-page "https://github.com/takluyver/testpath")
4750 (synopsis "Test utilities for code working with files and commands")
4751 (description
4752 "Testpath is a collection of utilities for Python code working with files
4753and commands. It contains functions to check things on the filesystem, and
4754tools for mocking system commands and recording calls to those.")
4755 (license license:expat)))
4756
4757(define-public python2-testpath
4758 (package-with-python2 python-testpath))
4759
ae1ab9fe
FB
4760(define-public python-ipython
4761 (package
4762 (name "python-ipython")
4dbc8ec4 4763 (version "4.0.3")
ae1ab9fe
FB
4764 (source
4765 (origin
fceac880 4766 (method url-fetch)
accd5f99 4767 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4768 (sha256
4dbc8ec4 4769 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4770 (build-system python-build-system)
4771 (outputs '("out" "doc"))
3a0b1b9a
FB
4772 (propagated-inputs
4773 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4774 ("python-terminado" ,python-terminado)
ae1ab9fe 4775 ("python-matplotlib" ,python-matplotlib)
5d26e542 4776 ("python-numpy" ,python-numpy)
ae1ab9fe 4777 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4778 ("python-jinja2" ,python-jinja2)
4779 ("python-mistune" ,python-mistune)
accd5f99
RW
4780 ("python-pexpect" ,python-pexpect)
4781 ("python-pickleshare" ,python-pickleshare)
4782 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4783 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4784 ("python-traitlets" ,python-traitlets)
4785 ("python-ipykernel" ,python-ipykernel)
4786 ("python-pygments" ,python-pygments)))
4787 (inputs
4788 `(("readline" ,readline)
4789 ("which" ,which)))
ae1ab9fe
FB
4790 (native-inputs
4791 `(("pkg-config" ,pkg-config)
accd5f99
RW
4792 ("python-requests" ,python-requests) ;; for tests
4793 ("python-testpath" ,python-testpath)
4794 ("python-nose" ,python-nose)
ae1ab9fe
FB
4795 ("python-sphinx" ,python-sphinx)
4796 ("texlive" ,texlive)
f3b98f4f 4797 ("texinfo" ,texinfo)))
ae1ab9fe 4798 (arguments
89b5c60e 4799 `(#:phases
3a0b1b9a
FB
4800 (modify-phases %standard-phases
4801 (add-after
4802 'install 'install-doc
4803 (lambda* (#:key inputs outputs #:allow-other-keys)
4804 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4805 (doc (string-append data "/doc/" ,name "-" ,version))
4806 (html (string-append doc "/html"))
4807 (man1 (string-append data "/man/man1"))
4808 (info (string-append data "/info"))
4809 (examples (string-append doc "/examples")))
afd3d931 4810 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4811 ;; Make installed package available for running the tests
4812 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4813 (with-directory-excursion "docs"
accd5f99
RW
4814 ;; FIXME: pdf fails to build
4815 ;;(system* "make" "pdf" "PAPER=a4")
4816 (system* "make" "html")
3a0b1b9a
FB
4817 (system* "make" "info"))
4818 (copy-recursively "docs/man" man1)
4819 (copy-recursively "examples" examples)
accd5f99 4820 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4821 ;; (copy-file "docs/build/latex/ipython.pdf"
4822 ;; (string-append doc "/ipython.pdf"))
4823 (mkdir-p info)
4824 (copy-file "docs/build/texinfo/ipython.info"
4825 (string-append info "/ipython.info"))
4826 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4827 ;; Tests can only be run after the library has been installed and not
4828 ;; within the source directory.
4829 (delete 'check)
4830 (add-after
4831 'install 'check
eee5cd04 4832 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4833 (if tests?
4834 (with-directory-excursion "/tmp"
eee5cd04
HG
4835 ;; Make installed package available for running the tests
4836 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4837 (setenv "HOME" "/tmp/") ;; required by a test
4838 (zero? (system* (string-append (assoc-ref outputs "out")
4839 "/bin/iptest"))))
4840 #t)))
4841 (add-before
4842 'install 'fix-tests
4843 (lambda* (#:key inputs #:allow-other-keys)
4844 (substitute* "./IPython/utils/_process_posix.py"
4845 (("/usr/bin/env', 'which") (which "which")))
4846 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4847 (("#!/usr/bin/env python")
4848 (string-append "#!" (which "python"))))
4849 ;; Disable 1 failing test
4850 (substitute* "./IPython/core/tests/test_magic.py"
4851 (("def test_dirops\\(\\):" all)
4852 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4853 (home-page "http://ipython.org")
4854 (synopsis "IPython is a tool for interactive computing in Python")
4855 (description
4856 "IPython provides a rich architecture for interactive computing with:
4857Powerful interactive shells, a browser-based notebook, support for interactive
4858data visualization, embeddable interpreters and tools for parallel
4859computing.")
135ba811
EF
4860 (license license:bsd-3)
4861 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4862
4863(define-public python2-ipython
135ba811 4864 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4865 (package
4866 (inherit ipython)
4867 ;; FIXME: some tests are failing
4868 (arguments
4869 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4870 ;; FIXME: add pyreadline once available.
e62600fe 4871 (native-inputs
135ba811 4872 `(("python2-mock" ,python2-mock)
77a6932a 4873 ,@(package-native-inputs ipython))))))
03411993
AE
4874
4875(define-public python-isodate
4876 (package
4877 (name "python-isodate")
b6785c2e 4878 (version "0.5.4")
03411993
AE
4879 (source
4880 (origin
4881 (method url-fetch)
b6785c2e 4882 (uri (pypi-uri "isodate" version))
03411993
AE
4883 (sha256
4884 (base32
b6785c2e 4885 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4886 (build-system python-build-system)
03411993
AE
4887 (home-page
4888 "http://cheeseshop.python.org/pypi/isodate")
4889 (synopsis
4890 "Python date parser and formatter")
4891 (description
4892 "Python-isodate is a python module for parsing and formatting
4893ISO 8601 dates, time and duration.")
3f641af0 4894 (license license:bsd-3)))
03411993
AE
4895
4896(define-public python2-isodate
4897 (package-with-python2 python-isodate))
673ab897
AE
4898
4899(define-public python-html5lib
4900 (package
4901 (name "python-html5lib")
a14061aa 4902 (version "1.0b10")
673ab897
AE
4903 (source
4904 (origin
4905 (method url-fetch)
fee04c19 4906 (uri (pypi-uri "html5lib" version))
673ab897
AE
4907 (sha256
4908 (base32
a14061aa 4909 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 4910 (build-system python-build-system)
3dd75476 4911 (propagated-inputs
4eb6ed28
MB
4912 `(("python-six" ,python-six)
4913 ("python-webencodings" ,python-webencodings)))
673ab897
AE
4914 (arguments
4915 `(#:test-target "check"))
4916 (home-page
4917 "https://github.com/html5lib/html5lib-python")
4918 (synopsis
4919 "Python HTML parser based on the WHATWG HTML specifcation")
4920 (description
4921 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4922and written in Python.")
bd3fa666 4923 (license license:expat)))
673ab897
AE
4924
4925(define-public python2-html5lib
4926 (package-with-python2 python-html5lib))
e99f4211 4927
8ee62c97
RW
4928;; Needed for python-bleach, a dependency of python-notebook
4929(define-public python-html5lib-0.9
4930 (package
4931 (inherit python-html5lib)
4932 (version "0.999")
4933 (source
4934 (origin
4935 (method url-fetch)
4936 (uri (pypi-uri "html5lib" version))
4937 (sha256
4938 (base32
4939 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4940
4941(define-public python2-html5lib-0.9
4942 (package-with-python2 python-html5lib-0.9))
4943
adbca19e
MB
4944(define-public python-webencodings
4945 (package
4946 (name "python-webencodings")
4947 (version "0.5")
4948 (source (origin
4949 (method url-fetch)
4950 (uri (pypi-uri "webencodings" version))
4951 (sha256
4952 (base32
4953 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
4954 (build-system python-build-system)
4955 (arguments
4956 '(#:phases
4957 (modify-phases %standard-phases
4958 (replace 'check
4959 (lambda _
4960 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
4961 (native-inputs
4962 `(("python-pytest" ,python-pytest)))
4963 (home-page "https://github.com/SimonSapin/python-webencodings")
4964 (synopsis "Character encoding aliases for legacy web content")
4965 (description
4966 "In order to be compatible with legacy web content when interpreting
4967something like @code{Content-Type: text/html; charset=latin1}, tools need
4968to use a particular set of aliases for encoding labels as well as some
4969overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
4970the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
4971or @code{UTF-16} BOM takes precedence over any other encoding declaration.
4972The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
4973defines all such details so that implementations do not have to
4974reverse-engineer each other.
4975
4976This module implements the Encoding standard and has encoding labels and
4977BOM detection, but the actual implementation for encoders and decoders
4978is Python’s.")
4979 (license license:bsd-3)))
4980
4981(define-public python2-webencodings
4982 (package-with-python2 python-webencodings))
4983
e99f4211
MW
4984(define-public python-urwid
4985 (package
4986 (name "python-urwid")
51ff41f6 4987 (version "1.3.1")
e99f4211
MW
4988 (source
4989 (origin
4990 (method url-fetch)
b97c1bfd 4991 (uri (pypi-uri "urwid" version))
e99f4211
MW
4992 (sha256
4993 (base32
51ff41f6 4994 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4995 (build-system python-build-system)
b97c1bfd
LF
4996 (arguments
4997 `(#:phases
4998 (modify-phases %standard-phases
4999 ;; Disable failing test. Bug filed upstream:
5000 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5001 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5002 (add-after 'unpack 'disable-failing-test
5003 (lambda _
5004 (substitute* "urwid/tests/test_event_loops.py"
5005 (("test_remove_watch_file")
5006 "disable_remove_watch_file")))))))
e99f4211
MW
5007 (home-page "http://urwid.org")
5008 (synopsis "Console user interface library for Python")
5009 (description
5010 "Urwid is a curses-based UI/widget library for Python. It includes many
5011features useful for text console applications.")
3f641af0 5012 (license license:lgpl2.1+)))
e99f4211
MW
5013
5014(define-public python2-urwid
5015 (package-with-python2 python-urwid))
d95a56c6 5016
47d0b292
TS
5017(define-public python-urwidtrees
5018 (package
5019 (name "python-urwidtrees")
37ec4623 5020 (version "1.0.2")
47d0b292
TS
5021 (source
5022 (origin
5023 (method url-fetch)
37ec4623
TS
5024 ;; package author intends on distributing via github rather than pypi:
5025 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5026 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5027 version ".tar.gz"))
5028 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5029 (sha256
5030 (base32
37ec4623 5031 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5032 (build-system python-build-system)
5033 (arguments
5034 '(#:tests? #f)) ; no tests
f22efa01 5035 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5036 (home-page "https://github.com/pazz/urwidtrees")
5037 (synopsis "Tree widgets for urwid")
5038 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5039toolkit. Use it to build trees of widgets.")
3f641af0 5040 (license license:gpl3+)))
47d0b292
TS
5041
5042(define-public python2-urwidtrees
5043 (package-with-python2 python-urwidtrees))
5044
d95a56c6
PAR
5045(define-public python-dbus
5046 (package
5047 (name "python-dbus")
5048 (version "1.2.0")
5049 (source
5050 (origin
5051 (method url-fetch)
5052 (uri (string-append
5cc3096c 5053 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5054 version ".tar.gz"))
5055 (sha256
5056 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5057 (build-system gnu-build-system)
6717c879
SB
5058 (arguments
5059 '(#:phases
5060 (modify-phases %standard-phases
5061 (add-before
5062 'check 'pre-check
5063 (lambda _
5064 ;; XXX: For the missing '/etc/machine-id'.
5065 (substitute* "test/run-test.sh"
5066 (("DBUS_FATAL_WARNINGS=1")
5067 "DBUS_FATAL_WARNINGS=0"))
5068 #t)))))
d95a56c6
PAR
5069 (native-inputs
5070 `(("pkg-config" ,pkg-config)))
5071 (inputs
5072 `(("python" ,python)
2e88d113 5073 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5074 (synopsis "Python bindings for D-bus")
5075 (description "python-dbus provides bindings for libdbus, the reference
5076implementation of D-Bus.")
5077 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5078 (license license:expat)))
b52af02b
MW
5079
5080(define-public python2-dbus
5081 (package (inherit python-dbus)
5082 (name "python2-dbus")
5083 (inputs `(("python" ,python-2)
5084 ,@(alist-delete "python"
5085 (package-inputs python-dbus)
5086 equal?)))
5087 ;; FIXME: on Python 2, the test_utf8 fails with:
5088 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5089 (arguments `(#:tests? #f))))
a6ac8332
AE
5090
5091(define-public python-apsw
5092 (package
5093 (name "python-apsw")
917708c2 5094 (version "3.9.2-r1")
a6ac8332
AE
5095 (source
5096 (origin
5097 (method url-fetch)
917708c2 5098 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5099 (sha256
5100 (base32
917708c2 5101 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5102 (build-system python-build-system)
5103 (inputs
f3b98f4f 5104 `(("sqlite" ,sqlite)))
a6ac8332
AE
5105 (arguments
5106 `(#:phases
5107 ;; swap check and install phases
5108 (alist-cons-after
5109 'install 'check
5110 (assoc-ref %standard-phases 'check)
5111 (alist-delete
5112 'check
5113 %standard-phases))))
5114 (home-page "https://github.com/rogerbinns/apsw/")
5115 (synopsis "Another Python SQLite Wrapper")
5116 (description "APSW is a Python wrapper for the SQLite
5117embedded relational database engine. In contrast to other wrappers such as
5118pysqlite it focuses on being a minimal layer over SQLite attempting just to
5119translate the complete SQLite API into Python.")
abde5f37 5120 (license license:zlib)))
a6ac8332
AE
5121
5122(define-public python2-apsw
5123 (package-with-python2 python-apsw))
26b307e2
AE
5124
5125(define-public python-lxml
5126 (package
5127 (name "python-lxml")
d58a3203 5128 (version "3.6.0")
26b307e2
AE
5129 (source
5130 (origin
5131 (method url-fetch)
97bbc480 5132 (uri (pypi-uri "lxml" version))
26b307e2 5133 (sha256
d58a3203
EF
5134 (base32
5135 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5136 (build-system python-build-system)
5137 (inputs
5138 `(("libxml2" ,libxml2)
f3b98f4f 5139 ("libxslt" ,libxslt)))
26b307e2
AE
5140 (home-page "http://lxml.de/")
5141 (synopsis
5142 "Python XML processing library")
5143 (description
5144 "The lxml XML toolkit is a Pythonic binding for the C libraries
5145libxml2 and libxslt.")
3f641af0 5146 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5147
5148(define-public python2-lxml
5149 (package-with-python2 python-lxml))
4ed20663 5150
b32a1e47
CAW
5151;; beautifulsoup4 has a totally different namespace than 3.x,
5152;; and pypi seems to put it under its own name, so I guess we should too
5153(define-public python-beautifulsoup4
5154 (package
5155 (name "python-beautifulsoup4")
67fd4a12 5156 (version "4.5.1")
b32a1e47
CAW
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (pypi-uri "beautifulsoup4" version))
5161 (sha256
5162 (base32
67fd4a12 5163 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5164 (build-system python-build-system)
5f37f0b6
LF
5165 (arguments
5166 `(#:phases
5167 (modify-phases %standard-phases
5168 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5169 ;; must use this conversion script when building with Python 3. The
5170 ;; conversion script also runs the tests.
5171 ;; For more information, see the file 'convert-py3k' in the source
5172 ;; distribution.
5173 (replace 'check
5174 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5175 (home-page
5176 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5177 (synopsis
5178 "Python screen-scraping library")
5179 (description
5180 "Beautiful Soup is a Python library designed for rapidly setting up
5181screen-scraping projects. It offers Pythonic idioms for navigating,
5182searching, and modifying a parse tree, providing a toolkit for
5183dissecting a document and extracting what you need. It automatically
5184converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5185 (license license:expat)))
b32a1e47
CAW
5186
5187(define-public python2-beautifulsoup4
5188 (package
5189 (inherit (package-with-python2
5190 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5191 (arguments `(#:python ,python-2))))
b32a1e47 5192
092e86f5
AE
5193(define-public python2-cssutils
5194 (package
5195 (name "python2-cssutils")
58d1d816 5196 (version "1.0.1")
092e86f5
AE
5197 (source
5198 (origin
5199 (method url-fetch)
58d1d816 5200 (uri (pypi-uri "cssutils" version))
092e86f5 5201 (sha256
58d1d816
EF
5202 (base32
5203 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5204 (build-system python-build-system)
5205 (native-inputs
5206 `(("python2-mock" ,python2-mock) ; for the tests
5207 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5208 (arguments
5209 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5210 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5211 ))
092e86f5
AE
5212 (home-page "http://cthedot.de/cssutils/")
5213 (synopsis
5214 "CSS Cascading Style Sheets library for Python")
5215 (description
5216 "Cssutils is a Python package for parsing and building CSS
5217Cascading Style Sheets. Currently it provides a DOM only and no rendering
5218options.")
3f641af0 5219 (license license:lgpl3+)))
880ff77c
AE
5220
5221(define-public python-cssselect
5222 (package
5223 (name "python-cssselect")
d5ccd9ab 5224 (version "0.9.2")
880ff77c
AE
5225 (source
5226 (origin
5227 (method url-fetch)
d5ccd9ab 5228 (uri (pypi-uri "cssselect" version))
880ff77c 5229 (sha256
d5ccd9ab
EF
5230 (base32
5231 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5232 (build-system python-build-system)
880ff77c
AE
5233 (arguments
5234 ;; tests fail with message
5235 ;; AttributeError: 'module' object has no attribute 'tests'
5236 `(#:tests? #f))
5237 (home-page
5238 "https://pythonhosted.org/cssselect/")
5239 (synopsis
5240 "CSS3 selector parser and translator to XPath 1.0")
5241 (description
5242 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5243them to XPath 1.0 expressions. Such expressions can be used in lxml or
5244another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5245 (license license:bsd-3)))
880ff77c
AE
5246
5247(define-public python2-cssselect
5248 (package-with-python2 python-cssselect))
60357f99
AE
5249
5250(define-public python-netifaces
5251 (package
5252 (name "python-netifaces")
5253 (version "0.10.4")
5254 (source
5255 (origin
5256 (method url-fetch)
5257 (uri (string-append
5258 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5259 version
5260 ".tar.gz"))
5261 (sha256
5262 (base32
5263 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5264 (build-system python-build-system)
60357f99
AE
5265 (home-page
5266 "https://bitbucket.org/al45tair/netifaces")
5267 (synopsis
5268 "Python module for portable network interface information")
5269 (description
5270 "Netifaces is a Python module providing information on network
5271interfaces in an easy and portable manner.")
5272 (license license:expat)))
5273
5274(define-public python2-netifaces
5275 (package-with-python2 python-netifaces))
92cb152b 5276
32f77c04
RW
5277(define-public python-networkx
5278 (package
5279 (name "python-networkx")
a4d9609c 5280 (version "1.11")
32f77c04
RW
5281 (source
5282 (origin
5283 (method url-fetch)
a4d9609c 5284 (uri (pypi-uri "networkx" version))
32f77c04 5285 (sha256
a4d9609c 5286 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5287 (build-system python-build-system)
5288 ;; python-decorator is needed at runtime
5289 (propagated-inputs
5290 `(("python-decorator" ,python-decorator)))
5291 (native-inputs
f3b98f4f 5292 `(("python-nose" ,python-nose)))
32f77c04
RW
5293 (home-page "http://networkx.github.io/")
5294 (synopsis "Python module for creating and manipulating graphs and networks")
5295 (description
5296 "NetworkX is a Python package for the creation, manipulation, and study
5297of the structure, dynamics, and functions of complex networks.")
3f641af0 5298 (license license:bsd-3)))
32f77c04
RW
5299
5300(define-public python2-networkx
5301 (package-with-python2 python-networkx))
5302
92cb152b
RW
5303(define-public snakemake
5304 (package
5305 (name "snakemake")
5306 (version "3.2.1")
5307 (source
5308 (origin
5309 (method url-fetch)
5310 (uri (string-append
5311 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5312 version ".tar.gz"))
5313 (sha256
5314 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5315 (build-system python-build-system)
92cb152b
RW
5316 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5317 (synopsis "Python-based execution environment for make-like workflows")
5318 (description
5319 "Snakemake aims to reduce the complexity of creating workflows by
5320providing a clean and modern domain specific specification language (DSL) in
5321Python style, together with a fast and comfortable execution environment.")
5322 (license license:expat)))
a1920bc9 5323
35de1fbd
RW
5324(define-public python-seaborn
5325 (package
5326 (name "python-seaborn")
fc899d4f 5327 (version "0.7.0")
35de1fbd
RW
5328 (source
5329 (origin
5330 (method url-fetch)
fc899d4f 5331 (uri (pypi-uri "seaborn" version))
35de1fbd 5332 (sha256
fc899d4f 5333 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5334 (build-system python-build-system)
5335 (propagated-inputs
5336 `(("python-pandas" ,python-pandas)
5337 ("python-matplotlib" ,python-matplotlib)
5338 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5339 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5340 (synopsis "Statistical data visualization")
5341 (description
5342 "Seaborn is a library for making attractive and informative statistical
5343graphics in Python. It is built on top of matplotlib and tightly integrated
5344with the PyData stack, including support for numpy and pandas data structures
5345and statistical routines from scipy and statsmodels.")
3f641af0 5346 (license license:bsd-3)
fc899d4f 5347 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5348
5349(define-public python2-seaborn
fc899d4f
EF
5350 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5351 (package
5352 (inherit base)
5353 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5354 ,@(package-propagated-inputs base))))))
35de1fbd 5355
90fc547f
RW
5356(define-public python-sympy
5357 (package
5358 (name "python-sympy")
5359 (version "0.7.6")
5360 (source
5361 (origin
5362 (method url-fetch)
5363 (uri (string-append
5364 "https://github.com/sympy/sympy/releases/download/sympy-"
5365 version "/sympy-" version ".tar.gz"))
5366 (sha256
5367 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5368 (build-system python-build-system)
90fc547f
RW
5369 (home-page "http://www.sympy.org/")
5370 (synopsis "Python library for symbolic mathematics")
5371 (description
5372 "SymPy is a Python library for symbolic mathematics. It aims to become a
5373full-featured computer algebra system (CAS) while keeping the code as simple
5374as possible in order to be comprehensible and easily extensible.")
3f641af0 5375 (license license:bsd-3)))
90fc547f
RW
5376
5377(define-public python2-sympy
5378 (package-with-python2 python-sympy))
5379
e8c9b010
SR
5380(define-public python-q
5381 (package
5382 (name "python-q")
5383 (version "2.6")
5384 (source
5385 (origin
5386 (method url-fetch)
5387 (uri (pypi-uri "q" version))
5388 (sha256
5389 (base32
5390 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5391 (build-system python-build-system)
5392 (home-page "https://github.com/zestyping/q")
5393 (synopsis "Quick-and-dirty debugging output for tired programmers")
5394 (description
5395 "q is a Python module for \"print\" style of debugging Python code. It
5396provides convenient short API for print out of values, tracebacks, and
5397falling into the Python interpreter.")
f210e944 5398 (license license:asl2.0)))
e8c9b010
SR
5399
5400(define-public python2-q
f210e944 5401 (package-with-python2 python-q))
e8c9b010 5402
a1920bc9
FB
5403(define-public python-testlib
5404 (package
5405 (name "python-testlib")
5406 (version "0.6.5")
5407 (source
5408 (origin
5409 (method url-fetch)
5410 (uri (string-append
5411 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5412 version ".zip"))
5413 (sha256
5414 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5415 (build-system python-build-system)
a1920bc9 5416 (native-inputs
632735f2 5417 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5418 (synopsis "Python micro test suite harness")
5419 (description "A micro unittest suite harness for Python.")
5420 (home-page "https://github.com/trentm/testlib")
1cb9c006 5421 (license license:expat)))
a1920bc9
FB
5422
5423(define-public python2-testlib
5424 (package-with-python2 python-testlib))
db62afa5
LC
5425
5426(define-public python2-xlib
5427 (package
5428 (name "python2-xlib")
5429 (version "0.14")
5430 (source (origin
5431 (method url-fetch)
de67e922
LF
5432 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5433 "/" version "/"
db62afa5
LC
5434 "python-xlib-" version ".tar.gz"))
5435 (sha256
5436 (base32
5437 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5438 (build-system python-build-system)
5439 (arguments
5440 `(#:python ,python-2 ;Python 2 only
5441 #:tests? #f)) ;no tests
db62afa5
LC
5442 (home-page "http://python-xlib.sourceforge.net/")
5443 (synopsis "Python X11 client library")
5444 (description
5445 "The Python X Library is intended to be a fully functional X client
5446library for Python programs. It is useful to implement low-level X clients.
5447It is written entirely in Python.")
3f641af0 5448 (license license:gpl2+)))
0234ca06
DT
5449
5450(define-public python-singledispatch
5451 (package
5452 (name "python-singledispatch")
5453 (version "3.4.0.3")
5454 (source
5455 (origin
5456 (method url-fetch)
bdb67d84 5457 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5458 (sha256
5459 (base32
5460 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5461 (build-system python-build-system)
5e1c9d24
HG
5462 (native-inputs
5463 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5464 (home-page
5465 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5466 (synopsis "Backport of singledispatch feature from Python 3.4")
5467 (description
5468 "This library brings functools.singledispatch from Python 3.4 to Python
54692.6-3.3.")
5470 (license license:expat)))
5471
5472(define-public python2-singledispatch
5473 (package-with-python2 python-singledispatch))
feaae484 5474
310d218f
RW
5475(define-public python-tornado
5476 (package
5477 (name "python-tornado")
a724924b 5478 (version "4.3")
310d218f
RW
5479 (source
5480 (origin
5481 (method url-fetch)
a724924b 5482 (uri (pypi-uri "tornado" version))
310d218f 5483 (sha256
a724924b 5484 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5485 (build-system python-build-system)
3fe2c209
MB
5486 (arguments
5487 '(;; FIXME: Two tests error out with:
5488 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5489 ;; #:phases
5490 ;; (modify-phases %standard-phases
5491 ;; (replace 'check
5492 ;; (lambda _
5493 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5494 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5495 ;; (zero? (system* "python" "-m" "tornado.test")))))
5496 #:tests? #f))
310d218f 5497 (native-inputs
b455439b 5498 `(("python-certifi" ,python-certifi)))
f22efa01 5499 (propagated-inputs
b455439b 5500 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5501 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5502 (synopsis "Python web framework and asynchronous networking library")
5503 (description
5504 "Tornado is a Python web framework and asynchronous networking library,
5505originally developed at FriendFeed. By using non-blocking network I/O,
5506Tornado can scale to tens of thousands of open connections, making it ideal
5507for long polling, WebSockets, and other applications that require a long-lived
5508connection to each user.")
3f641af0 5509 (license license:asl2.0)
b455439b 5510 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5511
5512(define-public python2-tornado
b455439b 5513 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5514 (package (inherit tornado)
f22efa01 5515 (propagated-inputs
310d218f
RW
5516 `(("python2-backport-ssl-match-hostname"
5517 ,python2-backport-ssl-match-hostname)
b455439b 5518 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5519 ,@(package-propagated-inputs tornado))))))
310d218f 5520
6b59fc10
EF
5521;; the python- version can be removed with python-3.5
5522(define-public python-backports-abc
5523 (package
5524 (name "python-backports-abc")
5525 (version "0.4")
5526 (source
5527 (origin
5528 (method url-fetch)
5529 (uri (pypi-uri "backports_abc" version))
5530 (sha256
5531 (base32
5532 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5533 (build-system python-build-system)
6b59fc10 5534 (home-page "https://github.com/cython/backports_abc")
66e07664 5535 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5536 (description
5537 "Python-backports-abc provides a backport of additions to the
5538'collections.abc' module in Python-3.5.")
3f641af0 5539 (license license:psfl)))
6b59fc10
EF
5540
5541(define-public python2-backports-abc
5542 (package-with-python2 python-backports-abc))
5543
feaae484
SB
5544(define-public python-waf
5545 (package
5546 (name "python-waf")
7dd55dfe 5547 (version "1.9.5")
feaae484
SB
5548 (source (origin
5549 (method url-fetch)
bae67829 5550 (uri (string-append "https://waf.io/"
feaae484
SB
5551 "waf-" version ".tar.bz2"))
5552 (sha256
5553 (base32
7dd55dfe 5554 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5555 (build-system python-build-system)
5556 (arguments
5557 '(#:phases
5558 (modify-phases %standard-phases
5559 (replace 'build
7dd55dfe
EF
5560 (lambda _
5561 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5562 (replace 'check
7dd55dfe
EF
5563 (lambda _
5564 (zero? (system* "python" "waf" "--version"))))
feaae484 5565 (replace 'install
7dd55dfe
EF
5566 (lambda _
5567 (copy-file "waf" %output))))))
5568 (home-page "http://waf.io/")
feaae484
SB
5569 (synopsis "Python-based build system")
5570 (description
5571 "Waf is a Python-based framework for configuring, compiling and installing
5572applications.")
3f641af0 5573 (license license:bsd-3)))
feaae484
SB
5574
5575(define-public python2-waf
5576 (package-with-python2 python-waf))
45203542
RW
5577
5578(define-public python-pyzmq
5579 (package
5580 (name "python-pyzmq")
3655ee76 5581 (version "15.1.0")
45203542
RW
5582 (source
5583 (origin
5584 (method url-fetch)
3655ee76 5585 (uri (pypi-uri "pyzmq" version))
45203542 5586 (sha256
3655ee76 5587 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5588 (build-system python-build-system)
5589 (arguments
5590 `(#:configure-flags
5591 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5592 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5593 ;; --inplace' for 'python setup.py test' to work.
5594 #:tests? #f))
5595 (inputs
5596 `(("zeromq" ,zeromq)))
5597 (native-inputs
5598 `(("pkg-config" ,pkg-config)
f3b98f4f 5599 ("python-nose" ,python-nose)))
45203542
RW
5600 (home-page "http://github.com/zeromq/pyzmq")
5601 (synopsis "Python bindings for 0MQ")
5602 (description
5603 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5604 (license license:bsd-4)))
45203542
RW
5605
5606(define-public python2-pyzmq
5607 (package-with-python2 python-pyzmq))
d889e6c4
CR
5608
5609(define-public python-pep8
5610 (package
5611 (name "python-pep8")
db251311 5612 (version "1.7.0")
d889e6c4
CR
5613 (source
5614 (origin
5615 (method url-fetch)
db251311 5616 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5617 (sha256
5618 (base32
db251311 5619 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5620 (build-system python-build-system)
d889e6c4
CR
5621 (home-page "http://pep8.readthedocs.org/")
5622 (synopsis "Python style guide checker")
5623 (description
5624 "This tools checks Python code against some of the style conventions in
5625PEP 8.")
5626 (license license:expat)))
5627
5628(define-public python2-pep8
5629 (package-with-python2 python-pep8))
e31d7f44
CR
5630
5631(define-public python-pyflakes
5632 (package
5633 (name "python-pyflakes")
2abc3972 5634 (version "1.0.0")
e31d7f44
CR
5635 (source
5636 (origin
5637 (method url-fetch)
2abc3972 5638 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5639 (sha256
5640 (base32
2abc3972 5641 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5642 (build-system python-build-system)
e31d7f44
CR
5643 (home-page
5644 "https://github.com/pyflakes/pyflakes")
5645 (synopsis "Passive checker of Python programs")
5646 (description
5647 "Pyflakes statically checks Python source code for common errors.")
5648 (license license:expat)))
a59e017c 5649
7261d9eb
CR
5650(define-public python2-pyflakes
5651 (package-with-python2 python-pyflakes))
5652
a59e017c
CR
5653(define-public python-mccabe
5654 (package
5655 (name "python-mccabe")
c6ebd40d 5656 (version "0.4.0")
a59e017c
CR
5657 (source
5658 (origin
5659 (method url-fetch)
c6ebd40d 5660 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5661 (sha256
5662 (base32
c6ebd40d 5663 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5664 (build-system python-build-system)
328bb95d 5665 (native-inputs
c6ebd40d 5666 `(("python-pytest" ,python-pytest)
f3b98f4f 5667 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5668 (home-page "https://github.com/flintwork/mccabe")
5669 (synopsis "McCabe checker, plugin for flake8")
5670 (description
5671 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5672complexity of Python source code.")
7362371d 5673 (license license:expat)))
a59e017c
CR
5674
5675(define-public python2-mccabe
5676 (package-with-python2 python-mccabe))
e8df8f47 5677
7477fbb1
CR
5678(define-public python-mccabe-0.2.1
5679 (package (inherit python-mccabe)
5680 (version "0.2.1")
5681 (source
5682 (origin
5683 (method url-fetch)
5684 (uri (pypi-uri "mccabe" version))
5685 (sha256
5686 (base32
f3b98f4f 5687 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5688
5689(define-public python2-mccabe-0.2.1
5690 (package-with-python2 python-mccabe-0.2.1))
5691
e8df8f47
CR
5692;; Flake8 2.4.1 requires an older version of pep8.
5693;; This should be removed ASAP.
5694(define-public python-pep8-1.5.7
5695 (package (inherit python-pep8)
5696 (version "1.5.7")
5697 (source
5698 (origin
5699 (method url-fetch)
5700 (uri (string-append
5701 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5702 version
5703 ".tar.gz"))
5704 (sha256
5705 (base32
73e3060d
MB
5706 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5707 (arguments
5708 ;; XXX Tests not compatible with Python 3.5.
5709 '(#:tests? #f))))
e8df8f47
CR
5710
5711(define-public python2-pep8-1.5.7
5712 (package-with-python2 python-pep8-1.5.7))
5713
5714;; Flake8 2.4.1 requires an older version of pyflakes.
5715;; This should be removed ASAP.
5716(define-public python-pyflakes-0.8.1
5717 (package (inherit python-pyflakes)
5718 (version "0.8.1")
5719 (source
5720 (origin
5721 (method url-fetch)
5722 (uri (string-append
5723 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5724 version
5725 ".tar.gz"))
5726 (sha256
5727 (base32
0d84e1ef
MB
5728 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5729 (arguments
5730 ;; XXX Tests not compatible with Python 3.5.
5731 '(#:tests? #f))))
e8df8f47
CR
5732
5733(define-public python2-pyflakes-0.8.1
7261d9eb 5734 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5735
5736(define-public python-flake8
5737 (package
5738 (name "python-flake8")
43789136 5739 (version "2.5.4")
e8df8f47
CR
5740 (source
5741 (origin
5742 (method url-fetch)
1b995533 5743 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5744 (sha256
5745 (base32
011271c7
HG
5746 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5747 (modules '((guix build utils)))
5748 (snippet
5749 '(begin
5750 ;; Remove pre-compiled .pyc files from source.
5751 (for-each delete-file-recursively
5752 (find-files "." "__pycache__" #:directories? #t))
5753 (for-each delete-file (find-files "." "\\.pyc$"))
5754 #t))))
e8df8f47 5755 (build-system python-build-system)
482d9591 5756 (propagated-inputs
f3b98f4f 5757 `(("python-pep8" ,python-pep8)
43789136 5758 ("python-pyflakes" ,python-pyflakes)
482d9591 5759 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5760 (native-inputs
5761 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5762 ("python-nose" ,python-nose)))
5763 (home-page "https://gitlab.com/pycqa/flake8")
5764 (synopsis
5765 "The modular source code checker: pep8, pyflakes and co")
5766 (description
5767 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5768 (license license:expat)))
5769
5770(define-public python2-flake8
5771 (package-with-python2 python-flake8))
61b9ac53 5772
abf21efc
CR
5773;; This will only be needed by the python-hacking package and will not be
5774;; necessary once python-hacking > 0.10.2 is released.
5775(define-public python-flake8-2.2.4
5776 (package (inherit python-flake8)
482d9591 5777 (propagated-inputs
f3b98f4f 5778 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5779 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5780 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5781 (native-inputs
482d9591 5782 `(("python-mock" ,python-mock)
abf21efc
CR
5783 ("python-nose" ,python-nose)))
5784 (version "2.2.4")
5785 (source
5786 (origin
5787 (method url-fetch)
5788 (uri (pypi-uri "flake8" version))
5789 (sha256
5790 (base32
b9c8ccce
HG
5791 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5792 (modules '((guix build utils)))
5793 (snippet
5794 '(begin
5795 ;; Remove pre-compiled .pyc files from source.
5796 (for-each delete-file-recursively
5797 (find-files "." "__pycache__" #:directories? #t))
5798 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
5799 #t))))
5800 (arguments
5801 ;; XXX Fails with Python 3.5.
5802 '(#:tests? #f))))
abf21efc
CR
5803
5804(define-public python2-flake8-2.2.4
5805 (package-with-python2 python-flake8-2.2.4))
5806
61b9ac53
FB
5807(define-public python-mistune
5808 (package
5809 (name "python-mistune")
5810 (version "0.7")
5811 (source
5812 (origin
5813 (method url-fetch)
5814 (uri (string-append
5815 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5816 version
5817 ".tar.gz"))
5818 (sha256
5819 (base32
5820 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5821 (build-system python-build-system)
328bb95d 5822 (native-inputs
f3b98f4f 5823 `(("python-nose" ,python-nose)
61b9ac53
FB
5824 ("python-cython" ,python-cython)))
5825 (home-page "https://github.com/lepture/mistune")
5826 (synopsis "Markdown parser in pure Python")
5827 (description "This package provides a fast markdown parser in pure
5828Python.")
3f641af0 5829 (license license:bsd-3)))
61b9ac53
FB
5830
5831(define-public python2-mistune
5832 (package-with-python2 python-mistune))
6d992d07 5833
b9893908
EE
5834(define-public python-markdown
5835 (package
5836 (name "python-markdown")
5837 (version "2.6.5")
5838 (source
5839 (origin
5840 (method url-fetch)
5841 (uri (pypi-uri "Markdown" version))
5842 (sha256
5843 (base32
5844 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5845 (build-system python-build-system)
5846 (arguments
5847 `(#:phases
5848 (modify-phases %standard-phases
5849 (replace 'check
5850 (lambda _
5851 (zero? (system* "python" "run-tests.py")))))))
5852 (native-inputs
5853 `(("python-nose" ,python-nose)
5854 ("python-pyyaml" ,python-pyyaml)))
5855 (home-page "https://pythonhosted.org/Markdown/")
5856 (synopsis "Python implementation of Markdown")
5857 (description
5858 "This package provides a Python implementation of John Gruber's
5859Markdown. The library features international input, various Markdown
5860extensions, and several HTML output formats. A command line wrapper
5861markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5862 (license license:bsd-3)))
b9893908
EE
5863
5864(define-public python2-markdown
5865 (package-with-python2 python-markdown))
5866
6d992d07
FB
5867(define-public python-ptyprocess
5868 (package
5869 (name "python-ptyprocess")
5870 (version "0.5")
5871 (source
5872 (origin
5873 (method url-fetch)
5874 (uri (string-append
5875 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5876 version ".tar.gz"))
5877 (sha256
5878 (base32
5879 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5880 (build-system python-build-system)
328bb95d 5881 (native-inputs
f3b98f4f 5882 `(("python-nose" ,python-nose)))
6d992d07
FB
5883 (arguments
5884 `(#:phases
5885 (modify-phases %standard-phases
5886 (replace 'check
5887 (lambda _
5888 (zero? (system* "nosetests")))))))
5889 (home-page "https://github.com/pexpect/ptyprocess")
5890 (synopsis "Run a subprocess in a pseudo terminal")
5891 (description
5892 "This package provides a Python library used to launch a subprocess in a
5893pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5894 (license license:isc)))
6d992d07
FB
5895
5896(define-public python2-ptyprocess
5897 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5898
5899(define-public python-terminado
5900 (package
5901 (name "python-terminado")
783fb0a3 5902 (version "0.6")
4aadb1df
FB
5903 (source
5904 (origin
5905 (method url-fetch)
783fb0a3 5906 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5907 (sha256
5908 (base32
783fb0a3 5909 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5910 (build-system python-build-system)
5911 (propagated-inputs
5912 `(("python-tornado" ,python-tornado)
5913 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5914 (native-inputs
5915 `(("python-nose" ,python-nose)))
4aadb1df
FB
5916 (arguments
5917 `(#:phases
5918 (modify-phases %standard-phases
5919 (replace 'check
5920 (lambda _
5921 (zero? (system* "nosetests")))))))
5922 (home-page "https://github.com/takluyver/terminado")
5923 (synopsis "Terminals served to term.js using Tornado websockets")
5924 (description "This package provides a Tornado websocket backend for the
5925term.js Javascript terminal emulator library.")
3f641af0 5926 (license license:bsd-2)
783fb0a3 5927 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5928
5929(define-public python2-terminado
783fb0a3 5930 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5931 (package (inherit terminado)
783fb0a3
EF
5932 (propagated-inputs
5933 `(("python2-backport-ssl-match-hostname"
5934 ,python2-backport-ssl-match-hostname)
00e10c6e 5935 ,@(package-propagated-inputs terminado))))))
5faa5ce4 5936
d582eaac
SB
5937(define-public python-fonttools
5938 (package
5939 (name "python-fonttools")
5940 (version "2.5")
5941 (source (origin
5942 (method url-fetch)
5943 (uri (string-append
5944 "https://pypi.python.org/packages/source/F/FontTools/"
5945 "fonttools-" version ".tar.gz"))
5946 (sha256
5947 (base32
5948 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5949 (build-system python-build-system)
9e8c6a37
HG
5950 (arguments
5951 '(#:test-target "check"
5952 #:phases
5953 (modify-phases %standard-phases
5954 (add-after 'unpack 'patch-setuppy
5955 ;; Remove the undocumented "extra_path" argument, which adds an
5956 ;; intervening directories between site-packages and the package
5957 ;; directory.
5958 (lambda _
5959 (substitute* "setup.py"
5960 (("^[ \t]*extra_path *= *'FontTools',") ""))
5961 #t)))))
d582eaac
SB
5962 (home-page "http://github.com/behdad/fonttools")
5963 (synopsis "Tools to manipulate font files")
5964 (description
5965 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 5966supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
5967of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5968also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5969from an XML-based format.")
3f641af0
DC
5970 (license (license:non-copyleft
5971 "file://LICENSE.txt"
5972 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5973
5974(define-public python2-fonttools
5975 (package-with-python2 python-fonttools))
75710da6 5976
5faa5ce4
RW
5977(define-public python-ly
5978 (package
5979 (name "python-ly")
5135354f 5980 (version "0.9.4")
5faa5ce4
RW
5981 (source
5982 (origin
5983 (method url-fetch)
5135354f
RW
5984 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5985 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5986 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5987 (sha256
5988 (base32
5135354f 5989 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 5990 (build-system python-build-system)
5faa5ce4
RW
5991 (synopsis "Tool and library for manipulating LilyPond files")
5992 (description "This package provides a Python library to parse, manipulate
5993or create documents in LilyPond format. A command line program ly is also
5994provided that can be used to do various manipulations with LilyPond files.")
5995 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5996 (license license:gpl2+)))
7e7b27d9
CR
5997
5998(define-public python-appdirs
5999 (package
6000 (name "python-appdirs")
6001 (version "1.4.0")
6002 (source
6003 (origin
6004 (method url-fetch)
6005 (uri (string-append
6006 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6007 version
6008 ".tar.gz"))
6009 (sha256
6010 (base32
6011 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6012 (build-system python-build-system)
7e7b27d9
CR
6013 (home-page "http://github.com/ActiveState/appdirs")
6014 (synopsis
6015 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6016 (description
6017 "This module provides a portable way of finding out where user data
6018should be stored on various operating systems.")
6019 (license license:expat)))
6020
6021(define-public python2-appdirs
6022 (package-with-python2 python-appdirs))
89b2e0b0
LF
6023
6024(define-public python-llfuse
6025 (package
6026 (name "python-llfuse")
e36ace36 6027 (version "1.1.1")
89b2e0b0
LF
6028 (source (origin
6029 (method url-fetch)
6030 (uri (string-append
6031 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6032 "llfuse-" version ".tar.bz2"))
6033 (sha256
6034 (base32
e36ace36 6035 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6036 (build-system python-build-system)
6037 (inputs
6038 `(("fuse" ,fuse)
6039 ("attr" ,attr)))
6040 (native-inputs
f3b98f4f 6041 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6042 (synopsis "Python bindings for FUSE")
6043 (description
6044 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6045 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6046 (license license:lgpl2.0+)
cd0569c4 6047 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6048
6049(define-public python2-llfuse
cd0569c4
LF
6050 (package (inherit (package-with-python2
6051 (strip-python2-variant python-llfuse)))
6052 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6053
6054;; For attic-0.16
6055(define-public python-llfuse-0.41
6056 (package (inherit python-llfuse)
229b3661 6057 (version "0.41.1")
cd0569c4
LF
6058 (source (origin
6059 (method url-fetch)
6060 (uri (string-append
6061 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6062 "llfuse-" version ".tar.bz2"))
6063 (sha256
6064 (base32
229b3661 6065 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6066 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6067 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6068 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6069
6070(define-public python-msgpack
6071 (package
6072 (name "python-msgpack")
aed625bd 6073 (version "0.4.8")
641c9871
LF
6074 (source (origin
6075 (method url-fetch)
ae831df4 6076 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6077 (sha256
6078 (base32
aed625bd 6079 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6080 (build-system python-build-system)
641c9871
LF
6081 (synopsis "MessagePack (de)serializer")
6082 (description "MessagePack is a fast, compact binary serialization format,
6083suitable for similar data to JSON. This package provides CPython bindings for
6084reading and writing MessagePack data.")
6085 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6086 (license license:asl2.0)))
bd74be7b
LF
6087
6088(define-public python2-msgpack
f210e944 6089 (package-with-python2 python-msgpack))
641c9871 6090
6e5e39f4
CR
6091(define-public python-netaddr
6092 (package
6093 (name "python-netaddr")
6094 (version "0.7.18")
6095 (source
6096 (origin
6097 (method url-fetch)
6098 (uri (string-append
6099 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6100 version
6101 ".tar.gz"))
6102 (sha256
6103 (base32
6104 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6105 (build-system python-build-system)
6106 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6107 (home-page "https://github.com/drkjam/netaddr/")
6108 (synopsis "Pythonic manipulation of network addresses")
6109 (description
6110 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6111and MAC network addresses.")
3f641af0 6112 (license license:bsd-3)))
6e5e39f4
CR
6113
6114(define-public python2-netaddr
6115 (package-with-python2 python-netaddr))
8c692a52
CR
6116
6117(define-public python-wrapt
6118 (package
6119 (name "python-wrapt")
6120 (version "1.10.5")
6121 (source
6122 (origin
6123 (method url-fetch)
6124 (uri (string-append
6125 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6126 version
6127 ".tar.gz"))
6128 (sha256
6129 (base32
6130 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6131 (build-system python-build-system)
6132 (arguments
6133 ;; Tests are not included in the tarball, they are only available in the
6134 ;; git repository.
6135 `(#:tests? #f))
8c692a52
CR
6136 (home-page "https://github.com/GrahamDumpleton/wrapt")
6137 (synopsis "Module for decorators, wrappers and monkey patching")
6138 (description
6139 "The aim of the wrapt module is to provide a transparent object proxy for
6140 Python, which can be used as the basis for the construction of function
6141 wrappers and decorator functions.")
3f641af0 6142 (license license:bsd-2)))
8c692a52
CR
6143
6144(define-public python2-wrapt
6145 (package-with-python2 python-wrapt))
b85c85be
CR
6146
6147(define-public python-iso8601
6148 (package
6149 (name "python-iso8601")
fe84bc9a 6150 (version "0.1.11")
b85c85be
CR
6151 (source
6152 (origin
6153 (method url-fetch)
fe84bc9a 6154 (uri (pypi-uri "iso8601" version))
b85c85be 6155 (sha256
fe84bc9a
EF
6156 (base32
6157 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6158 (build-system python-build-system)
63b02364
MB
6159 (native-inputs
6160 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6161 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6162 (synopsis "Module to parse ISO 8601 dates")
6163 (description
6164 "This module parses the most common forms of ISO 8601 date strings (e.g.
6165@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6166 (license license:expat)))
6167
6168(define-public python2-iso8601
6169 (package-with-python2 python-iso8601))
5e412b63
CR
6170
6171(define-public python-monotonic
6172 (package
6173 (name "python-monotonic")
6174 (version "0.3")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (string-append
6179 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6180 version
6181 ".tar.gz"))
6182 (sha256
6183 (base32
6184 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6185 (build-system python-build-system)
5e412b63
CR
6186 (home-page "https://github.com/atdt/monotonic")
6187 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6188 (description
6189 "This module provides a monotonic() function which returns the value (in
6190fractional seconds) of a clock which never goes backwards.")
3f641af0 6191 (license license:asl2.0)))
5e412b63
CR
6192
6193(define-public python2-monotonic
6194 (package-with-python2 python-monotonic))
de34afac
CR
6195
6196(define-public python-webob
6197 (package
6198 (name "python-webob")
b8834c21 6199 (version "1.5.1")
de34afac
CR
6200 (source
6201 (origin
6202 (method url-fetch)
b8834c21 6203 (uri (pypi-uri "WebOb" version))
de34afac
CR
6204 (sha256
6205 (base32
b8834c21 6206 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6207 (build-system python-build-system)
328bb95d 6208 (native-inputs
f3b98f4f 6209 `(("python-nose" ,python-nose)))
de34afac
CR
6210 (home-page "http://webob.org/")
6211 (synopsis "WSGI request and response object")
6212 (description
6213 "WebOb provides wrappers around the WSGI request environment, and an
6214object to help create WSGI responses.")
6215 (license license:expat)))
6216
6217(define-public python2-webob
6218 (package-with-python2 python-webob))
350ba0a3 6219
02a8a187
BW
6220(define-public python-xlrd
6221 (package
6222 (name "python-xlrd")
c2ad4d70 6223 (version "1.0.0")
02a8a187
BW
6224 (source (origin
6225 (method url-fetch)
e775f48e 6226 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6227 (sha256
6228 (base32
c2ad4d70 6229 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6230 (build-system python-build-system)
6231 (arguments
6232 `(#:phases
6233 (modify-phases %standard-phases
c2ad4d70 6234 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6235 ;; run tests instead for now.
6236 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6237 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6238 (home-page "http://www.python-excel.org/")
6239 (synopsis "Library for extracting data from Excel files")
6240 (description "This packages provides a library to extract data from
c598e35c 6241spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6242@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6243Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6244 (license license:bsd-3)))
02a8a187
BW
6245
6246(define-public python2-xlrd
6247 (package-with-python2 python-xlrd))
6248
350ba0a3
CR
6249(define-public python-prettytable
6250 (package
6251 (name "python-prettytable")
6252 (version "0.7.2")
6253 (source
6254 (origin
6255 (method url-fetch)
6256 (uri (string-append
6257 "https://pypi.python.org/packages/source/P/PrettyTable/"
6258 "prettytable-" version ".tar.bz2"))
6259 (sha256
6260 (base32
6261 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6262 (build-system python-build-system)
350ba0a3
CR
6263 (home-page "http://code.google.com/p/prettytable/")
6264 (synopsis "Display tabular data in an ASCII table format")
6265 (description
6266 "A library designed to represent tabular data in visually appealing ASCII
6267tables. PrettyTable allows for selection of which columns are to be printed,
6268independent alignment of columns (left or right justified or centred) and
6269printing of sub-tables by specifying a row range.")
3f641af0 6270 (license license:bsd-3)))
350ba0a3
CR
6271
6272(define-public python2-prettytable
6273 (package-with-python2 python-prettytable))
7a8ac75a 6274
9f8ee3fe
RW
6275(define-public python-tables
6276 (package
6277 (name "python-tables")
6278 (version "3.2.2")
6279 (source
6280 (origin
6281 (method url-fetch)
6282 (uri (pypi-uri "tables" version))
6283 (sha256
6284 (base32
bac23672
HG
6285 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6286 (modules '((guix build utils)))
6287 (snippet
6288 '(begin
6289 ;; Remove pre-compiled .pyc files from source.
6290 (for-each delete-file-recursively
6291 (find-files "." "__pycache__" #:directories? #t))
6292 (for-each delete-file (find-files "." "\\.pyc$"))
6293 #t))))
9f8ee3fe
RW
6294 (build-system python-build-system)
6295 (arguments
6296 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6297 ;; or "check", so we must override the build and check phases.
6298 #:phases
6299 (modify-phases %standard-phases
6300 (add-after 'unpack 'use-gcc
6301 (lambda _
6302 (substitute* "setup.py"
6303 (("compiler = new_compiler\\(\\)" line)
6304 (string-append line
6305 "\ncompiler.set_executables(compiler='gcc',"
6306 "compiler_so='gcc',"
6307 "linker_exe='gcc',"
6308 "linker_so='gcc -shared')")))
6309 #t))
6310 (replace 'build
6311 (lambda* (#:key inputs #:allow-other-keys)
6312 (zero? (system* "python" "setup.py" "build"
6313 (string-append "--hdf5="
6314 (assoc-ref inputs "hdf5"))))))
6315 (replace 'check
6316 (lambda* (#:key inputs #:allow-other-keys)
6317 (zero? (system* "python" "setup.py" "check"
6318 (string-append "--hdf5="
6319 (assoc-ref inputs "hdf5")))))))))
6320 (propagated-inputs
6321 `(("python-numexpr" ,python-numexpr)
6322 ("python-numpy" ,python-numpy)))
6323 (native-inputs
f3b98f4f 6324 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6325 ("pkg-config" ,pkg-config)))
6326 (inputs
6327 `(("hdf5" ,hdf5)
6328 ("bzip2" ,bzip2)
6329 ("zlib" ,zlib)))
6330 (home-page "http://www.pytables.org/")
6331 (synopsis "Hierarchical datasets for Python")
6332 (description "PyTables is a package for managing hierarchical datasets and
6333designed to efficently cope with extremely large amounts of data.")
3f641af0 6334 (license license:bsd-3)))
9f8ee3fe
RW
6335
6336(define-public python2-tables
6337 (package-with-python2 python-tables))
6338
7a8ac75a
RW
6339(define-public python-pyasn1
6340 (package
6341 (name "python-pyasn1")
caa0edb3 6342 (version "0.1.9")
7a8ac75a
RW
6343 (source
6344 (origin
6345 (method url-fetch)
caa0edb3 6346 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6347 (sha256
6348 (base32
caa0edb3 6349 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6350 (build-system python-build-system)
6351 (home-page "http://pyasn1.sourceforge.net/")
6352 (synopsis "ASN.1 types and codecs")
6353 (description
6354 "This is an implementation of ASN.1 types and codecs in Python. It is
6355suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6356 (license license:bsd-2)))
7a8ac75a
RW
6357
6358(define-public python2-pyasn1
6359 (package-with-python2 python-pyasn1))
9a49a535 6360
5988c299
EF
6361(define-public python-pyasn1-modules
6362 (package
6363 (name "python-pyasn1-modules")
6364 (version "0.0.8")
6365 (source
6366 (origin
6367 (method url-fetch)
6368 (uri (pypi-uri "pyasn1-modules" version))
6369 (sha256
6370 (base32
6371 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6372 (build-system python-build-system)
5988c299
EF
6373 (propagated-inputs
6374 `(("python-pyasn1" ,python-pyasn1)))
6375 (home-page "http://sourceforge.net/projects/pyasn1/")
6376 (synopsis "ASN.1 codec implementations")
6377 (description
6378 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6379implementations of ASN.1-based codecs and protocols.")
3f641af0 6380 (license license:bsd-3)))
5988c299
EF
6381
6382(define-public python2-pyasn1-modules
6383 (package-with-python2 python-pyasn1-modules))
6384
520af157 6385(define-public python-ipaddress
9a49a535 6386 (package
520af157
DC
6387 (name "python-ipaddress")
6388 (version "1.0.16")
6389 (source (origin
6390 (method url-fetch)
6391 (uri (pypi-uri "ipaddress" version))
6392 (sha256
6393 (base32
6394 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6395 (build-system python-build-system)
9a49a535
RW
6396 (home-page "https://github.com/phihag/ipaddress")
6397 (synopsis "IP address manipulation library")
6398 (description
520af157
DC
6399 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6400 in Python. This library is used to create, poke at, and manipulate IPv4 and
6401 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6402 module to older versions of Python.")
f210e944 6403 (license license:psfl)))
520af157
DC
6404
6405(define-public python2-ipaddress
f210e944 6406 (package-with-python2 python-ipaddress))
3f00e078 6407
4a238186
HG
6408(define-public python2-ipaddr
6409 (package
6410 (name "python2-ipaddr")
6411 (version "2.1.11")
6412 (source
6413 (origin
6414 (method url-fetch)
6415 (uri (pypi-uri "ipaddr" version))
6416 (sha256
6417 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6418 (build-system python-build-system)
6419 (arguments
6420 `(#:python ,python-2 ;version 2 only
6421 #:phases
6422 (modify-phases %standard-phases
6423 (replace 'check
6424 (lambda* _
6425 (zero? (system* "python" "ipaddr_test.py")))))))
6426 (home-page "https://github.com/google/ipaddr-py")
6427 (synopsis "IP address manipulation library")
6428 (description
6429 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6430IPv6 addresses and networks.
6431
6432For new implementations you may prefer to use the standard module
6433@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6434versions of Python.")
3f641af0 6435 (license license:asl2.0)))
4a238186 6436
3f00e078
RW
6437(define-public python-idna
6438 (package
6439 (name "python-idna")
6440 (version "2.0")
6441 (source
6442 (origin
6443 (method url-fetch)
6444 (uri (string-append "https://pypi.python.org/packages/source/i/"
6445 "idna/idna-" version ".tar.gz"))
6446 (sha256
6447 (base32
6448 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6449 (build-system python-build-system)
3f00e078
RW
6450 (home-page "https://github.com/kjd/idna")
6451 (synopsis "Internationalized domain names in applications")
6452 (description
6453 "This is a library to support the Internationalised Domain Names in
6454Applications (IDNA) protocol as specified in RFC 5891. This version of the
6455protocol is often referred to as “IDNA2008” and can produce different results
6456from the earlier standard from 2003. The library is also intended to act as a
6457suitable drop-in replacement for the “encodings.idna” module that comes with
6458the Python standard library but currently only supports the older 2003
6459specification.")
3f641af0 6460 (license license:bsd-4)))
3f00e078
RW
6461
6462(define-public python2-idna
6463 (package-with-python2 python-idna))
36ebf972
RW
6464
6465(define-public python-pretend
6466 (package
6467 (name "python-pretend")
6468 (version "1.0.8")
6469 (source
6470 (origin
6471 (method url-fetch)
6472 (uri (string-append "https://pypi.python.org/packages/source/p/"
6473 "pretend/pretend-" version ".tar.gz"))
6474 (sha256
6475 (base32
6476 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6477 (build-system python-build-system)
36ebf972
RW
6478 (home-page "https://github.com/alex/pretend")
6479 (synopsis "Library for stubbing in Python")
6480 (description
6481 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6482technique for writing tests. You may hear the term mixed up with mocks,
6483fakes, or doubles. Basically, a stub is an object that returns pre-canned
6484responses, rather than doing any computation.")
3f641af0 6485 (license license:bsd-3)))
36ebf972
RW
6486
6487(define-public python2-pretend
6488 (package-with-python2 python-pretend))
aa759a51
RW
6489
6490(define-public python-cryptography-vectors
6491 (package
6492 (name "python-cryptography-vectors")
a6c47905 6493 (version "1.6")
aa759a51
RW
6494 (source
6495 (origin
6496 (method url-fetch)
9c509ca9 6497 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6498 (sha256
6499 (base32
a6c47905 6500 "0xgn3yvlmv5rs92wgjj39qscr6s7mwbbsx7j683sfa6ijmyb1k01"))))
aa759a51 6501 (build-system python-build-system)
aa759a51 6502 (home-page "https://github.com/pyca/cryptography")
66e07664 6503 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6504 (description
6505 "This package contains test vectors for the cryptography package.")
6506 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6507 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6508
6509(define-public python2-cryptography-vectors
6510 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6511
6512(define-public python-cryptography
6513 (package
6514 (name "python-cryptography")
a6c47905 6515 (version "1.6")
88b47cb0
RW
6516 (source
6517 (origin
6518 (method url-fetch)
9c509ca9 6519 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6520 (sha256
6521 (base32
a6c47905 6522 "0gwvmz6w5ml0bjbgmdiscsv5i948lrjd381z7h9qkz6kr398c3ad"))))
88b47cb0 6523 (build-system python-build-system)
470613f9
LF
6524 (arguments
6525 `(#:phases
6526 (modify-phases %standard-phases
6527 (add-before 'check 'disable-failing-test
6528 (lambda _
6529 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6530 ;; versions of python-cryptography:
6531 ;; https://github.com/pyca/cryptography/issues/3196
6532 ;; TODO: Try re-enabling the test when upgrading
6533 ;; python-cryptography.
6534 (substitute* "tests/hazmat/backends/test_openssl.py"
6535 (("def test_numeric_string_x509_name_entry")
6536 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6537 #t)))))
88b47cb0
RW
6538 (inputs
6539 `(("openssl" ,openssl)))
6540 (propagated-inputs
6541 `(("python-cffi" ,python-cffi)
6542 ("python-six" ,python-six)
6543 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6544 ("python-idna" ,python-idna)
6545 ("python-iso8601" ,python-iso8601)))
6546 (native-inputs
6547 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6548 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6549 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6550 ("python-pyasn1" ,python-pyasn1)
6551 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6552 ("python-pytz" ,python-pytz)
6553 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6554 (home-page "https://github.com/pyca/cryptography")
6555 (synopsis "Cryptographic recipes and primitives for Python")
6556 (description
6557 "cryptography is a package which provides cryptographic recipes and
6558primitives to Python developers. It aims to be the “cryptographic standard
6559library” for Python. The package includes both high level recipes, and low
6560level interfaces to common cryptographic algorithms such as symmetric ciphers,
6561message digests and key derivation functions.")
6562 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6563 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6564 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6565
6566(define-public python2-cryptography
519e2f4f
LF
6567 (let ((crypto (package-with-python2
6568 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6569 (package (inherit crypto)
6570 (propagated-inputs
6571 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6572 ("python2-backport-ssl-match-hostname"
6573 ,python2-backport-ssl-match-hostname)
68f1cdec 6574 ("python2-enum34" ,python2-enum34)
88b47cb0 6575 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6576
6577(define-public python-pyopenssl
6578 (package
6579 (name "python-pyopenssl")
61684de2 6580 (version "16.2.0")
5af999b8
RW
6581 (source
6582 (origin
6583 (method url-fetch)
eb68d268 6584 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6585 (sha256
6586 (base32
61684de2 6587 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6588 (build-system python-build-system)
30e0229a
MB
6589 (arguments
6590 ;; FIXME: Some tests fail with "NameError: name 'long' is not defined".
6591 '(#:tests? #f))
5af999b8
RW
6592 (propagated-inputs
6593 `(("python-cryptography" ,python-cryptography)
6594 ("python-six" ,python-six)))
6595 (inputs
6596 `(("openssl" ,openssl)))
30e0229a
MB
6597 (native-inputs
6598 `(("python-pytest" ,python-pytest)))
5af999b8
RW
6599 (home-page "https://github.com/pyca/pyopenssl")
6600 (synopsis "Python wrapper module around the OpenSSL library")
6601 (description
6602 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6603library.")
3f641af0 6604 (license license:asl2.0)))
5af999b8
RW
6605
6606(define-public python2-pyopenssl
519e2f4f 6607 (package-with-python2 python-pyopenssl))
643725a1
CR
6608
6609(define-public python-pip
6610 (package
6611 (name "python-pip")
6fb54e3b 6612 (version "8.0.2")
643725a1
CR
6613 (source
6614 (origin
6615 (method url-fetch)
6fb54e3b 6616 (uri (pypi-uri "pip" version))
643725a1
CR
6617 (sha256
6618 (base32
6fb54e3b 6619 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1 6620 (build-system python-build-system)
05e2e4cf
HG
6621 (native-inputs
6622 `(;; Tests
6623 ("python-virtualenv" ,python-virtualenv)
643725a1
CR
6624 ("python-mock" ,python-mock)
6625 ("python-pytest" ,python-pytest)
6626 ("python-scripttest" ,python-scripttest)))
6627 (home-page "https://pip.pypa.io/")
6628 (synopsis
6629 "Package manager for Python software")
6630 (description
6631 "Pip is a package manager for Python software, that finds packages on the
6632Python Package Index (PyPI).")
6633 (license license:expat)))
6634
6635(define-public python2-pip
6636 (package-with-python2 python-pip))
d8c4998f
LC
6637
6638(define-public python-tlsh
6639 (package
6640 (name "python-tlsh")
99b00dc7 6641 (version "3.4.4")
d8c4998f
LC
6642 (home-page "https://github.com/trendmicro/tlsh")
6643 (source (origin
99b00dc7
EF
6644 (method url-fetch)
6645 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6646 version ".tar.gz"))
d8c4998f
LC
6647 (sha256
6648 (base32
99b00dc7
EF
6649 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6650 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6651 (build-system cmake-build-system)
6652 (arguments
6653 '(#:out-of-source? #f
6654 #:phases (modify-phases %standard-phases
6655 (replace
6656 'install
6657 (lambda* (#:key outputs #:allow-other-keys)
6658 ;; Build and install the Python bindings. The underlying
6659 ;; C++ library is apparently not meant to be installed.
6660 (let ((out (assoc-ref outputs "out")))
6661 (with-directory-excursion "py_ext"
6662 (and (system* "python" "setup.py" "build")
6663 (system* "python" "setup.py" "install"
6664 (string-append "--prefix=" out))))))))))
6665 (inputs `(("python" ,python-wrapper))) ;for the bindings
6666 (synopsis "Fuzzy matching library for Python")
6667 (description
6668 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6669Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6670value which can be used for similarity comparisons. Similar objects have
6671similar hash values, which allows for the detection of similar objects by
6672comparing their hash values. The byte stream should have a sufficient amount
6673of complexity; for example, a byte stream of identical bytes will not generate
6674a hash value.")
3f641af0 6675 (license license:asl2.0)))
d8c4998f
LC
6676
6677(define-public python2-tlsh
6678 (package
6679 (inherit python-tlsh)
6680 (name "python2-tlsh")
6681 (inputs `(("python" ,python-2)))))
d96034ed 6682
67f66812
BW
6683(define-public python-termcolor
6684 (package
6685 (name "python-termcolor")
6686 (version "1.1.0")
6687 (source
6688 (origin
6689 (method url-fetch)
6690 (uri (pypi-uri "python-termcolor" version))
6691 (sha256
6692 (base32
6693 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6694 (build-system python-build-system)
6695 (arguments
6696 ;; There are no tests.
6697 `(#:tests? #f))
6698 (home-page "http://pypi.python.org/pypi/termcolor")
6699 (synopsis "ANSII Color formatting for terminal output")
6700 (description
6701 "This package provides ANSII Color formatting for output in terminals.")
6702 (license license:expat)))
6703
6704(define-public python2-termcolor
6705 (package-with-python2 python-termcolor))
6706
d96034ed
LC
6707(define-public python-libarchive-c
6708 (package
6709 (name "python-libarchive-c")
03fd001c 6710 (version "2.2")
d96034ed
LC
6711 (source (origin
6712 (method url-fetch)
03fd001c 6713 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6714 (sha256
6715 (base32
03fd001c 6716 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6717 (build-system python-build-system)
6718 (arguments
6719 '(#:phases (modify-phases %standard-phases
6720 (add-before
6721 'build 'reference-libarchive
6722 (lambda* (#:key inputs #:allow-other-keys)
6723 ;; Retain the absolute file name of libarchive.so.
6724 (let ((libarchive (assoc-ref inputs "libarchive")))
6725 (substitute* "libarchive/ffi.py"
6726 (("find_library\\('archive'\\)")
6727 (string-append "'" libarchive
b41a05ce 6728 "/lib/libarchive.so'")))))))))
d96034ed 6729 (inputs
f3b98f4f 6730 `(("libarchive" ,libarchive)))
d96034ed
LC
6731 (home-page "https://github.com/Changaco/python-libarchive-c")
6732 (synopsis "Python interface to libarchive")
6733 (description
6734 "This package provides Python bindings to libarchive, a C library to
6735access possibly compressed archives in many different formats. It uses
6736Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6737 (license license:lgpl2.0+)))
d96034ed
LC
6738
6739(define-public python2-libarchive-c
6740 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6741
6742(define-public python-file
6743 (package
6744 (inherit file)
6745 (name "python-file")
7ffa5d4a
LF
6746 (source (origin
6747 (inherit (package-source file))
6748 ;; This patch should not be applied to python2-file.
6749 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6750 (build-system python-build-system)
6751 (arguments
6752 '(#:tests? #f ;no tests
00bf74be 6753 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6754 #:phases (modify-phases %standard-phases
6755 (add-before 'build 'change-directory
6756 (lambda _
6757 (chdir "python")
6758 #t))
6759 (add-before 'build 'set-library-file-name
6760 (lambda* (#:key inputs #:allow-other-keys)
6761 (let ((file (assoc-ref inputs "file")))
6762 (substitute* "magic.py"
6763 (("find_library\\('magic'\\)")
6764 (string-append "'" file "/lib/libmagic.so'")))
6765 #t))))))
6766 (inputs `(("file" ,file)))
6767 (self-native-input? #f)
daeeea71
CM
6768 (synopsis "Python bindings to the libmagic file type guesser. Note that
6769this module and the python-magic module both provide a \"magic.py\" file;
6770these two modules, which are different and were developed separately, both
f210e944 6771serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6772
6773(define-public python2-file
f210e944 6774 (package-with-python2 python-file))
85d4aeac
LC
6775
6776(define-public python-debian
6777 (package
6778 (name "python-debian")
6779 (version "0.1.23")
6780 (source
6781 (origin
6782 (method url-fetch)
6783 (uri (string-append
6784 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6785 version ".tar.gz"))
6786 (sha256
6787 (base32
6788 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6789 (build-system python-build-system)
f22efa01 6790 (propagated-inputs
85d4aeac 6791 `(("python-six" ,python-six)))
85d4aeac
LC
6792 (home-page "http://packages.debian.org/sid/python-debian")
6793 (synopsis "Debian package related modules")
6794 (description
5c7bdc9a
LC
6795 ;; XXX: Use @enumerate instead of @itemize to work around
6796 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6797 "This package provides Python modules that abstract many formats of
6798Debian-related files, such as:
6799
5c7bdc9a 6800@enumerate
85d4aeac
LC
6801@item Debtags information;
6802@item @file{debian/changelog} files;
6803@item packages files, pdiffs;
6804@item control files of single or multiple RFC822-style paragraphs---e.g.
6805 @file{debian/control}, @file{.changes}, @file{.dsc};
6806@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6807 contained files and meta-information.
5c7bdc9a 6808@end enumerate\n")
85d4aeac
LC
6809
6810 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6811 (license license:gpl3+)))
85d4aeac
LC
6812
6813(define-public python2-debian
6814 (package-with-python2 python-debian))
816a6538 6815
2d321bb2
RW
6816(define-public python-nbformat
6817 (package
6818 (name "python-nbformat")
6819 (version "4.1.0")
6820 (source
6821 (origin
6822 (method url-fetch)
6823 (uri (pypi-uri "nbformat" version))
6824 (sha256
6825 (base32
6826 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6827 (build-system python-build-system)
6828 (arguments `(#:tests? #f)) ; no test target
6829 (propagated-inputs
6830 `(("python-ipython-genutils" ,python-ipython-genutils)
6831 ("python-jsonschema" ,python-jsonschema)
6832 ("python-jupyter-core" ,python-jupyter-core)
6833 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6834 (home-page "http://jupyter.org")
6835 (synopsis "Jupyter Notebook format")
6836 (description "This package provides the reference implementation of the
6837Jupyter Notebook format and Python APIs for working with notebooks.")
6838 (license license:bsd-3)))
6839
6840(define-public python2-nbformat
6841 (package-with-python2 python-nbformat))
6842
55436048
RW
6843(define-public python-bleach
6844 (package
6845 (name "python-bleach")
6846 (version "1.4.3")
6847 (source
6848 (origin
6849 (method url-fetch)
6850 (uri (pypi-uri "bleach" version))
6851 (sha256
6852 (base32
6853 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6854 (build-system python-build-system)
6855 (propagated-inputs
6856 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6857 ("python-six" ,python-six)))
6858 (native-inputs
6859 `(("python-nose" ,python-nose)))
6860 (home-page "http://github.com/jsocol/bleach")
6861 (synopsis "Whitelist-based HTML-sanitizing tool")
6862 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6863 (license license:asl2.0)))
6864
6865(define-public python2-bleach
6866 (package-with-python2 python-bleach))
6867
60590a3a
RW
6868(define-public python-entrypoints
6869 (package
6870 (name "python-entrypoints")
6871 (version "0.2.2")
6872 (source
6873 (origin
6874 (method url-fetch)
6875 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6876 version ".tar.gz"))
6877 (file-name (string-append name "-" version ".tar.gz"))
6878 (sha256
6879 (base32
6880 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6881 (build-system python-build-system)
6882 ;; The package does not come with a setup.py file, so we have to generate
6883 ;; one ourselves.
6884 (arguments
6885 `(#:tests? #f
6886 #:phases
6887 (modify-phases %standard-phases
6888 (add-after 'unpack 'create-setup.py
6889 (lambda _
6890 (call-with-output-file "setup.py"
6891 (lambda (port)
6892 (format port "\
6893from setuptools import setup
6894setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6895" ,version))))))))
6896 (home-page "https://github.com/takluyver/entrypoints")
6897 (synopsis "Discover and load entry points from installed Python packages")
6898 (description "Entry points are a way for Python packages to advertise
6899objects with some common interface. The most common examples are
6900@code{console_scripts} entry points, which define shell commands by
6901identifying a Python function to run. The @code{entrypoints} module contains
6902functions to find and load entry points.")
6903 (license license:expat)))
6904
6905(define-public python2-entrypoints
6906 (package-with-python2 python-entrypoints))
6907
c60898a8
RW
6908(define-public python-nbconvert
6909 (package
6910 (name "python-nbconvert")
6911 (version "5.0.0b1")
6912 (source
6913 (origin
6914 (method url-fetch)
6915 (uri (pypi-uri "nbconvert" version))
6916 (sha256
6917 (base32
6918 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6919 (build-system python-build-system)
497355dc
MB
6920 (arguments
6921 `(;; The "bdist_egg" target is disabled by default, causing the installation
6922 ;; to fail.
6923 #:configure-flags (list "bdist_egg")
6924 ;; FIXME: 5 failures, 40 errors.
6925 #:tests? #f))
6926 ;; #:phases
6927 ;; (modify-phases %standard-phases
6928 ;; (replace 'check
6929 ;; (lambda _
6930 ;; (zero? (system* "py.test" "-v")))))
6931 (native-inputs
6932 `(("python-pytest" ,python-pytest)))
c60898a8
RW
6933 (propagated-inputs
6934 `(("python-bleach" ,python-bleach)
6935 ("python-entrypoints" ,python-entrypoints)
6936 ("python-jinja2" ,python-jinja2)
6937 ("python-jupyter-core" ,python-jupyter-core)
6938 ("python-mistune" ,python-mistune)
6939 ("python-nbformat" ,python-nbformat)
6940 ("python-pygments" ,python-pygments)
c60898a8
RW
6941 ("python-traitlets" ,python-traitlets)))
6942 (home-page "http://jupyter.org")
6943 (synopsis "Converting Jupyter Notebooks")
6944 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6945notebooks to various other formats via Jinja templates. It allows you to
6946convert an @code{.ipynb} notebook file into various static formats including:
6947
6948@enumerate
6949@item HTML
6950@item LaTeX
6951@item PDF
6952@item Reveal JS
6953@item Markdown (md)
6954@item ReStructured Text (rst)
6955@item executable script
6956@end enumerate\n")
6957 (license license:bsd-3)))
6958
6959(define-public python2-nbconvert
6960 (package-with-python2 python-nbconvert))
6961
a0d62280
RW
6962(define-public python-notebook
6963 (package
6964 (name "python-notebook")
6965 (version "4.2.3")
6966 (source (origin
6967 (method url-fetch)
6968 (uri (pypi-uri "notebook" version))
6969 (sha256
6970 (base32
6971 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6972 (build-system python-build-system)
6973 (arguments
6974 `(#:phases
6975 (modify-phases %standard-phases
6976 (replace 'check
6977 (lambda _
6978 ;; HOME must be set for tests
6979 (setenv "HOME" "/tmp")
6980 (zero? (system* "nosetests")))))))
6981 (propagated-inputs
6982 `(("python-jupyter-core" ,python-jupyter-core)
6983 ("python-nbformat" ,python-nbformat)
6984 ("python-nbconvert" ,python-nbconvert)
6985 ("python-ipython" ,python-ipython)))
6986 (native-inputs
6987 `(("python-nose" ,python-nose)
6988 ("python-sphinx" ,python-sphinx)
6989 ("python-requests" ,python-requests)))
6990 (home-page "http://jupyter.org/")
6991 (synopsis "Web-based notebook environment for interactive computing")
6992 (description
6993 "The Jupyter HTML notebook is a web-based notebook environment for
6994interactive computing.")
3a735ecf 6995 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
6996 (license license:bsd-3)))
6997
6998(define-public python2-notebook
3a735ecf
HG
6999 (let ((base (package-with-python2
7000 (strip-python2-variant python-notebook))))
7001 (package (inherit base)
7002 (native-inputs
7003 `(("python2-mock" ,python2-mock)
7004 ,@(package-native-inputs base)))
7005 (arguments
7006 (substitute-keyword-arguments (package-arguments base)
7007 ((#:phases phases)
7008 `(modify-phases ,phases
7009 (add-before 'check 'disable-test-case
7010 ;; The test requires network access to localhost. Curiously it
7011 ;; fails with Python 2 only. Simply make the test-case return
7012 ;; immediately.
7013 (lambda _
7014 (substitute*
7015 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7016 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7017
d55724ed
RW
7018(define-public python-widgetsnbextension
7019 (package
7020 (name "python-widgetsnbextension")
7021 (version "1.2.6")
7022 (source
7023 (origin
7024 (method url-fetch)
7025 (uri (pypi-uri "widgetsnbextension" version))
7026 (sha256
7027 (base32
7028 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7029 (build-system python-build-system)
7030 (propagated-inputs
7031 `(("python-notebook" ,python-notebook)))
7032 (native-inputs
f3b98f4f 7033 `(("python-nose" ,python-nose)))
d55724ed
RW
7034 (home-page "http://ipython.org")
7035 (synopsis "IPython HTML widgets for Jupyter")
7036 (description "This package provides interactive HTML widgets for Jupyter
7037notebooks.")
7038 (license license:bsd-3)))
7039
7040(define-public python2-widgetsnbextension
7041 (package-with-python2 python-widgetsnbextension))
7042
4fe2e344
RW
7043(define-public python-ipywidgets
7044 (package
7045 (name "python-ipywidgets")
7046 (version "5.2.2")
7047 (source
7048 (origin
7049 (method url-fetch)
7050 (uri (pypi-uri "ipywidgets" version))
7051 (sha256
7052 (base32
7053 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7054 (build-system python-build-system)
7055 ;; FIXME: it's not clear how to run the tests.
7056 (arguments `(#:tests? #f))
7057 (propagated-inputs
7058 `(("python-ipykernel" ,python-ipykernel)
7059 ("python-ipython" ,python-ipython)
4fe2e344
RW
7060 ("python-traitlets" ,python-traitlets)
7061 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7062 (home-page "http://ipython.org")
7063 (synopsis "IPython HTML widgets for Jupyter")
7064 (description "Ipywidgets are interactive HTML widgets for Jupyter
7065notebooks and the IPython kernel. Notebooks come alive when interactive
7066widgets are used. Users gain control of their data and can visualize changes
7067in the data.")
7068 (license license:bsd-3)))
7069
7070(define-public python2-ipywidgets
7071 (package-with-python2 python-ipywidgets))
7072
8ceebf8f
RW
7073(define-public python-jupyter-console
7074 (package
7075 (name "python-jupyter-console")
7076 (version "5.0.0")
7077 (source
7078 (origin
7079 (method url-fetch)
7080 (uri (pypi-uri "jupyter_console" version))
7081 (sha256
7082 (base32
7083 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7084 (build-system python-build-system)
7085 ;; FIXME: it's not clear how to run the tests.
7086 (arguments `(#:tests? #f))
7087 (propagated-inputs
7088 `(("python-ipykernel" ,python-ipykernel)
7089 ("python-ipython" ,python-ipython)
7090 ("python-jupyter-client" ,python-jupyter-client)
7091 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7092 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7093 (home-page "https://jupyter.org")
7094 (synopsis "Jupyter terminal console")
7095 (description "This package provides a terminal-based console frontend for
7096Jupyter kernels. It also allows for console-based interaction with non-Python
7097Jupyter kernels such as IJulia and IRKernel.")
7098 (license license:bsd-3)))
7099
7100(define-public python2-jupyter-console
7101 (package-with-python2 python-jupyter-console))
7102
c27ae827
RW
7103(define-public jupyter
7104 (package
7105 (name "jupyter")
7106 (version "1.0.0")
7107 (source
7108 (origin
7109 (method url-fetch)
7110 (uri (pypi-uri "jupyter" version))
7111 (sha256
7112 (base32
7113 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7114 (build-system python-build-system)
7115 ;; FIXME: it's not clear how to run the tests.
7116 (arguments `(#:tests? #f))
7117 (propagated-inputs
7118 `(("python-ipykernel" ,python-ipykernel)
7119 ("python-ipywidgets" ,python-ipywidgets)
7120 ("python-jupyter-console" ,python-jupyter-console)
7121 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7122 ("python-notebook" ,python-notebook)))
c27ae827
RW
7123 (home-page "http://jupyter.org")
7124 (synopsis "Web application for interactive documents")
7125 (description
7126 "The Jupyter Notebook is a web application that allows you to create and
7127share documents that contain live code, equations, visualizations and
7128explanatory text. Uses include: data cleaning and transformation, numerical
7129simulation, statistical modeling, machine learning and much more.")
7130 (license license:bsd-3)))
7131
816a6538
LC
7132(define-public python-chardet
7133 (package
7134 (name "python-chardet")
7135 (version "2.3.0")
7136 (source
7137 (origin
7138 (method url-fetch)
7139 (uri (string-append
7140 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7141 version
7142 ".tar.gz"))
7143 (sha256
7144 (base32
7145 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7146 (build-system python-build-system)
816a6538
LC
7147 (home-page "https://github.com/chardet/chardet")
7148 (synopsis "Universal encoding detector for Python 2 and 3")
7149 (description
7150 "This package provides @code{chardet}, a Python module that can
7151automatically detect a wide range of file encodings.")
3f641af0 7152 (license license:lgpl2.1+)))
816a6538
LC
7153
7154(define-public python2-chardet
7155 (package-with-python2 python-chardet))
2fc5f186 7156
1872f1bb
KM
7157(define-public python-docopt
7158 (package
7159 (name "python-docopt")
7160 (version "0.6.2")
7161 (source
7162 (origin
7163 (method url-fetch)
7164 ;; The release on PyPI does not include tests.
7165 (uri (string-append
7166 "https://github.com/docopt/docopt/archive/"
7167 version ".tar.gz"))
7168 (file-name (string-append name "-" version ".tar.gz"))
7169 (sha256
7170 (base32
7171 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7172 (build-system python-build-system)
7173 (native-inputs
f3b98f4f 7174 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7175 (arguments
7176 `(#:phases (alist-replace
7177 'check
7178 (lambda _ (zero? (system* "py.test")))
7179 %standard-phases)))
7180 (home-page "http://docopt.org")
7181 (synopsis "Command-line interface description language for Python")
7182 (description "This library allows the user to define a command-line
7183interface from a program's help message rather than specifying it
7184programatically with command-line parsers like @code{getopt} and
7185@code{argparse}.")
7186 (license license:expat)))
7187
7188(define-public python2-docopt
7189 (package-with-python2 python-docopt))
7190
2fc5f186
LF
7191(define-public python-zope-event
7192 (package
7193 (name "python-zope-event")
7194 (version "4.1.0")
7195 (source
7196 (origin
7197 (method url-fetch)
7198 (uri (string-append "https://pypi.python.org/packages/source/z"
7199 "/zope.event/zope.event-" version ".tar.gz"))
7200 (sha256
7201 (base32
7202 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7203 (build-system python-build-system)
2fc5f186
LF
7204 (home-page "http://pypi.python.org/pypi/zope.event")
7205 (synopsis "Event publishing system for Python")
7206 (description "Zope.event provides an event publishing API, intended for
7207use by applications which are unaware of any subscribers to their events. It
7208is a simple event-dispatching system on which more sophisticated event
7209dispatching systems can be built.")
3f641af0 7210 (license license:zpl2.1)))
2fc5f186
LF
7211
7212(define-public python2-zope-event
7213 (package-with-python2 python-zope-event))
97abe268
LF
7214
7215(define-public python-zope-interface
7216 (package
7217 (name "python-zope-interface")
7218 (version "4.1.3")
7219 (source
7220 (origin
7221 (method url-fetch)
7222 (uri (string-append "https://pypi.python.org/packages/source/z"
7223 "/zope.interface/zope.interface-" version ".tar.gz"))
7224 (sha256
7225 (base32
7226 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7227 (build-system python-build-system)
38d480a8 7228 (native-inputs
97abe268
LF
7229 `(("python-zope-event" ,python-zope-event)))
7230 (home-page "https://github.com/zopefoundation/zope.interface")
7231 (synopsis "Python implementation of the \"design by contract\"
7232methodology")
7233 (description "Zope.interface provides an implementation of \"object
7234interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7235conforming to a given API or contract.")
3f641af0 7236 (license license:zpl2.1)))
97abe268
LF
7237
7238(define-public python2-zope-interface
7239 (package-with-python2 python-zope-interface))
81f2373c
LF
7240
7241(define-public python-zope-exceptions
7242 (package
7243 (name "python-zope-exceptions")
7244 (version "4.0.8")
7245 (source
7246 (origin
7247 (method url-fetch)
7248 (uri (string-append "https://pypi.python.org/packages/source/z"
7249 "/zope.exceptions/zope.exceptions-"
7250 version ".tar.gz"))
7251 (sha256
7252 (base32
7253 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7254 (build-system python-build-system)
7255 (arguments
7256 '(#:tests? #f)) ; circular dependency with zope.testrunner
7257 (propagated-inputs
7258 `(("python-zope-interface" ,python-zope-interface)))
7259 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7260 (synopsis "Zope exceptions")
7261 (description "Zope.exceptions provides general-purpose exception types
7262that have uses outside of the Zope framework.")
3f641af0 7263 (license license:zpl2.1)))
81f2373c
LF
7264
7265(define-public python2-zope-exceptions
7266 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7267
7268(define-public python-zope-testing
7269 (package
7270 (name "python-zope-testing")
7271 (version "4.5.0")
7272 (source
7273 (origin
7274 (method url-fetch)
7275 (uri (string-append "https://pypi.python.org/packages/source/z"
7276 "/zope.testing/zope.testing-" version ".tar.gz"))
7277 (sha256
7278 (base32
b02f7a21
HG
7279 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7280 (modules '((guix build utils)))
7281 (snippet
7282 '(begin
7283 ;; Remove pre-compiled .pyc files backup files from source.
7284 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7285 #t))))
900e3c0e
LF
7286 (build-system python-build-system)
7287 (native-inputs
7288 `(("python-zope-exceptions" ,python-zope-exceptions)))
7289 (propagated-inputs
7290 `(("python-zope-interface" ,python-zope-interface)))
7291 (home-page "http://pypi.python.org/pypi/zope.testing")
7292 (synopsis "Zope testing helpers")
7293 (description "Zope.testing provides a number of testing utilities for HTML
7294forms, HTTP servers, regular expressions, and more.")
3f641af0 7295 (license license:zpl2.1)))
900e3c0e
LF
7296
7297(define-public python2-zope-testing
7298 (package-with-python2 python-zope-testing))
01614c4f
LF
7299
7300(define-public python-zope-testrunner
7301 (package
7302 (name "python-zope-testrunner")
7303 (version "4.4.9")
7304 (source
7305 (origin
7306 (method url-fetch)
7307 (uri (string-append "https://pypi.python.org/packages/source/z"
7308 "/zope.testrunner/zope.testrunner-"
7309 version ".zip"))
7310 (sha256
7311 (base32
7312 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7313 (build-system python-build-system)
7314 (native-inputs
7315 `(("python-six" ,python-six)
e408ffc3 7316 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7317 ("python-zope-exceptions" ,python-zope-exceptions)
7318 ("python-zope-testing" ,python-zope-testing)
7319 ("unzip" ,unzip)))
7320 (propagated-inputs
7321 `(("python-zope-interface" ,python-zope-interface)))
7322 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7323 (synopsis "Zope testrunner script")
7324 (description "Zope.testrunner provides a script for running Python
7325tests.")
3f641af0 7326 (license license:zpl2.1)))
01614c4f
LF
7327
7328(define-public python2-zope-testrunner
7329 (let ((base (package-with-python2 python-zope-testrunner)))
7330 (package
7331 (inherit base)
7332 (native-inputs
7333 (append (package-native-inputs base)
7334 `(("python2-subunit" ,python2-subunit)
7335 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7336
7337(define-public python-zope-i18nmessageid
7338 (package
7339 (name "python-zope-i18nmessageid")
7340 (version "4.0.3")
7341 (source
7342 (origin
7343 (method url-fetch)
7344 (uri (string-append
7345 "https://pypi.python.org/packages/source/z"
7346 "/zope.i18nmessageid/zope.i18nmessageid-"
7347 version ".tar.gz"))
7348 (sha256
7349 (base32
7350 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7351 (build-system python-build-system)
6a5c710c
LF
7352 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7353 (synopsis "Message identifiers for internationalization")
7354 (description "Zope.i18nmessageid provides facilities for declaring
7355internationalized messages within program source text.")
3f641af0 7356 (license license:zpl2.1)))
6a5c710c
LF
7357
7358(define-public python2-zope-i18nmessageid
7359 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7360
7361(define-public python-zope-schema
7362 (package
7363 (name "python-zope-schema")
7364 (version "4.4.2")
7365 (source
7366 (origin
7367 (method url-fetch)
7368 (uri (string-append "https://pypi.python.org/packages/source/z"
7369 "/zope.schema/zope.schema-" version ".tar.gz"))
7370 (sha256
7371 (base32
7372 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7373 (build-system python-build-system)
7374 (propagated-inputs
7375 `(("python-zope-event" ,python-zope-event)
2b9e4bea 7376 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
7377 ("python-zope-interface" ,python-zope-interface)))
7378 (native-inputs
47f77210
HG
7379 `(("python-zope-testing" ,python-zope-testing)
7380 ("python-coverage" ,python-coverage)
7381 ("python-nose" ,python-nose)))
71fb09f3
LF
7382 (home-page "http://pypi.python.org/pypi/zope.schema")
7383 (synopsis "Zope data schemas")
7384 (description "Zope.scheme provides extensions to zope.interface for
7385defining data schemas.")
3f641af0 7386 (license license:zpl2.1)))
71fb09f3
LF
7387
7388(define-public python2-zope-schema
7389 (package-with-python2 python-zope-schema))
fbac9b17
LF
7390
7391(define-public python-zope-configuration
7392 (package
7393 (name "python-zope-configuration")
7394 (version "4.0.3")
7395 (source (origin
7396 (method url-fetch)
7397 (uri (string-append "https://pypi.python.org/packages/source/z"
7398 "/zope.configuration/zope.configuration-"
7399 version ".tar.gz"))
7400 (sha256
7401 (base32
7402 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7403 (build-system python-build-system)
7404 (propagated-inputs
7405 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7406 ("python-zope-schema" ,python-zope-schema)))
7407 (home-page "http://pypi.python.org/pypi/zope.configuration")
7408 (synopsis "Zope Configuration Markup Language")
7409 (description "Zope.configuration implements ZCML, the Zope Configuration
7410Markup Language.")
3f641af0 7411 (license license:zpl2.1)))
fbac9b17
LF
7412
7413(define-public python2-zope-configuration
7414 (package-with-python2 python-zope-configuration))
2ad52086
LF
7415
7416(define-public python-zope-proxy
7417 (package
7418 (name "python-zope-proxy")
7419 (version "4.1.6")
7420 (source
7421 (origin
7422 (method url-fetch)
7423 (uri (string-append "https://pypi.python.org/packages/source/z"
7424 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7425 (sha256
7426 (base32
7427 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7428 (build-system python-build-system)
7429 (propagated-inputs
7430 `(("python-zope-interface" ,python-zope-interface)))
7431 (home-page "http://pypi.python.org/pypi/zope.proxy")
7432 (synopsis "Generic, transparent proxies")
7433 (description "Zope.proxy provides generic, transparent proxies for Python.
7434Proxies are special objects which serve as mostly-transparent wrappers around
7435another object, intervening in the apparent behavior of the wrapped object
7436only when necessary to apply the policy (e.g., access checking, location
7437brokering, etc.) for which the proxy is responsible.")
3f641af0 7438 (license license:zpl2.1)))
2ad52086
LF
7439
7440(define-public python2-zope-proxy
7441 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7442
7443(define-public python-zope-location
7444 (package
7445 (name "python-zope-location")
7446 (version "4.0.3")
7447 (source
7448 (origin
7449 (method url-fetch)
7450 (uri (string-append "https://pypi.python.org/packages/source/z"
7451 "/zope.location/zope.location-" version ".tar.gz"))
7452 (sha256
7453 (base32
7454 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7455 (build-system python-build-system)
d27f176a 7456 (propagated-inputs
f404b5ea
LF
7457 `(("python-zope-proxy" ,python-zope-proxy)
7458 ("python-zope-schema" ,python-zope-schema)))
7459 (home-page "http://pypi.python.org/pypi/zope.location/")
7460 (synopsis "Zope location library")
7461 (description "Zope.location implements the concept of \"locations\" in
7462Zope3, which are are special objects that have a structural location.")
3f641af0 7463 (license license:zpl2.1)))
f404b5ea
LF
7464
7465(define-public python2-zope-location
7466 (package-with-python2 python-zope-location))
d4b77f36
LF
7467
7468(define-public python-zope-security
7469 (package
7470 (name "python-zope-security")
7471 (version "4.0.3")
7472 (source
7473 (origin
7474 (method url-fetch)
7475 (uri (string-append "https://pypi.python.org/packages/source/z"
7476 "/zope.security/zope.security-" version ".tar.gz"))
7477 (sha256
7478 (base32
7479 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7480 (build-system python-build-system)
7481 (propagated-inputs
7482 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7483 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7
HG
7484 ("python-zope-schema" ,python-zope-schema)))
7485 (native-inputs
7486 `(("python-zope-component" ,python-zope-component)
7487 ("python-zope-configuration" ,python-zope-configuration)
7488 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7489 ("python-zope-testrunner" ,python-zope-testrunner)
7490 ("python-zope-testing" ,python-zope-testing)))
7491 (home-page "http://pypi.python.org/pypi/zope.security")
7492 (synopsis "Zope security framework")
7493 (description "Zope.security provides a generic mechanism to implement
7494security policies on Python objects.")
3f641af0 7495 (license license:zpl2.1)))
d4b77f36
LF
7496
7497(define-public python2-zope-security
04417662
EF
7498 (let ((zope-security (package-with-python2 python-zope-security)))
7499 (package (inherit zope-security)
7500 (propagated-inputs
7501 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7502 ,@(alist-delete
7503 "python-zope-testrunner"
7504 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7505
7506(define-public python-zope-component
7507 (package
7508 (name "python-zope-component")
7509 (version "4.2.2")
7510 (source
7511 (origin
7512 (method url-fetch)
7513 (uri (string-append "https://pypi.python.org/packages/source/z"
7514 "/zope.component/zope.component-" version ".tar.gz"))
7515 (sha256
7516 (base32
7517 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7518 (build-system python-build-system)
7519 (arguments
7520 ;; Skip tests due to circular dependency with python-zope-security.
7521 '(#:tests? #f))
7522 (native-inputs
7523 `(("python-zope-testing" ,python-zope-testing)))
7524 (propagated-inputs
7525 `(("python-zope-event" ,python-zope-event)
7526 ("python-zope-interface" ,python-zope-interface)
7527 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7528 ("python-zope-configuration" ,python-zope-configuration)))
7529 (home-page "https://github.com/zopefoundation/zope.component")
7530 (synopsis "Zope Component Architecture")
7531 (description "Zope.component represents the core of the Zope Component
7532Architecture. Together with the zope.interface package, it provides
7533facilities for defining, registering and looking up components.")
3f641af0 7534 (license license:zpl2.1)))
a6b61b27
LF
7535
7536(define-public python2-zope-component
7537 (package-with-python2 python-zope-component))
3859ac12 7538
1ae44b80 7539(define-public python-pythondialog
b5f218be 7540 (package
1ae44b80 7541 (name "python-pythondialog")
42c4b246 7542 (version "3.4.0")
b5f218be
LF
7543 (source
7544 (origin
7545 (method url-fetch)
1ae44b80 7546 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7547 (sha256
7548 (base32
1ae44b80 7549 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7550 (build-system python-build-system)
7551 (arguments
7552 `(#:phases
7553 (modify-phases %standard-phases
7554 (add-after 'unpack 'patch-path
7555 (lambda* (#:key inputs #:allow-other-keys)
7556 (let* ((dialog (assoc-ref inputs "dialog")))
7557 ;; Since this library really wants to grovel the search path, we
7558 ;; must hardcode dialog's store path into it.
7559 (substitute* "dialog.py"
7560 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7561 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7562 #t))))
b5f218be
LF
7563 #:tests? #f)) ; no test suite
7564 (propagated-inputs
7565 `(("dialog" ,dialog)))
7566 (home-page "http://pythondialog.sourceforge.net/")
7567 (synopsis "Python interface to the UNIX dialog utility")
7568 (description "A Python wrapper for the dialog utility. Its purpose is to
7569provide an easy to use, pythonic and comprehensive Python interface to dialog.
7570This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7571 (license license:lgpl2.1)
1ae44b80
LF
7572 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7573
7574(define-public python2-pythondialog
7575 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7576 (package
7577 (inherit base)
7578 (version (package-version python-pythondialog))
7579 (source (origin
7580 (method url-fetch)
7581 (uri (pypi-uri "python2-pythondialog" version))
7582 (sha256
7583 (base32
7584 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7585
3859ac12
LF
7586(define-public python-pyrfc3339
7587 (package
7588 (name "python-pyrfc3339")
d9aa097b 7589 (version "1.0")
3859ac12
LF
7590 (source
7591 (origin
7592 (method url-fetch)
d9aa097b 7593 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7594 (sha256
7595 (base32
d9aa097b 7596 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7597 (build-system python-build-system)
7598 (propagated-inputs
7599 `(("python-pytz" ,python-pytz)))
7600 (native-inputs
f3b98f4f 7601 `(("python-nose" ,python-nose)))
3859ac12
LF
7602 (home-page "https://github.com/kurtraschke/pyRFC3339")
7603 (synopsis "Python timestamp library")
7604 (description "Python library for generating and parsing RFC 3339-compliant
7605timestamps.")
7606 (license license:expat)))
7607
7608(define-public python2-pyrfc3339
7609 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7610
7611(define-public python-werkzeug
7612 (package
7613 (name "python-werkzeug")
0580e383 7614 (version "0.11.11")
5eea2005
LF
7615 (source
7616 (origin
7617 (method url-fetch)
4b47cbfa 7618 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7619 (sha256
7620 (base32
0580e383 7621 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7622 (build-system python-build-system)
7623 (native-inputs
7624 `(("python-pytest" ,python-pytest)))
7625 (home-page "http://werkzeug.pocoo.org/")
7626 (synopsis "Utilities for WSGI applications")
7627 (description "One of the most advanced WSGI utility modules. It includes a
7628powerful debugger, full-featured request and response objects, HTTP utilities to
7629handle entity tags, cache control headers, HTTP dates, cookie handling, file
7630uploads, a powerful URL routing system and a bunch of community-contributed
7631addon modules.")
3f641af0 7632 (license license:x11)))
5eea2005
LF
7633
7634(define-public python2-werkzeug
7635 (package-with-python2 python-werkzeug))
99fffa8a
LF
7636
7637(define-public python-configobj
7638 (package
7639 (name "python-configobj")
7640 (version "5.0.6")
7641 (source (origin
7642 (method url-fetch)
7643 (uri (string-append
7644 "https://pypi.python.org/packages/source/c/configobj/"
7645 "configobj-" version ".tar.gz"))
7646 (sha256
7647 (base32
7648 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7649 ;; Patch setup.py so it looks for python-setuptools, which is
7650 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7651 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7652 (build-system python-build-system)
861f70c9 7653 (propagated-inputs
f3b98f4f 7654 `(("python-six" ,python-six)))
99fffa8a
LF
7655 (synopsis "Config file reading, writing and validation")
7656 (description "ConfigObj is a simple but powerful config file reader and
7657writer: an ini file round tripper. Its main feature is that it is very easy to
7658use, with a straightforward programmer’s interface and a simple syntax for
7659config files.")
7660 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7661 (license license:bsd-3)))
99fffa8a
LF
7662
7663(define-public python2-configobj
7664 (package-with-python2 python-configobj))
79e8a291
LF
7665
7666(define-public python-configargparse
7667 (package
7668 (name "python-configargparse")
7669 (version "0.10.0")
7670 (source (origin
7671 (method url-fetch)
7672 (uri (string-append
7673 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7674 "ConfigArgParse-" version ".tar.gz"))
7675 (sha256
7676 (base32
7677 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7678 (build-system python-build-system)
7679 (arguments
7680 ;; FIXME: Bug in test suite filed upstream:
7681 ;; https://github.com/bw2/ConfigArgParse/issues/32
7682 '(#:tests? #f))
7683 (synopsis "Replacement for argparse")
7684 (description "A drop-in replacement for argparse that allows options to also
7685be set via config files and/or environment variables.")
7686 (home-page "https://github.com/bw2/ConfigArgParse")
7687 (license license:expat)))
7688
7689(define-public python2-configargparse
7690 (package-with-python2 python-configargparse))
ab41f979
LF
7691
7692(define-public python-ndg-httpsclient
7693 (package
7694 (name "python-ndg-httpsclient")
7695 (version "0.4.0")
7696 (source (origin
7697 (method url-fetch)
7698 (uri (string-append
7699 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7700 "ndg_httpsclient-" version ".tar.gz"))
7701 (sha256
7702 (base32
7703 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7704 (build-system python-build-system)
a39cc016
LF
7705 (arguments
7706 '(;; The tests appear to require networking.
7707 #:tests? #f))
ab41f979
LF
7708 (propagated-inputs
7709 `(("python-pyopenssl" ,python-pyopenssl)))
7710 (synopsis "HTTPS support for Python's httplib and urllib2")
7711 (description "This is a HTTPS client implementation for httplib and urllib2
7712based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7713over the default provided with Python and importantly enables full verification
7714of the SSL peer.")
7715 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7716 (license license:bsd-3)))
ab41f979
LF
7717
7718;; python2-openssl requires special care, so package-with-python2 is
7719;; insufficient.
7720(define-public python2-ndg-httpsclient
7721 (package (inherit python-ndg-httpsclient)
7722 (name "python2-ndg-httpsclient")
7723 (arguments `(#:python ,python-2))
7724 (propagated-inputs
7725 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7726
7727(define-public python-contextlib2
7728 (package
7729 (name "python-contextlib2")
7730 (version "0.4.0")
7731 (source
7732 (origin
7733 (method url-fetch)
7734 (uri (pypi-uri "contextlib2" version))
7735 (sha256
7736 (base32
7737 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7738 (build-system python-build-system)
7739 (arguments
7740 `(#:phases
7741 (modify-phases %standard-phases
7742 (replace 'check
7743 (lambda _ (zero?
7744 (system*
b3546174 7745 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7746 (home-page "http://contextlib2.readthedocs.org/")
7747 (synopsis "Tools for decorators and context managers")
7748 (description "This module is primarily a backport of the Python
77493.2 contextlib to earlier Python versions. Like contextlib, it
7750provides utilities for common tasks involving decorators and context
7751managers. It also contains additional features that are not part of
7752the standard library.")
3f641af0 7753 (license license:psfl)))
03f964a5
CM
7754
7755(define-public python2-contextlib2
7756 (package-with-python2 python-contextlib2))
210bf497
DT
7757
7758(define-public python-texttable
7759 (package
7760 (name "python-texttable")
7761 (version "0.8.4")
7762 (source
7763 (origin
7764 (method url-fetch)
7765 (uri (pypi-uri "texttable" version))
7766 (sha256
7767 (base32
7768 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7769 (build-system python-build-system)
7770 (arguments '(#:tests? #f)) ; no tests
7771 (home-page "https://github.com/foutaise/texttable/")
7772 (synopsis "Python module for creating simple ASCII tables")
7773 (description "Texttable is a Python module for creating simple ASCII
7774tables.")
3f641af0 7775 (license license:lgpl2.1+)))
210bf497
DT
7776
7777(define-public python2-texttable
7778 (package-with-python2 python-texttable))
67c52bb3
DT
7779
7780(define-public python-websocket-client
7781 (package
7782 (name "python-websocket-client")
6b810897 7783 (version "0.37.0")
67c52bb3
DT
7784 (source
7785 (origin
7786 (method url-fetch)
6b810897 7787 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7788 (sha256
7789 (base32
6b810897 7790 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7791 (build-system python-build-system)
a5333f7c
HG
7792 (propagated-inputs
7793 `(("python-six" ,python-six)))
67c52bb3
DT
7794 (home-page "https://github.com/liris/websocket-client")
7795 (synopsis "WebSocket client for Python")
7796 (description "The Websocket-client module provides the low level APIs for
7797WebSocket usage in Python programs.")
3f641af0 7798 (license license:lgpl2.1+)))
67c52bb3
DT
7799
7800(define-public python2-websocket-client
7801 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7802
7803(define-public python-atomicwrites
7804 (package
7805 (name "python-atomicwrites")
4e92d76a 7806 (version "1.1.0")
5c6eea2a
LF
7807 (source (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "atomicwrites" version))
7810 (sha256
7811 (base32
4e92d76a 7812 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7813 (build-system python-build-system)
7814 (synopsis "Atomic file writes in Python")
7815 (description "Library for atomic file writes using platform dependent tools
8f65585b 7816for atomic file system operations.")
5c6eea2a 7817 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7818 (license license:expat)))
9bb6d184
LF
7819
7820(define-public python2-atomicwrites
f210e944 7821 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7822
7823(define-public python-requests-toolbelt
7824 (package
7825 (name "python-requests-toolbelt")
c02af1c8 7826 (version "0.6.2")
561bb3cb
LF
7827 (source (origin
7828 (method url-fetch)
c02af1c8
LF
7829 (uri (string-append
7830 "https://pypi.python.org/packages/"
7831 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7832 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7833 (sha256
7834 (base32
c02af1c8 7835 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7836 (build-system python-build-system)
759aadd4
LF
7837 (native-inputs
7838 `(("python-betamax" ,python-betamax)
7839 ("python-mock" ,python-mock)
7840 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7841 (propagated-inputs
7842 `(("python-requests" ,python-requests)))
7843 (synopsis "Extensions to python-requests")
7844 (description "This is a toolbelt of useful classes and functions to be used
7845with python-requests.")
7846 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7847 (license license:asl2.0)))
d1deb90b
LF
7848
7849(define-public python-click-threading
7850 (package
7851 (name "python-click-threading")
3d2e0dbc 7852 (version "0.2.0")
d1deb90b
LF
7853 (source (origin
7854 (method url-fetch)
3d2e0dbc
LF
7855 (uri (string-append
7856 "https://pypi.python.org/packages/"
7857 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7858 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7859 (sha256
7860 (base32
3d2e0dbc 7861 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7862 (build-system python-build-system)
7863 (propagated-inputs
7864 `(("python-click" ,python-click)))
7865 (synopsis "Utilities for multithreading in Click")
7866 (description "This package provides utilities for multithreading in Click
7867applications.")
7868 (home-page "https://github.com/click-contrib/click-threading")
7869 (license license:expat)))
7b17cab9
LF
7870
7871(define-public python-click-log
7872 (package
7873 (name "python-click-log")
a9da8fec 7874 (version "0.1.3")
7b17cab9
LF
7875 (source (origin
7876 (method url-fetch)
7877 (uri (pypi-uri "click-log" version))
7878 (sha256
7879 (base32
a9da8fec 7880 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7881 (build-system python-build-system)
7882 (propagated-inputs
7883 `(("python-click" ,python-click)))
7884 (synopsis "Logging for click applications")
7885 (description "This package provides a Python library for logging Click
7886applications.")
7887 (home-page "https://github.com/click-contrib/click-log")
7888 (license license:expat)))
7b3a4ee4
LF
7889
7890(define-public python-apipkg
7891 (package
7892 (name "python-apipkg")
7893 (version "1.4")
7894 (source (origin
7895 (method url-fetch)
7896 (uri (pypi-uri "apipkg" version))
7897 (sha256
7898 (base32
7899 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7900 (build-system python-build-system)
328bb95d 7901 (native-inputs
7b3a4ee4
LF
7902 `(("python-pytest" ,python-pytest)))
7903 (synopsis "Namespace control and lazy-import mechanism")
7904 (description "With apipkg you can control the exported namespace of a Python
7905package and greatly reduce the number of imports for your users. It is a small
7906pure Python module that works on virtually all Python versions.")
7907 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 7908 (license license:expat)))
e08739c3
CAW
7909
7910(define-public python2-apipkg
f210e944 7911 (package-with-python2 python-apipkg))
848964fe
LF
7912
7913(define-public python-execnet
7914 (package
7915 (name "python-execnet")
7916 (version "1.4.1")
7917 (source (origin
7918 (method url-fetch)
7919 (uri (pypi-uri "execnet" version))
7920 (sha256
7921 (base32
7922 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7923 (build-system python-build-system)
ca0eee9d
LF
7924 (arguments
7925 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7926 ;; The two test failures are caused by the lack of an `ssh` executable.
7927 ;; The test suite can be run with pytest after the 'install' phase.
7928 #:tests? #f))
848964fe 7929 (native-inputs
ca0eee9d
LF
7930 `(("python-pytest" ,python-pytest)
7931 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 7932 (propagated-inputs
848964fe
LF
7933 `(("python-apipkg" ,python-apipkg)))
7934 (synopsis "Rapid multi-Python deployment")
7935 (description "Execnet provides a share-nothing model with
7936channel-send/receive communication for distributing execution across many
7937Python interpreters across version, platform and network barriers. It has a
7938minimal and fast API targetting the following uses:
7939@enumerate
7940@item distribute tasks to (many) local or remote CPUs
7941@item write and deploy hybrid multi-process applications
7942@item write scripts to administer multiple environments
7943@end enumerate")
7944 (home-page "http://codespeak.net/execnet/")
f210e944 7945 (license license:expat)))
16c84f90
CAW
7946
7947(define-public python2-execnet
f210e944 7948 (package-with-python2 python-execnet))
6720dbb4
LF
7949
7950;;; The software provided by this package was integrated into pytest 2.8.
7951(define-public python-pytest-cache
7952 (package
7953 (name "python-pytest-cache")
7954 (version "1.0")
7955 (source (origin
7956 (method url-fetch)
7957 (uri (pypi-uri "pytest-cache" version))
7958 (sha256
7959 (base32
7960 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7961 (build-system python-build-system)
f22efa01 7962 (propagated-inputs
630d938f
EF
7963 `(("python-apipkg" ,python-apipkg)
7964 ("python-execnet" ,python-execnet)
7965 ("python-py" ,python-py)
7966 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7967 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7968 (description "The pytest-cache plugin provides tools to rerun failures from
7969the last py.test invocation.")
7970 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 7971 (license license:expat)))
0adc21c2
EF
7972
7973(define-public python2-pytest-cache
f210e944 7974 (package-with-python2 python-pytest-cache))
d7e729fe
LF
7975
7976(define-public python-pytest-localserver
7977 (package
7978 (name "python-pytest-localserver")
29f20168 7979 (version "0.3.5")
d7e729fe
LF
7980 (source (origin
7981 (method url-fetch)
29f20168 7982 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7983 (sha256
7984 (base32
29f20168 7985 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7986 (build-system python-build-system)
7987 (arguments
7988 `(#:phases (modify-phases %standard-phases
7989 (replace 'check
7990 (lambda _
7991 (zero? (system* "py.test" "--genscript=runtests.py"))
7992 (zero? (system* "py.test")))))))
7993 (native-inputs
d7e729fe
LF
7994 `(("python-pytest" ,python-pytest)
7995 ("python-requests" ,python-requests)
9ba40f05 7996 ("python-six" ,python-six)))
f22efa01 7997 (propagated-inputs
9ba40f05 7998 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7999 (synopsis "Py.test plugin to test server connections locally")
8000 (description "Pytest-localserver is a plugin for the pytest testing
8001framework which enables you to test server connections locally.")
8002 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8003 (license license:expat)))
28cecbb7
LF
8004
8005(define-public python-wsgi-intercept
8006 (package
8007 (name "python-wsgi-intercept")
909fbd2b 8008 (version "1.2.2")
28cecbb7
LF
8009 (source (origin
8010 (method url-fetch)
909fbd2b
LF
8011 (uri (string-append
8012 "https://pypi.python.org/packages/"
8013 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8014 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8015 (sha256
8016 (base32
909fbd2b 8017 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8018 (build-system python-build-system)
b9fc496f
HG
8019 (propagated-inputs
8020 `(("python-six" ,python-six)))
28cecbb7 8021 (native-inputs
9d813ec1 8022 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8023 ("python-httplib2" ,python-httplib2)
8024 ("python-requests" ,python-requests)
8757f050 8025 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8026 (synopsis "Puts a WSGI application in place of a real URI for testing")
8027 (description "Wsgi_intercept installs a WSGI application in place of a real
8028URI for testing. Testing a WSGI application normally involves starting a
8029server at a local host and port, then pointing your test code to that address.
8030Instead, this library lets you intercept calls to any specific host/port
8031combination and redirect them into a WSGI application importable by your test
8032program. Thus, you can avoid spawning multiple processes or threads to test
8033your Web app.")
8034 (home-page "https://github.com/cdent/wsgi-intercept")
8035 (license license:expat)))
89b8a551
LF
8036
8037(define-public python-pytest-xprocess
8038 (package
8039 (name "python-pytest-xprocess")
8040 (version "0.9.1")
8041 (source (origin
8042 (method url-fetch)
8043 (uri (pypi-uri "pytest-xprocess" version))
8044 (sha256
8045 (base32
8046 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8047 (build-system python-build-system)
8048 (propagated-inputs
8049 `(("python-pytest" ,python-pytest)
8050 ("python-pytest-cache" ,python-pytest-cache)
8051 ("python-psutil" ,python-psutil)))
8052 (synopsis "Pytest plugin to manage external processes across test runs")
8053 (description "Pytest-xprocess is an experimental py.test plugin for managing
8054processes across test runs.")
8055 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8056 (license license:expat)))
5c299bf0
LF
8057
8058(define-public python-icalendar
8059 (package
8060 (name "python-icalendar")
25291aca 8061 (version "3.11")
5c299bf0
LF
8062 (source (origin
8063 (method url-fetch)
8064 (uri (pypi-uri "icalendar" version))
8065 (sha256
8066 (base32
25291aca 8067 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8068 (build-system python-build-system)
8069 (propagated-inputs
8070 `(("python-dateutil-2" ,python-dateutil-2)
8071 ("python-pytz" ,python-pytz)))
8072 (synopsis "Python library for parsing iCalendar files")
8073 (description "The icalendar package is a parser/generator of iCalendar
8074files for use with Python.")
8075 (home-page "https://github.com/collective/icalendar")
3f641af0 8076 (license license:bsd-2)))
6bbbb53e
LF
8077
8078(define-public python-sphinxcontrib-newsfeed
8079 (package
8080 (name "python-sphinxcontrib-newsfeed")
8081 (version "0.1.4")
8082 (source (origin
8083 (method url-fetch)
8084 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8085 (sha256
8086 (base32
8087 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8088 (build-system python-build-system)
8089 (propagated-inputs
251ed7f2 8090 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8091 (synopsis "News Feed extension for Sphinx")
8092 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8093Blog, News or Announcements section to a Sphinx website.")
8094 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8095 (license license:bsd-2)))
2216e15c
SB
8096
8097(define-public python-args
8098 (package
8099 (name "python-args")
8100 (version "0.1.0")
8101 (source (origin
8102 (method url-fetch)
8103 (uri (pypi-uri "args" version))
8104 (sha256
8105 (base32
8106 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8107 (build-system python-build-system)
2216e15c
SB
8108 (home-page "https://github.com/kennethreitz/args")
8109 (synopsis "Command-line argument parser")
8110 (description
8111 "This library provides a Python module to parse command-line arguments.")
3f641af0 8112 (license license:bsd-3)))
2216e15c
SB
8113
8114(define-public python2-args
8115 (package-with-python2 python-args))
c06a3de9
SB
8116
8117(define-public python-clint
8118 (package
8119 (name "python-clint")
8120 (version "0.5.1")
8121 (source (origin
8122 (method url-fetch)
8123 (uri (pypi-uri "clint" version))
8124 (sha256
8125 (base32
8126 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8127 (build-system python-build-system)
6145b604
MB
8128 (arguments
8129 '(#:phases
8130 (modify-phases %standard-phases
8131 (replace 'check
8132 (lambda _
8133 (zero? (system* "py.test" "-v")))))))
8134 (native-inputs
8135 `(("python-pytest" ,python-pytest)))
f22efa01 8136 (propagated-inputs
f3b98f4f 8137 `(("python-args" ,python-args)))
c06a3de9
SB
8138 (home-page "https://github.com/kennethreitz/clint")
8139 (synopsis "Command-line interface tools")
8140 (description
8141 "Clint is a Python module filled with a set of tools for developing
8142command-line applications, including tools for colored and indented
8143output, progress bar display, and pipes.")
3f641af0 8144 (license license:isc)))
c06a3de9
SB
8145
8146(define-public python2-clint
8147 (package-with-python2 python-clint))
4ecdeef8
SB
8148
8149(define-public python-astor
8150 (package
8151 (name "python-astor")
8152 (version "0.5")
8153 (source (origin
8154 (method url-fetch)
8155 (uri (pypi-uri "astor" version))
8156 (sha256
8157 (base32
8158 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8159 (build-system python-build-system)
4ecdeef8
SB
8160 (home-page "https://github.com/berkerpeksag/astor")
8161 (synopsis "Read and write Python ASTs")
8162 (description
8163 "Astor is designed to allow easy manipulation of Python source via the
8164Abstract Syntax Tree.")
3f641af0 8165 (license license:bsd-3)))
4ecdeef8
SB
8166
8167(define-public python2-astor
8168 (package-with-python2 python-astor))
e224b7d0
SB
8169
8170(define-public python-rply
8171 (package
8172 (name "python-rply")
8173 (version "0.7.4")
8174 (source (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "rply" version))
8177 (sha256
8178 (base32
8179 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8180 (build-system python-build-system)
f22efa01 8181 (propagated-inputs
f3b98f4f 8182 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8183 (home-page "https://github.com/alex/rply")
8184 (synopsis "Parser generator for Python")
8185 (description
8186 "This package provides a pure Python based parser generator, that also
8187works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8188with a new public API, and RPython support.")
3f641af0 8189 (license license:bsd-3)))
e224b7d0
SB
8190
8191(define-public python2-rply
8192 (package-with-python2 python-rply))
c3e919d7
SB
8193
8194(define-public python-hy
8195 (package
8196 (name "python-hy")
8197 (version "0.11.1")
8198 (source (origin
8199 (method url-fetch)
8200 (uri (pypi-uri "hy" version))
8201 (sha256
8202 (base32
8203 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8204 (build-system python-build-system)
f22efa01 8205 (propagated-inputs
c3e919d7
SB
8206 `(("python-astor" ,python-astor)
8207 ("python-clint" ,python-clint)
f3b98f4f 8208 ("python-rply" ,python-rply)))
c3e919d7
SB
8209 (home-page "http://hylang.org/")
8210 (synopsis "Lisp frontend to Python")
8211 (description
8212 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8213its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8214Python at your fingertips, in Lisp form.")
8215 (license license:expat)))
8216
8217(define-public python2-hy
8218 (package-with-python2 python-hy))
7a5b944e 8219
81f7f297
EF
8220(define-public python-rauth
8221 (package
8222 (name "python-rauth")
8223 (version "0.7.2")
8224 (source
8225 (origin
8226 (method url-fetch)
8227 (uri (pypi-uri "rauth" version))
8228 (sha256
8229 (base32
8230 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8231 (build-system python-build-system)
8232 (arguments
8233 `(#:test-target "check"))
f22efa01 8234 (propagated-inputs
81f7f297
EF
8235 `(("python-requests" ,python-requests)))
8236 (home-page "https://github.com/litl/rauth")
8237 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8238 (description
8239 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8240provides service wrappers for convenient connection initialization and
8241authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8242 (license license:expat)
8243 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8244
8245(define-public python2-rauth
0848d8d3
EF
8246 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8247 (package
8248 (inherit base)
00e10c6e 8249 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8250 ,@(package-native-inputs base))))))
81f7f297 8251
1abe448d
EF
8252(define-public python2-functools32
8253 (package
8254 (name "python2-functools32")
8255 (version "3.2.3-2")
8256 (source
8257 (origin
8258 (method url-fetch)
8259 (uri (pypi-uri "functools32" version))
8260 (sha256
8261 (base32
8262 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8263 (build-system python-build-system)
8264 (arguments
8265 `(#:python ,python-2
8266 #:tests? #f)) ; no test target
1abe448d
EF
8267 (home-page "https://github.com/MiCHiLU/python-functools32")
8268 (synopsis
8269 "Backport of the functools module from Python 3.2.3")
8270 (description
8271 "This package is a backport of the @code{functools} module from Python
82723.2.3 for use with older versions of Python and PyPy.")
8273 (license license:expat)))
8274
877889f3 8275(define-public python2-futures
7a5b944e 8276 (package
877889f3 8277 (name "python2-futures")
7a5b944e
EF
8278 (version "3.0.3")
8279 (source
8280 (origin
8281 (method url-fetch)
8282 (uri (pypi-uri "futures" version))
8283 (sha256
8284 (base32
8285 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8286 (build-system python-build-system)
877889f3 8287 (arguments `(#:python ,python-2))
7a5b944e
EF
8288 (home-page "https://github.com/agronholm/pythonfutures")
8289 (synopsis
8290 "Backport of the concurrent.futures package from Python 3.2")
8291 (description
8292 "The concurrent.futures module provides a high-level interface for
8293asynchronously executing callables. This package backports the
8294concurrent.futures package from Python 3.2")
3f641af0 8295 (license license:bsd-3)))
7a5b944e 8296
5cb2fe44
EF
8297(define-public python-promise
8298 (package
8299 (name "python-promise")
8300 (version "0.4.2")
8301 (source
8302 (origin
8303 (method url-fetch)
8304 (uri (pypi-uri "promise" version))
8305 (sha256
8306 (base32
8307 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8308 (build-system python-build-system)
8309 ;; Tests wants python-futures, which is a python2 only program, and
8310 ;; can't be found by python-promise at test time.
8311 (arguments `(#:tests? #f))
8312 (home-page "https://github.com/syrusakbary/promise")
8313 (synopsis "Promises/A+ implementation for Python")
8314 (description
8315 "Promises/A+ implementation for Python")
8316 (properties `((python2-variant . ,(delay python2-promise))))
8317 (license license:expat)))
8318
8319(define-public python2-promise
8320 (let ((promise (package-with-python2
8321 (strip-python2-variant python-promise))))
8322 (package (inherit promise)
8323 (arguments (substitute-keyword-arguments (package-arguments promise)
8324 ((#:tests? _) #t)))
8325 (native-inputs
8326 `(("python2-futures" ,python2-futures)
8327 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8328 ,@(package-native-inputs promise))))))
8329
c18f6368
EF
8330(define-public python-urllib3
8331 (package
8332 (name "python-urllib3")
6178274d 8333 (version "1.18.1")
c18f6368
EF
8334 (source
8335 (origin
8336 (method url-fetch)
8337 (uri (pypi-uri "urllib3" version))
8338 (sha256
8339 (base32
6178274d 8340 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8341 (build-system python-build-system)
8342 (arguments `(#:tests? #f))
8343 (native-inputs
f3b98f4f 8344 `(;; some packages for tests
c18f6368
EF
8345 ("python-nose" ,python-nose)
8346 ("python-mock" ,python-mock)
8347 ("python-tornado" ,python-tornado)))
8348 (propagated-inputs
8322749a 8349 `(;; extra packages for https security
c18f6368
EF
8350 ("python-certifi" ,python-certifi)
8351 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8352 ("python-pyasn1" ,python-pyasn1)
8353 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8354 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8355 (synopsis "HTTP library with thread-safe connection pooling")
8356 (description
8357 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8358can reuse the same socket connection for multiple requests, it can POST files,
8359supports url redirection and retries, and also gzip and deflate decoding.")
8360 (license license:expat)))
8361
8362(define-public python2-urllib3
8363 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8364
8365(define-public python-colorama
8366 (package
8367 (name "python-colorama")
8368 (version "0.3.3")
8369 (source
8370 (origin
8371 (method url-fetch)
8372 (uri (pypi-uri "colorama" version))
8373 (sha256
8374 (base32
8375 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8376 (build-system python-build-system)
2b2f2fc1
DT
8377 (synopsis "colored terminal text rendering for Python")
8378 (description "Colorama is a Python library for rendering colored terminal
8379text.")
8380 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8381 (license license:bsd-3)))
2b2f2fc1
DT
8382
8383(define-public python2-colorama
8384 (package-with-python2 python-colorama))
f5bcec6e
DT
8385
8386(define-public python-rsa
8387 (package
8388 (name "python-rsa")
ecd68c53 8389 (version "3.4.2")
f5bcec6e
DT
8390 (source
8391 (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "rsa" version))
8394 (sha256
8395 (base32
ecd68c53 8396 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8397 (build-system python-build-system)
f22efa01 8398 (propagated-inputs
f3b98f4f 8399 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8400 (synopsis "Pure-Python RSA implementation")
8401 (description "Python-RSA is a pure-Python RSA implementation. It supports
8402encryption and decryption, signing and verifying signatures, and key
8403generation according to PKCS#1 version 1.5. It can be used as a Python
8404library as well as on the command line.")
8405 (home-page "http://stuvel.eu/rsa")
3f641af0 8406 (license license:asl2.0)))
f5bcec6e
DT
8407
8408(define-public python2-rsa
8409 (package-with-python2 python-rsa))
c0aacfa5
DT
8410
8411(define-public python-pluggy
8412 (package
8413 (name "python-pluggy")
8414 (version "0.3.1")
8415 (source
8416 (origin
8417 (method url-fetch)
8418 (uri (pypi-uri "pluggy" version))
8419 (sha256
8420 (base32
8421 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8422 (build-system python-build-system)
c0aacfa5
DT
8423 (synopsis "Plugin and hook calling mechanism for Python")
8424 (description "Pluggy is an extraction of the plugin manager as used by
8425Pytest but stripped of Pytest specific details.")
8426 (home-page "https://pypi.python.org/pypi/pluggy")
8427 (license license:expat)))
8428
8429(define-public python2-pluggy
8430 (package-with-python2 python-pluggy))
a4af21ca
DT
8431
8432(define-public python-tox
8433 (package
8434 (name "python-tox")
8435 (version "2.3.1")
8436 (source
8437 (origin
8438 (method url-fetch)
8439 (uri (pypi-uri "tox" version))
8440 (sha256
8441 (base32
8442 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8443 (build-system python-build-system)
8444 (arguments
7ba07edf
HG
8445 ;; FIXME: Tests require pytest-timeout, which itself requires
8446 ;; pytest>=2.8.0 for installation.
a4af21ca 8447 '(#:tests? #f))
482d9591
HG
8448 (propagated-inputs
8449 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8450 ("python-py" ,python-py)
482d9591 8451 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8452 (native-inputs
7ba07edf
HG
8453 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8454 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8455 (home-page "http://tox.testrun.org/")
8456 (synopsis "Virtualenv-based automation of test activities")
8457 (description "Tox is a generic virtualenv management and test command line
8458tool. It can be used to check that a package installs correctly with
8459different Python versions and interpreters, or run tests in each type of
8460supported environment, or act as a frontend to continuous integration
8461servers.")
8462 (license license:expat)))
8463
8464(define-public python2-tox
8465 (package-with-python2 python-tox))
ba9da248
DT
8466
8467(define-public python-jmespath
8468 (package
8469 (name "python-jmespath")
8470 (version "0.9.0")
8471 (source
8472 (origin
8473 (method url-fetch)
8474 (uri (pypi-uri "jmespath" version))
8475 (sha256
8476 (base32
8477 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8478 (build-system python-build-system)
52a75a83
MB
8479 (native-inputs
8480 `(("python-nose" ,python-nose)))
ba9da248
DT
8481 (synopsis "JSON Matching Expressions")
8482 (description "JMESPath (pronounced “james path”) is a Python library that
8483allows one to declaratively specify how to extract elements from a JSON
8484document.")
8485 (home-page "https://github.com/jmespath/jmespath.py")
8486 (license license:expat)))
8487
8488(define-public python2-jmespath
8489 (package-with-python2 python-jmespath))
935fcd5c
DT
8490
8491(define-public python-botocore
8492 (package
8493 (name "python-botocore")
e09f952d 8494 (version "1.4.62")
935fcd5c
DT
8495 (source
8496 (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "botocore" version))
8499 (sha256
8500 (base32
e09f952d 8501 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8502 (build-system python-build-system)
877fdac9
MB
8503 (arguments
8504 ;; FIXME: Many tests are failing.
8505 '(#:tests? #f))
482d9591 8506 (propagated-inputs
935fcd5c
DT
8507 `(("python-dateutil" ,python-dateutil-2)
8508 ("python-docutils" ,python-docutils)
482d9591 8509 ("python-jmespath" ,python-jmespath)))
8fa6890b 8510 (native-inputs
482d9591 8511 `(("python-mock" ,python-mock)
935fcd5c 8512 ("python-nose" ,python-nose)
482d9591 8513 ("behave" ,behave)
935fcd5c 8514 ("python-tox" ,python-tox)
482d9591 8515 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8516 (home-page "https://github.com/boto/botocore")
8517 (synopsis "Low-level interface to AWS")
8518 (description "Botocore is a Python library that provides a low-level
8519interface to the Amazon Web Services (AWS) API.")
3f641af0 8520 (license license:asl2.0)))
935fcd5c
DT
8521
8522(define-public python2-botocore
8523 (package-with-python2 python-botocore))
f861b8b8
DT
8524
8525(define-public awscli
8526 (package
8527 (name "awscli")
d5ccf71e 8528 (version "1.11.5")
f861b8b8
DT
8529 (source
8530 (origin
8531 (method url-fetch)
d5ccf71e 8532 (uri (pypi-uri name version))
f861b8b8
DT
8533 (sha256
8534 (base32
d5ccf71e 8535 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8536 (build-system python-build-system)
482d9591 8537 (propagated-inputs
f861b8b8 8538 `(("python-colorama" ,python-colorama)
482d9591
HG
8539 ("python-botocore" ,python-botocore)
8540 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8541 ("python-docutils" ,python-docutils)
482d9591 8542 ("python-rsa" ,python-rsa)))
d4649177 8543 (native-inputs
482d9591 8544 `(("python-mock" ,python-mock)
f861b8b8 8545 ("python-nose" ,python-nose)
f861b8b8
DT
8546 ("python-sphinx" ,python-sphinx)
8547 ("python-tox" ,python-tox)
482d9591 8548 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8549 (home-page "http://aws.amazon.com/cli/")
8550 (synopsis "Command line client for AWS")
8551 (description "AWS CLI provides a unified command line interface to the
8552Amazon Web Services (AWS) API.")
3f641af0 8553 (license license:asl2.0)))
6a44697d
LF
8554
8555(define-public python-hypothesis
8556 (package
8557 (name "python-hypothesis")
bea6d94d 8558 (version "3.1.0")
6a44697d
LF
8559 (source (origin
8560 (method url-fetch)
8561 (uri (pypi-uri "hypothesis" version))
8562 (sha256
8563 (base32
bea6d94d 8564 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8565 (build-system python-build-system)
bd100c71 8566 (native-inputs
6a44697d
LF
8567 `(("python-flake8" ,python-flake8)
8568 ("python-pytest" ,python-pytest)))
8569 (synopsis "Library for property based testing")
8570 (description "Hypothesis is a library for testing your Python code against a
8571much larger range of examples than you would ever want to write by hand. It’s
8572based on the Haskell library, Quickcheck, and is designed to integrate
8573seamlessly into your existing Python unit testing work flow.")
8574 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8575 (license license:mpl2.0)
6f068e08 8576 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8577
8578(define-public python2-hypothesis
6f068e08
EF
8579 (let ((hypothesis (package-with-python2
8580 (strip-python2-variant python-hypothesis))))
8581 (package (inherit hypothesis)
8582 (native-inputs
bd100c71
MB
8583 `(("python2-enum34" ,python2-enum34)
8584 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
8585
8586(define-public python-pytest-subtesthack
8587 (package
8588 (name "python-pytest-subtesthack")
8589 (version "0.1.1")
8590 (source (origin
8591 (method url-fetch)
8592 (uri (pypi-uri "pytest-subtesthack" version))
8593 (sha256
8594 (base32
8595 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8596 (build-system python-build-system)
7517e73c
LF
8597 (propagated-inputs
8598 `(("python-pytest" ,python-pytest)))
8599 (synopsis "Set-up and tear-down fixtures for unit tests")
8600 (description "This plugin allows you to set up and tear down fixtures within
8601unit test functions that use @code{py.test}. This is useful for using
8602@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8603function multiple times, without setting up or tearing down fixture state as is
8604normally the case.")
8605 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8606 (license license:unlicense)))
7517e73c
LF
8607
8608(define-public python2-pytest-subtesthack
8609 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8610
8611(define-public python2-xdo
8612 (package
8613 (name "python2-xdo")
8614 (version "0.2")
8615 (source (origin
8616 (method url-fetch)
8617 (uri (string-append
8618 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8619 "python-xdo_" version ".orig.tar.gz"))
8620 (sha256
8621 (base32
8622 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8623 (build-system python-build-system)
8624 (arguments
8625 `(#:python ,python-2
8626 #:tests? #f)) ; no tests provided
8627 (inputs
8628 `(("xdotool" ,xdotool)
8629 ("libX11" ,libx11)))
8630 (home-page "https://tracker.debian.org/pkg/python-xdo")
8631 (synopsis "Python library for simulating X11 keyboard/mouse input")
8632 (description "Provides bindings to libxdo for manipulating X11 via simulated
8633input. (Note that this is mostly a legacy library; you may wish to look at
8634python-xdo for newer bindings.)")
3f641af0 8635 (license license:bsd-3)))
0bdc1671 8636
cb34dc6c
CAW
8637(define-public python-wtforms
8638 (package
8639 (name "python-wtforms")
8640 (version "2.1")
8641 (source
8642 (origin
8643 (method url-fetch)
8644 (uri (pypi-uri "WTForms" version ".zip"))
8645 (sha256
8646 (base32
8647 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8648 (build-system python-build-system)
13c4d874
EF
8649 (arguments
8650 '(#:phases
8651 (modify-phases %standard-phases
8652 (add-after 'unpack 'remove-django-test
8653 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8654 (lambda _
8655 (substitute*
8656 "tests/runtests.py"
8657 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8658 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8659 #t)))))
cb34dc6c
CAW
8660 (native-inputs
8661 `(("unzip" ,unzip)))
8662 (home-page "http://wtforms.simplecodes.com/")
8663 (synopsis
8664 "Form validation and rendering library for Python web development")
8665 (description
8666 "WTForms is a flexible forms validation and rendering library
8667for Python web development. It is very similar to the web form API
8668available in Django, but is a standalone package.")
f210e944 8669 (license license:bsd-3)))
cb34dc6c
CAW
8670
8671(define-public python2-wtforms
f210e944 8672 (package-with-python2 python-wtforms))
50aaec25
DT
8673
8674(define-public python-mako
8675 (package
8676 (name "python-mako")
8677 (version "1.0.3")
8678 (source
8679 (origin
8680 (method url-fetch)
8681 (uri (pypi-uri "Mako" version))
8682 (sha256
8683 (base32
8684 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8685 (build-system python-build-system)
482d9591
HG
8686 (propagated-inputs
8687 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8688 (native-inputs
482d9591 8689 `(("python-mock" ,python-mock)
50aaec25
DT
8690 ("python-nose" ,python-nose)))
8691 (home-page "http://www.makotemplates.org/")
8692 (synopsis "Templating language for Python")
8693 (description "Mako is a templating language for Python that compiles
8694templates into Python modules.")
f210e944 8695 (license license:expat)))
50aaec25
DT
8696
8697(define-public python2-mako
f210e944 8698 (package-with-python2 python-mako))
ae00a41f
CAW
8699
8700(define-public python-waitress
8701 (package
8702 (name "python-waitress")
8703 (version "0.8.10")
8704 (source
8705 (origin
8706 (method url-fetch)
8707 (uri (pypi-uri "waitress" version))
8708 (sha256
8709 (base32
8710 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8711 (build-system python-build-system)
8712 (home-page "https://github.com/Pylons/waitress")
8713 (synopsis "Waitress WSGI server")
8714 (description "Waitress is meant to be a production-quality pure-Python WSGI
8715server with very acceptable performance.")
f210e944 8716 (license license:zpl2.1)))
ae00a41f
CAW
8717
8718(define-public python2-waitress
f210e944 8719 (package-with-python2 python-waitress))
778a284b
CAW
8720
8721(define-public python-wsgiproxy2
8722 (package
8723 (name "python-wsgiproxy2")
8724 (version "0.4.2")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8729 (sha256
8730 (base32
8731 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8732 (build-system python-build-system)
e359b31a
LF
8733 (arguments
8734 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8735 ;; support Python 3:
8736 ;; https://github.com/benoitc/restkit/issues/140
8737 #:tests? #f))
778a284b
CAW
8738 (native-inputs
8739 `(("unzip" ,unzip)
8740 ("python-nose" ,python-nose)
8741 ("python-coverage" ,python-coverage)))
8742 (propagated-inputs
8743 `(("python-six" ,python-six)
8744 ("python-webob" ,python-webob)))
8745 (home-page
8746 "https://github.com/gawel/WSGIProxy2/")
8747 (synopsis "WSGI Proxy with various http client backends")
8748 (description "WSGI turns HTTP requests into WSGI function calls.
8749WSGIProxy turns WSGI function calls into HTTP requests.
8750It also includes code to sign requests and pass private data,
8751and to spawn subprocesses to handle requests.")
f210e944 8752 (license license:expat)))
778a284b
CAW
8753
8754(define-public python2-wsgiproxy2
f210e944 8755 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8756
8757(define-public python-pastedeploy
8758 (package
8759 (name "python-pastedeploy")
8760 (version "1.5.2")
8761 (source
8762 (origin
8763 (method url-fetch)
8764 (uri (pypi-uri "PasteDeploy" version))
8765 (sha256
8766 (base32
8767 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8768 (build-system python-build-system)
8769 (native-inputs
8770 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8771 (home-page "http://pythonpaste.org/deploy/")
8772 (synopsis
8773 "Load, configure, and compose WSGI applications and servers")
8774 (description
8775 "This tool provides code to load WSGI applications and servers from URIs;
8776these URIs can refer to Python Eggs for INI-style configuration files. Paste
8777Script provides commands to serve applications based on this configuration
8778file.")
8779 (license license:expat)))
8780
8781(define-public python2-pastedeploy
8782 (package-with-python2 python-pastedeploy))
1cf53652 8783
c4a7904c
CAW
8784(define-public python-paste
8785 (package
8786 (name "python-paste")
8787 (version "2.0.2")
8788 (source
8789 (origin
8790 (method url-fetch)
8791 (uri (pypi-uri "Paste" version))
8792 (sha256
8793 (base32
8794 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8795 (patches (search-patches "python-paste-remove-website-test.patch"
8796 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8797 (build-system python-build-system)
8798 (native-inputs
8799 `(("python-nose" ,python-nose)))
8800 (propagated-inputs
f3b98f4f 8801 `(("python-six" ,python-six)))
c4a7904c
CAW
8802 (arguments
8803 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8804 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8805 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8806 ;; still... things should be better by the next Paste release.)
8807 #:tests? #f))
8808 (home-page "http://pythonpaste.org")
8809 (synopsis
8810 "Python web development tools, focusing on WSGI")
8811 (description
8812 "Paste provides a variety of web development tools and middleware which
8813can be nested together to build web applications. Paste's design closely
8814follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8815 (license license:expat)
8816 (properties `((python2-variant . ,(delay python2-paste))))))
8817
8818(define-public python2-paste
8819 (let ((paste (package-with-python2
8820 (strip-python2-variant python-paste))))
8821 (package
8822 (inherit paste)
8823 (arguments
8824 ;; Tests are back for Python 2!
8825 `(#:tests? #t
8826 ,@(package-arguments paste))))))
8827
a8f20f63
CAW
8828(define-public python-pastescript
8829 (package
8830 (name "python-pastescript")
8831 (version "2.0.2")
8832 (source
8833 (origin
8834 (method url-fetch)
8835 (uri (pypi-uri "PasteScript" version))
8836 (sha256
8837 (base32
8838 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8839 (build-system python-build-system)
8840 (native-inputs
8841 `(("python-nose" ,python-nose)))
8842 (propagated-inputs
f3b98f4f 8843 `(("python-paste" ,python-paste)
a8f20f63
CAW
8844 ("python-pastedeploy" ,python-pastedeploy)))
8845 (home-page "http://pythonpaste.org/script/")
8846 (arguments
8847 '(;; Unfortunately, this requires the latest unittest2,
8848 ;; but that requires traceback2 which requires linecache2 which requires
8849 ;; unittest2. So we're skipping tests for now.
8850 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8851 ;; so in theory we could get around this situation somehow.)
8852 #:tests? #f))
8853 (synopsis
8854 "Pluggable command line tool for serving web applications and more")
8855 (description
8856 "PasteScript is a plugin-friendly command line tool which provides a
8857variety of features, from launching web applications to bootstrapping project
8858layouts.")
8859 (license license:expat)))
8860
8861(define-public python2-pastescript
8862 (package-with-python2 python-pastescript))
8863
1cf53652
CAW
8864(define-public python-pyquery
8865 (package
8866 (name "python-pyquery")
aab76e80 8867 (version "1.2.13")
1cf53652
CAW
8868 (source
8869 (origin
8870 (method url-fetch)
8871 (uri (pypi-uri "pyquery" version))
8872 (sha256
8873 (base32
aab76e80 8874 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8875 (build-system python-build-system)
2ddbfa8c
LF
8876 (native-inputs
8877 `(("python-webob" ,python-webob)
8878 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8879 (propagated-inputs
8880 `(("python-lxml" ,python-lxml)
8881 ("python-cssselect" ,python-cssselect)))
8882 (home-page "https://github.com/gawel/pyquery")
8883 (synopsis "Make jQuery-like queries on xml documents")
8884 (description "pyquery allows you to make jQuery queries on xml documents.
8885The API is as much as possible the similar to jQuery. pyquery uses lxml for
8886fast xml and html manipulation.")
f210e944 8887 (license license:bsd-3)))
1cf53652
CAW
8888
8889(define-public python2-pyquery
f210e944 8890 (package-with-python2 python-pyquery))
aa6313d6
CAW
8891
8892(define-public python-webtest
8893 (package
8894 (name "python-webtest")
8895 (version "2.0.20")
8896 (source
8897 (origin
8898 (method url-fetch)
8899 (uri (pypi-uri "WebTest" version))
8900 (sha256
8901 (base32
8902 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8903 (build-system python-build-system)
8904 (arguments
8905 `(;; Unfortunately we have to disable tests!
8906 ;; This release of WebTest is pinned to python-nose < 1.3,
8907 ;; but older versions of python-nose are plagued with the following
8908 ;; bug(s), which rears its ugly head during test execution:
8909 ;; https://github.com/nose-devs/nose/issues/759
8910 ;; https://github.com/nose-devs/nose/pull/811
8911 #:tests? #f))
8912 ;; Commented out code is no good, but in this case, once tests
8913 ;; are ready to be enabled again, we should put the following
8914 ;; in place:
8915 ;; (native-inputs
8916 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8917 ;; ; but see above comment
8918 ;; ("python-coverage" ,python-coverage)
8919 ;; ("python-mock" ,python-mock)
8920 ;; ("python-pastedeploy" ,python-pastedeploy)
8921 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8922 ;; ("python-pyquery" ,python-pyquery)))
8923 (propagated-inputs
8924 `(("python-waitress" ,python-waitress)
8925 ("python-webob" ,python-webob)
8926 ("python-six" ,python-six)
8927 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8928 (home-page "http://webtest.pythonpaste.org/")
8929 (synopsis "Helper to test WSGI applications")
8930 (description "Webtest allows you to test your Python web applications
8931without starting an HTTP server. It supports anything that supports the
8932minimum of WSGI.")
f210e944 8933 (license license:expat)))
aa6313d6
CAW
8934
8935(define-public python2-webtest
f210e944 8936 (package-with-python2 python-webtest))
4cb122cd
CAW
8937
8938(define-public python-anyjson
8939 (package
8940 (name "python-anyjson")
8941 (version "0.3.3")
8942 (source
8943 (origin
8944 (method url-fetch)
8945 (uri (pypi-uri "anyjson" version))
8946 (sha256
8947 (base32
8948 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8949 (build-system python-build-system)
8950 (arguments
8951 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8952 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8953 ;; whatever) so this transformation needs to be done before the tests
8954 ;; can be run. Maybe we could add a build step to transform beforehand
8955 ;; but it could be annoying/difficult.
8956 ;; We can enable tests for the Python 2 version, though, and do below.
8957 #:tests? #f))
8958 (home-page "http://bitbucket.org/runeh/anyjson/")
8959 (synopsis
8960 "Wraps best available JSON implementation in a common interface")
8961 (description
8962 "Anyjson loads whichever is the fastest JSON module installed
8963and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8964 (license license:bsd-3)
4cb122cd
CAW
8965 (properties `((python2-variant . ,(delay python2-anyjson))))))
8966
8967(define-public python2-anyjson
8968 (let ((anyjson (package-with-python2
8969 (strip-python2-variant python-anyjson))))
8970 (package
8971 (inherit anyjson)
8972 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8973 #:tests? #t
8974 ,@(package-arguments anyjson)))
00e10c6e 8975 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8976
8977(define-public python-amqp
8978 (package
8979 (name "python-amqp")
8980 (version "1.4.9")
8981 (source
8982 (origin
8983 (method url-fetch)
8984 (uri (pypi-uri "amqp" version))
8985 (sha256
8986 (base32
8987 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8988 (build-system python-build-system)
8989 (native-inputs
8990 `(("python-nose" ,python-nose)
8991 ("python-mock" ,python-mock)))
8992 (home-page "http://github.com/celery/py-amqp")
8993 (synopsis
8994 "Low-level AMQP client for Python (fork of amqplib)")
8995 (description
8996 "This is a fork of amqplib which was originally written by Barry Pederson.
8997It is maintained by the Celery project, and used by kombu as a pure python
8998alternative when librabbitmq is not available.")
3f641af0 8999 (license license:lgpl2.1+)
8dfceab7
CAW
9000 (properties `((python2-variant . ,(delay python2-amqp))))))
9001
9002(define-public python2-amqp
9003 (let ((amqp (package-with-python2
9004 (strip-python2-variant python-amqp))))
9005 (package
9006 (inherit amqp)
9007 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9008 ;; unmaintained. Weirdly, does not do this on the python 3
9009 ;; version?
9010 #:tests? #f
00e10c6e 9011 ,@(package-arguments amqp))))))
7d387305
CAW
9012
9013(define-public python-kombu
9014 (package
9015 (name "python-kombu")
0cb59822 9016 (version "3.0.37")
7d387305
CAW
9017 (source
9018 (origin
9019 (method url-fetch)
9020 (uri (pypi-uri "kombu" version))
9021 (sha256
9022 (base32
0cb59822 9023 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9024 (build-system python-build-system)
9025 (native-inputs
9026 `(("python-mock" ,python-mock)
9027 ("python-nose" ,python-nose)))
9028 (propagated-inputs
9029 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9030 ("python-amqp" ,python-amqp)
9031 ("python-redis" ,python-redis)))
7d387305
CAW
9032 (home-page "http://kombu.readthedocs.org")
9033 (synopsis "Message passing library for Python")
9034 (description "The aim of Kombu is to make messaging in Python as easy as
9035possible by providing an idiomatic high-level interface for the AMQ protocol,
9036and also provide proven and tested solutions to common messaging problems.
9037AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9038message orientation, queuing, routing, reliability and security, for which the
9039RabbitMQ messaging server is the most popular implementation.")
3f641af0 9040 (license license:bsd-3)
7d387305
CAW
9041 (properties `((python2-variant . ,(delay python2-kombu))))))
9042
9043(define-public python2-kombu
9044 (let ((kombu (package-with-python2
9045 (strip-python2-variant python-kombu))))
9046 (package
9047 (inherit kombu)
328bb95d
HG
9048 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9049 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9050
9051(define-public python-billiard
9052 (package
9053 (name "python-billiard")
a6bb9e44 9054 (version "3.3.0.23")
b6f0b9fb
CAW
9055 (source
9056 (origin
9057 (method url-fetch)
9058 (uri (pypi-uri "billiard" version))
9059 (sha256
9060 (base32
a6bb9e44 9061 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9062 (build-system python-build-system)
9063 (native-inputs
9064 `(("python-nose" ,python-nose)))
9065 (home-page "http://github.com/celery/billiard")
9066 (synopsis
9067 "Python multiprocessing fork with improvements and bugfixes")
9068 (description
9069 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9070multiprocessing package itself is a renamed and updated version of R Oudkerk's
9071pyprocessing package. This standalone variant is intended to be compatible with
9072Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9073 (license license:bsd-3)
b6f0b9fb
CAW
9074 (properties `((python2-variant . ,(delay python2-billiard))))))
9075
9076(define-public python2-billiard
9077 (let ((billiard (package-with-python2
9078 (strip-python2-variant python-billiard))))
9079 (package
9080 (inherit billiard)
00e10c6e 9081 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9082 ("python2-mock" ,python2-mock)
9083 ,@(package-native-inputs billiard))))))
22df6419
CAW
9084
9085(define-public python-celery
9086 (package
9087 (name "python-celery")
9ebe87fe 9088 (version "3.1.24")
22df6419
CAW
9089 (source
9090 (origin
9091 (method url-fetch)
9092 (uri (pypi-uri "celery" version))
9093 (sha256
9094 (base32
9ebe87fe 9095 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9096 (build-system python-build-system)
9ebe87fe
LF
9097 (arguments
9098 `(#:phases
9099 (modify-phases %standard-phases
9100 ;; These tests break with Python 3.5:
9101 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9102 (replace 'check
9103 (lambda _
9104 (zero?
9105 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9106 (native-inputs
9107 `(("python-nose" ,python-nose)))
f22efa01 9108 (propagated-inputs
22df6419
CAW
9109 `(("python-pytz" ,python-pytz)
9110 ("python-billiard" ,python-billiard)
9111 ("python-kombu" ,python-kombu)))
9112 (home-page "http://celeryproject.org")
9113 (synopsis "Distributed Task Queue")
9114 (description "Celery is an asynchronous task queue/job queue based on
9115distributed message passing. It is focused on real-time operation, but
9116supports scheduling as well. The execution units, called tasks, are executed
9117concurrently on a single or more worker servers using multiprocessing,
9118Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9119synchronously (wait until ready).")
3f641af0 9120 (license license:bsd-3)
22df6419
CAW
9121 (properties `((python2-variant . ,(delay python2-celery))))))
9122
9123(define-public python2-celery
9124 (let ((celery (package-with-python2
9125 (strip-python2-variant python-celery))))
9126 (package
9127 (inherit celery)
00e10c6e 9128 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9129 ("python2-mock" ,python2-mock)
9130 ,@(package-native-inputs celery))))))
97e32948
CAW
9131
9132(define-public python-translitcodec
9133 (package
9134 (name "python-translitcodec")
9135 (version "0.4.0")
9136 (source
9137 (origin
9138 (method url-fetch)
9139 (uri (pypi-uri "translitcodec" version))
9140 (sha256
9141 (base32
9142 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9143 (build-system python-build-system)
9144 (arguments
9145 `(#:tests? #f)) ; no tests provided
9146 (home-page
9147 "https://github.com/claudep/translitcodec")
9148 (synopsis
9149 "Unicode to 8-bit charset transliteration codec")
9150 (description
9151 "This package contains codecs for transliterating ISO 10646 texts into
9152best-effort representations using smaller coded character sets (ASCII,
9153ISO 8859, etc.).")
f210e944 9154 (license license:expat)))
97e32948
CAW
9155
9156(define-public python2-translitcodec
f210e944 9157 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9158
9159(define-public python-editor
9160 (package
9161 (name "python-editor")
9162 (version "0.5")
9163 (source
9164 (origin
9165 (method url-fetch)
9166 (uri (pypi-uri "python-editor" version))
9167 (sha256
9168 (base32
9169 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9170 (build-system python-build-system)
9171 (home-page
9172 "https://github.com/fmoo/python-editor")
9173 (synopsis
9174 "Programmatically open an editor, capture the result")
9175 (description
9176 "python-editor is a library that provides the editor module for
9177programmatically interfacing with your system's $EDITOR.")
f210e944 9178 (license license:asl2.0)))
0c3b90d4
CAW
9179
9180(define-public python2-editor
f210e944 9181 (package-with-python2 python-editor))
3276517c
LF
9182
9183(define-public python-sphinxcontrib-programoutput
9184 (package
9185 (name "python-sphinxcontrib-programoutput")
9186 (version "0.8")
9187 (source (origin
9188 (method url-fetch)
9189 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9190 (sha256
9191 (base32
9192 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9193 (build-system python-build-system)
9194 (propagated-inputs
a0a09859 9195 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9196 (synopsis "Sphinx extension to include program output")
9197 (description "A Sphinx extension to literally insert the output of arbitrary
9198commands into documents, helping you to keep your command examples up to date.")
9199 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9200 (license license:bsd-2)))
3276517c
LF
9201
9202(define-public python2-sphinxcontrib-programoutput
f210e944 9203 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9204
9205(define-public python-sphinx-repoze-autointerface
9206 (package
9207 (name "python-sphinx-repoze-autointerface")
328ae341 9208 (version "0.8")
548d7165
LF
9209 (source (origin
9210 (method url-fetch)
9211 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9212 (sha256
9213 (base32
328ae341 9214 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9215 (build-system python-build-system)
9216 (propagated-inputs
47c7dc4a 9217 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9218 ("python-zope-interface" ,python-zope-interface)))
9219 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9220 (description "This package defines an extension for the Sphinx documentation
9221system. The extension allows generation of API documentation by
9222introspection of @code{zope.interface} instances in code.")
9223 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9224 (license license:repoze)))
548d7165
LF
9225
9226(define-public python2-sphinx-repoze-autointerface
9227 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9228
9229(define-public python-psycopg2
9230 (package
9231 (name "python-psycopg2")
9232 (version "2.6.1")
9233 (source
9234 (origin
9235 (method url-fetch)
9236 (uri (pypi-uri "psycopg2" version))
9237 (sha256
9238 (base32
9239 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9240 (build-system python-build-system)
9241 (arguments
9242 ;; Tests would require a postgresql database "psycopg2_test"
9243 ;; and a running postgresql database management service.
9244 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9245 (inputs
9246 `(("postgresql" ,postgresql))) ; libpq
9247 (home-page "http://initd.org/psycopg/")
9248 (synopsis "Python PostgreSQL adapter")
9249 (description
9250 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9251 (license license:lgpl3+)))
b31fbea5
DM
9252
9253(define-public python2-psycopg2
f210e944 9254 (package-with-python2 python-psycopg2))
eed1a61f
LF
9255
9256(define-public python-vobject
9257 (package
9258 (name "python-vobject")
9bed9b15 9259 (version "0.9.2")
eed1a61f
LF
9260 (source (origin
9261 (method url-fetch)
9262 (uri (pypi-uri "vobject" version))
9263 (sha256
9264 (base32
9bed9b15 9265 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9266 (build-system python-build-system)
a9871b7b
LF
9267 (arguments
9268 '(;; The test suite relies on some non-portable Windows interfaces.
9269 #:tests? #f))
f22efa01 9270 (propagated-inputs
eed1a61f
LF
9271 `(("python-dateutil-2" ,python-dateutil-2)
9272 ("python-pyicu" ,python-pyicu)))
9273 (synopsis "Parse and generate vCard and vCalendar files")
9274 (description "Vobject is intended to be a full featured Python package for
9275parsing and generating vCard and vCalendar files. Currently, iCalendar files
9276are supported and well tested. vCard 3.0 files are supported, and all data
9277should be imported, but only a few components are understood in a sophisticated
9278way.")
9279 (home-page "http://eventable.github.io/vobject/")
f210e944 9280 (license license:asl2.0)))
eed1a61f
LF
9281
9282(define-public python2-vobject
f210e944 9283 (package-with-python2 python-vobject))
cedac813
LF
9284
9285(define-public python-munkres
9286 (package
9287 (name "python-munkres")
38e81a2c 9288 (version "1.0.8")
cedac813
LF
9289 (source (origin
9290 (method url-fetch)
9291 (uri (pypi-uri "munkres" version))
9292 (sha256
9293 (base32
38e81a2c 9294 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9295 (build-system python-build-system)
9296 (arguments
9297 '(#:tests? #f)) ; no test suite
9298 (home-page "http://software.clapper.org/munkres/")
9299 (synopsis "Implementation of the Munkres algorithm")
9300 (description "The Munkres module provides an implementation of the Munkres
9301algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9302useful for solving the Assignment Problem.")
3f641af0 9303 (license license:bsd-3)))
cedac813
LF
9304
9305(define-public python2-munkres
9306 (package-with-python2 python-munkres))
f3b3d78f
LF
9307
9308(define-public python-flask
9309 (package
9310 (name "python-flask")
c6c80104 9311 (version "0.11.1")
f3b3d78f
LF
9312 (source (origin
9313 (method url-fetch)
9314 (uri (pypi-uri "Flask" version))
9315 (sha256
9316 (base32
c6c80104 9317 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9318 (build-system python-build-system)
9319 (propagated-inputs
9320 `(("python-itsdangerous" ,python-itsdangerous)
9321 ("python-jinja2" ,python-jinja2)
8f35c030 9322 ("python-click" ,python-click)
f3b3d78f
LF
9323 ("python-werkzeug" ,python-werkzeug)))
9324 (home-page "https://github.com/mitsuhiko/flask/")
9325 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9326 (description "Flask is a micro web framework based on the Werkzeug toolkit
9327and Jinja2 template engine. It is called a micro framework because it does not
9328presume or force a developer to use a particular tool or library.")
f210e944 9329 (license license:bsd-3)))
f3b3d78f
LF
9330
9331(define-public python2-flask
f210e944 9332 (package-with-python2 python-flask))
603d665b
LF
9333
9334(define-public python-cookies
9335 (package
9336 (name "python-cookies")
9337 (version "2.2.1")
9338 (source (origin
9339 (method url-fetch)
9340 (uri (pypi-uri "cookies" version))
9341 (sha256
9342 (base32
9343 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9344 (build-system python-build-system)
9345 (arguments
9346 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9347 #:tests? #f))
9348 (native-inputs
9349 `(("python-pytest" ,python2-pytest)))
9350 (synopsis "HTTP cookie parser and renderer")
9351 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9352Python.")
9353 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9354 (license license:expat)))
603d665b
LF
9355
9356(define-public python2-cookies
f210e944 9357 (package-with-python2 python-cookies))
0efde7d6
LF
9358
9359(define-public python-responses
9360 (package
9361 (name "python-responses")
9362 (version "0.5.1")
9363 (source (origin
9364 (method url-fetch)
9365 (uri (pypi-uri "responses" version))
9366 (sha256
9367 (base32
9368 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9369 (build-system python-build-system)
9370 (arguments
9371 `(;; Test suite is not distributed:
9372 ;; https://github.com/getsentry/responses/issues/38
9373 #:tests? #f))
9374 (native-inputs
d8ea5f2f 9375 `(("python-mock" ,python-mock)))
0efde7d6
LF
9376 (propagated-inputs
9377 `(("python-requests" ,python-requests)
d8ea5f2f 9378 ("python-cookies" ,python-cookies)
0efde7d6
LF
9379 ("python-six" ,python-six)))
9380 (home-page "https://github.com/getsentry/responses")
9381 (synopsis "Utility for mocking out the `requests` Python library")
9382 (description "A utility library for mocking out the `requests` Python
9383library.")
f210e944 9384 (license license:asl2.0)))
0efde7d6
LF
9385
9386(define-public python2-responses
f210e944 9387 (package-with-python2 python-responses))
76b94885 9388
b7afd018
RW
9389(define-public python-whoosh
9390 (package
9391 (name "python-whoosh")
9392 (version "2.7.4")
9393 (source
9394 (origin
9395 (method url-fetch)
9396 (uri (pypi-uri "Whoosh" version))
9397 (sha256
9398 (base32
9399 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9400 (build-system python-build-system)
9401 (native-inputs
f3b98f4f 9402 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9403 (home-page "http://bitbucket.org/mchaput/whoosh")
9404 (synopsis "Full text indexing, search, and spell checking library")
9405 (description
9406 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9407checking library.")
9408 (license license:bsd-2)))
9409
9410(define-public python2-whoosh
9411 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9412 (package (inherit whoosh)
9413 (propagated-inputs
9414 `(("python2-backport-ssl-match-hostname"
9415 ,python2-backport-ssl-match-hostname)
9416 ,@(package-propagated-inputs whoosh))))))
9417
76b94885
LF
9418(define-public python-pathlib
9419 (package
9420 (name "python-pathlib")
9421 (version "1.0.1")
9422 (source (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "pathlib" version))
9425 (sha256
9426 (base32
9427 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9428 (build-system python-build-system)
92a312dc
RW
9429 ;; The tests depend on the internal "test" module, which does not provide
9430 ;; a stable interface.
9431 (arguments `(#:tests? #f))
76b94885 9432 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9433 (synopsis "Object-oriented file system paths")
9434 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9435It offers the following advantages over using string objects:
9436
9437@enumerate
9438@item No more cumbersome use of os and os.path functions. Everything can
9439be done easily through operators, attribute accesses, and method calls.
9440@item Embodies the semantics of different path types. For example,
9441comparing Windows paths ignores casing.
9442@item Well-defined semantics, eliminating any inconsistencies or
9443ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9444@end enumerate
9445
9446Note: In Python 3.4, pathlib is now part of the standard library. For other
9447Python versions please consider python-pathlib2 instead, which tracks the
9448standard library module. This module (python-pathlib) isn't maintained
9449anymore.")
76b94885
LF
9450 (license license:expat)))
9451
9452(define-public python2-pathlib
9453 (package-with-python2 python-pathlib))
25a7db0a 9454
b7703c81
HG
9455(define-public python2-pathlib2
9456 (package
9457 (name "python2-pathlib2")
9458 (version "2.1.0")
9459 (source (origin
9460 (method url-fetch)
9461 (uri (pypi-uri "pathlib2" version))
9462 (sha256
9463 (base32
9464 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9465 (build-system python-build-system)
49a531f5
HG
9466 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9467 ;; version is 3.4 which already includes this package as part of the
9468 ;; standard library.
b7703c81
HG
9469 (arguments
9470 `(#:python ,python-2))
9471 (native-inputs
f3b98f4f 9472 `(("python2-six" ,python2-six)))
b7703c81
HG
9473 (home-page "http://pypi.python.org/pypi/pathlib2/")
9474 (synopsis "Object-oriented file system paths - backport of standard
9475pathlib module")
9476 (description "The goal of pathlib2 is to provide a backport of standard
9477pathlib module which tracks the standard library module, so all the newest
9478features of the standard pathlib can be used also on older Python versions.
9479
9480Pathlib offers a set of classes to handle file system paths. It offers the
9481following advantages over using string objects:
9482
9483@enumerate
9484@item No more cumbersome use of os and os.path functions. Everything can
9485be done easily through operators, attribute accesses, and method calls.
9486@item Embodies the semantics of different path types. For example,
9487comparing Windows paths ignores casing.
9488@item Well-defined semantics, eliminating any inconsistencies or
9489ambiguities (forward vs. backward slashes, etc.).
9490@end enumerate")
9491 (license license:expat)))
9492
25a7db0a
LF
9493(define-public python-jellyfish
9494 (package
9495 (name "python-jellyfish")
8c4964dd 9496 (version "0.5.6")
25a7db0a
LF
9497 (source (origin
9498 (method url-fetch)
9499 (uri (pypi-uri "jellyfish" version))
9500 (sha256
9501 (base32
8c4964dd 9502 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9503 (build-system python-build-system)
9504 (native-inputs
9505 `(("python-pytest" ,python-pytest)))
9506 (home-page "https://github.com/jamesturk/jellyfish")
9507 (synopsis "Approximate and phonetic matching of strings")
9508 (description "Jellyfish uses a variety of string comparison and phonetic
9509encoding algorithms to do fuzzy string matching.")
3f641af0 9510 (license license:bsd-2)
25a7db0a
LF
9511 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9512
9513(define-public python2-jellyfish
9514 (let ((jellyfish (package-with-python2
9515 (strip-python2-variant python-jellyfish))))
9516 (package (inherit jellyfish)
00e10c6e 9517 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9518 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9519
9520(define-public python2-unicodecsv
9521 (package
9522 (name "python2-unicodecsv")
9523 (version "0.14.1")
9524 (source (origin
9525 (method url-fetch)
9526 ;; The test suite is not included in the PyPi release.
9527 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9528 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9529 "archive/" version ".tar.gz"))
9530 (file-name (string-append name "-" version ".tar.gz"))
9531 (sha256
9532 (base32
9533 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9534 (build-system python-build-system)
9535 (arguments
9536 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9537 #:python ,python-2))
9538 (native-inputs
f3b98f4f 9539 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9540 (home-page "https://github.com/jdunck/python-unicodecsv")
9541 (synopsis "Unicode CSV module for Python 2")
9542 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9543module, adding support for Unicode strings.")
3f641af0 9544 (license license:bsd-2)))
064503aa
LF
9545
9546(define-public python-rarfile
9547 (package
9548 (name "python-rarfile")
67824447 9549 (version "2.8")
064503aa
LF
9550 (source (origin
9551 (method url-fetch)
9552 (uri (pypi-uri "rarfile" version))
9553 (sha256
9554 (base32
67824447 9555 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9556 (build-system python-build-system)
9557 (arguments
9558 '(#:phases
9559 (modify-phases %standard-phases
9560 (replace 'check
9561 ;; Many tests fail, but the installation proceeds.
9562 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9563 (native-inputs
9564 `(("which" ,which))) ; required for tests
9565 (propagated-inputs
9566 `(("libarchive" ,libarchive)))
9567 (home-page "https://github.com/markokr/rarfile")
9568 (synopsis "RAR archive reader for Python")
9569 (description "This is Python module for RAR archive reading. The interface
9570is made as zipfile like as possible.")
3f641af0 9571 (license license:isc)))
064503aa
LF
9572
9573(define-public python2-rarfile
9574 (package-with-python2 python-rarfile))
daeeea71
CM
9575
9576(define-public python-magic
9577 (package
9578 (name "python-magic")
9579 (version "0.4.3")
9580 (source
9581 (origin
9582 (method url-fetch)
9583 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9584 version ".tar.gz"))
9585 (sha256
9586 (base32
9587 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9588 (file-name (string-append name "-" version "-checkout"))))
9589 (build-system python-build-system)
9590 (arguments
9591 ;; The tests are unreliable, so don't run them. The tests fail
9592 ;; under Python3 because they were written for Python2 and
9593 ;; contain import statements that do not work in Python3. One of
9594 ;; the tests fails under Python2 because its assertions are
9595 ;; overly stringent; it relies on comparing output strings which
9596 ;; are brittle and can change depending on the version of
9597 ;; libmagic being used and the system on which the test is
9598 ;; running. In my case, under GuixSD 0.10.0, only one test
9599 ;; failed, and it seems to have failed only because the version
9600 ;; of libmagic that is packaged in Guix outputs a slightly
9601 ;; different (but not wrong) string than the one that the test
9602 ;; expected.
9603 '(#:tests? #f
9604 #:phases (modify-phases %standard-phases
9605 ;; Replace a specific method call with a hard-coded
9606 ;; path to the necessary libmagic.so file in the
9607 ;; store. If we don't do this, then the method call
9608 ;; will fail to find the libmagic.so file, which in
9609 ;; turn will cause any application using
9610 ;; python-magic to fail.
9611 (add-before 'build 'hard-code-path-to-libmagic
9612 (lambda* (#:key inputs #:allow-other-keys)
9613 (let ((file (assoc-ref inputs "file")))
9614 (substitute* "magic.py"
9615 (("ctypes.util.find_library\\('magic'\\)")
9616 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9617 #t)))
9618 (add-before 'install 'disable-egg-compression
9619 (lambda _
9620 (let ((port (open-file "setup.cfg" "a")))
9621 (display "\n[easy_install]\nzip_ok = 0\n"
9622 port)
9623 (close-port port)
9624 #t))))))
daeeea71
CM
9625 (inputs
9626 ;; python-magic needs to be able to find libmagic.so.
9627 `(("file" ,file)))
9628 (home-page "https://github.com/ahupp/python-magic")
9629 (synopsis "File type identification using libmagic")
9630 (description
9631 "This module uses ctypes to access the libmagic file type
9632identification library. It makes use of the local magic database and
9633supports both textual and MIME-type output. Note that this module and
9634the python-file module both provide a \"magic.py\" file; these two
9635modules, which are different and were developed separately, both serve
9636the same purpose: to provide Python bindings for libmagic.")
9637 (license license:expat)))
9638
9639(define-public python2-magic
9640 (package-with-python2 python-magic))
12af303f
CM
9641
9642(define-public python2-s3cmd
9643 (package
9644 (name "python2-s3cmd")
9645 (version "1.6.1")
9646 (source
9647 (origin
9648 (method url-fetch)
de67e922 9649 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9650 "s3cmd-" version ".tar.gz"))
9651 (sha256
9652 (base32
9653 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9654 (build-system python-build-system)
9655 (arguments
9656 ;; s3cmd is written for python2 only and contains no tests.
9657 `(#:python ,python-2
9658 #:tests? #f))
f22efa01 9659 (propagated-inputs
12af303f
CM
9660 `(("python2-dateutil" ,python2-dateutil)
9661 ;; The python-file package also provides a magic.py module.
9662 ;; This is an unfortunate state of affairs; however, s3cmd
9663 ;; fails to install if it cannot find specifically the
9664 ;; python-magic package. Thus we include it, instead of using
9665 ;; python-file. Ironically, s3cmd sometimes works better
9666 ;; without libmagic bindings at all:
9667 ;; https://github.com/s3tools/s3cmd/issues/198
9668 ("python2-magic" ,python2-magic)))
9669 (home-page "http://s3tools.org/s3cmd")
9670 (synopsis "Command line tool for S3-compatible storage services")
9671 (description
9672 "S3cmd is a command line tool for uploading, retrieving and managing data
9673in storage services that are compatible with the Amazon Simple Storage
9674Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9675GnuPG encryption, and more. It also supports management of Amazon's
9676CloudFront content delivery network.")
3f641af0 9677 (license license:gpl2+)))
4323a5f0
AE
9678
9679(define-public python-pkgconfig
9680 (package
9681 (name "python-pkgconfig")
9682 (version "1.1.0")
9683 (source
9684 (origin
9685 (method url-fetch)
9686 (uri (pypi-uri "pkgconfig" version))
9687 (sha256
9688 (base32
9689 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9690 (build-system python-build-system)
9691 (native-inputs
f3b98f4f 9692 `(("python-nose" ,python-nose)))
4323a5f0
AE
9693 (inputs
9694 `(("pkg-config" ,pkg-config)))
9695 (arguments
9696 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9697 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9698 #:tests? #f
4323a5f0
AE
9699 ;; Hard-code the path to pkg-config.
9700 #:phases
9701 (modify-phases %standard-phases
9702 (add-before
9703 'build 'patch
9704 (lambda _
9705 (substitute* "pkgconfig/pkgconfig.py"
9706 (("cmd = 'pkg-config")
9707 (string-append "cmd = '" (which "pkg-config"))))
9708 #t)))))
9709 (home-page "http://github.com/matze/pkgconfig")
9710 (synopsis "Python interface for pkg-config")
9711 (description "This module provides a Python interface to pkg-config. It
9712can be used to find all pkg-config packages, check if a package exists,
9713check if a package meets certain version requirements, query CFLAGS and
9714LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9715 (license license:expat)))
4323a5f0
AE
9716
9717(define-public python2-pkgconfig
9718 (package-with-python2 python-pkgconfig))
9719
2e697322
BW
9720(define-public python-bz2file
9721 (package
9722 (name "python-bz2file")
9723 (version "0.98")
9724 (source
9725 (origin
9726 (method url-fetch)
9727 (uri (pypi-uri "bz2file" version))
9728 (sha256
9729 (base32
9730 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9731 (build-system python-build-system)
9732 (arguments
124df723 9733 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9734 (home-page "https://github.com/nvawda/bz2file")
9735 (synopsis "Read and write bzip2-compressed files")
9736 (description
9737 "Bz2file is a Python library for reading and writing bzip2-compressed
9738files. It contains a drop-in replacement for the I/O interface in the
9739standard library's @code{bz2} module, including features from the latest
9740development version of CPython that are not available in older releases.")
3f641af0 9741 (license license:asl2.0)
2e697322
BW
9742 (properties `((python2-variant . ,(delay python2-bz2file))))))
9743
9744(define-public python2-bz2file
9745 (let ((base (package-with-python2
9746 (strip-python2-variant python-bz2file))))
9747 (package
9748 (inherit base)
124df723 9749 (arguments
752bb447
BW
9750 `(#:python ,python-2
9751 #:phases
124df723
BW
9752 (modify-phases %standard-phases
9753 ;; 'python setup.py test' does not work as of 0.98.
9754 ;; There is only the one test file, so we run it directly.
9755 (replace 'check
9756 (lambda _ (zero? (system* "python"
9757 "test_bz2file.py"))))))))))
2e697322 9758
da4ac1aa
BW
9759(define-public python-future
9760 (package
9761 (name "python-future")
9762 (version "0.15.2")
9763 (source
9764 (origin
9765 (method url-fetch)
9766 (uri (pypi-uri "future" version))
9767 (sha256
9768 (base32
9769 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9770 (build-system python-build-system)
9771 ;; Many tests connect to the network or are otherwise flawed.
9772 ;; https://github.com/PythonCharmers/python-future/issues/210
9773 (arguments
9774 `(#:tests? #f))
9775 (home-page "http://python-future.org")
9776 (synopsis "Single-source support for Python 3 and 2")
9777 (description
9778 "@code{python-future} is the missing compatibility layer between Python 2 and
9779Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9780to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9781 (license license:expat)))
da4ac1aa
BW
9782
9783(define-public python2-future
f210e944 9784 (package-with-python2 python-future))
da4ac1aa 9785
8e451885
AE
9786(define-public python-cysignals
9787 (package
9788 (name "python-cysignals")
9789 (version "1.1.0")
9790 (source
9791 (origin
9792 (method url-fetch)
9793 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9794 (sha256
9795 (base32
9796 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9797 (build-system python-build-system)
9798 (native-inputs
9799 `(("python-cython" ,python-cython)
8e451885
AE
9800 ("python-sphinx" ,python-sphinx)))
9801 (inputs
9802 `(("pari-gp" ,pari-gp)))
9803 (arguments
9804 `(#:modules ((guix build python-build-system)
9805 ((guix build gnu-build-system) #:prefix gnu:)
9806 (guix build utils))
9807 ;; FIXME: Tests are executed after installation and currently fail
9808 ;; when not installing into standard locations; the author is working
9809 ;; on a fix.
9810 #:tests? #f
9811 #:phases
9812 (modify-phases %standard-phases
9813 (add-before
9814 'build 'configure
9815 (assoc-ref gnu:%standard-phases 'configure)))))
9816 (home-page
9817 "https://github.com/sagemath/cysignals")
9818 (synopsis
9819 "Handling of interrupts and signals for Cython")
9820 (description
9821 "The cysignals package provides mechanisms to handle interrupts (and
9822other signals and errors) in Cython code, using two related approaches,
9823for mixed Cython/Python code or external C libraries and pure Cython code,
9824respectively.")
3f641af0 9825 (license license:lgpl3+)))
8e451885
AE
9826
9827(define-public python2-cysignals
9828 (package-with-python2 python-cysignals))
9829
63bcec71
DM
9830(define-public python2-shedskin
9831 (package
9832 (name "python2-shedskin")
9833 (version "0.9.4")
9834 (source
9835 (origin
9836 (method url-fetch)
9837 (uri (string-append "https://github.com/shedskin/shedskin/"
9838 "releases/download/v" version
9839 "/shedskin-" version ".tgz"))
9840 (sha256
9841 (base32
9842 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9843 (build-system python-build-system)
9844 (arguments
9845 `(#:python ,python-2
9846 #:phases (modify-phases %standard-phases
9847 (add-after 'unpack 'fix-resulting-include-libs
9848 (lambda* (#:key inputs #:allow-other-keys)
9849 (let ((libgc (assoc-ref inputs "libgc"))
9850 (pcre (assoc-ref inputs "pcre")))
9851 (substitute* "shedskin/makefile.py"
9852 (("variable == 'CCFLAGS':[ ]*")
9853 (string-append "variable == 'CCFLAGS':\n"
9854 " line += ' -I " pcre "/include"
9855 " -I " libgc "/include'"))
9856 (("variable == 'LFLAGS':[ ]*")
9857 (string-append "variable == 'LFLAGS':\n"
9858 " line += ' -L" pcre "/lib"
9859 " -L " libgc "/lib'")))
9860 #t))))))
63bcec71
DM
9861 (inputs `(("pcre" ,pcre)
9862 ("libgc" ,libgc)))
9863 (home-page "https://shedskin.github.io/")
9864 (synopsis "Experimental Python-2 to C++ Compiler")
9865 (description (string-append "This is an experimental compiler for a subset of
9866Python. It generates C++ code and a Makefile."))
3f641af0 9867 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9868
9869(define-public python2-rope
9870 (package
9871 (name "python2-rope")
9872 (version "0.10.3")
9873 (source
9874 (origin
9875 (method url-fetch)
9876 (uri (pypi-uri "rope" version))
9877 (sha256
9878 (base32
9879 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9880 (arguments
9881 ;; Rope is currently python-2 only.
9882 ;; https://github.com/python-rope/rope/issues/57
9883 `(#:python ,python-2))
9884 (build-system python-build-system)
9885 (native-inputs
f3b98f4f 9886 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
9887 (home-page "https://github.com/python-rope/rope")
9888 (synopsis "Refactoring library for Python")
9889 (description "Rope is a refactoring library for Python. It facilitates
9890the renaming, moving and extracting of attributes, functions, modules, fields
9891and parameters in Python 2 source code. These refactorings can also be applied
9892to occurences in strings and comments.")
3f641af0 9893 (license license:gpl2)))
6ba8ca17
9894
9895(define-public python-py3status
9896 (package
9897 (name "python-py3status")
d2262d70 9898 (version "3.1")
6ba8ca17
9899 (source
9900 (origin
9901 (method url-fetch)
9902 (uri (pypi-uri "py3status" version))
9903 (sha256
9904 (base32
d2262d70 9905 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 9906 (build-system python-build-system)
6ba8ca17
9907 (home-page "https://github.com/ultrabug/py3status")
9908 (synopsis "Extensible i3status wrapper written in Python")
9909 (description "py3status is an i3status wrapper which extends i3status
9910functionality in a modular way, allowing you to extend your panel with your
9911own code, responding to click events and updating clock every second.")
3f641af0 9912 (license license:bsd-3)))
b8fdbca3
HG
9913
9914(define-public python-tblib
9915 (package
9916 (name "python-tblib")
9917 (version "1.3.0")
9918 (source (origin
9919 (method url-fetch)
9920 (uri (pypi-uri "tblib" version))
9921 (sha256 (base32
9922 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9923 (build-system python-build-system)
9924 (arguments
9925 `(#:phases
9926 (modify-phases %standard-phases
9927 (replace 'check
9928 (lambda _
9929 ;; Upstream runs tests after installation and the package itself
9930 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9931 ;; found.
9932 (setenv "PYTHONPATH"
9933 (string-append (getcwd) "/build/lib:"
9934 (getenv "PYTHONPATH")))
9935 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9936 (native-inputs
9937 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
9938 ("python-six" ,python-six)))
9939 (home-page "https://github.com/ionelmc/python-tblib")
9940 (synopsis "Traceback serialization library")
9941 (description
9942 "Traceback serialization allows you to:
9943
9944@enumerate
9945@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9946different processes. This allows better error handling when running code over
9947multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9948
9949@item Parse traceback strings and raise with the parsed tracebacks.
9950@end itemize")
3f641af0 9951 (license license:bsd-3)))
b8fdbca3
HG
9952
9953(define-public python2-tblib
9954 (package-with-python2 python-tblib))
1a024de4
HG
9955
9956(define-public python-sqlparse
9957 (package
9958 (name "python-sqlparse")
9959 (version "0.1.19")
9960 (source (origin
9961 (method url-fetch)
9962 (uri (pypi-uri "sqlparse" version))
9963 (sha256
9964 (base32
9965 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9966 (build-system python-build-system)
9967 (arguments
9968 `(#:phases
9969 (modify-phases %standard-phases
9970 (replace 'check
9971 (lambda* _
9972 ;; setup.py-integrated 2to3 only affects the build files, but
9973 ;; py.test is using the source files. So we need to convert them
9974 ;; manually.
9975 (when (zero? (system* "python3"))
9976 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9977 (zero? (system* "py.test")))))))
9978 (native-inputs
f3b98f4f 9979 `(("python-pytest" ,python-pytest)))
1a024de4
HG
9980 (home-page "https://github.com/andialbrecht/sqlparse")
9981 (synopsis "Non-validating SQL parser")
9982 (description "Sqlparse is a non-validating SQL parser for Python. It
9983provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9984 (license license:bsd-3)))
1a024de4
HG
9985
9986(define-public python2-sqlparse
9987 (package-with-python2 python-sqlparse))
68b9d242
SB
9988
9989(define-public python-greenlet
9990 (package
9991 (name "python-greenlet")
9992 (version "0.4.9")
9993 (source (origin
9994 (method url-fetch)
9995 (uri (pypi-uri "greenlet" version))
9996 (sha256
9997 (base32
9998 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9999 (build-system python-build-system)
68b9d242
SB
10000 (home-page "https://greenlet.readthedocs.io/")
10001 (synopsis "Lightweight in-process concurrent programming")
10002 (description
10003 "Greenlet package is a spin-off of Stackless, a version of CPython
10004that supports micro-threads called \"tasklets\". Tasklets run
10005pseudo-concurrently (typically in a single or a few OS-level threads) and
10006are synchronized with data exchanges on \"channels\".")
3f641af0 10007 (license (list license:psfl license:expat))))
68b9d242
SB
10008
10009(define-public python2-greenlet
10010 (package-with-python2 python-greenlet))
d79a343b
SB
10011
10012(define-public python-gevent
10013 (package
10014 (name "python-gevent")
10015 (version "1.1.1")
10016 (source (origin
10017 (method url-fetch)
10018 (uri (pypi-uri "gevent" version))
10019 (sha256
10020 (base32
10021 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10022 (modules '((guix build utils)))
10023 (snippet
10024 '(begin
10025 ;; unbunding libev and c-ares
10026 (for-each delete-file-recursively '("libev" "c-ares"))
10027 ;; fixing testsuite
10028 (call-with-output-file "greentest/__init__.py" noop)
10029 (substitute* "greentest/testrunner.py"
10030 (("import util") "from . import util")
10031 (("from util import log") "from .util import log"))))))
10032 (build-system python-build-system)
10033 (propagated-inputs
10034 `(("python-greenlet" ,python-greenlet)))
10035 (native-inputs
f3b98f4f 10036 `(("python-six" ,python-six)))
d79a343b
SB
10037 (inputs
10038 `(("c-ares" ,c-ares)
10039 ("libev" ,libev)))
10040 (home-page "http://www.gevent.org/")
10041 (synopsis "Coroutine-based network library")
10042 (description
10043 "gevent is a coroutine-based Python networking library that uses greenlet
10044to provide a high-level synchronous API on top of the libev event loop.")
10045 (license license:expat)))
10046
10047(define-public python2-gevent
10048 (package-with-python2 python-gevent))
da3aeeb6
SB
10049
10050(define-public python-twisted
10051 (package
10052 (name "python-twisted")
10053 (version "16.2.0")
10054 (source (origin
10055 (method url-fetch)
8ea8e8d3 10056 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10057 (sha256
10058 (base32
10059 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10060 (build-system python-build-system)
45912170
SB
10061 (propagated-inputs
10062 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10063 (home-page "https://twistedmatrix.com/")
10064 (synopsis "Asynchronous networking framework written in Python")
10065 (description
10066 "Twisted is an extensible framework for Python programming, with special
10067focus on event-based network programming and multiprotocol integration.")
10068 (license license:expat)))
10069
10070(define-public python2-twisted
10071 (package-with-python2 python-twisted))
d0b6fed6 10072
4d3fa5a4
EF
10073(define-public python-pika
10074 (package
10075 (name "python-pika")
10076 (version "0.10.0")
10077 (source
10078 (origin
10079 (method url-fetch)
10080 (uri (pypi-uri "pika" version))
10081 (sha256
10082 (base32
10083 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10084 (build-system python-build-system)
10085 (native-inputs
269d9172
LF
10086 `(("python-pyev" ,python-pyev)
10087 ("python-tornado" ,python-tornado)
10088 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10089 (home-page "https://pika.readthedocs.org")
10090 (synopsis "Pure Python AMQP Client Library")
10091 (description
10092 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10093Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10094network support library.")
10095 (license license:bsd-3)))
10096
10097(define-public python2-pika
10098 (package-with-python2 python-pika))
10099
d0b6fed6
DM
10100(define-public python-ply
10101 (package
10102 (name "python-ply")
10103 (version "3.8")
10104 (source
10105 (origin
10106 (method url-fetch)
10107 (uri (string-append
10108 "https://pypi.python.org/packages/"
10109 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10110 "/ply-" version ".tar.gz"))
10111 (sha256
10112 (base32
10113 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10114 (build-system python-build-system)
10115 (home-page "http://www.dabeaz.com/ply/")
10116 (synopsis "Python Lex & Yacc")
10117 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10118It uses LR parsing and does extensive error checking.")
f210e944 10119 (license license:bsd-3)))
d0b6fed6
DM
10120
10121(define-public python2-ply
f210e944 10122 (package-with-python2 python-ply))
d951bd54
SB
10123
10124(define-public python-tabulate
10125 (package
10126 (name "python-tabulate")
10127 (version "0.7.5")
10128 (source (origin
10129 (method url-fetch)
10130 (uri (pypi-uri "tabulate" version))
10131 (sha256
10132 (base32
10133 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10134 ;; Fix tests
10135 (modules '((guix build utils)))
10136 (snippet '(substitute* '("test/test_cli.py"
10137 "test/test_input.py"
10138 "test/test_output.py"
10139 "test/test_regression.py")
10140 (("from common") "from nose.tools")))))
10141 (build-system python-build-system)
10142 (native-inputs
f3b98f4f 10143 `(;; For testing
d951bd54
SB
10144 ("python-nose" ,python-nose)))
10145 (home-page "https://bitbucket.org/astanin/python-tabulate")
10146 (synopsis "Pretty-print tabular data")
10147 (description
10148 "Tabulate is a library and command-line utility to pretty-print tabular
10149data in Python.")
10150 (license license:expat)))
10151
10152(define-public python2-tabulate
10153 (package-with-python2 python-tabulate))
1c4c8a33
SB
10154
10155(define-public python-kazoo
10156 (package
10157 (name "python-kazoo")
10158 (version "2.2.1")
10159 (source
10160 (origin
10161 (method url-fetch)
10162 (uri (pypi-uri "kazoo" version))
10163 (sha256
10164 (base32
10165 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10166 (build-system python-build-system)
10167 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10168 (propagated-inputs
10169 `(("python-six" ,python-six)))
1c4c8a33
SB
10170 (home-page "https://kazoo.readthedocs.org")
10171 (synopsis "High-level Zookeeper client library")
10172 (description
10173 "Kazoo is a Python client library for the Apache Zookeeper distributed
10174application service. It is designed to be easy to use and to avoid common
10175programming errors.")
3f641af0 10176 (license license:asl2.0)))
1c4c8a33
SB
10177
10178(define-public python2-kazoo
10179 (package-with-python2 python-kazoo))
45dda35e
SB
10180
10181(define-public python-pykafka
10182 (package
10183 (name "python-pykafka")
10184 (version "2.4.0")
10185 (source (origin
10186 (method url-fetch)
c6bccf71
EF
10187 (uri (string-append
10188 "https://pypi.python.org/packages/8b/3e/"
10189 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10190 "pykafka-" version ".tar.gz"))
45dda35e
SB
10191 (sha256
10192 (base32
10193 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10194 (build-system python-build-system)
10195 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10196 (propagated-inputs
45dda35e
SB
10197 `(("python-gevent" ,python-gevent)
10198 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10199 ("python-tabulate" ,python-tabulate)))
10200 (inputs
10201 `(("librdkafka" ,librdkafka)))
10202 (home-page "https://pykafka.readthedocs.io/")
10203 (synopsis "Apache Kafka client for Python")
10204 (description
10205 "PyKafka is a client for the Apache Kafka distributed messaging system.
10206It includes Python implementations of Kafka producers and consumers, which
10207are optionally backed by a C extension built on librdkafka.")
3f641af0 10208 (license license:asl2.0)))
45dda35e
SB
10209
10210(define-public python2-pykafka
10211 (package-with-python2 python-pykafka))
a44fd439
DM
10212
10213(define-public python-wcwidth
10214 (package
10215 (name "python-wcwidth")
10216 (version "0.1.6")
10217 (source
10218 (origin
10219 (method url-fetch)
10220 (uri (string-append
10221 "https://pypi.python.org/packages/"
10222 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10223 "wcwidth-" version ".tar.gz"))
10224 (sha256
10225 (base32
10226 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10227 (build-system python-build-system)
10228 (home-page "https://github.com/jquast/wcwidth")
66e07664 10229 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10230 (description "Wcwidth measures the number of terminal column cells of
10231wide-character codes. It is useful for those implementing a terminal emulator,
10232or programs that carefully produce output to be interpreted by one. It is a
10233Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10234specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10235 (license license:expat)))
a44fd439
DM
10236
10237(define-public python2-wcwidth
f210e944 10238 (package-with-python2 python-wcwidth))
0de78c95
DP
10239
10240(define-public python2-jsonrpclib
10241 (package
10242 (name "python2-jsonrpclib")
10243 (version "0.1.7")
10244 (source (origin
10245 (method url-fetch)
10246 (uri (string-append
10247 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10248 "jsonrpclib-" version ".tar.gz"))
10249 (sha256
10250 (base32
10251 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10252 (build-system python-build-system)
0de78c95
DP
10253 (arguments
10254 `(#:tests? #f
10255 #:python ,python-2))
10256 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10257 (synopsis "Implementation of JSON-RPC specification for Python")
10258 (description
10259 "This library is an implementation of the JSON-RPC specification.
10260It supports both the original 1.0 specification, as well as the
10261new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10262etc.")
3f641af0 10263 (license license:asl2.0)))
9250b0f3
SB
10264
10265(define-public python-chai
10266 (package
10267 (name "python-chai")
10268 (version "1.1.1")
10269 (source (origin
10270 (method url-fetch)
10271 (uri (pypi-uri "chai" version))
10272 (sha256
10273 (base32
10274 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10275 (build-system python-build-system)
9250b0f3
SB
10276 (home-page "https://github.com/agoragames/chai")
10277 (synopsis "Mocking framework for Python")
10278 (description
10279 "Chai provides an api for mocking, stubbing and spying your python
10280objects, patterned after the Mocha library for Ruby.")
3f641af0 10281 (license license:bsd-3)))
9250b0f3
SB
10282
10283(define-public python2-chai
10284 (package-with-python2 python-chai))
10285
ae43baa8
SB
10286(define-public python-arrow
10287 (package
10288 (name "python-arrow")
10289 (version "0.8.0")
10290 (source (origin
10291 (method url-fetch)
10292 (uri (pypi-uri "arrow" version))
10293 (sha256
10294 (base32
10295 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10296 (build-system python-build-system)
10297 (native-inputs
f3b98f4f 10298 `(;; For testing
ae43baa8
SB
10299 ("python-chai" ,python-chai)
10300 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10301 (propagated-inputs
10302 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10303 (home-page "https://github.com/crsmithdev/arrow/")
10304 (synopsis "Dates and times for Python")
10305 (description
10306 "Arrow is a Python library to creating, manipulating, formatting and
10307converting dates, times, and timestamps. It implements and updates the
10308datetime type.")
3f641af0 10309 (license license:asl2.0)))
ae43baa8
SB
10310
10311(define-public python2-arrow
10312 (package-with-python2 python-arrow))
10313
1f2b62a4
SB
10314(define-public python-inflection
10315 (package
10316 (name "python-inflection")
10317 (version "0.3.1")
10318 (source
10319 (origin (method url-fetch)
10320 (uri (pypi-uri "inflection" version))
10321 (sha256
10322 (base32
10323 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10324 (build-system python-build-system)
e9127525
MB
10325 (native-inputs
10326 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
10327 (home-page "http://github.com/jpvanhal/inflection")
10328 (synopsis "Python string transformation library")
10329 (description
10330 "Inflection is a string transformation library. It singularizes
10331and pluralizes English words, and transforms strings from CamelCase to
10332underscored string.")
10333 (license license:expat)))
10334
10335(define-public python2-inflection
10336 (package-with-python2 python-inflection))
10337
18995566
SB
10338(define-public python-pylev
10339 (package
10340 (name "python-pylev")
10341 (version "1.3.0")
10342 (source (origin
10343 (method url-fetch)
10344 (uri (pypi-uri "pylev" version))
10345 (sha256
10346 (base32
10347 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10348 (build-system python-build-system)
18995566
SB
10349 (home-page "http://github.com/toastdriven/pylev")
10350 (synopsis "Levenshtein distance implementation in Python")
10351 (description "Pure Python Levenshtein implementation, based off the
10352Wikipedia code samples at
10353@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10354 (license license:bsd-3)))
18995566
SB
10355
10356(define-public python2-pylev
10357 (package-with-python2 python-pylev))
10358
f5deff7a
SB
10359(define-public python-cleo
10360 (package
10361 (name "python-cleo")
10362 (version "0.4.1")
10363 (source (origin
10364 (method url-fetch)
10365 (uri (pypi-uri "cleo" version))
10366 (sha256
10367 (base32
10368 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10369 (build-system python-build-system)
10370 (native-inputs
f3b98f4f 10371 `(;; For testing
f5deff7a
SB
10372 ("python-mock" ,python-mock)
10373 ("python-pytest" ,python-pytest)))
9403150a
SB
10374 (propagated-inputs
10375 `(("python-psutil" ,python-psutil)
10376 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10377 (home-page "https://github.com/sdispater/cleo")
10378 (synopsis "Command-line arguments library for Python")
10379 (description
10380 "Cleo allows you to create command-line commands with signature in
10381docstring and colored output.")
10382 (license license:expat)))
10383
10384(define-public python2-cleo
10385 (package-with-python2 python-cleo))
10386
77cadb43
SB
10387(define-public python-lazy-object-proxy
10388 (package
10389 (name "python-lazy-object-proxy")
10390 (version "1.2.2")
10391 (source (origin
10392 (method url-fetch)
10393 (uri (pypi-uri "lazy-object-proxy" version))
10394 (sha256
10395 (base32
10396 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10397 (build-system python-build-system)
77cadb43
SB
10398 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10399 (synopsis "Lazy object proxy for python")
10400 (description
10401 "Lazy object proxy is an object that wraps a callable but defers the call
10402until the object is actually required, and caches the result of said call.")
3f641af0 10403 (license license:bsd-2)))
77cadb43
SB
10404
10405(define-public python2-lazy-object-proxy
10406 (package-with-python2 python-lazy-object-proxy))
10407
5477e05f
SB
10408(define-public python-dnspython
10409 (package
10410 (name "python-dnspython")
6c514128 10411 (version "1.15.0")
5477e05f
SB
10412 (source (origin
10413 (method url-fetch)
10414 (uri (string-append "http://www.dnspython.org/kits/"
10415 version "/dnspython-" version ".tar.gz"))
10416 (sha256
10417 (base32
6c514128 10418 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10419 (build-system python-build-system)
10420 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10421 (home-page "http://www.dnspython.org")
10422 (synopsis "DNS toolkit for Python")
10423 (description
10424 "dnspython is a DNS toolkit for Python. It supports almost all record
10425types. It can be used for queries, zone transfers, and dynamic updates.
10426It supports TSIG authenticated messages and EDNS0.")
10427 (license license:expat)))
10428
10429(define-public python2-dnspython
10430 (package-with-python2 python-dnspython))
10431
22711e25
SB
10432(define-public python-email-validator
10433 (package
10434 (name "python-email-validator")
10435 (version "1.0.1")
10436 (source
10437 (origin (method url-fetch)
10438 (uri (pypi-uri "email_validator" version))
10439 (sha256
10440 (base32
10441 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10442 (build-system python-build-system)
10443 (arguments
10444 '(#:phases
10445 (modify-phases %standard-phases
10446 (add-before 'build 'use-dnspython
10447 (lambda _
10448 (substitute* "setup.py"
10449 (("dnspython3") "dnspython"))
10450 #t)))))
d42560bd 10451 (propagated-inputs
22711e25 10452 `(("python-dnspython" ,python-dnspython)
d42560bd 10453 ("python-idna" ,python-idna)))
22711e25
SB
10454 (home-page "https://github.com/JoshData/python-email-validator")
10455 (synopsis "Email address validation library for Python")
10456 (description
10457 "This library validates email address syntax and deliverability.")
3f641af0 10458 (license license:cc0)))
22711e25
SB
10459
10460(define-public python2-email-validator
10461 (package-with-python2 python-email-validator))
10462
8987d91e
SB
10463(define-public python-ukpostcodeparser
10464 (package
10465 (name "python-ukpostcodeparser")
10466 (version "1.0.3")
10467 (source (origin
10468 (method url-fetch)
10469 (uri (pypi-uri "UkPostcodeParser" version))
10470 (sha256
10471 (base32
10472 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10473 (build-system python-build-system)
8987d91e
SB
10474 (home-page "https://github.com/hamstah/ukpostcodeparser")
10475 (synopsis "UK Postcode parser for Python")
10476 (description
10477 "This library provides the @code{parse_uk_postcode} function for
10478parsing UK postcodes.")
10479 (license license:expat)))
10480
10481(define-public python2-ukpostcodeparser
10482 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10483
10484(define-public python-fake-factory
10485 (package
10486 (name "python-fake-factory")
7adc698f 10487 (version "0.7.2")
ea92ae01
SB
10488 (source (origin
10489 (method url-fetch)
10490 (uri (pypi-uri "fake-factory" version))
10491 (sha256
10492 (base32
7adc698f 10493 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10494 (build-system python-build-system)
b7f3ea95
MB
10495 (arguments
10496 '(#:phases
10497 (modify-phases %standard-phases
10498 (replace 'check
10499 (lambda _
10500 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 10501 (native-inputs
f3b98f4f 10502 `(;; For testing
ea92ae01
SB
10503 ("python-email-validator" ,python-email-validator)
10504 ("python-mock" ,python-mock)
10505 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10506 (propagated-inputs
10507 `(("python-dateutil" ,python-dateutil-2)
10508 ("python-six" ,python-six)))
7adc698f 10509 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10510 (synopsis "Python package that generates fake data")
10511 (description
10512 "Faker is a Python package that generates fake data such as names,
10513addresses, and phone numbers.")
10514 (license license:expat)
10515 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10516
10517(define-public python2-fake-factory
10518 (let ((base (package-with-python2 (strip-python2-variant
10519 python-fake-factory))))
10520 (package
10521 (inherit base)
24c9aa18 10522 (propagated-inputs
ea92ae01 10523 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10524 ,@(package-propagated-inputs base))))))
ea92ae01 10525
b49504fd
SB
10526(define-public python-pyaml
10527 (package
10528 (name "python-pyaml")
10529 (version "15.8.2")
10530 (source (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "pyaml" version))
10533 (sha256
10534 (base32
10535 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10536 (build-system python-build-system)
f620311a
MB
10537 (native-inputs
10538 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
10539 (propagated-inputs
10540 `(("python-pyyaml" ,python-pyyaml)))
10541 (home-page "https://github.com/mk-fg/pretty-yaml")
10542 (synopsis "YAML pretty-print library for Python")
10543 (description
10544 "pyaml is a PyYAML based python module to produce pretty and readable
10545YAML-serialized data.")
3f641af0 10546 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10547
10548(define-public python2-pyaml
10549 (package-with-python2 python-pyaml))
10550
347175a2
SB
10551(define-public python-flexmock
10552 (package
10553 (name "python-flexmock")
10554 (version "0.10.2")
10555 (source (origin
10556 (method url-fetch)
10557 (uri (pypi-uri "flexmock" version))
10558 (sha256
10559 (base32
10560 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10561 (build-system python-build-system)
347175a2
SB
10562 (home-page "https://flexmock.readthedocs.org")
10563 (synopsis "Testing library for Python")
10564 (description
10565 "flexmock is a testing library for Python that makes it easy to create
10566mocks, stubs and fakes.")
3f641af0 10567 (license license:bsd-3)))
347175a2
SB
10568
10569(define-public python2-flexmock
10570 (package-with-python2 python-flexmock))
10571
5a744191
SB
10572(define-public python-orator
10573 (package
10574 (name "python-orator")
10575 (version "0.8.2")
10576 (source (origin
10577 (method url-fetch)
10578 (uri (pypi-uri "orator" version))
10579 (sha256
10580 (base32
10581 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10582 (build-system python-build-system)
10583 (arguments '(#:tests? #f)) ; no tests
b2676030 10584 (propagated-inputs
5a744191
SB
10585 `(("python-arrow" ,python-arrow)
10586 ("python-blinker" ,python-blinker)
10587 ("python-cleo" ,python-cleo)
10588 ("python-fake-factory" ,python-fake-factory)
10589 ("python-inflection" ,python-inflection)
10590 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10591 ("python-pyaml" ,python-pyaml)
5a744191
SB
10592 ("python-simplejson" ,python-simplejson)
10593 ("python-wrapt" ,python-wrapt)))
10594 (home-page "https://orator-orm.com/")
10595 (synopsis "ActiveRecord ORM for Python")
10596 (description
10597 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10598implementation for Python.")
10599 (license license:expat)
10600 (properties `((python2-variant . ,(delay python2-orator))))))
10601
10602(define-public python2-orator
10603 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10604 (package
10605 (inherit base)
06961617 10606 (propagated-inputs
5a744191 10607 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10608 ,@(package-propagated-inputs base))))))
f4155188
DM
10609
10610(define-public python-prompt-toolkit
10611 (package
10612 (name "python-prompt-toolkit")
d15e2ef0 10613 (version "1.0.7")
f4155188
DM
10614 (source
10615 (origin
10616 (method url-fetch)
d15e2ef0 10617 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10618 (sha256
10619 (base32
d15e2ef0 10620 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10621 (build-system python-build-system)
bae18710
LF
10622 (arguments
10623 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10624 (propagated-inputs
10625 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10626 ("python-six" ,python-six)
f22efa01 10627 ("python-pygments" ,python-pygments)))
f4155188
DM
10628 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10629 (synopsis "Library for building command line interfaces in Python")
10630 (description
10631 "Prompt-Toolkit is a library for building interactive command line
10632interfaces in Python. It's like GNU Readline but it also features syntax
10633highlighting while typing, out-of-the-box multi-line input editing, advanced
10634code completion, incremental search, support for Chinese double-width
10635characters, mouse support, and auto suggestions.")
f210e944 10636 (license license:bsd-3)))
f4155188
DM
10637
10638(define-public python2-prompt-toolkit
f210e944 10639 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10640
10641(define-public python-jedi
10642 (package
10643 (name "python-jedi")
10644 (version "0.9.0")
10645 (source
10646 (origin
10647 (method url-fetch)
10648 (uri (pypi-uri "jedi" version))
10649 (sha256
10650 (base32
10651 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10652 (build-system python-build-system)
10653 (home-page "https://github.com/davidhalter/jedi")
10654 (synopsis
10655 "Autocompletion for Python that can be used for text editors")
10656 (description
10657 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10658 (license license:expat)))
a502dfbf
DM
10659
10660(define-public python2-jedi
f210e944 10661 (package-with-python2 python-jedi))
c2f0dc6e
DM
10662
10663(define-public ptpython
10664 (package
10665 (name "ptpython")
10666 (version "0.34")
10667 (source (origin
10668 (method url-fetch)
10669 (uri (pypi-uri "ptpython" version))
10670 (sha256
10671 (base32
10672 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10673 (build-system python-build-system)
f22efa01 10674 (propagated-inputs
c2f0dc6e
DM
10675 `(("python-docopt" ,python-docopt)
10676 ("python-jedi" ,python-jedi)
10677 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10678 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10679 (home-page "https://github.com/jonathanslenders/ptpython")
10680 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10681 (description
10682 "ptpython is a Python read-eval-print loop with IDE-like features.
10683It supports syntax highlighting, multiline editing, autocompletion, mouse,
10684color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10685etc.")
3f641af0 10686 (license license:bsd-3)
c2f0dc6e
DM
10687 (properties `((python2-variant . ,(delay ptpython-2))))))
10688
10689(define-public ptpython-2
10690 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10691 (package
10692 (inherit base)
10693 (name "ptpython2"))))
b227f0be 10694
b04a52a6
DJ
10695(define-public python-requests-oauthlib
10696 (package
10697 (name "python-requests-oauthlib")
10698 (version "0.6.2")
10699 (source
10700 (origin
10701 (method url-fetch)
10702 (uri (pypi-uri "requests-oauthlib" version))
10703 (sha256
10704 (base32
10705 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10706 (build-system python-build-system)
10707 (arguments
10708 `(#:phases
10709 (modify-phases %standard-phases
10710 ;; removes tests that require network access
10711 (add-before 'check 'pre-check
10712 (lambda _
10713 (delete-file "tests/test_core.py")
10714 #t)))))
10715 (native-inputs
10716 `(("python-requests-mock" ,python-requests-mock)
10717 ("python-mock" ,python-mock)))
f22efa01 10718 (propagated-inputs
b04a52a6
DJ
10719 `(("python-oauthlib" ,python-oauthlib)
10720 ("python-requests" ,python-requests)))
10721 (home-page
10722 "https://github.com/requests/requests-oauthlib")
10723 (synopsis
10724 "OAuthlib authentication support for Requests")
10725 (description
10726 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10727provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10728 (license license:isc)))
b04a52a6
DJ
10729
10730(define-public python2-requests-oauthlib
f210e944 10731 (package-with-python2 python-requests-oauthlib))
b04a52a6 10732
b227f0be 10733(define-public python-stem
10734 (package
10735 (name "python-stem")
10736 (version "1.4.1b")
10737 (source
10738 (origin
10739 (method url-fetch)
10740 (uri (pypi-uri "stem" version ".tar.bz2"))
10741 (sha256
10742 (base32
10743 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10744 (build-system python-build-system)
10745 (arguments
10746 `(#:phases
10747 (modify-phases %standard-phases
10748 (replace 'check
10749 (lambda _
10750 (zero? (system* "./run_tests.py" "--unit")))))))
10751 (native-inputs
10752 `(("python-mock" ,python-mock)
10753 ("python-pep8" ,python-pep8)
10754 ("python-pyflakes" ,python-pyflakes)))
f22efa01 10755 (propagated-inputs
b227f0be 10756 `(("python-pycrypto" ,python-pycrypto)))
10757 (home-page "https://stem.torproject.org/")
10758 (synopsis
10759 "Python controller library that allows applications to interact with Tor")
10760 (description
10761 "Stem is a Python controller library for Tor. With it you can use Tor's
10762control protocol to script against the Tor process and read descriptor data
10763relays publish about themselves.")
3f641af0 10764 (license license:lgpl3)))
b227f0be 10765
10766(define-public python2-stem
10767 (package-with-python2 python-stem))
517a6c0c
DM
10768
10769(define-public python-pyserial
10770 (package
10771 (name "python-pyserial")
10772 (version "3.1.1")
10773 (source
10774 (origin
10775 (method url-fetch)
10776 (uri (pypi-uri "pyserial" version))
10777 (sha256
10778 (base32
10779 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10780 (build-system python-build-system)
10781 (home-page
10782 "https://github.com/pyserial/pyserial")
10783 (synopsis "Python Serial Port Bindings")
10784 (description "@code{pyserial} provide serial port bindings for Python. It
10785supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10786and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10787 (license license:bsd-3)))
517a6c0c
DM
10788
10789(define-public python2-pyserial
f210e944 10790 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10791
10792(define-public python-kivy
10793 (package
10794 (name "python-kivy")
10795 (version "1.9.1")
10796 (source
10797 (origin
10798 (method url-fetch)
10799 (uri (pypi-uri "kivy" version))
10800 (file-name (string-append name "-" version ".tar.gz"))
10801 (sha256
10802 (base32
10803 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10804 (build-system python-build-system)
10805 (arguments
10806 `(#:tests? #f ; Tests require many optional packages
10807 #:phases
10808 (modify-phases %standard-phases
10809 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10810 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10811 (lambda* (#:key inputs #:allow-other-keys)
10812 (setenv "KIVY_SDL2_PATH"
10813 (string-append (assoc-ref inputs "sdl-union")
10814 "/include/SDL2"))
10815 #t)))))
10816 (native-inputs
f2516de2
HG
10817 `(("pkg-config" ,pkg-config)
10818 ("python-cython" ,python-cython)))
6eb7af2a 10819 (inputs
f2516de2 10820 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10821 ("mesa" ,mesa)
10822 ("sdl-union"
10823 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10824 (home-page "http://kivy.org")
10825 (synopsis
10826 "Multitouch application framework")
10827 (description
10828 "A software library for rapid development of
10829hardware-accelerated multitouch applications.")
10830 (license license:expat)))
10831
10832(define-public python2-kivy
10833 (package-with-python2 python-kivy))
10834
10835(define-public python-kivy-next
10836 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10837 (revision "1"))
10838 (package (inherit python-kivy)
10839 (name "python-kivy-next")
d80a71eb 10840 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10841 (string-take commit 7)))
10842 (source
10843 (origin
10844 (method git-fetch)
10845 (uri (git-reference
10846 (url "https://github.com/kivy/kivy")
10847 (commit commit)))
10848 (file-name (string-append name "-" version "-checkout"))
10849 (sha256
10850 (base32
10851 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10852
10853(define-public python2-kivy-next
10854 (package-with-python2 python-kivy-next))
8794bd8b
DC
10855
10856(define-public python-binaryornot
10857 (package
10858 (name "python-binaryornot")
10859 (version "0.4.0")
10860 (source (origin
10861 (method url-fetch)
10862 (uri (pypi-uri "binaryornot" version))
10863 (sha256
10864 (base32
10865 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10866 (build-system python-build-system)
f22efa01 10867 (propagated-inputs
8794bd8b
DC
10868 `(("python-chardet" ,python-chardet)
10869 ("python-hypothesis" ,python-hypothesis)))
10870 (home-page "https://github.com/audreyr/binaryornot")
10871 (synopsis "Package to check if a file is binary or text")
10872 (description "Ultra-lightweight pure Python package to check if a file is
10873binary or text.")
10874 (license license:bsd-3)
10875 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10876
10877(define-public python2-binaryornot
10878 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10879 (package (inherit base)
f22efa01 10880 (propagated-inputs
8794bd8b 10881 `(("python2-enum34" ,python2-enum34)
f22efa01 10882 ,@(package-propagated-inputs base))))))
a9ac982a
DC
10883
10884(define-public python-nltk
10885 (package
10886 (name "python-nltk")
10887 (version "3.2.1")
10888 (source (origin
10889 (method url-fetch)
10890 (uri (pypi-uri "nltk" version))
10891 (sha256
10892 (base32
10893 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10894 (build-system python-build-system)
59f12985
LF
10895 (arguments
10896 '(;; The tests require some extra resources to be downloaded.
10897 ;; TODO Try packaging these resources.
10898 #:tests? #f))
a9ac982a
DC
10899 (home-page "http://nltk.org/")
10900 (synopsis "Natural Language Toolkit")
10901 (description "It provides interfaces to over 50 corpora and lexical
10902resources such as WordNet, along with a suite of text processing libraries
10903for classification, tokenization, stemming, tagging, parsing, and semantic
10904reasoning, wrappers for natural language processing libraries.")
f210e944 10905 (license license:asl2.0)))
a9ac982a
DC
10906
10907(define-public python2-nltk
f210e944 10908 (package-with-python2 python-nltk))
691cd90d
DC
10909
10910(define-public python-pymongo
10911 (package
10912 (name "python-pymongo")
10913 (version "3.3.0")
10914 (source (origin
10915 (method url-fetch)
10916 (uri (pypi-uri "pymongo" version))
10917 (sha256
10918 (base32
10919 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10920 (build-system python-build-system)
f22efa01 10921 (propagated-inputs
691cd90d
DC
10922 `(("python-certifi" ,python-certifi)))
10923 (home-page "http://github.com/mongodb/mongo-python-driver")
10924 (synopsis "Python driver for MongoDB")
10925 (description "Python driver for MongoDB.")
f210e944 10926 (license license:asl2.0)))
691cd90d
DC
10927
10928(define-public python2-pymongo
f210e944 10929 (package-with-python2 python-pymongo))
6a6c9d43
DC
10930
10931(define-public python-sh
10932 (package
10933 (name "python-sh")
10934 (version "1.11")
10935 (source (origin
10936 (method url-fetch)
10937 (uri (pypi-uri "sh" version))
10938 (sha256
10939 (base32
10940 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10941 (build-system python-build-system)
10942 (arguments
10943 `(#:tests? #f)) ; no tests
10944 (home-page "https://github.com/amoffat/sh")
10945 (synopsis "Python subprocess interface")
10946 (description "Abstracts process invocation by providing a function
10947interface for programs.")
f210e944 10948 (license license:expat)))
6a6c9d43
DC
10949
10950(define-public python2-sh
f210e944 10951 (package-with-python2 python-sh))
05b59190 10952
25702397
EF
10953(define-public python-consul
10954 (package
10955 (name "python-consul")
10956 (version "0.6.1")
10957 (source
10958 (origin
10959 (method url-fetch)
10960 (uri (pypi-uri "python-consul" version))
10961 (sha256
10962 (base32
10963 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10964 (build-system python-build-system)
10965 (native-inputs
fd1d6de7
HG
10966 `(("python-pytest" ,python-pytest)))
10967 (propagated-inputs
10968 `(("python-requests" ,python-requests)
25702397
EF
10969 ("python-six" ,python-six)))
10970 (home-page "https://github.com/cablehead/python-consul")
10971 (synopsis "Python client for Consul")
10972 (description
10973 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10974discovery, monitoring and configuration.")
10975 (license license:expat)))
10976
10977(define-public python2-consul
f210e944 10978 (package-with-python2 python-consul))
25702397 10979
05b59190
DC
10980(define-public python-schematics
10981 (package
10982 (name "python-schematics")
10983 (version "1.1.1")
10984 (source
10985 (origin
10986 (method url-fetch)
10987 (uri (string-append
10988 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10989 (file-name (string-append name "-" version ".tar.gz"))
10990 (sha256
10991 (base32
10992 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10993 (build-system python-build-system)
f22efa01 10994 (propagated-inputs
05b59190
DC
10995 `(("python-six" ,python-six)))
10996 (arguments
10997 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10998 ; version requirements (eg python-coveralls)
10999 (home-page "https://github.com/schematics/schematics")
11000 (synopsis "Python Data Structures for Humans")
11001 (description "Python Data Structures for Humans.")
f210e944 11002 (license license:bsd-3)))
05b59190
DC
11003
11004(define-public python2-schematics
f210e944 11005 (package-with-python2 python-schematics))
d6907ff7
DC
11006
11007(define-public python-publicsuffix
11008 (package
11009 (name "python-publicsuffix")
11010 (version "1.1.0")
11011 (source (origin
11012 (method url-fetch)
11013 (uri (pypi-uri "publicsuffix" version))
11014 (sha256
11015 (base32
11016 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11017 (build-system python-build-system)
11018 (arguments
11019 `(#:tests? #f)) ; tests use the internet
11020 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11021 (synopsis "Get suffix for a domain name")
11022 (description "Get a public suffix for a domain name using the Public Suffix
11023List.")
f210e944 11024 (license license:expat)))
d6907ff7
DC
11025
11026(define-public python2-publicsuffix
f210e944 11027 (package-with-python2 python-publicsuffix))
b2319996
DC
11028
11029(define-public python-publicsuffix2
11030 (package
11031 (name "python-publicsuffix2")
11032 (version "2.20160621")
11033 (source
11034 (origin
11035 (method url-fetch)
11036 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11037 (sha256
11038 (base32
11039 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11040 (build-system python-build-system)
10797a0a
LF
11041 (arguments
11042 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11043 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11044 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11045 (description "Get a public suffix for a domain name using the Public Suffix
11046List. Forked from and using the same API as the publicsuffix package.")
f210e944 11047 (license (list license:expat license:mpl2.0))))
b2319996
DC
11048
11049(define-public python2-publicsuffix2
f210e944 11050 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11051
11052(define-public python-url
11053 (package
11054 (name "python-url")
11055 (version "0.2.0")
11056 (source (origin
11057 (method url-fetch)
11058 (uri (pypi-uri "url" version))
11059 (sha256
11060 (base32
11061 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11062 (build-system python-build-system)
f22efa01 11063 (propagated-inputs
81f1515d
DC
11064 `(("python-publicsuffix" ,python-publicsuffix)))
11065 (native-inputs
11066 `(("python-coverage" ,python-coverage)
11067 ("python-nose" ,python-nose)))
11068 (arguments
11069 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11070 (home-page "http://github.com/seomoz/url-py")
11071 (synopsis "URL Parsing")
11072 (description "Library for parsing urls.")
11073 (license license:expat)
11074 (properties `((python2-variant . ,(delay python2-url))))))
11075
11076(define-public python2-url
11077 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11078 (package (inherit base)
f22efa01 11079 (propagated-inputs
f210e944 11080 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11081
11082(define-public python-freezegun
11083 (package
11084 (name "python-freezegun")
11085 (version "0.3.7")
11086 (source
11087 (origin
11088 (method url-fetch)
11089 (uri (pypi-uri "freezegun" version))
11090 (sha256
11091 (base32
11092 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11093 (build-system python-build-system)
11094 (native-inputs
11095 `(("python-mock" ,python-mock)
11096 ("python-nose" ,python-nose)
4e096968 11097 ("python-coverage" ,python-coverage)))
f22efa01 11098 (propagated-inputs
4e096968
HG
11099 `(("python-six" ,python-six)
11100 ("python-dateutil-2" ,python-dateutil-2)))
974ee2c1
TS
11101 (arguments
11102 `(#:phases (modify-phases %standard-phases
11103 ;; The tests are normally executed via `make test`, but the PyPi
11104 ;; package does not include the Makefile.
11105 (replace 'check
11106 (lambda _
11107 (zero? (system* "nosetests" "./tests/")))))))
11108 (home-page "https://github.com/spulec/freezegun")
11109 (synopsis "Test utility for mocking the datetime module")
11110 (description
11111 "FreezeGun is a library that allows your python tests to travel through
11112time by mocking the datetime module.")
11113 (license license:asl2.0)))
11114
11115(define-public python2-freezegun
f210e944
HG
11116 (package-with-python2 python-freezegun))
11117
dddcb25c
MB
11118
11119(define-public python-odfpy
11120 (package
11121 (name "python-odfpy")
11122 (version "1.3.3")
11123 (source (origin
11124 (method url-fetch)
11125 (uri (pypi-uri "odfpy" version))
11126 (sha256
11127 (base32
11128 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11129 (arguments
11130 `(#:modules ((srfi srfi-1)
11131 (guix build python-build-system)
11132 (guix build utils))
11133 #:phases
11134 (modify-phases %standard-phases
11135 (replace 'check
11136 ;; The test runner invokes python2 and python3 for test*.py.
11137 ;; To avoid having both in inputs, we replicate it here.
11138 (lambda _
11139 (every (lambda (test-file)
11140 (zero? (system* "python" test-file)))
11141 (find-files "tests" "^test.*\\.py$")))))))
11142 (build-system python-build-system)
11143 (home-page "https://github.com/eea/odfpy")
11144 (synopsis "Python API and tools to manipulate OpenDocument files")
11145 (description "Collection of libraries and utility programs written in
11146Python to manipulate OpenDocument 1.2 files.")
11147 (license
11148 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11149 ;; number of files with other licenses.
11150 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11151
11152(define-public python2-odfpy
11153 (package-with-python2 python-odfpy))
b30565bd
MB
11154
11155(define-public python-cachecontrol
11156 (package
11157 (name "python-cachecontrol")
11158 (version "0.11.6")
11159 (source
11160 (origin
11161 (method url-fetch)
11162 ;; Pypi does not have tests.
11163 (uri (string-append
11164 "https://github.com/ionrock/cachecontrol/archive/v"
11165 version ".tar.gz"))
11166 (file-name (string-append name "-" version ".tar.gz"))
11167 (sha256
11168 (base32
11169 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11170 (build-system python-build-system)
11171 (arguments
11172 `(#:phases
11173 (modify-phases %standard-phases
11174 (replace 'check
11175 (lambda _
11176 ;; Drop test that requires internet access.
11177 (delete-file "tests/test_regressions.py")
11178 (setenv "PYTHONPATH"
11179 (string-append (getcwd) "/build/lib:"
11180 (getenv "PYTHONPATH")))
11181 (zero? (system* "py.test" "-vv")))))))
11182 (native-inputs
11183 `(("python-pytest" ,python-pytest)
11184 ("python-redis" ,python-redis)
11185 ("python-webtest" ,python-webtest)
11186 ("python-mock" ,python-mock)))
11187 (propagated-inputs
11188 `(("python-requests" ,python-requests)
11189 ("python-lockfile" ,python-lockfile)))
11190 (home-page "https://github.com/ionrock/cachecontrol")
11191 (synopsis "The httplib2 caching algorithms for use with requests")
11192 (description "CacheControl is a port of the caching algorithms in
11193@code{httplib2} for use with @code{requests} session objects.")
f210e944 11194 (license license:asl2.0)))
b30565bd
MB
11195
11196(define-public python2-cachecontrol
f210e944 11197 (package-with-python2 python-cachecontrol))
243db824
DM
11198
11199(define-public python-lit
11200 (package
11201 (name "python-lit")
11202 (version "0.5.0")
11203 (source
11204 (origin
11205 (method url-fetch)
11206 (uri (pypi-uri "lit" version))
11207 (sha256
11208 (base32
11209 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11210 (build-system python-build-system)
11211 (home-page "http://llvm.org/")
11212 (synopsis "LLVM Software Testing Tool")
11213 (description "@code{lit} is a portable tool for executing LLVM and Clang
11214style test suites, summarizing their results, and providing indication of
11215failures.")
f210e944 11216 (license license:ncsa)))
243db824
DM
11217
11218(define-public python2-lit
f210e944 11219 (package-with-python2 python-lit))
66f95b20
MB
11220
11221(define-public python-pytest-pep8
11222 (package
11223 (name "python-pytest-pep8")
11224 (version "1.0.6")
11225 (source (origin
11226 (method url-fetch)
11227 (uri (pypi-uri "pytest-pep8" version))
11228 (sha256
11229 (base32
11230 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11231 (build-system python-build-system)
11232 (arguments
b41a05ce 11233 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11234 (native-inputs
11235 `(("python-pytest" ,python-pytest)))
11236 (propagated-inputs
11237 `(("python-pep8" ,python-pep8)))
11238 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11239 (synopsis "Py.test plugin to check PEP8 requirements")
11240 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11241 (license license:expat)))
66f95b20
MB
11242
11243(define-public python2-pytest-pep8
f210e944 11244 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11245
11246(define-public python-pytest-flakes
11247 (package
11248 (name "python-pytest-flakes")
11249 (version "1.0.1")
11250 (source (origin
11251 (method url-fetch)
11252 (uri (pypi-uri "pytest-flakes" version))
11253 (sha256
11254 (base32
11255 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11256 (build-system python-build-system)
11257 (arguments
b41a05ce 11258 `(#:phases
df94a6b5
MB
11259 (modify-phases %standard-phases
11260 (delete 'check)
11261 (add-after 'install 'check
05c2fd36
HG
11262 (lambda* (#:key outputs inputs #:allow-other-keys)
11263 ;; It's easier to run tests after install.
11264 ;; Make installed package available for running the tests
11265 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11266 (zero? (system* "py.test" "-vv")))))))
11267 (native-inputs
11268 `(("python-coverage" ,python-coverage)
11269 ("python-pytest" ,python-pytest)
11270 ("python-pytest-cache" ,python-pytest-cache)
11271 ("python-pytest-pep8" ,python-pytest-pep8)))
11272 (propagated-inputs
11273 `(("python-pyflakes" ,python-pyflakes)))
11274 (home-page "https://github.com/fschulze/pytest-flakes")
11275 (synopsis "Py.test plugin to check source code with pyflakes")
11276 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11277 (license license:expat)))
df94a6b5
MB
11278
11279(define-public python2-pytest-flakes
f210e944 11280 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11281
11282(define-public python-natsort
11283 (package
11284 (name "python-natsort")
11285 (version "5.0.1")
11286 (source (origin
11287 (method url-fetch)
11288 (uri (pypi-uri "natsort" version))
11289 (sha256
11290 (base32
11291 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11292 (build-system python-build-system)
11293 (arguments
11294 `(#:phases
11295 (modify-phases %standard-phases
11296 (add-before 'check 'set-cachedir
11297 ;; Tests require write access to $HOME by default
11298 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11299 (native-inputs
11300 `(("python-hypothesis" ,python-hypothesis)
11301 ("python-pytest-cache" ,python-pytest-cache)
11302 ("python-pytest-cov" ,python-pytest-cov)
11303 ("python-pytest-flakes" ,python-pytest-flakes)
11304 ("python-pytest-pep8" ,python-pytest-pep8)))
11305 (propagated-inputs ; TODO: Add python-fastnumbers.
11306 `(("python-pyicu" ,python-pyicu)))
11307 (home-page "https://github.com/SethMMorton/natsort")
11308 (synopsis "Natural sorting for python and shell")
11309 (description
11310 "Natsort lets you apply natural sorting on lists instead of
11311lexicographical. If you use the built-in @code{sorted} method in python
11312on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11313returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11314function @code{natsorted} that identifies numbers and sorts them separately
11315from strings. It can also sort version numbers, real numbers, mixed types
11316and more, and comes with a shell command @command{natsort} that exposes this
11317functionality in the command line.")
11318 (license license:expat)
11319 (properties `((python2-variant . ,(delay python2-natsort))))))
11320
11321(define-public python2-natsort
11322 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11323 (package (inherit base)
11324 (native-inputs
00e10c6e 11325 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11326 ("python2-mock" ,python2-mock)
11327 ("python2-enum34" ,python2-enum34)
11328 ,@(package-native-inputs base))))))
4efb9c54
SR
11329
11330(define-public python-glances
11331 (package
11332 (name "python-glances")
11333 (version "2.7.1")
11334 (source
11335 (origin
11336 (method url-fetch)
11337 (uri (pypi-uri "Glances" version))
11338 (sha256
11339 (base32
11340 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11341 (build-system python-build-system)
f22efa01 11342 (propagated-inputs
4efb9c54
SR
11343 `(("python-psutil" ,python-psutil)))
11344 (home-page
11345 "https://github.com/nicolargo/glances")
11346 (synopsis
11347 "A cross-platform curses-based monitoring tool")
11348 (description
11349 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11350Glances uses the PsUtil library to get information from your system. It monitors
11351CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11352 (license license:lgpl3+)))
4efb9c54
SR
11353
11354(define-public python2-glances
f210e944 11355 (package-with-python2 python-glances))
05b7a593
EF
11356
11357(define-public python-graphql-core
11358 (package
11359 (name "python-graphql-core")
11360 (version "0.5.3")
11361 (source
11362 (origin
11363 (method url-fetch)
11364 (uri (pypi-uri "graphql-core" version))
11365 (sha256
11366 (base32
11367 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11368 (build-system python-build-system)
11369 (arguments
326f8285
LF
11370 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11371 #:phases
05b7a593
EF
11372 (modify-phases %standard-phases
11373 (add-after 'unpack 'patch-hardcoded-version
11374 (lambda _ (substitute*
11375 "setup.py"
11376 (("'gevent==1.1rc1'") "'gevent'"))
11377 #t)))))
11378 (native-inputs
11379 `(("python-gevent" ,python-gevent)
11380 ("python-mock" ,python-mock)
11381 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11382 (propagated-inputs
05b7a593
EF
11383 `(("python-promise" ,python-promise)
11384 ("python-six" ,python-six)))
11385 (home-page "https://github.com/graphql-python/graphql-core")
11386 (synopsis "GraphQL implementation for Python")
11387 (description
11388 "GraphQL implementation for Python. GraphQL is a data query language and
11389runtime designed and used to request and deliver data to mobile and web apps.
11390This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11391to Python.")
05b7a593
EF
11392 (license license:expat)))
11393
11394(define-public python2-graphql-core
f210e944 11395 (package-with-python2 python-graphql-core))
7ee51575
EF
11396
11397(define-public python-graphql-relay
11398 (package
11399 (name "python-graphql-relay")
11400 (version "0.4.4")
11401 (source
11402 (origin
11403 (method url-fetch)
11404 (uri (pypi-uri "graphql-relay" version))
11405 (sha256
11406 (base32
11407 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11408 (build-system python-build-system)
11409 (native-inputs
11410 `(("python-pytest" ,python-pytest)))
f22efa01 11411 (propagated-inputs
7ee51575
EF
11412 `(("python-graphql-core" ,python-graphql-core)
11413 ("python-promise" ,python-promise)
11414 ("python-six" ,python-six)))
11415 (home-page "https://github.com/graphql-python/graphql-relay-py")
11416 (synopsis "Relay implementation for Python")
11417 (description
11418 "This is a library to allow the easy creation of Relay-compliant servers
11419using the GraphQL Python reference implementation of a GraphQL server. It
11420should be noted that the code is a exact port of the original
11421@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11422from Facebook.")
7ee51575
EF
11423 (license license:expat)))
11424
11425(define-public python2-graphql-relay
f210e944 11426 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11427
11428(define-public python-graphene
11429 (package
11430 (name "python-graphene")
11431 (version "0.10.2")
11432 (source
11433 (origin
11434 (method url-fetch)
11435 (uri (pypi-uri "graphene" version))
11436 (sha256
11437 (base32
11438 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11439 (build-system python-build-system)
11440 (native-inputs
11441 `(("python-django-filter" ,python-django-filter)
11442 ("python-mock" ,python-mock)
11443 ("python-psycopg2" ,python-psycopg2)
11444 ("python-pytest-django" ,python-pytest-django)
11445 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11446 (propagated-inputs
ddc63a56
EF
11447 `(("python-graphql-core" ,python-graphql-core)
11448 ("python-graphql-relay" ,python-graphql-relay)
11449 ("python-iso8601" ,python-iso8601)
11450 ("python-promise" ,python-promise)
11451 ("python-six" ,python-six)))
11452 (home-page "http://graphene-python.org/")
11453 (synopsis "GraphQL Framework for Python")
11454 (description
11455 "Graphene is a Python library for building GraphQL schemas/types.
11456A GraphQL schema describes your data model, and provides a GraphQL server
11457with an associated set of resolve methods that know how to fetch data.")
11458 (properties `((python2-variant . ,(delay python2-graphene))))
11459 (license license:expat)))
11460
11461(define-public python2-graphene
11462 (let ((base (package-with-python2
11463 (strip-python2-variant python-graphene))))
11464 (package (inherit base)
11465 (native-inputs
00e10c6e 11466 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11467 ,@(package-native-inputs base))))))
d488d5d6
EF
11468
11469(define-public python-nautilus
11470 (package
11471 (name "python-nautilus")
11472 (version "0.4.9")
11473 (source
11474 (origin
11475 (method url-fetch)
11476 (uri (pypi-uri "nautilus" version))
11477 (sha256
11478 (base32
11479 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11480 (build-system python-build-system)
11481 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11482 (propagated-inputs
d488d5d6
EF
11483 `(("python-bcrypt" ,python-bcrypt)
11484 ("python-click" ,python-click)
11485 ("python-consul" ,python-consul)
d488d5d6
EF
11486 ("python-graphene" ,python-graphene)
11487 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11488 ("python-peewee" ,python-peewee)
11489 ("python-pika" ,python-pika)
d488d5d6
EF
11490 ("python-tornado" ,python-tornado)
11491 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11492 (native-inputs
11493 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11494 (home-page "https://github.com/AlecAivazis/nautilus")
11495 (synopsis "Library for creating microservice applications")
11496 (description
11497 "Nautilus is a framework for flux based microservices that looks to
11498provide extendible implementations of common aspects of a cloud so that you can
11499focus on building massively scalable web applications.")
11500 (license license:expat)))
94cffc63 11501
66d3f50a
LF
11502(define-public python-betamax
11503 (package
11504 (name "python-betamax")
11505 (version "0.8.0")
11506 (source
11507 (origin
11508 (method url-fetch)
11509 (uri (pypi-uri "betamax" version))
11510 (sha256
11511 (base32
11512 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11513 (build-system python-build-system)
11514 (arguments
11515 '(;; Many tests fail because they require networking.
11516 #:tests? #f))
c415f763 11517 (propagated-inputs
66d3f50a
LF
11518 `(("python-requests" ,python-requests)))
11519 (home-page "https://github.com/sigmavirus24/betamax")
11520 (synopsis "Record HTTP interactions with python-requests")
11521 (description "Betamax will record your test suite's HTTP interactions and
11522replay them during future tests. It is designed to work with python-requests.")
f210e944 11523 (license license:expat)))
66d3f50a
LF
11524
11525(define-public python2-betamax
f210e944 11526 (package-with-python2 python-betamax))
ca0635b4 11527
94cffc63
LF
11528(define-public python-s3transfer
11529 (package
11530 (name "python-s3transfer")
11531 (version "0.1.8")
11532 (source (origin
11533 (method url-fetch)
11534 (uri (pypi-uri "s3transfer" version))
11535 (sha256
11536 (base32
11537 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11538 (build-system python-build-system)
fad8bf97
LF
11539 (arguments
11540 `(#:phases
11541 (modify-phases %standard-phases
11542 (replace 'check
11543 (lambda _
11544 ;; 7 of the 'integration' tests require network access or login
11545 ;; credentials.
11546 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11547 (native-inputs
fad8bf97
LF
11548 `(("python-docutils" ,python-docutils)
11549 ("python-mock" ,python-mock)
11550 ("python-nose" ,python-nose)))
f22efa01 11551 (propagated-inputs
94cffc63
LF
11552 `(("python-botocore" ,python-botocore)))
11553 (synopsis "Amazon S3 Transfer Manager")
11554 (description "S3transfer is a Python library for managing Amazon S3
11555transfers.")
11556 (home-page "https://github.com/boto/s3transfer")
11557 (license license:asl2.0)
11558 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11559
11560(define-public python2-s3transfer
11561 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11562 (package
11563 (inherit base)
11564 (native-inputs
11565 `(("python2-futures" ,python2-futures)
94cffc63 11566 ,@(package-native-inputs base))))))
8ab59181
HG
11567
11568(define-public python-setproctitle
11569(package
11570 (name "python-setproctitle")
11571 (version "1.1.10")
11572 (source
11573 (origin
11574 (method url-fetch)
11575 (uri (pypi-uri "setproctitle" version))
11576 (sha256
11577 (base32
11578 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11579 (build-system python-build-system)
11580 (arguments
11581 '(#:phases
11582 (modify-phases %standard-phases
11583 (add-before 'check 'patch-Makefile
11584 ;; Stricly this is only required for the python2 variant.
11585 ;; But adding a phase in an inherited package seems to be
11586 ;; cumbersum. So we patch even for python3.
11587 (lambda _
11588 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11589 (when nose
11590 (substitute* "Makefile"
11591 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11592 (string-append nose "/bin/nosetests "))))
11593 #t)))
11594 (replace 'check
11595 (lambda _
11596 (setenv "PYTHON" (or (which "python3") (which "python")))
11597 (setenv "PYCONFIG" (or (which "python3-config")
11598 (which "python-config")))
11599 (setenv "CC" "gcc")
11600 ;; No need to extend PYTHONPATH to find the built package, since
11601 ;; the Makefile will build anyway
11602 (zero? (system* "make" "check")))))))
11603 (native-inputs
11604 `(("procps" ,procps))) ; required for tests
11605 (home-page
11606 "https://github.com/dvarrazzo/py-setproctitle")
11607 (synopsis
11608 "Setproctitle implementation for Python to customize the process title")
11609 (description "The library allows a process to change its title (as displayed
11610by system tools such as ps and top).
11611
11612Changing the title is mostly useful in multi-process systems, for
11613example when a master process is forked: changing the children's title
11614allows to identify the task each process is busy with. The technique
11615is used by PostgreSQL and the OpenSSH Server for example.")
11616 (license license:bsd-3)
11617 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11618
11619(define-public python2-setproctitle
11620 (let ((base (package-with-python2
11621 (strip-python2-variant python-setproctitle))))
11622 (package
11623 (inherit base)
11624 (native-inputs `(("python2-nose" ,python2-nose)
11625 ,@(package-native-inputs base))))))
162e42d8
HG
11626
11627(define-public python-validictory
11628 (package
11629 (name "python-validictory")
11630 (version "1.0.1")
11631 (source
11632 (origin
11633 (method url-fetch)
11634 (uri (pypi-uri "validictory" version))
11635 (sha256
11636 (base32
11637 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11638 (build-system python-build-system)
11639 (arguments
11640 '(#:phases
11641 (modify-phases %standard-phases
11642 (add-after 'unpack 'bootstrap
11643 ;; Move the tests out of the package directory to avoid
11644 ;; packaging them.
11645 (lambda* _
11646 (rename-file "validictory/tests" "tests")
11647 (delete-file "tests/__init__.py")))
11648 (replace 'check
11649 (lambda _
11650 ;; Extend PYTHONPATH so the built package will be found.
11651 (setenv "PYTHONPATH"
11652 (string-append (getcwd) "/build/lib:"
11653 (getenv "PYTHONPATH")))
11654 (zero? (system* "py.test" "-vv" )))))))
11655 (native-inputs
11656 `(("python-pytest" ,python-pytest)))
11657 (home-page
11658 "https://github.com/jamesturk/validictory")
11659 (synopsis "General purpose Python data validator")
11660 (description "It allows validation of arbitrary Python data structures.
11661
11662The schema format is based on the JSON Schema
11663proposal (http://json-schema.org), so combined with json the library is also
11664useful as a validator for JSON data.")
f210e944 11665 (license license:expat)))
162e42d8
HG
11666
11667(define-public python2-validictory
f210e944 11668 (package-with-python2 python-validictory))
0990edfe
DM
11669
11670(define-public python-aniso8601
11671 (package
11672 (name "python-aniso8601")
11673 (version "1.1.0")
11674 (source
11675 (origin
11676 (method url-fetch)
11677 (uri (pypi-uri "aniso8601" version))
11678 (sha256
11679 (base32
11680 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11681 (build-system python-build-system)
11682 (propagated-inputs
11683 `(("python-dateutil-2" ,python-dateutil-2)))
11684 (home-page
11685 "https://bitbucket.org/nielsenb/aniso8601")
11686 (synopsis
11687 "Python library for parsing ISO 8601 strings")
11688 (description
11689 "This package contains a library for parsing ISO 8601 datetime strings.")
11690 (license license:bsd-3)))
999d964d
DM
11691
11692(define-public python-flask-restful
11693 (package
11694 (name "python-flask-restful")
11695 (version "0.3.5")
11696 (source
11697 (origin
11698 (method url-fetch)
11699 (uri (pypi-uri "Flask-RESTful" version))
11700 (sha256
11701 (base32
11702 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11703 (build-system python-build-system)
11704 (propagated-inputs
11705 `(("python-aniso8601" ,python-aniso8601)
11706 ("python-flask" ,python-flask)
11707 ("python-pycrypto" ,python-pycrypto)
11708 ("python-pytz" ,python-pytz)))
11709 (native-inputs
11710 `(;; Optional dependency of Flask. Tests need it.
11711 ("python-blinker" ,python-blinker)
11712 ("python-mock" ,python-mock) ; For tests
11713 ("python-nose" ,python-nose) ; For tests
11714 ("python-sphinx" ,python-sphinx)))
11715 (home-page
11716 "https://www.github.com/flask-restful/flask-restful/")
11717 (synopsis
11718 "Flask module for creating REST APIs")
11719 (description
11720 "This package contains a Flask module for creating REST APIs.")
11721 (license license:bsd-3)))
31288222
DM
11722
11723(define-public python-flask-basicauth
11724 (package
11725 (name "python-flask-basicauth")
11726 (version "0.2.0")
11727 (source
11728 (origin
11729 (method url-fetch)
11730 (uri (pypi-uri "Flask-BasicAuth" version))
11731 (sha256
11732 (base32
11733 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11734 (build-system python-build-system)
11735 (propagated-inputs
11736 `(("python-flask" ,python-flask)))
11737 (home-page
11738 "https://github.com/jpvanhal/flask-basicauth")
11739 (synopsis
11740 "HTTP basic access authentication for Flask")
11741 (description
11742 "This package provides HTTP basic access authentication for Flask.")
11743 (license license:bsd-3)))
903276d0
DM
11744
11745(define-public python-flask-sqlalchemy
11746 (package
11747 (name "python-flask-sqlalchemy")
11748 (version "2.1")
11749 (source
11750 (origin
11751 (method url-fetch)
11752 (uri (pypi-uri "Flask-SQLAlchemy" version))
11753 (sha256
11754 (base32
11755 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11756 (build-system python-build-system)
11757 (propagated-inputs
11758 `(("python-flask" ,python-flask)
11759 ("python-sqlalchemy" ,python-sqlalchemy)))
11760 (home-page
11761 "http://github.com/mitsuhiko/flask-sqlalchemy")
11762 (synopsis
11763 "Module adding SQLAlchemy support to your Flask application")
11764 (description
11765 "This package adds SQLAlchemy support to your Flask application.")
11766 (license license:bsd-3)))
329b4b3b
LF
11767
11768(define-public python-pyev
11769 (package
11770 (name "python-pyev")
11771 (version "0.9.0")
11772 (source
11773 (origin
11774 (method url-fetch)
11775 (uri (pypi-uri "pyev" version))
11776 (sha256
11777 (base32
11778 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11779 (build-system python-build-system)
11780 (arguments
11781 `(#:tests? #f ; no test suite
11782 #:phases
11783 (modify-phases %standard-phases
11784 (add-after 'unpack 'patch
11785 (lambda* (#:key inputs #:allow-other-keys)
11786 (let ((libev (string-append (assoc-ref inputs "libev")
11787 "/lib/libev.so.4")))
11788 (substitute* "setup.py"
11789 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11790 (string-append "libev_dll_name = \"" libev "\"")))))))))
11791 (inputs
11792 `(("libev" ,libev)))
11793 (home-page "http://pythonhosted.org/pyev/")
11794 (synopsis "Python libev interface")
11795 (description "Pyev provides a Python interface to libev.")
11796 (license license:gpl3)))
11797
11798(define-public python2-pyev
11799 (package-with-python2 python-pyev))
45b4f127
DM
11800
11801(define-public python-imagesize
11802 (package
11803 (name "python-imagesize")
11804 (version "0.7.1")
11805 (source
11806 (origin
11807 (method url-fetch)
11808 (uri (pypi-uri "imagesize" version))
11809 (sha256
11810 (base32
11811 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11812 (build-system python-build-system)
9422c98a
LF
11813 (arguments
11814 '(;; Test files are not distributed on PyPi:
11815 ;; https://github.com/shibukawa/imagesize_py/issues/7
11816 #:tests? #f))
45b4f127
DM
11817 (home-page "https://github.com/shibukawa/imagesize_py")
11818 (synopsis "Gets image size of files in variaous formats in Python")
11819 (description
11820 "This package allows determination of image size from
11821PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11822 (license license:expat)))
45b4f127
DM
11823
11824(define-public python2-imagesize
f210e944 11825 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11826
11827(define-public python-axolotl-curve25519
11828 (package
11829 (name "python-axolotl-curve25519")
11830 (version "0.1")
11831 (source
11832 (origin
11833 (method git-fetch)
11834 (uri (git-reference
11835 (url "git://github.com/tgalal/python-axolotl-curve25519")
11836 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11837 (file-name (string-append name "-" version "-checkout"))
11838 (sha256
11839 (base32
11840 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11841 (build-system python-build-system)
11842 (arguments
11843 `(;; Prevent creation of the egg. This works around
11844 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11845 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11846 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11847 (synopsis "Python wrapper for curve25519 library")
11848 (description "This is a python wrapper for the curve25519 library
11849with ed25519 signatures. The C code was pulled from
11850libaxolotl-android. At the moment this wrapper is meant for use by
11851python-axolotl.")
11852 (license (list license:gpl3 ; Most files
683cdbf5 11853 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11854
11855(define-public python2-axolotl-curve25519
11856 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11857
11858(define-public python-axolotl
11859 (package
11860 (name "python-axolotl")
11861 (version "0.1.35")
11862 (source
11863 (origin
11864 (method url-fetch)
11865 (uri (string-append
11866 "https://github.com/tgalal/python-axolotl/archive/"
11867 version ".tar.gz"))
11868 (file-name (string-append name "-" version ".tar.gz"))
11869 (sha256
11870 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11871 (build-system python-build-system)
11872 (arguments
11873 `(#:phases
11874 (modify-phases %standard-phases
11875 ;; Don't install tests
11876 (add-before 'install 'remove-tests
11877 (lambda _
11878 (for-each delete-file-recursively
11879 '("axolotl/tests" "build/lib/axolotl/tests"))
11880 #t)))
11881 ;; Prevent creation of the egg. This works around
11882 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11883 #:configure-flags '("--root=/")))
06ff0837
AI
11884 (propagated-inputs
11885 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11886 ("python-dateutil" ,python-dateutil)
11887 ("python-protobuf" ,python-protobuf)
11888 ("python-pycrypto" ,python-pycrypto)))
11889 (home-page "https://github.com/tgalal/python-axolotl")
11890 (synopsis "Python port of libaxolotl-android")
11891 (description "This is a python port of libaxolotl-android. This
11892is a ratcheting forward secrecy protocol that works in synchronous and
11893asynchronous messaging environments.")
11894 (license license:gpl3)))
11895
11896(define-public python2-axolotl
11897 (package-with-python2 python-axolotl))
e2fca490
DM
11898
11899(define-public python-termstyle
11900 (package
11901 (name "python-termstyle")
11902 (version "0.1.11")
11903 (source
11904 (origin
11905 (method url-fetch)
11906 (uri (pypi-uri "termstyle" version))
11907 (sha256
11908 (base32
11909 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11910 (build-system python-build-system)
11911 (home-page "http://github.com/gfxmonk/termstyle")
11912 (synopsis "Console text coloring for Python")
11913 (description "This package provides console text coloring for Python.")
11914 (license license:bsd-3)))
1e6112d8
DM
11915
11916(define-public python-rednose
11917 (package
11918 (name "python-rednose")
11919 (version "1.2.1")
11920 (source
11921 (origin
11922 (method url-fetch)
11923 (uri (pypi-uri "rednose" version))
11924 (sha256
11925 (base32
11926 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11927 (build-system python-build-system)
11928 (arguments
11929 `(#:phases
11930 (modify-phases %standard-phases
11931 (add-after 'unpack 'fix-deps
11932 (lambda _
11933 ;; See <https://github.com/JBKahn/rednose/issues/12>
11934 (substitute* "setup.py"
11935 (("python-termstyle") "termstyle"))
11936 #t)))))
11937 (propagated-inputs
11938 `(("python-colorama" ,python-colorama)
11939 ("python-termstyle" ,python-termstyle)))
11940 (native-inputs
11941 `(("python-six" ,python-six)
11942 ("python-nose" ,python-nose)))
11943 (home-page "https://github.com/JBKahn/rednose")
11944 (synopsis "Colored output for Python nosetests")
11945 (description "This package provides colored output for the
11946@command{nosetests} command of the Python Nose unit test framework.")
11947 (license license:bsd-3)))
0a7f17f0
DM
11948
11949(define-public python-flask-restplus
11950 (package
11951 (name "python-flask-restplus")
11952 (version "0.9.2")
11953 (source
11954 (origin
11955 (method url-fetch)
11956 (uri (pypi-uri "flask-restplus" version))
11957 (sha256
11958 (base32
11959 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11960 (build-system python-build-system)
11961 (propagated-inputs
11962 `(("python-aniso8601" ,python-aniso8601)
11963 ("python-flask" ,python-flask)
11964 ("python-jsonschema" ,python-jsonschema)
11965 ("python-pytz" ,python-pytz)
11966 ("python-six" ,python-six)))
11967 (native-inputs
11968 `(("python-tzlocal" ,python-tzlocal)
11969 ("python-blinker" ,python-blinker)
11970 ("python-nose" ,python-nose)
11971 ("python-rednose" ,python-rednose)))
11972 (home-page "https://github.com/noirbizarre/flask-restplus")
11973 (synopsis "Framework for documented API development with Flask")
11974 (description "This package provides a framework for API development with
11975the Flask web framework in Python. It is similar to package
11976@code{python-flask-restful} but supports the @code{python-swagger}
11977documentation builder.")
11978 (license license:expat)))
1ed21519
DM
11979
11980(define-public python-sadisplay
11981 (package
11982 (name "python-sadisplay")
11983 (version "0.4.6")
11984 (source
11985 (origin
11986 (method url-fetch)
11987 (uri (pypi-uri "sadisplay" version))
11988 (sha256
11989 (base32
11990 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
11991 (build-system python-build-system)
11992 (propagated-inputs
11993 `(("python-sqlalchemy" ,python-sqlalchemy)))
11994 (native-inputs
11995 `(("python-nose" ,python-nose)))
11996 (home-page "https://bitbucket.org/estin/sadisplay")
11997 (synopsis "SQLAlchemy schema displayer")
11998 (description "This package provides a program to build Entity
11999Relationship diagrams from a SQLAlchemy model (or directly from the
12000database).")
12001 (license license:bsd-3)))
12002
12003(define-public python2-sadisplay
12004 (package-with-python2 python-sadisplay))
444a79b6
DM
12005
12006(define-public python-flask-restful-swagger
12007 (package
12008 (name "python-flask-restful-swagger")
12009 (version "0.19")
12010 (source
12011 (origin
12012 (method url-fetch)
12013 (uri (pypi-uri "flask-restful-swagger" version))
12014 (sha256
12015 (base32
12016 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12017 (build-system python-build-system)
12018 (propagated-inputs
12019 `(("python-flask-restful" ,python-flask-restful)))
12020 (home-page "https://github.com/rantav/flask-restful-swagger")
12021 (synopsis "Extract Swagger specs from Flask-Restful projects")
12022 (description "This package lets you extract Swagger API documentation
12023specs from your Flask-Restful projects.")
12024 (license license:expat)))
12025
12026(define-public python2-flask-restful-swagger
12027 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
12028
12029(define-public python-argcomplete
12030 (package
12031 (name "python-argcomplete")
12032 (version "1.7.0")
12033 (source
12034 (origin
12035 (method url-fetch)
12036 (uri (pypi-uri "argcomplete" version))
12037 (sha256
12038 (base32
12039 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12040 (build-system python-build-system)
12041 (home-page "https://github.com/kislyuk/argcomplete")
12042 (synopsis "Shell tab completion for Python argparse")
12043 (description "argcomplete provides extensible command line tab completion
12044of arguments and options for Python scripts using @code{argparse}. It's
12045particularly useful for programs with many options or sub-parsers that can
12046dynamically suggest completions; for example, when browsing resources over the
12047network.")
12048 (license license:asl2.0)))
12049
12050(define-public python2-argcomplete
12051 (package-with-python2 python-argcomplete))