gnu: python-babel: Update to 2.3.4.
[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>
d205f895 36;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
a01b6da7
NK
37;;;
38;;; This file is part of GNU Guix.
39;;;
40;;; GNU Guix is free software; you can redistribute it and/or modify it
41;;; under the terms of the GNU General Public License as published by
42;;; the Free Software Foundation; either version 3 of the License, or (at
43;;; your option) any later version.
44;;;
45;;; GNU Guix is distributed in the hope that it will be useful, but
46;;; WITHOUT ANY WARRANTY; without even the implied warranty of
47;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48;;; GNU General Public License for more details.
49;;;
50;;; You should have received a copy of the GNU General Public License
51;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52
1ffa7090 53(define-module (gnu packages python)
3f641af0 54 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 55 #:use-module (gnu packages)
8e451885 56 #:use-module (gnu packages algebra)
d79a343b 57 #:use-module (gnu packages adns)
89b2e0b0 58 #:use-module (gnu packages attr)
d96034ed 59 #:use-module (gnu packages backup)
3969ca54 60 #:use-module (gnu packages bash)
1ffa7090 61 #:use-module (gnu packages compression)
4ed20663 62 #:use-module (gnu packages databases)
ddc63a56 63 #:use-module (gnu packages django)
5e1c9367 64 #:use-module (gnu packages file)
4ed20663 65 #:use-module (gnu packages fontutils)
4ed20663
AE
66 #:use-module (gnu packages gcc)
67 #:use-module (gnu packages ghostscript)
6eb7af2a 68 #:use-module (gnu packages gl)
4ed20663 69 #:use-module (gnu packages glib)
6eb7af2a 70 #:use-module (gnu packages gstreamer)
4ed20663 71 #:use-module (gnu packages gtk)
421a80a2 72 #:use-module (gnu packages icu4c)
c937562e 73 #:use-module (gnu packages image)
4ed20663 74 #:use-module (gnu packages imagemagick)
d79a343b 75 #:use-module (gnu packages libevent)
b10ab723 76 #:use-module (gnu packages libffi)
89b2e0b0 77 #:use-module (gnu packages linux)
0da98533 78 #:use-module (gnu packages maths)
4ed20663 79 #:use-module (gnu packages multiprecision)
45203542 80 #:use-module (gnu packages networking)
be7134bf 81 #:use-module (gnu packages ncurses)
b04a52a6 82 #:use-module (gnu packages openstack)
d488d5d6 83 #:use-module (gnu packages password-utils)
c9b1b4f9 84 #:use-module (gnu packages pcre)
4ed20663 85 #:use-module (gnu packages perl)
b10ab723 86 #:use-module (gnu packages pkg-config)
06ff0837 87 #:use-module (gnu packages protobuf)
4ed20663 88 #:use-module (gnu packages readline)
6eb7af2a 89 #:use-module (gnu packages sdl)
c9b1b4f9 90 #:use-module (gnu packages statistics)
8f9ac901 91 #:use-module (gnu packages tex)
1c65314c 92 #:use-module (gnu packages texinfo)
cc2b77df 93 #:use-module (gnu packages tls)
e25f0174 94 #:use-module (gnu packages version-control)
02f8f804 95 #:use-module (gnu packages video)
8d12be1e 96 #:use-module (gnu packages web)
ce0614dd 97 #:use-module (gnu packages base)
26b307e2 98 #:use-module (gnu packages xml)
6fa14469 99 #:use-module (gnu packages xorg)
0bdc1671 100 #:use-module (gnu packages xdisorg)
4ed20663 101 #:use-module (gnu packages zip)
afa181ff 102 #:use-module (gnu packages tcl)
63bcec71 103 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
104 #:use-module (guix packages)
105 #:use-module (guix download)
ea5456c8 106 #:use-module (guix git-download)
11bb85a1 107 #:use-module (guix utils)
acc26ff1 108 #:use-module (guix build-system gnu)
d8c4998f 109 #:use-module (guix build-system cmake)
898238b9 110 #:use-module (guix build-system python)
1c65314c
FB
111 #:use-module (guix build-system trivial)
112 #:use-module (srfi srfi-1))
a01b6da7 113
45848023 114(define-public python-2.7
a01b6da7
NK
115 (package
116 (name "python")
f0499100 117 (version "2.7.12")
a01b6da7
NK
118 (source
119 (origin
120 (method url-fetch)
9b43a0ff 121 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
122 version "/Python-" version ".tar.xz"))
123 (sha256
124 (base32
f0499100 125 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
126 (patches (search-patches "python-2.7-search-paths.patch"
127 "python-2-deterministic-build-info.patch"
15e57f57 128 "python-2.7-site-prefixes.patch"
c3052d6b 129 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
130 (modules '((guix build utils)))
131 ;; suboptimal to delete failing tests here, but if we delete them in the
132 ;; arguments then we need to make sure to strip out that phase when it
133 ;; gets inherited by python and python-minimal.
134 (snippet
135 '(begin
136 (for-each delete-file
137 '("Lib/test/test_compileall.py"
f0499100 138 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
139 "Lib/test/test_distutils.py"
140 "Lib/test/test_import.py"
141 "Lib/test/test_shutil.py"
142 "Lib/test/test_socket.py"
1bb163b0 143 "Lib/test/test_subprocess.py"))
10a42aa2 144 #t))))
02f0c3b2
LC
145 (outputs '("out"
146 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 147 (build-system gnu-build-system)
3fdc99da 148 (arguments
10a42aa2 149 `(;; 356 tests OK.
e7e7a1eb
EF
150 ;; 6 tests failed:
151 ;; test_compileall test_distutils test_import test_shutil test_socket
152 ;; test_subprocess
153 ;; 39 tests skipped:
ff6f33cf
ED
154 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
155 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
156 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
157 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
158 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
159 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
160 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
161 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
162 ;; test_winreg test_winsound test_zipfile64
163 ;; 4 skips unexpected on linux2:
164 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 165 #:test-target "test"
3fdc99da 166 #:configure-flags
6a20289d
LC
167 (list "--enable-shared" ;allow embedding
168 "--with-system-ffi" ;build ctypes
aaf75c89 169 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
170 (string-append "LDFLAGS=-Wl,-rpath="
171 (assoc-ref %outputs "out") "/lib"))
fd982732 172
d2cc9c7c
LC
173 #:modules ((ice-9 ftw) (ice-9 match)
174 (guix build utils) (guix build gnu-build-system))
fd982732 175 #:phases
46472ecd
MW
176 (modify-phases %standard-phases
177 (add-before
178 'configure 'patch-lib-shells
179 (lambda _
180 ;; Filter for existing files, since some may not exist in all
181 ;; versions of python that are built with this recipe.
182 (substitute* (filter file-exists?
183 '("Lib/subprocess.py"
184 "Lib/popen2.py"
185 "Lib/distutils/tests/test_spawn.py"
186 "Lib/test/test_subprocess.py"))
187 (("/bin/sh") (which "sh")))
dedc8320
LC
188
189 ;; Use zero as the timestamp in .pyc files so that builds are
190 ;; deterministic. TODO: Remove it when this variable is set in
191 ;; gnu-build-system.scm.
a665996f 192 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 193 #t))
5b4e2791
LC
194 (add-before 'configure 'do-not-record-configure-flags
195 (lambda* (#:key configure-flags #:allow-other-keys)
196 ;; Remove configure flags from the installed '_sysconfigdata.py'
197 ;; and 'Makefile' so we don't end up keeping references to the
198 ;; build tools.
199 ;;
200 ;; Preserve at least '--with-system-ffi' since otherwise the
201 ;; thing tries to build libffi, fails, and we end up with a
202 ;; Python that lacks ctypes.
203 (substitute* "configure"
204 (("^CONFIG_ARGS=.*$")
205 (format #f "CONFIG_ARGS='~a'\n"
206 (if (member "--with-system-ffi" configure-flags)
207 "--with-system-ffi"
208 ""))))
209 #t))
46472ecd
MW
210 (add-before
211 'check 'pre-check
212 (lambda _
213 ;; 'Lib/test/test_site.py' needs a valid $HOME
214 (setenv "HOME" (getcwd))
215 #t))
216 (add-after
217 'unpack 'set-source-file-times-to-1980
218 ;; XXX One of the tests uses a ZIP library to pack up some of the
219 ;; source tree, and fails with "ZIP does not support timestamps
220 ;; before 1980". Work around this by setting the file times in the
221 ;; source tree to sometime in early 1980.
222 (lambda _
223 (let ((circa-1980 (* 10 366 24 60 60)))
224 (ftw "." (lambda (file stat flag)
225 (utime file circa-1980 circa-1980)
226 #t))
02f0c3b2 227 #t)))
9ffe61b0
LC
228 (add-after 'install 'remove-tests
229 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
230 ;; because these files are used by some libraries out there.
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 (match (scandir (string-append out "/lib")
234 (lambda (name)
235 (string-prefix? "python" name)))
236 ((pythonX.Y)
237 (let ((testdir (string-append out "/lib/" pythonX.Y
238 "/test")))
239 (with-directory-excursion testdir
240 (for-each delete-file-recursively
241 (scandir testdir
242 (match-lambda
243 ((or "." "..") #f)
244 (file
245 (not
246 (string-prefix? "test_support."
247 file))))))
248 (call-with-output-file "__init__.py" (const #t))
249 #t)))))))
216c283b
LC
250 (add-before 'strip 'make-libraries-writable
251 (lambda* (#:key outputs #:allow-other-keys)
252 ;; Make .so files writable so they can be stripped.
253 (let ((out (assoc-ref outputs "out")))
254 (for-each (lambda (file)
255 (chmod file #o755))
256 (find-files (string-append out "/lib")
257 "\\.so"))
258 #t)))
02f0c3b2
LC
259 (add-after 'install 'move-tk-inter
260 (lambda* (#:key outputs #:allow-other-keys)
261 ;; When Tkinter support is built move it to a separate output so
262 ;; that the main output doesn't contain a reference to Tcl/Tk.
263 (let ((out (assoc-ref outputs "out"))
264 (tk (assoc-ref outputs "tk")))
265 (when tk
266 (match (find-files out "tkinter.*\\.so")
267 ((tkinter.so)
268 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
269 ;; want it under TK/lib/pythonX.Y/site-packages.
270 (let* ((len (string-length out))
271 (target (string-append
272 tk "/"
273 (string-drop
274 (dirname (dirname tkinter.so))
275 len)
276 "/site-packages")))
277 (install-file tkinter.so target)
278 (delete-file tkinter.so)))))
279 #t))))))
a01b6da7 280 (inputs
3fdc99da
CR
281 `(("bzip2" ,bzip2)
282 ("gdbm" ,gdbm)
b10ab723 283 ("libffi" ,libffi) ; for ctypes
b88e1b0a 284 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 285 ("openssl" ,openssl)
3fdc99da 286 ("readline" ,readline)
afa181ff
LC
287 ("zlib" ,zlib)
288 ("tcl" ,tcl)
289 ("tk" ,tk))) ; for tkinter
b10ab723
CR
290 (native-inputs
291 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
292 (native-search-paths
293 (list (search-path-specification
294 (variable "PYTHONPATH")
af070955 295 (files '("lib/python2.7/site-packages")))))
f0499100 296 (home-page "https://www.python.org")
afa181ff 297 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
298 (description
299 "Python is a remarkably powerful dynamic programming language that
300is used in a wide variety of application domains. Some of its key
301distinguishing features include: clear, readable syntax; strong
302introspection capabilities; intuitive object orientation; natural
303expression of procedural code; full modularity, supporting hierarchical
304packages; exception-based error handling; and very high level dynamic
305data types.")
3f641af0 306 (license license:psfl)))
acc26ff1 307
45848023
HG
308;; Current 2.x version.
309(define-public python-2 python-2.7)
310
72df6680 311(define-public python-3.5
b24d1cfc 312 (package (inherit python-2)
72df6680 313 (version "3.5.2")
717003e3
LC
314 (source (origin
315 (method url-fetch)
316 (uri (string-append "https://www.python.org/ftp/python/"
317 version "/Python-" version ".tar.xz"))
fc1adab1
AK
318 (patches (search-patches
319 "python-fix-tests.patch"
72df6680 320 "python-3.5-fix-tests.patch"
fc1adab1
AK
321 "python-3-deterministic-build-info.patch"
322 "python-3-search-paths.patch"))
717003e3
LC
323 (patch-flags '("-p0"))
324 (sha256
325 (base32
72df6680 326 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
327 (arguments (substitute-keyword-arguments (package-arguments python-2)
328 ((#:tests? _) #t)))
1aebc0cb
AE
329 (native-search-paths
330 (list (search-path-specification
331 (variable "PYTHONPATH")
0e05d01e
SB
332 (files (list (string-append "lib/python"
333 (version-major+minor version)
334 "/site-packages"))))))))
f26a77ff 335
72df6680
LF
336(define-public python-3.4
337 (package (inherit python-3.5)
338 (version "3.4.5")
339 (source (origin
340 (method url-fetch)
341 (uri (string-append "https://www.python.org/ftp/python/"
342 version "/Python-" version ".tar.xz"))
343 (patches (search-patches
344 "python-fix-tests.patch"
345 "python-3.4-fix-tests.patch"
346 "python-3-deterministic-build-info.patch"
347 "python-3-search-paths.patch"))
348 (patch-flags '("-p0"))
349 (sha256
350 (base32
351 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
352
45848023 353;; Current 3.x version.
72df6680 354(define-public python-3 python-3.5)
45848023
HG
355
356;; Current major version.
357(define-public python python-3)
358
95288fcc
LC
359;; Minimal variants of Python, mostly used to break the cycle between Tk and
360;; Python (Tk -> libxcb -> Python.)
361
362(define-public python2-minimal
363 (package (inherit python-2)
364 (name "python-minimal")
02f0c3b2 365 (outputs '("out"))
95288fcc
LC
366 (arguments
367 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
368 ((#:configure-flags cf)
369 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
370 (inputs '()))) ;none of the optional dependencies
371
372(define-public python-minimal
898238b9 373 (package (inherit python)
95288fcc 374 (name "python-minimal")
02f0c3b2 375 (outputs '("out"))
95288fcc 376
d0b73960 377 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
378 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
379 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
380 (inputs `(("libffi" ,libffi)
381 ("openssl" ,openssl)
95288fcc
LC
382 ("zlib" ,zlib)))))
383
64cb064c
LC
384(define* (wrap-python3 python
385 #:optional
386 (name (string-append (package-name python) "-wrapper")))
898238b9 387 (package (inherit python)
95288fcc 388 (name name)
898238b9
AE
389 (source #f)
390 (build-system trivial-build-system)
02f0c3b2 391 (outputs '("out"))
3969ca54 392 (inputs `(("bash" ,bash)))
3c0f2329 393 (propagated-inputs `(("python" ,python)))
898238b9
AE
394 (arguments
395 `(#:modules ((guix build utils))
396 #:builder
397 (begin
398 (use-modules (guix build utils))
399 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
400 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
401 (mkdir-p bin)
402 (for-each
403 (lambda (old new)
404 (symlink (string-append python old)
405 (string-append bin "/" new)))
3969ca54
SB
406 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
407 `("python" ,"pydoc" ,"idle" ,"pip"))
408 ;; python-config outputs search paths based upon its location,
409 ;; use a bash wrapper to avoid changing its outputs.
410 (let ((bash (string-append (assoc-ref %build-inputs "bash")
411 "/bin/bash"))
412 (old (string-append python "python3-config"))
413 (new (string-append bin "/python-config")))
414 (with-output-to-file new
415 (lambda ()
416 (format #t "#!~a~%" bash)
417 (format #t "exec \"~a\" \"$@\"~%" old)
418 (chmod new #o755)
419 #t)))))))
0d56e3e1
LC
420 (synopsis "Wrapper for the Python 3 commands")
421 (description
422 "This package provides wrappers for the commands of Python@tie{}3.x such
423that they can be invoked under their usual name---e.g., @command{python}
424instead of @command{python3}.")))
425
95288fcc
LC
426(define-public python-wrapper (wrap-python3 python))
427(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 428
aaf625b8
RW
429(define-public python-psutil
430 (package
431 (name "python-psutil")
88535a44 432 (version "4.3.0")
aaf625b8
RW
433 (source
434 (origin
435 (method url-fetch)
f56777be 436 (uri (pypi-uri "psutil" version))
aaf625b8
RW
437 (sha256
438 (base32
88535a44 439 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 440 (build-system python-build-system)
88535a44 441 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
442 (synopsis "Library for retrieving information on running processes")
443 (description
444 "psutil (Python system and process utilities) is a library for retrieving
445information on running processes and system utilization (CPU, memory, disks,
446network) in Python. It is useful mainly for system monitoring, profiling and
447limiting process resources and management of running processes. It implements
448many functionalities offered by command line tools such as: ps, top, lsof,
449netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
450pidof, tty, taskset, pmap.")
3f641af0 451 (license license:bsd-3)))
aaf625b8
RW
452
453(define-public python2-psutil
454 (package-with-python2 python-psutil))
898238b9 455
f9da1d8a
ED
456(define-public python-passlib
457 (package
458 (name "python-passlib")
1c9f78ec 459 (version "1.7.0")
f9da1d8a
ED
460 (source
461 (origin
462 (method url-fetch)
690e8c66 463 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
464 (sha256
465 (base32
1c9f78ec 466 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
467 (build-system python-build-system)
468 (native-inputs
f3b98f4f 469 `(("python-nose" ,python-nose)))
f22efa01 470 (propagated-inputs
f9da1d8a
ED
471 `(("python-py-bcrypt" ,python-py-bcrypt)))
472 (arguments
473 `(#:phases
474 (alist-cons-before
475 'check 'set-PYTHON_EGG_CACHE
476 ;; some tests require access to "$HOME/.cython"
477 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
478 %standard-phases)))
479 (home-page "https://bitbucket.org/ecollins/passlib")
480 (synopsis
481 "Comprehensive password hashing framework")
482 (description
483 "Passlib is a password hashing library for Python 2 & 3, which provides
484cross-platform implementations of over 30 password hashing algorithms, as well
485as a framework for managing existing password hashes. It's designed to be
486useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
487to providing full-strength password hashing for multi-user application.")
3f641af0 488 (license license:bsd-3)))
f9da1d8a
ED
489
490(define-public python2-passlib
491 (package-with-python2 python-passlib))
492
feb0d9c3
ED
493(define-public python-py-bcrypt
494 (package
495 (name "python-py-bcrypt")
496 (version "0.4")
497 (source
498 (origin
499 (method url-fetch)
500 (uri (string-append
501 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
502 version
503 ".tar.gz"))
504 (sha256
505 (base32
506 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
507 (build-system python-build-system)
feb0d9c3
ED
508 (home-page "https://code.google.com/p/py-bcrypt")
509 (synopsis
510 "Bcrypt password hashing and key derivation")
511 (description
512 "A python wrapper of OpenBSD's Blowfish password hashing code. This
513system hashes passwords using a version of Bruce Schneier's Blowfish block
514cipher with modifications designed to raise the cost of off-line password
515cracking and frustrate fast hardware implementation. The computation cost of
516the algorithm is parametised, so it can be increased as computers get faster.
517The intent is to make a compromise of a password database less likely to
518result in an attacker gaining knowledge of the plaintext passwords (e.g. using
519John the Ripper).")
520 ;; "sha2.c" is under BSD-3;
521 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
522 ;; the rest is under ISC.
3f641af0 523 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
524
525(define-public python2-py-bcrypt
526 (package-with-python2 python-py-bcrypt))
527
528
429fdea1
ED
529(define-public python-paramiko
530 (package
531 (name "python-paramiko")
81b9bbbd 532 (version "1.16.0")
429fdea1
ED
533 (source
534 (origin
535 (method url-fetch)
81b9bbbd 536 (uri (pypi-uri "paramiko" version))
429fdea1
ED
537 (sha256
538 (base32
81b9bbbd 539 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 540 (build-system python-build-system)
a3fc12da 541 (propagated-inputs
f22efa01
HG
542 `(("python-pycrypto" ,python-pycrypto)
543 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
544 (home-page "http://www.paramiko.org/")
545 (synopsis "SSHv2 protocol library")
546 (description "Paramiko is a python implementation of the SSHv2 protocol,
547providing both client and server functionality. While it leverages a Python C
548extension for low level cryptography (PyCrypto), Paramiko itself is a pure
549Python interface around SSH networking concepts.")
3f641af0 550 (license license:lgpl2.1+)))
429fdea1
ED
551
552(define-public python2-paramiko
553 (package-with-python2 python-paramiko))
554
555
de73dbf6
ED
556(define-public python-httplib2
557 (package
558 (name "python-httplib2")
286f1bac 559 (version "0.9.2")
de73dbf6
ED
560 (source
561 (origin
562 (method url-fetch)
286f1bac 563 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
564 (sha256
565 (base32
286f1bac 566 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 567 (build-system python-build-system)
286f1bac 568 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
569 (synopsis "Comprehensive HTTP client library")
570 (description
571 "A comprehensive HTTP client library supporting many features left out of
572other HTTP libraries.")
573 (license license:expat)))
574
575(define-public python2-httplib2
576 (package-with-python2 python-httplib2))
577
67039875
ED
578(define-public python-ecdsa
579 (package
580 (name "python-ecdsa")
581 (version "0.13")
582 (source
583 (origin
584 (method url-fetch)
585 (uri (string-append
586 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
587 version
588 ".tar.gz"))
589 (sha256
590 (base32
591 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
592 (build-system python-build-system)
67039875
ED
593 (inputs
594 `(("openssl" ,openssl)))
595 (home-page
596 "http://github.com/warner/python-ecdsa")
597 (synopsis
598 "ECDSA cryptographic signature library (pure python)")
599 (description
600 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
601Curve Digital Signature Algorithm), implemented purely in Python. With this
602library, you can quickly create keypairs (signing key and verifying key), sign
603messages, and verify the signatures. The keys and signatures are very short,
604making them easy to handle and incorporate into other protocols.")
605 (license license:expat)))
606
607(define-public python2-ecdsa
608 (package-with-python2 python-ecdsa))
609
52323f32
ED
610(define-public python-ccm
611 (package
612 (name "python-ccm")
db5567f7 613 (version "2.1.6")
52323f32
ED
614 (source
615 (origin
616 (method url-fetch)
db5567f7 617 (uri (pypi-uri "ccm" version))
52323f32
ED
618 (sha256
619 (base32
db5567f7 620 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 621 (build-system python-build-system)
f22efa01 622 (propagated-inputs
52323f32 623 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
624 ;; Not listed in setup.py, but used in ccmlib/node.py for full
625 ;; functionality
626 ("python-psutil" ,python-psutil)
52323f32
ED
627 ("python-six" ,python-six)))
628 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
629 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
630localhost")
631 (description "Cassandra Cluster Manager is a development tool for testing
632local Cassandra clusters. It creates, launches and removes Cassandra clusters
633on localhost.")
3f641af0 634 (license license:asl2.0)))
52323f32
ED
635
636(define-public python2-ccm
637 (package-with-python2 python-ccm))
638
89114f39 639(define-public python-pytz
acc26ff1 640 (package
89114f39 641 (name "python-pytz")
61c9babb 642 (version "2016.3")
acc26ff1
CR
643 (source
644 (origin
645 (method url-fetch)
61c9babb 646 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
647 (sha256
648 (base32
61c9babb 649 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 650 (build-system python-build-system)
8498b8cf 651 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 652 (home-page "http://pythonhosted.org/pytz")
9e771e3b 653 (synopsis "Python timezone library")
acc26ff1
CR
654 (description
655 "This library allows accurate and cross platform timezone calculations
656using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 657 (license license:expat)))
5ace6e2f 658
89114f39 659(define-public python2-pytz
11bb85a1 660 (package-with-python2 python-pytz))
89114f39 661
fc50e9c6 662
89114f39 663(define-public python-babel
5ace6e2f 664 (package
89114f39 665 (name "python-babel")
ffb1e98d 666 (version "2.3.4")
5ace6e2f
CR
667 (source
668 (origin
669 (method url-fetch)
b850a6d8 670 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
671 (sha256
672 (base32
ffb1e98d 673 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 674 (build-system python-build-system)
f22efa01 675 (propagated-inputs
f3b98f4f 676 `(("python-pytz" ,python-pytz)))
8498b8cf 677 (arguments `(#:tests? #f)) ; no test target
e1804763 678 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
679 (synopsis
680 "Tools for internationalizing Python applications")
681 (description
682 "Babel is composed of two major parts:
683- tools to build and work with gettext message catalogs
684- a Python interface to the CLDR (Common Locale Data Repository), providing
685access to various locale display names, localized number and date formatting,
686etc. ")
3f641af0 687 (license license:bsd-3)))
89114f39
AE
688
689(define-public python2-babel
11bb85a1 690 (package-with-python2 python-babel))
73adf220 691
ed377cc6
RW
692(define-public python2-backport-ssl-match-hostname
693 (package
694 (name "python2-backport-ssl-match-hostname")
f2d06d46 695 (version "3.5.0.1")
ed377cc6
RW
696 (source
697 (origin
698 (method url-fetch)
699 (uri (string-append
700 "https://pypi.python.org/packages/source/b/"
701 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
702 version ".tar.gz"))
703 (sha256
704 (base32
f2d06d46 705 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 706 (build-system python-build-system)
f2d06d46
EF
707 (arguments
708 `(#:python ,python-2
709 #:tests? #f)) ; no test target
f2d06d46
EF
710 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
711 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
712 (description
713 "This backport brings the ssl.match_hostname() function to users of
714earlier versions of Python. The function checks the hostname in the
715certificate returned by the server to which a connection has been established,
716and verifies that it matches the intended target hostname.")
3f641af0 717 (license license:psfl)))
ed377cc6 718
d205f895
TD
719(define-public python-hdf4
720 (package
721 (name "python-hdf4")
722 (version "0.9")
723 (source
724 (origin
725 (method url-fetch)
726 (uri (pypi-uri name version))
727 (sha256
728 (base32
729 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
730 (build-system python-build-system)
731 (native-inputs `(("nose" ,python-nose)))
732 (propagated-inputs `(("numpy" ,python-numpy)))
733 (inputs
734 `(("hdf4" ,hdf4)
735 ("libjpeg" ,libjpeg)
736 ("zlib" ,zlib)))
737 (arguments
738 `(#:phases
739 (modify-phases %standard-phases
740 (replace 'check
741 (lambda _
742 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
743 ;; on to import numpy. Somehow this works on their CI system.
744 ;; Let's just manage PYTHONPATH here instead.
745 (substitute* "runexamples.sh"
746 (("export PYTHONPATH=.*") ""))
747 (setenv "PYTHONPATH"
748 (string-append (getcwd) ":"
749 (getenv "PYTHONPATH")))
750 (and (zero? (system* "./runexamples.sh"))
751 (zero? (system* "nosetests" "-v"))))))))
752 (home-page "https://github.com/fhs/python-hdf4")
753 (synopsis "Python interface to the NCSA HDF4 library")
754 (description
755 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
756which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
757NetCDF files can also be read and modified. Python-HDF4 is a fork of
758@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
759 (license license:expat)))
760
761(define-public python2-hdf4
762 (package-with-python2 python-hdf4))
763
ef5cbf9b
RW
764(define-public python-h5py
765 (package
766 (name "python-h5py")
fe147c41 767 (version "2.6.0")
ef5cbf9b
RW
768 (source
769 (origin
770 (method url-fetch)
fe147c41 771 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
772 (sha256
773 (base32
fe147c41 774 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 775 (build-system python-build-system)
797e1401
RW
776 (arguments
777 `(#:tests? #f ; no test target
778 #:phases
779 (modify-phases %standard-phases
780 (add-after 'unpack 'fix-hdf5-paths
781 (lambda* (#:key inputs #:allow-other-keys)
782 (let ((prefix (assoc-ref inputs "hdf5")))
783 (substitute* "setup_build.py"
784 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
785 (string-append "['" prefix "/lib" "']"))
786 (("'/opt/local/include', '/usr/local/include'")
787 (string-append "'" prefix "/include" "'")))
788 (substitute* "setup_configure.py"
789 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
790 (string-append "['" prefix "/lib" "']")))
791 #t))))))
3c4010b1 792 (propagated-inputs
69866690
HG
793 `(("python-six" ,python-six)
794 ("python-numpy" ,python-numpy)))
ef5cbf9b 795 (inputs
69866690 796 `(("hdf5" ,hdf5)))
ef5cbf9b 797 (native-inputs
fe147c41
EF
798 `(("python-cython" ,python-cython)
799 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
800 (home-page "http://www.h5py.org/")
801 (synopsis "Read and write HDF5 files from Python")
802 (description
803 "The h5py package provides both a high- and low-level interface to the
804HDF5 library from Python. The low-level interface is intended to be a
805complete wrapping of the HDF5 API, while the high-level component supports
806access to HDF5 files, datasets and groups using established Python and NumPy
807concepts.")
9820a028 808 (license license:bsd-3)))
ef5cbf9b
RW
809
810(define-public python2-h5py
9820a028 811 (package-with-python2 python-h5py))
ef5cbf9b 812
ea8450c8
TD
813(define-public python-netcdf4
814 (package
815 (name "python-netcdf4")
816 (version "1.2.6")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (pypi-uri "netCDF4" version))
821 (sha256
822 (base32
823 "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
824 (build-system python-build-system)
825 (native-inputs
826 `(("python-cython" ,python-cython)))
827 (propagated-inputs
828 `(("python-numpy" ,python-numpy)))
829 (inputs
830 `(("netcdf" ,netcdf)
831 ("hdf4" ,hdf4)
832 ("hdf5" ,hdf5)))
833 (arguments
834 '(#:phases
835 (modify-phases %standard-phases
836 (replace 'check
837 (lambda _
838 (setenv "NO_NET" "1") ; disable opendap tests
839 (with-directory-excursion "test"
840 (setenv "PYTHONPATH" ; find and add the library we just built
841 (string-append
842 (car (find-files "../build" "lib.*"
843 #:directories? #:t
844 #:fail-on-error? #:t))
845 ":" (getenv "PYTHONPATH")))
846 (zero? (system* "python" "run_all.py"))))))))
847 (home-page
848 "https://github.com/Unidata/netcdf4-python")
849 (synopsis "Python/numpy interface to the netCDF library")
850 (description "Netcdf4-python is a Python interface to the netCDF C
851library. netCDF version 4 has many features not found in earlier
852versions of the library and is implemented on top of HDF5. This module
853can read and write files in both the new netCDF 4 and the old netCDF 3
854format, and can create files that are readable by HDF5 clients. The
855API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
856to users of that module.")
857 ;; The software is mainly ISC, but includes some files covered
858 ;; by the Expat license.
859 (license (list license:isc license:expat))))
860
861(define-public python2-netcdf4
862 (package-with-python2 python-netcdf4))
863
c1448c69
EB
864(define-public python-lockfile
865 (package
866 (name "python-lockfile")
692add53 867 (version "0.12.2")
c1448c69
EB
868 (source
869 (origin
870 (method url-fetch)
871 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
872 "lockfile-" version ".tar.gz"))
873 (sha256
874 (base32
692add53 875 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
876 (build-system python-build-system)
877 (arguments '(#:test-target "check"))
692add53
BW
878 (native-inputs
879 `(("python-pbr" ,python-pbr)))
6a8f26a4 880 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
881 (synopsis "Platform-independent file locking module")
882 (description
883 "The lockfile package exports a LockFile class which provides a simple
884API for locking files.")
f210e944 885 (license license:expat)))
c1448c69
EB
886
887(define-public python2-lockfile
f210e944 888 (package-with-python2 python-lockfile))
c1448c69 889
5a1a4bf6
EB
890(define-public python-mock
891 (package
892 (name "python-mock")
893 (version "1.0.1")
894 (source
895 (origin
896 (method url-fetch)
6b7877e1 897 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
898 (sha256
899 (base32
900 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
901 (build-system python-build-system)
902 (arguments '(#:test-target "check"))
6b7877e1 903 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 904 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
905 (description
906 "Mock is a library for testing in Python. It allows you to replace parts
907of your system under test with mock objects and make assertions about how they
908have been used.")
bd3fa666 909 (license license:expat)))
5a1a4bf6
EB
910
911(define-public python2-mock
912 (package-with-python2 python-mock))
913
fc50e9c6 914
73adf220
AE
915(define-public python-setuptools
916 (package
917 (name "python-setuptools")
d660f7be 918 (version "31.0.0")
73adf220
AE
919 (source
920 (origin
921 (method url-fetch)
d660f7be 922 (uri (pypi-uri "setuptools" version))
73adf220
AE
923 (sha256
924 (base32
d660f7be 925 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
926 (modules '((guix build utils)))
927 (snippet
928 '(begin
929 ;; Remove included binaries which are used to build self-extracting
930 ;; installers for Windows.
931 ;; TODO: Find some way to build them ourself so we can include them.
932 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
933 #t))))
73adf220 934 (build-system python-build-system)
d3d656c5
AE
935 ;; FIXME: Tests require pytest, which itself relies on setuptools.
936 ;; One could bootstrap with an internal untested setuptools.
73adf220 937 (arguments
824af8ca 938 `(#:tests? #f))
73adf220
AE
939 (home-page "https://pypi.python.org/pypi/setuptools")
940 (synopsis
941 "Library designed to facilitate packaging Python projects")
942 (description
943 "Setuptools is a fully-featured, stable library designed to facilitate
944packaging Python projects, where packaging includes:
945Python package and module definitions,
946distribution package metadata,
947test hooks,
948project installation,
949platform-specific details,
950Python 3 support.")
d660f7be
MB
951 ;; TODO: setuptools now bundles the following libraries:
952 ;; packaging, pyparsing, six and appdirs. How to unbundle?
953 (license (list license:psfl ; setuptools itself
954 license:expat ; six, appdirs, pyparsing
955 license:asl2.0 ; packaging is dual ASL2/BSD-2
956 license:bsd-2))))
73adf220
AE
957
958(define-public python2-setuptools
959 (package-with-python2 python-setuptools))
fc50e9c6 960
1194575b
LF
961;;; Pycrypto is abandoned upstream [0] and contains at least one bug that can be
962;;; exploited to achieve arbitrary code execution [1].
963;;;
964;;; TODO Remove this package from GNU Guix.
965;;;
966;;; [0] https://github.com/dlitz/pycrypto/issues/173
967;;; [1] https://github.com/dlitz/pycrypto/issues/176
cafc3f5a
EB
968(define-public python-pycrypto
969 (package
970 (name "python-pycrypto")
971 (version "2.6.1")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (string-append "https://pypi.python.org/packages/source/p/"
976 "pycrypto/pycrypto-" version ".tar.gz"))
977 (sha256
978 (base32
979 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
980 (build-system python-build-system)
cafc3f5a
EB
981 (inputs
982 `(("python" ,python)
983 ("gmp" ,gmp)))
984 (arguments
985 `(#:phases
986 (alist-cons-before
987 'build 'set-build-env
988 ;; pycrypto runs an autoconf configure script behind the scenes
989 (lambda _
990 (setenv "CONFIG_SHELL" (which "bash")))
991 %standard-phases)))
992 (home-page "http://www.pycrypto.org/")
993 (synopsis "Cryptographic modules for Python")
994 (description
995 "Pycrypto is a collection of both secure hash functions (such as SHA256
996and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 997etc.). The package is structured to make adding new modules easy.")
3f641af0 998 (license license:public-domain)))
cafc3f5a 999
345f0611 1000(define-public python2-pycrypto
1c0059da
EF
1001 (let ((pycrypto (package-with-python2 python-pycrypto)))
1002 (package (inherit pycrypto)
1003 (inputs
1004 `(("python" ,python-2)
1005 ,@(alist-delete
1006 "python"
1007 (package-inputs pycrypto)))))))
345f0611 1008
cafc3f5a
EB
1009(define-public python-keyring
1010 (package
1011 (name "python-keyring")
13f3ff35 1012 (version "8.7")
cafc3f5a
EB
1013 (source
1014 (origin
1015 (method url-fetch)
664e6c3a 1016 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1017 (sha256
1018 (base32
13f3ff35 1019 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1020 (build-system python-build-system)
1021 (native-inputs
13f3ff35 1022 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1023 (propagated-inputs
cafc3f5a
EB
1024 `(("python-pycrypto" ,python-pycrypto)))
1025 (arguments
664e6c3a 1026 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1027 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1028 (synopsis "Store and access your passwords safely")
1029 (description
1030 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1031service from python. It can be used in any application that needs safe
cafc3f5a
EB
1032password storage.")
1033 ;; "MIT" and PSF dual license
f210e944 1034 (license license:x11)))
cafc3f5a 1035
d7af1069 1036(define-public python2-keyring
f210e944 1037 (package-with-python2 python-keyring))
d7af1069 1038
a480bc41
EB
1039(define-public python-six
1040 (package
1041 (name "python-six")
b6ab89ef 1042 (version "1.10.0")
a480bc41
EB
1043 (source
1044 (origin
1045 (method url-fetch)
b6ab89ef 1046 (uri (pypi-uri "six" version))
a480bc41
EB
1047 (sha256
1048 (base32
b6ab89ef 1049 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1050 (build-system python-build-system)
a480bc41
EB
1051 (home-page "http://pypi.python.org/pypi/six/")
1052 (synopsis "Python 2 and 3 compatibility utilities")
1053 (description
35b9e423 1054 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1055functions for smoothing over the differences between the Python versions with
1056the goal of writing Python code that is compatible on both Python versions.
35b9e423 1057Six supports every Python version since 2.5. It is contained in only one
a480bc41 1058Python file, so it can be easily copied into your project.")
3f641af0 1059 (license license:x11)))
a480bc41 1060
0c20025c
AE
1061(define-public python2-six
1062 (package-with-python2 python-six))
1063
cafc3f5a
EB
1064(define-public python-dateutil-2
1065 (package
1066 (name "python-dateutil")
394b8060 1067 (version "2.5.2")
cafc3f5a
EB
1068 (source
1069 (origin
1070 (method url-fetch)
394b8060 1071 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1072 (sha256
1073 (base32
394b8060 1074 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 1075 (build-system python-build-system)
f22efa01 1076 (propagated-inputs
394b8060 1077 `(("python-six" ,python-six)))
b5a5fb19 1078 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1079 (synopsis "Extensions to the standard datetime module")
1080 (description
1081 "The dateutil module provides powerful extensions to the standard
1082datetime module, available in Python 2.3+.")
f210e944 1083 (license license:bsd-3)))
cafc3f5a
EB
1084
1085(define-public python2-dateutil-2
f210e944 1086 (package-with-python2 python-dateutil-2))
cafc3f5a 1087
fc50e9c6
AE
1088(define-public python-dateutil
1089 (package
1090 (name "python-dateutil")
1091 (version "1.5") ; last version for python < 3
1092 (source
1093 (origin
1094 (method url-fetch)
cafc3f5a
EB
1095 (uri (string-append "http://labix.org/download/python-dateutil/"
1096 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
1097 (sha256
1098 (base32
1099 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1100 (build-system python-build-system)
b5a5fb19 1101 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 1102 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
1103 (description
1104 "The dateutil module provides powerful extensions to the standard
1105datetime module, available in Python 2.3+.")
3f641af0 1106 (license license:psfl)))
fc50e9c6
AE
1107
1108(define-public python2-dateutil
1109 (package-with-python2 python-dateutil))
1d08c01f 1110
cafc3f5a
EB
1111(define-public python-parsedatetime
1112 (package
1113 (name "python-parsedatetime")
eebf6f01 1114 (version "2.1")
cafc3f5a
EB
1115 (source
1116 (origin
1117 (method url-fetch)
eebf6f01 1118 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1119 (sha256
1120 (base32
eebf6f01 1121 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1122 (build-system python-build-system)
1123 (native-inputs
eebf6f01
EF
1124 `(("python-nose" ,python-nose)
1125 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1126 (home-page "http://github.com/bear/parsedatetime/")
1127 (synopsis
1128 "Parse human-readable date/time text")
1129 (description
e881752c 1130 "Parse human-readable date/time text.")
f210e944 1131 (license license:asl2.0)))
cafc3f5a 1132
38b8f9b2 1133(define-public python2-parsedatetime
f210e944 1134 (package-with-python2 python-parsedatetime))
38b8f9b2 1135
d072efcb
RW
1136(define-public python-pandas
1137 (package
1138 (name "python-pandas")
7d0c3c8d 1139 (version "0.18.1")
d072efcb
RW
1140 (source
1141 (origin
1b96f069 1142 (method url-fetch)
7d0c3c8d
EF
1143 (uri (string-append
1144 "https://pypi.python.org/packages/11/09/"
1145 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1146 "pandas-" version ".tar.gz"))
1b96f069 1147 (sha256
7d0c3c8d 1148 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1149 (build-system python-build-system)
d072efcb 1150 (propagated-inputs
f22efa01
HG
1151 `(("python-numpy" ,python-numpy)
1152 ("python-pytz" ,python-pytz)
d072efcb
RW
1153 ("python-dateutil" ,python-dateutil-2)))
1154 (native-inputs
abcc7a0e
HG
1155 `(("python-nose" ,python-nose)
1156 ("python-cython" ,python-cython)))
d072efcb
RW
1157 (home-page "http://pandas.pydata.org")
1158 (synopsis "Data structures for data analysis, time series, and statistics")
1159 (description
1160 "Pandas is a Python package providing fast, flexible, and expressive data
1161structures designed to make working with structured (tabular,
1162multidimensional, potentially heterogeneous) and time series data both easy
1163and intuitive. It aims to be the fundamental high-level building block for
1164doing practical, real world data analysis in Python.")
f210e944 1165 (license license:bsd-3)))
d072efcb
RW
1166
1167(define-public python2-pandas
f210e944 1168 (package-with-python2 python-pandas))
d072efcb 1169
cafc3f5a
EB
1170(define-public python-tzlocal
1171 (package
1172 (name "python-tzlocal")
ed80839b 1173 (version "1.2.2")
cafc3f5a
EB
1174 (source
1175 (origin
1176 (method url-fetch)
226d3331 1177 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1178 (sha256
1179 (base32
ed80839b 1180 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1181 (build-system python-build-system)
f22efa01
HG
1182 (propagated-inputs
1183 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1184 (home-page "https://github.com/regebro/tzlocal")
1185 (synopsis
35b9e423 1186 "Local timezone information for Python")
cafc3f5a
EB
1187 (description
1188 "Tzlocal returns a tzinfo object with the local timezone information.
1189This module attempts to fix a glaring hole in pytz, that there is no way to
1190get the local timezone information, unless you know the zoneinfo name, and
1191under several distributions that's hard or impossible to figure out.")
3f641af0 1192 (license license:cc0)))
cafc3f5a 1193
1d08c01f
AE
1194(define-public python2-pysqlite
1195 (package
1196 (name "python2-pysqlite")
fe476868 1197 (version "2.8.1")
1d08c01f
AE
1198 (source
1199 (origin
1200 (method url-fetch)
fe476868 1201 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1202 (sha256
1203 (base32
fe476868 1204 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1205 (build-system python-build-system)
1206 (inputs
1207 `(("sqlite" ,sqlite)))
1208 (arguments
1209 `(#:python ,python-2 ; incompatible with Python 3
1210 #:tests? #f)) ; no test target
fe476868 1211 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1212 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1213 (description
1214 "Pysqlite provides SQLite bindings for Python that comply to the
1215Database API 2.0T.")
ed0cdf83 1216 (license license:zlib)))
1d08c01f 1217
2875caf5
AE
1218
1219(define-public python2-mechanize
1220 (package
1221 (name "python2-mechanize")
1222 (version "0.2.5")
1223 (source
1224 (origin
1225 (method url-fetch)
1226 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1227 version ".tar.gz"))
1228 (sha256
1229 (base32
1230 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1231 (build-system python-build-system)
2875caf5
AE
1232 (arguments
1233 `(#:python ,python-2 ; apparently incompatible with Python 3
1234 #:tests? #f))
1235 ;; test fails with message
1236 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1237 ;; (python-3.3.2) or
1238 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1239 ;; (python-2.7.5).
1240 ;; The source code is from March 2011 and probably not up-to-date
1241 ;; with respect to python unit tests.
1242 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1243 (synopsis
1244 "Stateful programmatic web browsing in Python")
1245 (description
1246 "Mechanize implements stateful programmatic web browsing in Python,
1247after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1248 (license (license:non-copyleft
1249 "file://COPYING"
1250 "See COPYING in the distribution."))))
2875caf5 1251
0352532e
AE
1252
1253(define-public python-simplejson
1254 (package
1255 (name "python-simplejson")
b2e6e150 1256 (version "3.10.0")
0352532e
AE
1257 (source
1258 (origin
1259 (method url-fetch)
988d1bad 1260 (uri (pypi-uri "simplejson" version))
0352532e
AE
1261 (sha256
1262 (base32
b2e6e150 1263 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1264 (build-system python-build-system)
1265 (home-page "http://simplejson.readthedocs.org/en/latest/")
1266 (synopsis
1267 "Json library for Python")
1268 (description
e881752c
AK
1269 "JSON (JavaScript Object Notation) is a subset of JavaScript
1270syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1271format.
0352532e
AE
1272
1273Simplejson exposes an API familiar to users of the standard library marshal
1274and pickle modules. It is the externally maintained version of the json
1275library contained in Python 2.6, but maintains compatibility with Python 2.5
1276and (currently) has significant performance advantages, even without using
1277the optional C extension for speedups. Simplejson is also supported on
1278Python 3.3+.")
3f641af0 1279 (license license:x11)))
0352532e
AE
1280
1281(define-public python2-simplejson
1282 (package-with-python2 python-simplejson))
421a80a2
AE
1283
1284
ed07b08d 1285(define-public python-pyicu
421a80a2 1286 (package
ed07b08d 1287 (name "python-pyicu")
d3b29319 1288 (version "1.9.2")
421a80a2
AE
1289 (source
1290 (origin
1291 (method url-fetch)
1292 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1293 version ".tar.gz"))
1294 (sha256
1295 (base32
d3b29319 1296 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1297 (build-system python-build-system)
1298 (inputs
1299 `(("icu4c" ,icu4c)))
421a80a2 1300 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1301 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1302 (description
1303 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1304 (license license:x11)))
ed07b08d
LF
1305
1306(define-public python2-pyicu
f210e944 1307 (package-with-python2 python-pyicu))
cc20a22a
LC
1308
1309(define-public python2-dogtail
1310 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1311 ;; spaces in indentation" with Python 3.
1312 (package
1313 (name "python2-dogtail")
1314 (version "0.8.2")
1315 (source (origin
1316 (method url-fetch)
1317 (uri (string-append
1318 "https://fedorahosted.org/released/dogtail/dogtail-"
1319 version ".tar.gz"))
1320 (sha256
1321 (base32
1322 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1323 (build-system python-build-system)
1324 (arguments `(#:python ,python-2
1325 #:tests? #f)) ; invalid command "test"
1326 (home-page "https://fedorahosted.org/dogtail/")
1327 (synopsis "GUI test tool and automation framework written in ​Python")
1328 (description
35b9e423 1329 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1330It uses Accessibility (a11y) technologies to communicate with desktop
1331applications. dogtail scripts are written in Python and executed like any
1332other Python program.")
3f641af0 1333 (license license:gpl2+)))
515e6878 1334
011b18c3
LC
1335(define-public python2-empy
1336 (package
1337 (name "python2-empy")
1338 (version "3.3")
1339 (source (origin
1340 (method url-fetch)
1341 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1342 version ".tar.gz"))
1343 (sha256
1344 (base32
1345 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1346 (build-system python-build-system)
1347 (arguments
1348 `(#:python ,python-2
1349 #:phases (alist-replace
1350 'check
1351 (lambda _
1352 (zero? (system* "./test.sh")))
1353 %standard-phases)))
1354 (home-page "http://www.alcyone.com/software/empy/")
1355 (synopsis "Templating system for Python")
1356 (description
1357 "EmPy is a system for embedding Python expressions and statements in
1358template text; it takes an EmPy source file, processes it, and produces
1359output. This is accomplished via expansions, which are special signals to the
1cd4027c 1360EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1361EmPy can expand arbitrary Python expressions and statements in this way, as
1362well as a variety of special forms. Textual data not explicitly delimited in
1363this way is sent unaffected to the output, allowing Python to be used in
1364effect as a markup language. Also supported are callbacks via hooks,
1365recording and playback via diversions, and dynamic, chainable filters. The
1366system is highly configurable via command line options and embedded
1367commands.")
3f641af0 1368 (license license:lgpl2.1+)))
011b18c3 1369
8deeda0c
LC
1370(define-public python2-element-tree
1371 (package
1372 (name "python2-element-tree")
1373 (version "1.2.6")
1374 (source (origin
1375 (method url-fetch)
1376 (uri (string-append
1377 "http://effbot.org/media/downloads/elementtree-"
1378 version "-20050316.tar.gz"))
1379 (sha256
1380 (base32
1381 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1382 (build-system python-build-system)
1383 (arguments
1384 `(#:python ,python-2 ; seems to be part of Python 3
1385 #:tests? #f)) ; no 'test' sub-command
1386 (synopsis "Toolkit for XML processing in Python")
1387 (description
1388 "ElementTree is a Python library supporting lightweight XML processing.")
1389 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1390 (license (license:x11-style
1391 "http://docs.python.org/2/license.html"
1392 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1393
1394(define-public python2-pybugz
1395 (package
1396 (name "python2-pybugz")
1397 (version "0.6.11")
1398 (source (origin
1399 (method url-fetch)
1400 (uri (string-append
1401 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1402 version ".tar.gz"))
1403 (sha256
1404 (base32
6f194a1e 1405 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1406 (patches (search-patches "pybugz-stty.patch"
1407 "pybugz-encode-error.patch"))))
8deeda0c
LC
1408 (build-system python-build-system)
1409 (arguments
1410 `(#:python ,python-2 ; SyntaxError with Python 3
1411 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1412 (propagated-inputs
1413 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1414 (synopsis "Python and command-line interface to Bugzilla")
1415 (description
1416 "PyBugz is a Python library and command-line tool to query the Bugzilla
1417bug tracking system. It is meant as an aid to speed up interaction with the
1418bug tracker.")
1419 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1420 (license license:gpl2)))
8deeda0c 1421
a480bc41
EB
1422(define-public python-enum34
1423 (package
1424 (name "python-enum34")
d39ae1e5 1425 (version "1.1.0")
a480bc41
EB
1426 (source
1427 (origin
1428 (method url-fetch)
d39ae1e5 1429 (uri (pypi-uri "enum34" version))
a480bc41
EB
1430 (sha256
1431 (base32
d39ae1e5 1432 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1433 (build-system python-build-system)
a480bc41
EB
1434 (arguments
1435 `(#:phases
1436 (alist-replace
1437 'check
1438 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1439 %standard-phases)))
1440 (home-page "https://pypi.python.org/pypi/enum34")
1441 (synopsis "Backported Python 3.4 Enum")
1442 (description
1443 "Enum34 is the new Python stdlib enum module available in Python 3.4
1444backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1445 (license license:bsd-3)))
a480bc41 1446
820acd1b
LF
1447(define-public python2-enum34
1448 (package-with-python2 python-enum34))
1449
a480bc41
EB
1450(define-public python-parse-type
1451 (package
1452 (name "python-parse-type")
1453 (version "0.3.4")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (string-append "https://pypi.python.org/packages/source/p/"
1458 "parse_type/parse_type-" version ".tar.gz"))
1459 (sha256
1460 (base32
1461 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1462 (build-system python-build-system)
f22efa01 1463 (propagated-inputs
f3b98f4f 1464 `(("python-six" ,python-six)
68f1cdec 1465 ("python-parse" ,python-parse)))
a480bc41
EB
1466 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1467 (home-page "https://github.com/jenisys/parse_type")
1468 (synopsis "Extended parse module")
1469 (description
1470 "Parse_type extends the python parse module.")
3f641af0 1471 (license license:bsd-3)))
a480bc41
EB
1472
1473(define-public python-parse
1474 (package
1475 (name "python-parse")
eb3d3503 1476 (version "1.6.6")
a480bc41
EB
1477 (source
1478 (origin
1479 (method url-fetch)
eb3d3503 1480 (uri (pypi-uri "parse" version))
a480bc41
EB
1481 (sha256
1482 (base32
aa6c09ed
EF
1483 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1484 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1485 (build-system python-build-system)
1486 (arguments
1487 `(#:phases
f9a65318
EF
1488 (modify-phases %standard-phases
1489 (replace 'check
1490 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1491 (home-page "https://github.com/r1chardj0n3s/parse")
1492 (synopsis "Parse strings")
1493 (description
1494 "Parse strings using a specification based on the Python format()
1495syntax.")
3f641af0 1496 (license license:x11)))
a480bc41 1497
d3eff97a
JL
1498(define-public python-polib
1499 (package
1500 (name "python-polib")
1501 (version "1.0.8")
1502 (source (origin
1503 (method url-fetch)
1504 (uri (pypi-uri "polib" version))
1505 (sha256
1506 (base32
1507 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1508 (build-system python-build-system)
1509 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1510 (synopsis "Manipulate, create and modify gettext files")
1511 (description "Polib can manipulate any gettext format (po, pot and mo)
1512files. It can be used to create po files from scratch or to modify
1513existing ones.")
1514 (license license:expat)))
1515
1516(define-public python2-polib
1517 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1518 (package
1519 (inherit base)
1520 (arguments `(,@(package-arguments base)
1521 ;; Tests don't work with python2.
1522 #:tests? #f)))))
a480bc41 1523
515e6878
LC
1524(define-public scons
1525 (package
1526 (name "scons")
a3f61425 1527 (version "2.3.4")
515e6878
LC
1528 (source (origin
1529 (method url-fetch)
de67e922
LF
1530 (uri (string-append "mirror://sourceforge/scons/scons/" version
1531 "/scons-" version ".tar.gz"))
515e6878
LC
1532 (sha256
1533 (base32
a3f61425 1534 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1535 (build-system python-build-system)
1536 (arguments
1537 ;; With Python 3.x, fails to build with a syntax error.
1538 `(#:python ,python-2
b3e8b4bd 1539 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1540 #:tests? #f)) ; no 'python setup.py test' command
1541 (home-page "http://scons.org/")
1542 (synopsis "Software construction tool written in Python")
1543 (description
1544 "SCons is a software construction tool. Think of SCons as an improved,
1545cross-platform substitute for the classic Make utility with integrated
1546functionality similar to autoconf/automake and compiler caches such as ccache.
1547In short, SCons is an easier, more reliable and faster way to build
1548software.")
3f641af0 1549 (license license:x11)))
011b18c3 1550
c15a5c0e
DT
1551(define-public python-extras
1552 (package
1553 (name "python-extras")
1554 (version "0.0.3")
1555 (source
1556 (origin
1557 (method url-fetch)
1558 (uri (string-append
1559 "https://pypi.python.org/packages/source/e/extras/extras-"
1560 version ".tar.gz"))
1561 (sha256
1562 (base32
1563 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1564 (build-system python-build-system)
c15a5c0e
DT
1565 (arguments
1566 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1567 '(#:tests? #f))
1568 (home-page "https://github.com/testing-cabal/extras")
1569 (synopsis "Useful extensions to the Python standard library")
1570 (description
1571 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1572 (license license:expat)))
c15a5c0e
DT
1573
1574(define-public python2-extras
1575 (package-with-python2 python-extras))
1576
56ea0efd
DT
1577(define-public python-mimeparse
1578 (package
1579 (name "python-mimeparse")
1580 (version "0.1.4")
1581 (source
1582 (origin
1583 (method url-fetch)
1584 (uri (string-append
1585 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1586 version ".tar.gz"))
1587 (sha256
1588 (base32
1589 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1590 (build-system python-build-system)
56ea0efd
DT
1591 (arguments
1592 '(#:tests? #f)) ; no setup.py test command
1593 (home-page
1594 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1595 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1596 (description
1597 "Mimeparse provides basic functions for parsing MIME type names and
1598matching them against a list of media-ranges.")
bd3fa666 1599 (license license:expat)))
56ea0efd
DT
1600
1601(define-public python2-mimeparse
1602 (package-with-python2 python-mimeparse))
1603
4435427e
DT
1604(define-public python-nose
1605 (package
1606 (name "python-nose")
f7cb9841 1607 (version "1.3.7")
4435427e
DT
1608 (source
1609 (origin
1610 (method url-fetch)
f7cb9841 1611 (uri (pypi-uri "nose" version))
4435427e
DT
1612 (sha256
1613 (base32
f7cb9841 1614 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1615 (build-system python-build-system)
4435427e
DT
1616 (arguments
1617 '(#:tests? #f)) ; FIXME: test suite fails
1618 (home-page "http://readthedocs.org/docs/nose/")
1619 (synopsis "Python testing library")
1620 (description
1621 "Nose extends the unittest library to make testing easier.")
3f641af0 1622 (license license:lgpl2.0+)))
4435427e
DT
1623
1624(define-public python2-nose
1625 (package-with-python2 python-nose))
1626
0aea283a
EF
1627(define-public python-nose2
1628 (package
1629 (name "python-nose2")
1630 (version "0.6.5")
1631 (source
1632 (origin
1633 (method url-fetch)
1634 (uri (pypi-uri "nose2" version))
1635 (sha256
1636 (base32
1637 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1638 (build-system python-build-system)
1639 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1640 (propagated-inputs
0aea283a
EF
1641 `(("python-cov-core" ,python-cov-core)
1642 ("python-pytest-cov" ,python-pytest-cov)
1643 ("python-six" ,python-six)))
1644 (home-page "https://github.com/nose-devs/nose2")
1645 (synopsis "Next generation of nicer testing for Python")
1646 (description
1647 "Nose2 is the next generation of nicer testing for Python, based on the
1648plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1649better plugin api, being easier for users to configure, and simplifying internal
1650interfaces and processes.")
1651 (license license:bsd-2)))
1652
1653(define-public python2-nose2
1654 (package-with-python2 python-nose2))
1655
6cd9c356
DT
1656(define-public python-unittest2
1657 (package
1658 (name "python-unittest2")
1659 (version "0.5.1")
1660 (source
1661 (origin
1662 (method url-fetch)
1663 (uri (string-append
1664 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1665 version ".tar.gz"))
1666 (sha256
1667 (base32
1668 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1669 (build-system python-build-system)
6cd9c356
DT
1670 (home-page "http://pypi.python.org/pypi/unittest2")
1671 (synopsis "Python unit testing library")
1672 (description
1673 "Unittest2 is a replacement for the unittest module in the Python
1674standard library.")
3f641af0 1675 (license license:psfl)))
6cd9c356
DT
1676
1677(define-public python2-unittest2
1678 (package (inherit python-unittest2)
1679 (name "python2-unittest2")
1680 (version "0.5.1")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (string-append
1685 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1686 version ".tar.gz"))
1687 (sha256
1688 (base32
1689 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1690 (arguments
1691 `(#:python ,python-2
1692 #:tests? #f)))) ; no setup.py test command
1693
02f8f804 1694(define-public python-pafy
1695 (package
1696 (name "python-pafy")
1697 (version "0.5.2")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "pafy" version))
1702 (sha256
1703 (base32
1704 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1705 (build-system python-build-system)
ed3fee5f 1706 (arguments
1707 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1708 (propagated-inputs
1709 ;; Youtube-dl is a python package which is imported in the file
1710 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1711 `(("youtube-dl" ,youtube-dl)))
1712 (home-page "https://np1.github.io/pafy/")
1713 (synopsis "Retrieve YouTube content and metadata")
1714 (description
1715 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1716 (license license:lgpl3+)))
1717
542ad60f
DT
1718(define-public python-py
1719 (package
1720 (name "python-py")
71c8a804 1721 (version "1.4.31")
542ad60f
DT
1722 (source
1723 (origin
1724 (method url-fetch)
71c8a804 1725 (uri (pypi-uri "py" version))
542ad60f
DT
1726 (sha256
1727 (base32
71c8a804 1728 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1729 (build-system python-build-system)
542ad60f
DT
1730 (home-page "http://pylib.readthedocs.org/")
1731 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1732 (description
1733 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1734code introspection, and logging.")
bd3fa666 1735 (license license:expat)))
542ad60f
DT
1736
1737(define-public python2-py
1738 (package-with-python2 python-py))
1739
855d4761
DT
1740(define-public python-pytest
1741 (package
1742 (name "python-pytest")
61a4332d 1743 (version "2.7.3")
855d4761
DT
1744 (source
1745 (origin
1746 (method url-fetch)
1747 (uri (string-append
1748 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1749 version ".tar.gz"))
1750 (sha256
1751 (base32
61a4332d 1752 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1753 (modules '((guix build utils)))
1754 (snippet
1755 ;; One of the tests involves the /usr directory, so it fails.
1756 '(substitute* "testing/test_argcomplete.py"
1757 (("def test_remove_dir_prefix\\(self\\):")
1758 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1759 (build-system python-build-system)
482d9591
HG
1760 (propagated-inputs
1761 `(("python-py" ,python-py)))
e7881f3d 1762 (native-inputs
482d9591 1763 `(("python-nose" ,python-nose)
855d4761
DT
1764 ("python-mock" ,python-mock)))
1765 (home-page "http://pytest.org")
1766 (synopsis "Python testing library")
1767 (description
1768 "Pytest is a testing tool that provides auto-discovery of test modules
1769and functions, detailed info on failing assert statements, modular fixtures,
1770and many external plugins.")
bd3fa666 1771 (license license:expat)))
855d4761
DT
1772
1773(define-public python2-pytest
1774 (package-with-python2 python-pytest))
1775
fca4ff35
LF
1776;; This package is used by Borg until we can upgrade all our Python packages to
1777;; use a more recent pytest.
1778(define-public python-pytest-2.9.2
1779 (package
1780 (inherit python-pytest)
1781 (name "python-pytest")
1782 (version "2.9.2")
1783 (source (origin
1784 (method url-fetch)
1785 (uri (pypi-uri "pytest" version))
1786 (sha256
1787 (base32
1788 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1789 (arguments
1790 `(#:phases
1791 (modify-phases %standard-phases
1792 (add-before 'check 'disable-invalid-test
1793 (lambda _
1794 (substitute* "testing/test_argcomplete.py"
1795 (("def test_remove_dir_prefix" line)
1796 (string-append "@pytest.mark.skip"
1797 "(reason=\"Assumes that /usr exists.\")\n "
1798 line)))
1799 #t)))))))
1800
358c3d61
EF
1801(define-public python-pytest-cov
1802 (package
1803 (name "python-pytest-cov")
545f4a1c 1804 (version "2.2.1")
358c3d61
EF
1805 (source
1806 (origin
1807 (method url-fetch)
1808 (uri (pypi-uri "pytest-cov" version))
1809 (sha256
545f4a1c
EF
1810 (base32
1811 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1812 (build-system python-build-system)
ce40b383
HG
1813 (arguments
1814 `(#:phases
1815 (modify-phases %standard-phases
1816 (replace 'check
1817 (lambda _
1818 ;; options taken from tox.ini
1819 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1820 ;; with "Duplicate implicit target name"
1821 (zero? (system* "python" "./setup.py" "check"
1822 "--strict" "--metadata")))))))
f22efa01 1823 (propagated-inputs
10468636
EF
1824 `(("python-coverage" ,python-coverage)
1825 ("python-pytest" ,python-pytest)))
10468636
EF
1826 (home-page "https://github.com/pytest-dev/pytest-cov")
1827 (synopsis "Pytest plugin for measuring coverage")
1828 (description
1829 "Pytest-cov produces coverage reports. It supports centralised testing and
1830distributed testing in both @code{load} and @code{each} modes. It also
1831supports coverage of subprocesses.")
f210e944 1832 (license license:expat)))
358c3d61
EF
1833
1834(define-public python2-pytest-cov
f210e944 1835 (package-with-python2 python-pytest-cov))
358c3d61 1836
6784f2e3
RW
1837(define-public python-pytest-runner
1838 (package
1839 (name "python-pytest-runner")
1840 (version "2.6.2")
1841 (source
1842 (origin
1843 (method url-fetch)
54cd239b 1844 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1845 (sha256
1846 (base32
1847 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1848 (build-system python-build-system)
1849 (arguments
1850 `(#:phases
1851 (modify-phases %standard-phases
1852 ;; The fancy way of setting the version with setuptools_scm does not
1853 ;; seem to work here.
1854 (add-after 'unpack 'set-version
1855 (lambda _
1856 (substitute* "docs/conf.py"
1857 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1858 (string-append "version = \"" ,version "\"")))
1859 #t)))))
1860 (native-inputs
1861 `(("python-pytest" ,python-pytest)
1862 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1863 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1864 (synopsis "Invoke py.test as a distutils command")
1865 (description
1866 "This package provides a @command{pytest-runner} command that
1867@file{setup.py} files can use to run tests.")
f210e944 1868 (license license:expat)))
54cd239b
EF
1869
1870(define-public python2-pytest-runner
f210e944 1871 (package-with-python2 python-pytest-runner))
6784f2e3 1872
44547e51
EF
1873(define-public python-pytest-mock
1874 (package
1875 (name "python-pytest-mock")
1876 (version "1.2")
1877 (source
1878 (origin
1879 (method url-fetch)
1880 (uri (pypi-uri "pytest-mock" version ".zip"))
1881 (sha256
1882 (base32
1883 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1884 (build-system python-build-system)
1885 (native-inputs
1886 `(("unzip" ,unzip)))
f22efa01 1887 (propagated-inputs
d5e41cf2 1888 `(("python-pytest" ,python-pytest)))
44547e51
EF
1889 (home-page "https://github.com/pytest-dev/pytest-mock/")
1890 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1891 (description
1892 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1893around the patching API provided by the @code{mock} package, but with the
1894benefit of not having to worry about undoing patches at the end of a test.
1895The mocker fixture has the same API as @code{mock.patch}, supporting the
1896same arguments.")
1897 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1898 (license license:expat)))
1899
1900(define-public python2-pytest-mock
1901 (let ((base (package-with-python2
1902 (strip-python2-variant python-pytest-mock))))
1903 (package (inherit base)
f22efa01 1904 (propagated-inputs
44547e51 1905 `(("python2-mock" ,python2-mock)
f22efa01 1906 ,@(package-propagated-inputs base))))))
44547e51 1907
8fa58fc9
CAW
1908(define-public python-pytest-xdist
1909 (package
1910 (name "python-pytest-xdist")
1911 (version "1.14")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (pypi-uri "pytest-xdist" version ".zip"))
1916 (sha256
1917 (base32
de585a7e
HG
1918 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1919 (modules '((guix build utils)))
1920 (snippet
1921 '(begin
1922 ;; Remove pre-compiled .pyc files from source.
1923 (for-each delete-file-recursively
1924 (find-files "." "__pycache__" #:directories? #t))
1925 (for-each delete-file (find-files "." "\\.pyc$"))
1926 #t))))
8fa58fc9
CAW
1927 (build-system python-build-system)
1928 (native-inputs
1929 `(("unzip" ,unzip)
8fa58fc9 1930 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1931 (propagated-inputs
c4516ad2 1932 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1933 ("python-pytest" ,python-pytest)
1934 ("python-py" ,python-py)))
1935 (home-page
1936 "https://github.com/pytest-dev/pytest-xdist")
1937 (synopsis
1938 "Plugin for py.test with distributed testing and loop-on-failing modes")
1939 (description
1940 "The pytest-xdist plugin extends py.test with some unique test execution
1941modes: parallelization, running tests in boxed subprocesses, the ability
1942to run tests repeatedly when failed, and the ability to run tests on multiple
1943Python interpreters or platforms. It uses rsync to copy the existing
1944program code to a remote location, executes there, and then syncs the
1945result back.")
f210e944 1946 (license license:expat)))
8fa58fc9
CAW
1947
1948(define-public python2-pytest-xdist
f210e944 1949 (package-with-python2 python-pytest-xdist))
8fa58fc9 1950
84d24017
DT
1951(define-public python-scripttest
1952 (package
1953 (name "python-scripttest")
1954 (version "1.3")
1955 (source
1956 (origin
1957 (method url-fetch)
1958 (uri (string-append
1959 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1960 version ".tar.gz"))
1961 (sha256
1962 (base32
1963 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1964 (build-system python-build-system)
521b7772 1965 (native-inputs
f3b98f4f 1966 `(("python-pytest" ,python-pytest)))
84d24017
DT
1967 (home-page "http://pythonpaste.org/scripttest/")
1968 (synopsis "Python library to test command-line scripts")
1969 (description "Scripttest is a Python helper library for testing
1970interactive command-line applications. With it you can run a script in a
1971subprocess and see the output as well as any file modifications.")
bd3fa666 1972 (license license:expat)))
84d24017
DT
1973
1974(define-public python2-scripttest
1975 (package-with-python2 python-scripttest))
1976
d8fa80e1
DT
1977(define-public python-testtools
1978 (package
1979 (name "python-testtools")
1980 (version "1.0.0")
1981 (source
1982 (origin
1983 (method url-fetch)
1984 (uri (string-append
1985 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1986 version ".tar.gz"))
1987 (sha256
1988 (base32
1989 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1990 (build-system python-build-system)
0e88cbf8 1991 (propagated-inputs
f22efa01
HG
1992 `(("python-mimeparse" ,python-mimeparse)
1993 ("python-extras" ,python-extras)))
d8fa80e1
DT
1994 (home-page "https://github.com/testing-cabal/testtools")
1995 (synopsis
1996 "Extensions to the Python standard library unit testing framework")
1997 (description
1998 "Testtools extends the Python standard library unit testing framework to
1999provide matchers, more debugging information, and cross-Python
2000compatibility.")
3f641af0 2001 (license license:psfl)))
d8fa80e1
DT
2002
2003(define-public python2-testtools
2004 (package-with-python2 python-testtools))
2005
5bf3afea
DT
2006(define-public python-testscenarios
2007 (package
2008 (name "python-testscenarios")
2009 (version "0.4")
2010 (source
2011 (origin
2012 (method url-fetch)
2013 (uri (string-append
2014 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2015 version ".tar.gz"))
2016 (sha256
2017 (base32
2018 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2019 (build-system python-build-system)
f22efa01 2020 (propagated-inputs
8e73d3ba 2021 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2022 (home-page "https://launchpad.net/testscenarios")
2023 (synopsis "Pyunit extension for dependency injection")
2024 (description
2025 "Testscenarios provides clean dependency injection for Python unittest
2026style tests.")
3f641af0 2027 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2028
2029(define-public python2-testscenarios
2030 (package-with-python2 python-testscenarios))
2031
dac79ecc
DT
2032(define-public python-testresources
2033 (package
2034 (name "python-testresources")
2035 (version "0.2.7")
2036 (source
2037 (origin
2038 (method url-fetch)
2039 (uri (string-append
2040 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2041 version ".tar.gz"))
2042 (sha256
2043 (base32
2044 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2045 (build-system python-build-system)
dac79ecc
DT
2046 (home-page "https://launchpad.net/testresources")
2047 (synopsis
2048 "Pyunit extension for managing test resources")
2049 (description
2050 "Testresources is an extension to Python's unittest to allow declarative
2051use of resources by test cases.")
3f641af0 2052 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2053
2054(define-public python2-testresources
2055 (package-with-python2 python-testresources))
2056
070ab058
DT
2057(define-public python-subunit
2058 (package
2059 (name "python-subunit")
2060 (version "0.0.21")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (string-append
2065 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2066 version ".tar.gz"))
2067 (sha256
2068 (base32
2069 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2070 (build-system python-build-system)
f22efa01 2071 (propagated-inputs
b52ad371
HG
2072 `(("python-extras" ,python-extras)
2073 ("python-mimeparse" ,python-mimeparse)))
2074 (native-inputs
2075 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2076 (home-page "http://launchpad.net/subunit")
2077 (synopsis "Python implementation of the subunit protocol")
2078 (description
2079 "Python-subunit is a Python implementation of the subunit test streaming
2080protocol.")
3f641af0 2081 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2082
2083(define-public python2-subunit
2084 (package-with-python2 python-subunit))
2085
d2a8db92
HG
2086;; Recent versions of python-fixtures and python-testrepository need
2087;; python-pbr for packaging, which itself needs these two packages for
2088;; testing.
2089;; To fix this circular dependency, we use a build of python-pbr, based on the
2090;; same source, just without any test dependencies and with tests disabled.
2091;; python-pbr-minmal is then used to package python-fixtures and
2092;; python-testrepository.
2093;; Strictly speaking we currently could remove the test-requirements from the
2094;; normal python-pbr package (and save this package) since test are disabled
2095;; there anyway. But this may change in future.
2096(define python-pbr-minimal
cd49454b 2097 (package
d2a8db92
HG
2098 (name "python-pbr-minimal")
2099 (version "1.8.1")
7787ef76
CR
2100 (source
2101 (origin
2102 (method url-fetch)
d2a8db92 2103 (uri (pypi-uri "pbr" version))
7787ef76
CR
2104 (sha256
2105 (base32
d2a8db92 2106 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
2107 (build-system python-build-system)
2108 (arguments
d2a8db92
HG
2109 `(#:tests? #f))
2110 (home-page "http://docs.openstack.org/developer/pbr/")
2111 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2112 (description
d2a8db92 2113 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2114 (license license:asl2.0)))
7787ef76 2115
d2a8db92
HG
2116(define python2-pbr-minimal
2117 (package-with-python2 python-pbr-minimal))
7787ef76 2118
1ef09c0c 2119(define-public python-pbr
e25f0174 2120 (package
d2a8db92 2121 (inherit python-pbr-minimal)
e25f0174 2122 (name "python-pbr")
e25f0174
BW
2123 (arguments
2124 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2125 (propagated-inputs
d2a8db92
HG
2126 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2127 (native-inputs
e25f0174 2128 `(("python-fixtures" ,python-fixtures)
d2a8db92 2129 ;; discover, coverage, hacking, subunit
e25f0174 2130 ("python-mock" ,python-mock)
d2a8db92 2131 ("python-six" ,python-six)
e25f0174
BW
2132 ("python-sphinx" ,python-sphinx)
2133 ("python-testrepository" ,python-testrepository)
2134 ("python-testresources" ,python-testresources)
2135 ("python-testscenarios" ,python-testscenarios)
2136 ("python-testtools" ,python-testtools)
2137 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2138 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2139 (description
2140 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2141and sensible default behaviors into your setuptools run. It will set
2142versions, process requirements files and generate AUTHORS and ChangeLog file
2143from git information.
2144")))
1ef09c0c
BW
2145
2146(define-public python2-pbr
e25f0174 2147 (package-with-python2 python-pbr))
1ef09c0c 2148
7787ef76
CR
2149(define-public python-fixtures
2150 (package
2151 (name "python-fixtures")
13fcc6df 2152 (version "1.4.0")
7787ef76
CR
2153 (source
2154 (origin
2155 (method url-fetch)
13fcc6df 2156 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2157 (sha256
2158 (base32
13fcc6df 2159 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2160 (build-system python-build-system)
2161 (propagated-inputs
ae92cadd 2162 `(("python-six" ,python-six)))
e7881f3d 2163 (native-inputs
d2a8db92 2164 `(("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2165 ("python-testtools" ,python-testtools)))
7787ef76
CR
2166 (home-page "https://launchpad.net/python-fixtures")
2167 (synopsis "Python test fixture library")
2168 (description
2169 "Fixtures provides a way to create reusable state, useful when writing
2170Python tests.")
3f641af0 2171 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2172
cd49454b
DT
2173(define-public python2-fixtures
2174 (package-with-python2 python-fixtures))
2175
b24a0c00
DT
2176(define-public python-testrepository
2177 (package
2178 (name "python-testrepository")
2179 (version "0.0.20")
2180 (source
2181 (origin
2182 (method url-fetch)
2183 (uri (string-append
2184 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2185 version ".tar.gz"))
2186 (sha256
2187 (base32
2188 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2189 (build-system python-build-system)
05de40c5 2190 (propagated-inputs
b2e66edf
HG
2191 `(("python-fixtures" ,python-fixtures)
2192 ("python-subunit" ,python-subunit)
b52ad371
HG
2193 ("python-testtools" ,python-testtools)))
2194 (native-inputs
2195 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2196 ("python-mimeparse" ,python-mimeparse)))
2197 (home-page "https://launchpad.net/testrepository")
2198 (synopsis "Database for Python test results")
2199 (description "Testrepository provides a database of test results which can
2200be used as part of a developer's workflow to check things such as what tests
2201have failed since the last commit or what tests are currently failing.")
3f641af0 2202 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2203
2204(define-public python2-testrepository
2205 (package-with-python2 python-testrepository))
2206
243a009a
DT
2207(define-public python-coverage
2208 (package
2209 (name "python-coverage")
4d4cf3dd 2210 (version "4.1")
243a009a
DT
2211 (source
2212 (origin
2213 (method url-fetch)
82a3c582 2214 (uri (pypi-uri "coverage" version))
243a009a
DT
2215 (sha256
2216 (base32
4d4cf3dd 2217 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2218 (build-system python-build-system)
243a009a
DT
2219 (home-page "http://nedbatchelder.com/code/coverage")
2220 (synopsis "Code coverage measurement for Python")
2221 (description
2222 "Coverage measures code coverage, typically during test execution. It
2223uses the code analysis tools and tracing hooks provided in the Python standard
2224library to determine which lines are executable, and which have been
2225executed.")
3f641af0 2226 (license license:bsd-3)))
243a009a
DT
2227
2228(define-public python2-coverage
2229 (package-with-python2 python-coverage))
2230
12f839fd
EF
2231(define-public python-cov-core
2232 (package
2233 (name "python-cov-core")
2234 (version "1.15.0")
2235 (source
2236 (origin
2237 (method url-fetch)
2238 (uri (pypi-uri "cov-core" version))
2239 (sha256
2240 (base32
2241 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2242 (build-system python-build-system)
f78e1c27 2243 (propagated-inputs
12f839fd
EF
2244 `(("python-coverage" ,python-coverage)))
2245 (home-page "https://github.com/schlamar/cov-core")
2246 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2247 (description
2248 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2249It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2250 (license license:expat)))
12f839fd
EF
2251
2252(define-public python2-cov-core
f210e944 2253 (package-with-python2 python-cov-core))
12f839fd 2254
041358fb
DT
2255(define-public python-discover
2256 (package
2257 (name "python-discover")
2258 (version "0.4.0")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (string-append
2263 "https://pypi.python.org/packages/source/d/discover/discover-"
2264 version ".tar.gz"))
2265 (sha256
2266 (base32
2267 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2268 (build-system python-build-system)
041358fb
DT
2269 (home-page "http://pypi.python.org/pypi/discover/")
2270 (synopsis
2271 "Python test discovery for unittest")
2272 (description
2273 "Discover provides test discovery for unittest, a feature that has been
e881752c 2274backported from Python 2.7 for Python 2.4+.")
3f641af0 2275 (license license:bsd-3)))
041358fb
DT
2276
2277(define-public python2-discover
2278 (package-with-python2 python-discover))
2279
a480bc41
EB
2280(define-public behave
2281 (package
2282 (name "behave")
287cfd1a 2283 (version "1.2.5")
a480bc41
EB
2284 (source (origin
2285 (method url-fetch)
287cfd1a 2286 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2287 (sha256
2288 (base32
287cfd1a 2289 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2290 (build-system python-build-system)
f22efa01 2291 (propagated-inputs
f3b98f4f 2292 `(("python-six" ,python-six)
a480bc41
EB
2293 ("python-parse" ,python-parse)
2294 ("python-parse-type" ,python-parse-type)))
2295 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2296 ;PyHamcrest>=1.8
2297 (home-page "http://github.com/behave/behave")
2298 (synopsis "Python behavior-driven development")
2299 (description
2300 "Behave is a tool for behavior-driven development in python.
2301Behavior-driven development (or BDD) is an agile software development
2302technique that encourages collaboration between developers, QA and
2303non-technical or business participants in a software project. Behave uses
2304tests written in a natural language style, backed up by Python code.")
3f641af0 2305 (license license:x11)))
c7303d3c
DT
2306
2307(define-public python-exif-read
2308 (package
2309 (name "python-exif-read")
2a2d0981 2310 (version "2.1.2")
c7303d3c
DT
2311 (source (origin
2312 (method url-fetch)
2a2d0981 2313 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2314 (sha256
2315 (base32
2a2d0981 2316 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2317 (build-system python-build-system)
c7303d3c
DT
2318 (arguments `(#:tests? #f)) ; no tests
2319 (home-page "https://github.com/ianare/exif-py")
2320 (synopsis "Python library to extract EXIF data from image files")
2321 (description
2322 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2323files.")
3f641af0 2324 (license license:bsd-3)))
c7303d3c
DT
2325
2326(define-public python2-exif-read
2327 (package-with-python2 python-exif-read))
d5f89b22
DT
2328
2329(define-public python-pyld
2330 (package
2331 (name "python-pyld")
8957af32 2332 (version "0.7.1")
d5f89b22
DT
2333 (source (origin
2334 (method url-fetch)
af1ab773 2335 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2336 (sha256
2337 (base32
8957af32 2338 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2339 (build-system python-build-system)
d5f89b22
DT
2340 (arguments `(#:tests? #f)) ; no tests
2341 (home-page "http://github.com/digitalbazaar/pyld")
2342 (synopsis "Python implementation of the JSON-LD specification")
2343 (description
2344 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2345 (license license:bsd-3)))
d5f89b22
DT
2346
2347(define-public python2-pyld
2348 (package-with-python2 python-pyld))
3a1f9a68
DT
2349
2350(define-public python-certifi
2351 (package
2352 (name "python-certifi")
b2a2232c 2353 (version "2016.8.31")
3a1f9a68
DT
2354 (source (origin
2355 (method url-fetch)
9a41f443 2356 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2357 (sha256
2358 (base32
b2a2232c 2359 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2360 (build-system python-build-system)
3a1f9a68
DT
2361 (arguments `(#:tests? #f)) ; no tests
2362 (home-page "http://python-requests.org/")
2363 (synopsis "Python CA certificate bundle")
2364 (description
2365 "Certifi is a Python library that contains a CA certificate bundle, which
2366is used by the Requests library to verify HTTPS requests.")
3f641af0 2367 (license license:asl2.0)))
3a1f9a68
DT
2368
2369(define-public python2-certifi
2370 (package-with-python2 python-certifi))
e6cfbd36 2371
12c270dd
RW
2372(define-public python-click
2373 (package
2374 (name "python-click")
43accb58 2375 (version "6.6")
12c270dd
RW
2376 (source
2377 (origin
2378 (method url-fetch)
375f224b 2379 (uri (pypi-uri "click" version))
12c270dd 2380 (sha256
43accb58
LF
2381 (base32
2382 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2383 (build-system python-build-system)
e2ab5a09
BW
2384 (arguments
2385 `(#:phases
2386 (modify-phases %standard-phases
2387 (add-after 'unpack 'fix-paths
2388 (lambda* (#:key inputs #:allow-other-keys)
2389 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2390 "cross-libc" "libc"))))
2391 (substitute* "click/_unicodefun.py"
2392 (("'locale'")
2393 (string-append "'" glibc "/bin/locale'"))))
2394 #t)))))
12c270dd
RW
2395 (home-page "http://click.pocoo.org")
2396 (synopsis "Command line library for Python")
2397 (description
2398 "Click is a Python package for creating command line interfaces in a
2399composable way with as little code as necessary. Its name stands for
2400\"Command Line Interface Creation Kit\". It's highly configurable but comes
2401with sensible defaults out of the box.")
3f641af0 2402 (license license:bsd-3)))
12c270dd
RW
2403
2404(define-public python2-click
2405 (package-with-python2 python-click))
2406
addc808d
EF
2407(define-public python-wheel
2408 (package
2409 (name "python-wheel")
40981b5c 2410 (version "0.29.0")
e1ba0749
EF
2411 (source
2412 (origin
2413 (method url-fetch)
2414 (uri (pypi-uri "wheel" version))
2415 (sha256
2416 (base32
40981b5c 2417 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2418 (build-system python-build-system)
2419 (native-inputs
f3b98f4f 2420 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2421 ("python-pytest-cov" ,python-pytest-cov)))
2422 (home-page "https://bitbucket.org/pypa/wheel/")
2423 (synopsis "Format for built Python packages")
2424 (description
2425 "A wheel is a ZIP-format archive with a specially formatted filename and
2426the @code{.whl} extension. It is designed to contain all the files for a PEP
2427376 compatible install in a way that is very close to the on-disk format. Many
2428packages will be properly installed with only the @code{Unpack} step and the
2429unpacked archive preserves enough information to @code{Spread} (copy data and
2430scripts to their final locations) at any later time. Wheel files can be
2431installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2432 (license license:expat)
2433 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2434
2435(define-public python2-wheel
8ad4ae20
LF
2436 (let ((wheel (package-with-python2
2437 (strip-python2-variant python-wheel))))
264ae686 2438 (package (inherit wheel)
8ad4ae20
LF
2439 (native-inputs `(("python2-functools32" ,python2-functools32)
2440 ,@(package-native-inputs wheel))))))
2441
addc808d 2442
ae641128 2443(define-public python-requests
e6cfbd36 2444 (package
ae641128 2445 (name "python-requests")
74a066f9 2446 (version "2.9.1")
e6cfbd36
DT
2447 (source (origin
2448 (method url-fetch)
5d691657 2449 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2450 (sha256
2451 (base32
74a066f9 2452 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2453 (build-system python-build-system)
5d691657 2454 (native-inputs
f3b98f4f 2455 `(("python-py" ,python-py)
5d691657
EF
2456 ("python-pytest" ,python-pytest)
2457 ("python-pytest-cov" ,python-pytest-cov)
2458 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2459 (home-page "http://python-requests.org/")
2460 (synopsis "Python HTTP library")
2461 (description
2462 "Requests is a Python HTTP client library. It aims to be easier to use
2463than Python’s urllib2 library.")
3f641af0 2464 (license license:asl2.0)))
864b5211 2465
e9005180
DT
2466;; Some software requires an older version of Requests, notably Docker
2467;; Compose.
2468(define-public python-requests-2.7
2469 (package (inherit python-requests)
2470 (version "2.7.0")
2471 (source (origin
2472 (method url-fetch)
2473 (uri (pypi-uri "requests" version))
2474 (sha256
2475 (base32
2476 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2477
ae641128 2478(define-public python2-requests
8ad4ae20 2479 (package-with-python2 python-requests))
ae641128 2480
ea521b42
DT
2481(define-public python-vcversioner
2482 (package
2483 (name "python-vcversioner")
538fe019 2484 (version "2.16.0.0")
ea521b42
DT
2485 (source
2486 (origin
2487 (method url-fetch)
2488 (uri (pypi-uri "vcversioner" version))
2489 (sha256
2490 (base32
538fe019 2491 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2492 (build-system python-build-system)
ea521b42
DT
2493 (synopsis "Python library for version number discovery")
2494 (description "Vcversioner is a Python library that inspects tagging
2495information in a variety of version control systems in order to discover
2496version numbers.")
2497 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2498 (license license:isc)))
ea521b42
DT
2499
2500(define-public python2-vcversioner
f210e944 2501 (package-with-python2 python-vcversioner))
ae641128 2502
864b5211
DT
2503(define-public python-jsonschema
2504 (package
2505 (name "python-jsonschema")
b3667afb 2506 (version "2.5.1")
864b5211
DT
2507 (source (origin
2508 (method url-fetch)
2509 (uri
2510 (string-append
2511 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2512 version ".tar.gz"))
2513 (sha256
2514 (base32
b3667afb 2515 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2516 (build-system python-build-system)
8bcd6b91
EF
2517 (arguments
2518 '(#:phases
2519 (modify-phases %standard-phases
2520 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2521 (native-inputs
8bcd6b91
EF
2522 `(("python-nose" ,python-nose)
2523 ("python-vcversioner" ,python-vcversioner)))
2524 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2525 (synopsis "Implementation of JSON Schema for Python")
2526 (description
2527 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2528 (license license:expat)
2529 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2530
2531(define-public python2-jsonschema
a14600ec
LF
2532 (let ((jsonschema (package-with-python2
2533 (strip-python2-variant python-jsonschema))))
264ae686 2534 (package (inherit jsonschema)
eaba9d66 2535 (native-inputs
8bcd6b91 2536 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2537 ,@(package-native-inputs jsonschema)))
2538 (propagated-inputs
2539 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2540
2541(define-public python-unidecode
2542 (package
2543 (name "python-unidecode")
8925d4f3 2544 (version "0.04.18")
850189b8
DT
2545 (source (origin
2546 (method url-fetch)
8925d4f3 2547 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2548 (sha256
2549 (base32
8925d4f3 2550 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2551 (build-system python-build-system)
850189b8
DT
2552 (home-page "https://pypi.python.org/pypi/Unidecode")
2553 (synopsis "ASCII transliterations of Unicode text")
2554 (description
2555 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2556useful when integrating with legacy code that doesn't support Unicode, or for
2557ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2558machine identifiers from human-readable Unicode strings that should still be
2559somewhat intelligeble.")
3f641af0 2560 (license license:gpl2+)))
850189b8
DT
2561
2562(define-public python2-unidecode
2563 (package-with-python2 python-unidecode))
6d45fef4
DT
2564
2565(define-public python-pyjwt
2566 (package
2567 (name "python-pyjwt")
eb31d4b4 2568 (version "1.4.0")
6d45fef4
DT
2569 (source
2570 (origin
2571 (method url-fetch)
eb31d4b4 2572 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2573 (sha256
2574 (base32
eb31d4b4 2575 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2576 (build-system python-build-system)
eb31d4b4 2577 (native-inputs
130fe994
HG
2578 `(("python-pytest" ,python-pytest)
2579 ("python-pytest-cov" ,python-pytest-cov)
2580 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2581 (home-page "http://github.com/progrium/pyjwt")
2582 (synopsis "JSON Web Token implementation in Python")
2583 (description
2584 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2585 (license license:expat)))
6d45fef4
DT
2586
2587(define-public python2-pyjwt
2588 (package-with-python2 python-pyjwt))
2589
2cec1f6f
DT
2590(define-public python-oauthlib
2591 (package
2592 (name "python-oauthlib")
bde2171d 2593 (version "1.0.3")
2cec1f6f
DT
2594 (source (origin
2595 (method url-fetch)
bde2171d 2596 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2597 (sha256
2598 (base32
bde2171d 2599 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2600 (build-system python-build-system)
bde2171d 2601 (native-inputs
bb06aa34 2602 `(("python-nose" ,python-nose)
bde2171d 2603 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2604 ("python-pyjwt" ,python-pyjwt)
2605 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2606 (home-page "https://github.com/idan/oauthlib")
2607 (synopsis "OAuth implementation for Python")
2608 (description
2609 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2610OAuth request-signing logic.")
3f641af0 2611 (license license:bsd-3)
59f151ec 2612 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2613
2614(define-public python2-oauthlib
59f151ec 2615 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2616 (package
2617 (inherit base)
00e10c6e 2618 (native-inputs `(("python2-unittest2" ,python2-unittest2)
bb06aa34 2619 ("python2-mock" ,python2-mock)
59f151ec 2620 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2621
2622(define-public python-itsdangerous
2623 (package
2624 (name "python-itsdangerous")
2625 (version "0.24")
2626 (source
2627 (origin
2628 (method url-fetch)
2629 (uri (string-append
2630 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2631 version ".tar.gz"))
2632 (sha256
2633 (base32
2634 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2635 (build-system python-build-system)
ec5dbb5c
DT
2636 (home-page "http://github.com/mitsuhiko/itsdangerous")
2637 (synopsis "Python library for passing data to/from untrusted environments")
2638 (description
2639 "Itsdangerous provides various helpers to pass trusted data to untrusted
2640environments and back.")
f210e944 2641 (license license:bsd-3)))
ec5dbb5c
DT
2642
2643(define-public python2-itsdangerous
f210e944 2644 (package-with-python2 python-itsdangerous))
5731cae3 2645
8d12be1e
RW
2646(define-public python-pyyaml
2647 (package
2648 (name "python-pyyaml")
2649 (version "3.11")
2650 (source
2651 (origin
2652 (method url-fetch)
2653 (uri (string-append
2654 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2655 version ".tar.gz"))
2656 (sha256
2657 (base32
2658 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2659 (build-system python-build-system)
2660 (inputs
2661 `(("libyaml" ,libyaml)))
8d12be1e
RW
2662 (home-page "http://pyyaml.org/wiki/PyYAML")
2663 (synopsis "YAML parser and emitter for Python")
2664 (description
2665 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2666complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2667API, and sensible error messages. PyYAML supports standard YAML tags and
2668provides Python-specific tags that allow to represent an arbitrary Python
2669object.")
2670 (license license:expat)))
2671
2672(define-public python2-pyyaml
2673 (package-with-python2 python-pyyaml))
2674
5731cae3
DT
2675(define-public python-virtualenv
2676 (package
2677 (name "python-virtualenv")
58d04dba 2678 (version "15.0.3")
5731cae3
DT
2679 (source
2680 (origin
2681 (method url-fetch)
17804240 2682 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2683 (sha256
2684 (base32
58d04dba 2685 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2686 (build-system python-build-system)
17804240
EF
2687 (arguments
2688 `(#:phases
2689 (modify-phases %standard-phases
58d04dba
RW
2690 (replace 'check
2691 (lambda _
2692 ;; Disable failing test. See upstream bug report
2693 ;; https://github.com/pypa/virtualenv/issues/957
2694 (substitute* "tests/test_virtualenv.py"
2695 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2696 (zero? (system* "py.test")))))))
e7881f3d 2697 (native-inputs
f3b98f4f 2698 `(("python-mock" ,python-mock)
17804240 2699 ("python-pytest" ,python-pytest)))
5731cae3
DT
2700 (home-page "https://virtualenv.pypa.io/")
2701 (synopsis "Virtual Python environment builder")
2702 (description
2703 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2704 (license license:expat)))
5731cae3
DT
2705
2706(define-public python2-virtualenv
2707 (package-with-python2 python-virtualenv))
8176d4d5
DT
2708
2709(define-public python-markupsafe
2710 (package
2711 (name "python-markupsafe")
2712 (version "0.23")
2713 (source
2714 (origin
2715 (method url-fetch)
2716 (uri (string-append
2717 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2718 version ".tar.gz"))
2719 (sha256
2720 (base32
2721 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2722 (build-system python-build-system)
8176d4d5
DT
2723 (home-page "http://github.com/mitsuhiko/markupsafe")
2724 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2725 (description
2726 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2727for Python.")
3f641af0 2728 (license license:bsd-3)))
8176d4d5
DT
2729
2730(define-public python2-markupsafe
2731 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2732
2733(define-public python-jinja2
2734 (package
2735 (name "python-jinja2")
e98149b3 2736 (version "2.8")
fe34f0d1
DT
2737 (source
2738 (origin
2739 (method url-fetch)
e98149b3 2740 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2741 (sha256
2742 (base32
e98149b3 2743 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2744 (build-system python-build-system)
f22efa01 2745 (propagated-inputs
f3b98f4f 2746 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2747 (home-page "http://jinja.pocoo.org/")
2748 (synopsis "Python template engine")
2749 (description
2750 "Jinja2 is a small but fast and easy to use stand-alone template engine
2751written in pure Python.")
3f641af0 2752 (license license:bsd-3)))
fe34f0d1
DT
2753
2754(define-public python2-jinja2
2755 (package-with-python2 python-jinja2))
3580ab8b 2756
f7d17ac7
EE
2757(define-public python-pystache
2758 (package
2759 (name "python-pystache")
2760 (version "0.5.4")
2761 (source (origin
2762 (method url-fetch)
2763 (uri (pypi-uri "pystache" version))
2764 (sha256
2765 (base32
2766 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2767 (build-system python-build-system)
f7d17ac7
EE
2768 (home-page "http://defunkt.io/pystache/")
2769 (synopsis "Python logic-less template engine")
2770 (description
2771 "Pystache is a Python implementation of the framework agnostic,
2772logic-free templating system Mustache.")
2773 (license license:expat)))
2774
2775(define-public python2-pystache
2776 (package-with-python2 python-pystache))
2777
1285119b
RW
2778(define-public python-joblib
2779 (package
2780 (name "python-joblib")
f34ef331 2781 (version "0.10.3")
1285119b
RW
2782 (source (origin
2783 (method url-fetch)
f34ef331 2784 (uri (pypi-uri "joblib" version))
1285119b
RW
2785 (sha256
2786 (base32
6aa5f1ca
HG
2787 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2788 (modules '((guix build utils)))
2789 (snippet
2790 '(begin
2791 ;; Remove pre-compiled .pyc files from source.
2792 (for-each delete-file-recursively
2793 (find-files "." "__pycache__" #:directories? #t))
2794 (for-each delete-file (find-files "." "\\.pyc$"))
2795 #t))))
1285119b 2796 (build-system python-build-system)
a8dd960a
RW
2797 (arguments
2798 `(#:phases
2799 (modify-phases %standard-phases
2800 (add-before 'check 'disable-failing-tests
2801 (lambda _
2802 ;; This numpydoc tests fails for unknown reasons
2803 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2804 ;; This numpydoc test depends on matplotlib, which is not a
2805 ;; required input.
2806 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2807 ;; These tests fail to execute sys.executable
2808 (substitute* "joblib/test/test_parallel.py"
2809 (("import nose" line)
2810 (string-append "from nose.plugins.skip import SkipTest\n" line))
2811 (("def test_nested_parallel_warnings" line)
2812 (string-append "@SkipTest\n" line))
2813 (("def test_parallel_with_interactively_defined_functions" line)
2814 (string-append "@SkipTest\n" line)))
2815 #t)))))
f052ec9a 2816 ;; Provide nose to enable tests command
1285119b 2817 (native-inputs
f3b98f4f 2818 `(("python-nose" ,python-nose)
f34ef331
RW
2819 ("python-sphinx" ,python-sphinx)
2820 ("python-docutils" ,python-docutils)
2821 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2822 (home-page "http://pythonhosted.org/joblib/")
2823 (synopsis "Using Python functions as pipeline jobs")
2824 (description
2825 "Joblib is a set of tools to provide lightweight pipelining in Python.
2826In particular, joblib offers: transparent disk-caching of the output values
2827and lazy re-evaluation (memoize pattern), easy simple parallel computing
2828logging and tracing of the execution.")
3f641af0 2829 (license license:bsd-3)))
1285119b
RW
2830
2831(define-public python2-joblib
2832 (package-with-python2 python-joblib))
2833
3580ab8b
DT
2834(define-public python-docutils
2835 (package
2836 (name "python-docutils")
00e0ca7c 2837 (version "0.13.1")
3580ab8b
DT
2838 (source
2839 (origin
2840 (method url-fetch)
00e0ca7c 2841 (uri (pypi-uri "docutils" version))
3580ab8b
DT
2842 (sha256
2843 (base32
00e0ca7c 2844 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 2845 (build-system python-build-system)
3580ab8b
DT
2846 (arguments
2847 '(#:tests? #f)) ; no setup.py test command
2848 (home-page "http://docutils.sourceforge.net/")
2849 (synopsis "Python Documentation Utilities")
2850 (description
2851 "Docutils is a modular system for processing documentation into useful
2852formats, such as HTML, XML, and LaTeX. For input Docutils supports
2853reStructuredText.")
2854 ;; Most of the source code is public domain, but some source files are
2855 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2856 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2857
2858(define-public python2-docutils
2859 (package-with-python2 python-docutils))
fb35b7c0
DT
2860
2861(define-public python-pygments
2862 (package
2863 (name "python-pygments")
9f442285 2864 (version "2.0.2")
fb35b7c0
DT
2865 (source
2866 (origin
2867 (method url-fetch)
9f442285 2868 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2869 (sha256
2870 (base32
9f442285 2871 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2872 (build-system python-build-system)
fb35b7c0
DT
2873 (home-page "http://pygments.org/")
2874 (synopsis "Syntax highlighting")
2875 (description
2876 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2877 (license license:bsd-2)))
fb35b7c0
DT
2878
2879(define-public python2-pygments
2880 (package-with-python2 python-pygments))
9dd6078d
DT
2881
2882(define-public python-sphinx
2883 (package
2884 (name "python-sphinx")
2885 (version "1.2.3")
2886 (source
2887 (origin
2888 (method url-fetch)
2889 (uri (string-append
2890 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2891 version ".tar.gz"))
2892 (sha256
2893 (base32
2894 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2895 (build-system python-build-system)
f22efa01 2896 (propagated-inputs
f3b98f4f 2897 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2898 ("python-docutils" ,python-docutils)
2899 ("python-pygments" ,python-pygments)))
2900 (home-page "http://sphinx-doc.org/")
2901 (synopsis "Python documentation generator")
2902 (description "Sphinx is a tool that makes it easy to create documentation
2903for Python projects or other documents consisting of multiple reStructuredText
2904sources.")
3f641af0 2905 (license license:bsd-3)))
9dd6078d
DT
2906
2907(define-public python2-sphinx
2908 (package-with-python2 python-sphinx))
6888830b 2909
ad320b20
RW
2910(define-public python-sphinx-rtd-theme
2911 (package
2912 (name "python-sphinx-rtd-theme")
2913 (version "0.1.6")
2914 (source
2915 (origin
2916 (method url-fetch)
2917 (uri (string-append "https://pypi.python.org/packages/source/s/"
2918 "sphinx_rtd_theme/sphinx_rtd_theme-"
2919 version ".tar.gz"))
2920 (sha256
2921 (base32
2922 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2923 (build-system python-build-system)
ad320b20
RW
2924 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2925 (synopsis "ReadTheDocs.org theme for Sphinx")
2926 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2927 (license license:expat)))
ad320b20
RW
2928
2929(define-public python2-sphinx-rtd-theme
2930 (package-with-python2 python-sphinx-rtd-theme))
2931
fe94cf0c
HG
2932(define-public python-rst.linker
2933 (package
2934 (name "python-rst.linker")
2935 (version "1.7")
2936 (source
2937 (origin
2938 (method url-fetch)
2939 (uri (pypi-uri "rst.linker" version))
2940 (sha256
2941 (base32
2942 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2943 (build-system python-build-system)
2944 (propagated-inputs
2945 `(("python-dateutil" ,python-dateutil-2)
2946 ("python-six" ,python-six)))
2947 (native-inputs
2948 `(("python-setuptools-scm" ,python-setuptools-scm)))
2949 ;; Test would require path.py, which would introduce a cyclic dependence.
2950 (arguments `(#:tests? #f))
2951 ;; Note: As of version 1.7 the documentation is not worth building.
2952 (home-page "https://github.com/jaraco/rst.linker")
2953 (synopsis "Sphinx plugin to add links and timestamps")
2954 (description "rst.linker allows to automatically replace text by a
2955reStructuredText external reference or timestamps. It's primary purpose is to
2956augment the changelog, but it can be used for other documents, too.")
2957 (license license:expat)))
2958
2959(define-public python2-rst.linker
2960 (package-with-python2 python-rst.linker))
2961
f4de5b3b
CAW
2962(define-public python-feedgenerator
2963 (package
2964 (name "python-feedgenerator")
f0412aa2 2965 (version "1.8")
f4de5b3b 2966 (source
f4de5b3b 2967 (origin
f0412aa2
EF
2968 (method url-fetch)
2969 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2970 (sha256
2971 (base32
7c88bcf4
HG
2972 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2973 (modules '((guix build utils)))
2974 (snippet
2975 '(begin
2976 ;; Remove pre-compiled .pyc files from source.
2977 (for-each delete-file-recursively
2978 (find-files "." "__pycache__" #:directories? #t))
2979 (for-each delete-file (find-files "." "\\.pyc$"))
2980 #t))))
f4de5b3b 2981 (build-system python-build-system)
dae73d9b 2982 (propagated-inputs
f3b98f4f 2983 `(("python-pytz" ,python-pytz)
f4de5b3b 2984 ("python-six" ,python-six)))
f0412aa2 2985 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2986 (synopsis
2987 "Standalone version of Django's Atom/RSS feed generator")
2988 (description
2989 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2990which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2991 (license license:bsd-3)))
f4de5b3b
CAW
2992
2993(define-public python2-feedgenerator
2994 (package-with-python2 python-feedgenerator))
2995
59ad30e3
CAW
2996(define-public python-blinker
2997 (package
2998 (name "python-blinker")
7fb9ff4d 2999 (version "1.4")
59ad30e3
CAW
3000 (source
3001 (origin
3002 (method url-fetch)
7fb9ff4d 3003 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3004 (sha256
3005 (base32
7fb9ff4d 3006 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3007 (build-system python-build-system)
59ad30e3
CAW
3008 (home-page "http://pythonhosted.org/blinker/")
3009 (synopsis "Fast, simple object-to-object and broadcast signaling")
3010 (description
3011 "Blinker provides a fast dispatching system that allows any number of
3012interested parties to subscribe to events, or \"signals\".")
3013 (license license:expat)))
3014
3015(define-public python2-blinker
3016 (package-with-python2 python-blinker))
3017
b8050e71
CAW
3018(define-public pelican
3019 (package
3020 (name "pelican")
11f97c27 3021 (version "3.6.3")
b8050e71
CAW
3022 (source
3023 (origin
3024 (method url-fetch)
11f97c27 3025 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3026 (sha256
3027 (base32
11f97c27 3028 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3029 (build-system python-build-system)
f22efa01 3030 (propagated-inputs
b8050e71
CAW
3031 `(("python-feedgenerator" ,python-feedgenerator)
3032 ("python-jinja2" ,python-jinja2)
3033 ("python-pygments" ,python-pygments)
3034 ("python-docutils" ,python-docutils)
3035 ("python-pytz" ,python-pytz)
3036 ("python-blinker" ,python-blinker)
3037 ("python-unidecode" ,python-unidecode)
3038 ("python-six" ,python-six)
3039 ("python-dateutil-2" ,python-dateutil-2)))
3040 (home-page "http://getpelican.com/")
3041 (arguments
3042 `(;; XXX Requires a lot more packages to do unit tests :P
3043 #:tests? #f
3044 #:phases (modify-phases %standard-phases
3045 (add-before
3046 'install 'adjust-requires
3047 ;; Since feedgenerator is installed from git, it doesn't
3048 ;; conform to the version requirements.
3049 ;;
3050 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3051 ;; version requirement so setuptools doesn't get confused.
3052 (lambda _
3053 (substitute* "setup.py"
3054 (("['\"]feedgenerator.*?['\"]")
3055 "'feedgenerator'")))))))
3056 (synopsis "Python-based static site publishing system")
3057 (description
3058 "Pelican is a tool to generate a static blog from reStructuredText,
3059Markdown input files, and more. Pelican uses Jinja2 for templating
3060and is very extensible.")
3f641af0 3061 (license license:agpl3+)))
b8050e71 3062
240ca4aa
RW
3063(define-public python-scikit-learn
3064 (package
3065 (name "python-scikit-learn")
8e401ab6 3066 (version "0.18.1")
240ca4aa
RW
3067 (source
3068 (origin
3069 (method url-fetch)
3070 (uri (string-append
3071 "https://github.com/scikit-learn/scikit-learn/archive/"
3072 version ".tar.gz"))
7e21b9fb 3073 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3074 (sha256
3075 (base32
8e401ab6 3076 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3077 (build-system python-build-system)
3078 (arguments
3079 `(#:phases
3080 (alist-cons-before
2f6b3d2e
RW
3081 'check 'set-HOME
3082 ;; some tests require access to "$HOME"
3083 (lambda _ (setenv "HOME" "/tmp"))
8e401ab6 3084 %standard-phases)))
240ca4aa 3085 (inputs
328bb95d
HG
3086 `(("openblas" ,openblas)))
3087 (native-inputs
8e401ab6
RW
3088 `(("python-nose" ,python-nose)
3089 ("python-cython" ,python-cython)))
240ca4aa
RW
3090 (propagated-inputs
3091 `(("python-numpy" ,python-numpy)
3092 ("python-scipy" ,python-scipy)))
3093 (home-page "http://scikit-learn.org/")
3094 (synopsis "Machine Learning in Python")
3095 (description
3096 "Scikit-learn provides simple and efficient tools for data
3097mining and data analysis.")
1b5241c5 3098 (license license:bsd-3)))
240ca4aa
RW
3099
3100(define-public python2-scikit-learn
1b5241c5 3101 (package-with-python2 python-scikit-learn))
240ca4aa 3102
12f8f9bb
RW
3103(define-public python-scikit-image
3104 (package
3105 (name "python-scikit-image")
3106 (version "0.11.3")
3107 (source
3108 (origin
3109 (method url-fetch)
3110 (uri (string-append
3111 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3112 version ".tar.gz"))
3113 (sha256
3114 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3115 (build-system python-build-system)
b83e2333 3116 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3117 (propagated-inputs
3118 `(("python-matplotlib" ,python-matplotlib)
3119 ("python-networkx" ,python-networkx)
12f8f9bb 3120 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3121 ("python-pillow" ,python-pillow)))
3122 (native-inputs
b83e2333
HG
3123 `(("python-numpy" ,python-numpy)
3124 ("python-cython" ,python-cython)
3125 ("python-six" ,python-six)))
12f8f9bb
RW
3126 (home-page "http://scikit-image.org/")
3127 (synopsis "Image processing in Python")
3128 (description
e881752c 3129 "Scikit-image is a collection of algorithms for image processing.")
12733594 3130 (license license:bsd-3)))
12f8f9bb
RW
3131
3132(define-public python2-scikit-image
12733594 3133 (package-with-python2 python-scikit-image))
12f8f9bb 3134
5394a6a6
RW
3135(define-public python-redis
3136 (package
3137 (name "python-redis")
3138 (version "2.10.3")
3139 (source
3140 (origin
3141 (method url-fetch)
3142 (uri (string-append
3143 "https://pypi.python.org/packages/source/r/redis/redis-"
3144 version ".tar.gz"))
3145 (sha256
3146 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3147 (build-system python-build-system)
3148 ;; Tests require a running Redis server
3149 (arguments '(#:tests? #f))
cf8124b0
HG
3150 ;; As long as we are not running test, we do not need this input :-)
3151 ;;(native-inputs
3152 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3153 (home-page "https://github.com/andymccurdy/redis-py")
3154 (synopsis "Redis Python client")
3155 (description
3156 "This package provides a Python interface to the Redis key-value store.")
3157 (license license:expat)))
3158
3159(define-public python2-redis
3160 (package-with-python2 python-redis))
3161
748cef5b
RW
3162(define-public python-rq
3163 (package
3164 (name "python-rq")
3165 (version "0.5.2")
3166 (source
3167 (origin
3168 (method url-fetch)
3169 (uri (string-append
3170 "https://pypi.python.org/packages/source/r/rq/rq-"
3171 version ".tar.gz"))
3172 (sha256
3173 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3174 (build-system python-build-system)
3175 (propagated-inputs
3176 `(("python-click" ,python-click)
3177 ("python-redis" ,python-redis)))
748cef5b
RW
3178 (home-page "http://python-rq.org/")
3179 (synopsis "Simple job queues for Python")
3180 (description
3181 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3182processing them in the background with workers. It is backed by Redis and it
3183is designed to have a low barrier to entry.")
3f641af0 3184 (license license:bsd-2)))
748cef5b
RW
3185
3186(define-public python2-rq
3187 (package-with-python2 python-rq))
3188
6888830b
FB
3189(define-public python-cython
3190 (package
3191 (name "python-cython")
dd22efef 3192 (version "0.24.1")
6888830b
FB
3193 (source
3194 (origin
3195 (method url-fetch)
56918e26 3196 (uri (pypi-uri "Cython" version))
6888830b
FB
3197 (sha256
3198 (base32
dd22efef 3199 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3200 (build-system python-build-system)
3201 ;; we need the full python package and not just the python-wrapper
3202 ;; because we need libpython3.3m.so
3203 (inputs
3204 `(("python" ,python)))
3205 (arguments
3206 `(#:phases
b92f651b
EF
3207 (modify-phases %standard-phases
3208 (add-before 'check 'set-HOME
3209 ;; some tests require access to "$HOME/.cython"
3210 (lambda _ (setenv "HOME" "/tmp")))
3211 (replace 'check
3212 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3213 (home-page "http://cython.org/")
3214 (synopsis "C extensions for Python")
3215 (description "Cython is an optimising static compiler for both the Python
3216programming language and the extended Cython programming language. It makes
3217writing C extensions for Python as easy as Python itself.")
3f641af0 3218 (license license:asl2.0)
48b311b1 3219 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3220
3221(define-public python2-cython
48b311b1
LC
3222 (package (inherit (package-with-python2
3223 (strip-python2-variant python-cython)))
6888830b
FB
3224 (name "python2-cython")
3225 (inputs
3226 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3227
ee5fb7ee
AV
3228;; The RPython toolchain currently does not support Python 3.
3229(define-public python2-rpython
3230 (package
3231 (name "python2-rpython")
3232 (version "0.1.4")
3233 (source
3234 (origin
3235 (method url-fetch)
3236 (uri (pypi-uri "rpython" version))
3237 (sha256
3238 (base32
3239 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3240 (build-system python-build-system)
3241 (arguments `(#:python ,python-2))
3242 (native-inputs
f3b98f4f 3243 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3244 (home-page "https://rpython.readthedocs.org")
3245 (synopsis "Framework for implementing interpreters and virtual machines")
3246 (description "RPython is a translation and support framework for
3247producing implementations of dynamic languages, emphasizing a clean separation
3248between language specification and implementation aspects.")
3249 (license license:expat)))
3250
0da98533
FB
3251;; This version of numpy is missing the documentation and is only used to
3252;; build matplotlib which is required to build numpy's documentation.
3253(define python-numpy-bootstrap
3254 (package
3255 (name "python-numpy-bootstrap")
ef9b4c04 3256 (version "1.10.4")
0da98533
FB
3257 (source
3258 (origin
3259 (method url-fetch)
de67e922 3260 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3261 "/numpy-" version ".tar.gz"))
3262 (sha256
3263 (base32
ef9b4c04 3264 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3265 (build-system python-build-system)
3266 (inputs
328bb95d 3267 `(("openblas" ,openblas)
cba256f8 3268 ("lapack" ,lapack)))
0da98533 3269 (native-inputs
2efabc55
HG
3270 `(("python-nose" ,python-nose)
3271 ("gfortran" ,gfortran)))
0da98533
FB
3272 (arguments
3273 `(#:phases
2efabc55
HG
3274 (modify-phases %standard-phases
3275 (add-before 'build 'set-environment-variables
3276 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3277 (call-with-output-file "site.cfg"
3278 (lambda (port)
cba256f8
RW
3279 (format port
3280 "[openblas]
dbdfe515
RW
3281libraries = openblas
3282library_dirs = ~a/lib
3283include_dirs = ~a/include
cba256f8 3284
2efabc55
HG
3285# backslash-n to make emacs happy
3286\n[lapack]
cba256f8
RW
3287lapack_libs = lapack
3288library_dirs = ~a/lib
3289include_dirs = ~a/include
3290"
3291 (assoc-ref inputs "openblas")
3292 (assoc-ref inputs "openblas")
3293 (assoc-ref inputs "lapack")
3294 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3295 ;; Use "gcc" executable, not "cc".
3296 (substitute* "numpy/distutils/system_info.py"
3297 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3298 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3299 #t))
6a843168
FB
3300 ;; Tests can only be run after the library has been installed and not
3301 ;; within the source directory.
2efabc55
HG
3302 (delete 'check)
3303 (add-after 'install 'check
3304 (lambda* (#:key outputs inputs #:allow-other-keys)
3305 ;; Make installed package available for running the tests
3306 (add-installed-pythonpath inputs outputs)
6a843168 3307 (with-directory-excursion "/tmp"
89b5c60e 3308 (zero? (system* "python" "-c"
2efabc55 3309 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3310 (home-page "http://www.numpy.org/")
3311 (synopsis "Fundamental package for scientific computing with Python")
3312 (description "NumPy is the fundamental package for scientific computing
e881752c 3313with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3314object, sophisticated (broadcasting) functions, tools for integrating C/C++
3315and Fortran code, useful linear algebra, Fourier transform, and random number
3316capabilities.")
3f641af0 3317 (license license:bsd-3)))
0da98533
FB
3318
3319(define python2-numpy-bootstrap
3320 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3321
3a1bfe18
RW
3322(define-public python2-fastlmm
3323 (package
3324 (name "python2-fastlmm")
b074e7d4 3325 (version "0.2.21")
3a1bfe18
RW
3326 (source
3327 (origin
3328 (method url-fetch)
b074e7d4 3329 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3330 (sha256
3331 (base32
b074e7d4 3332 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3333 (build-system python-build-system)
3334 (arguments
3335 `(#:python ,python-2)) ; only Python 2.7 is supported
3336 (propagated-inputs
3337 `(("python2-numpy" ,python2-numpy)
3338 ("python2-scipy" ,python2-scipy)
3339 ("python2-matplotlib" ,python2-matplotlib)
3340 ("python2-pandas" ,python2-pandas)
3341 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3342 ("python2-pysnptools" ,python2-pysnptools)))
3343 (native-inputs
3344 `(("unzip" ,unzip)
2efabc55 3345 ("python2-cython" ,python2-cython)
f3b98f4f 3346 ("python2-mock" ,python2-mock)))
3a1bfe18
RW
3347 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3348 (synopsis "Perform genome-wide association studies on large data sets")
3349 (description
3350 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3351Models, is a program for performing both single-SNP and SNP-set genome-wide
3352association studies (GWAS) on extremely large data sets.")
3f641af0 3353 (license license:asl2.0)))
3a1bfe18 3354
2ee8869a
FB
3355(define-public python-numpy
3356 (package (inherit python-numpy-bootstrap)
3357 (name "python-numpy")
3358 (outputs '("out" "doc"))
89b5c60e 3359 (inputs
b0aa6ede
HG
3360 `(("which" ,which)
3361 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3362 (propagated-inputs
3363 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3364 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3365 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3366 (native-inputs
3367 `(("pkg-config" ,pkg-config)
2efabc55
HG
3368 ("python-sphinx" ,python-sphinx)
3369 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3370 ("texlive" ,texlive)
3371 ("texinfo" ,texinfo)
3372 ("perl" ,perl)
3373 ,@(package-native-inputs python-numpy-bootstrap)))
3374 (arguments
89b5c60e 3375 `(,@(substitute-keyword-arguments
2ee8869a
FB
3376 (package-arguments python-numpy-bootstrap)
3377 ((#:phases phases)
3378 `(alist-cons-after
3379 'install 'install-doc
2efabc55
HG
3380 (lambda* (#:key inputs outputs #:allow-other-keys)
3381 ;; Make installed package available for building the
3382 ;; documentation
3383 (add-installed-pythonpath inputs outputs)
2ee8869a 3384 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3385 (doc (string-append
3386 data "/doc/" ,name "-"
2ee8869a
FB
3387 ,(package-version python-numpy-bootstrap)))
3388 (info (string-append data "/info"))
3389 (html (string-append doc "/html"))
3390 (pyver ,(string-append "PYVER=")))
3391 (with-directory-excursion "doc"
3392 (mkdir-p html)
3393 (system* "make" "html" pyver)
3394 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3395 (system* "make" "-C" "build/latex"
2ee8869a
FB
3396 "all-pdf" "PAPER=a4" pyver)
3397 ;; FIXME: Generation of the info file fails.
3398 ;; (system* "make" "info" pyver)
3399 ;; (mkdir-p info)
3400 ;; (copy-file "build/texinfo/numpy.info"
3401 ;; (string-append info "/numpy.info"))
3402 (for-each (lambda (file)
3403 (copy-file (string-append "build/latex" file)
3404 (string-append doc file)))
3405 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3406 (with-directory-excursion "build/html"
3407 (for-each (lambda (file)
3408 (let* ((dir (dirname file))
3409 (tgt-dir (string-append html "/" dir)))
3410 (unless (equal? "." dir)
3411 (mkdir-p tgt-dir))
96c46210 3412 (install-file file html)))
2ee8869a
FB
3413 (find-files "." ".*"))))))
3414 ,phases)))))))
3415
764c077b 3416(define-public python2-numpy
57b7b8cd 3417 (package-with-python2 python-numpy))
2ee8869a 3418
15bfe6d6
FB
3419(define-public python-pyparsing
3420 (package
3421 (name "python-pyparsing")
e0669289 3422 (version "2.0.3")
15bfe6d6
FB
3423 (source
3424 (origin
3425 (method url-fetch)
de67e922
LF
3426 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3427 "/pyparsing-" version
15bfe6d6
FB
3428 "/pyparsing-" version ".tar.gz"))
3429 (sha256
3430 (base32
e0669289 3431 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3432 (build-system python-build-system)
3433 (outputs '("out" "doc"))
3434 (arguments
3435 `(#:tests? #f ; no test target
3436 #:modules ((guix build python-build-system)
3437 (guix build utils))
3438 #:phases
3439 (alist-cons-after
3440 'install 'install-doc
3441 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3442 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3443 "/share/doc/" ,name "-" ,version))
3444 (html-doc (string-append doc "/html"))
3445 (examples (string-append doc "/examples")))
3446 (mkdir-p html-doc)
3447 (mkdir-p examples)
89b5c60e 3448 (for-each
15bfe6d6 3449 (lambda (dir tgt)
89b5c60e 3450 (map (lambda (file)
96c46210 3451 (install-file file tgt))
15bfe6d6
FB
3452 (find-files dir ".*")))
3453 (list "docs" "htmldoc" "examples")
3454 (list doc html-doc examples))))
3455 %standard-phases)))
3456 (home-page "http://pyparsing.wikispaces.com")
3457 (synopsis "Python parsing class library")
3458 (description
3459 "The pyparsing module is an alternative approach to creating and
3460executing simple grammars, vs. the traditional lex/yacc approach, or the use
3461of regular expressions. The pyparsing module provides a library of classes
3462that client code uses to construct the grammar directly in Python code.")
bd3fa666 3463 (license license:expat)))
15bfe6d6
FB
3464
3465(define-public python2-pyparsing
3466 (package-with-python2 python-pyparsing))
3467
ec00de35
FB
3468(define-public python-numpydoc
3469 (package
3470 (name "python-numpydoc")
3471 (version "0.5")
3472 (source
3473 (origin
3474 (method url-fetch)
89b5c60e 3475 (uri (string-append
ec00de35
FB
3476 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3477 version ".tar.gz"))
3478 (sha256
3479 (base32
5e4d8f67
AE
3480 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3481 (modules '((guix build utils)))
3482 (snippet
3483 '(begin
3484 ;; Drop a test requiring matplotlib, which we cannot add as an
3485 ;; input since it would create a circular dependency: Extend the
3486 ;; test for Python 3, where it is already dropped, to Python 2.
3487 (substitute* "numpydoc/tests/test_plot_directive.py"
3488 (("3") "2"))))))
ec00de35 3489 (build-system python-build-system)
fe4a8da4 3490 (propagated-inputs
213d1745
HG
3491 `(("python-sphinx" ,python-sphinx)))
3492 (native-inputs
3493 `(("python-nose" ,python-nose)))
ec00de35
FB
3494 (home-page "https://pypi.python.org/pypi/numpydoc")
3495 (synopsis
3496 "Numpy's Sphinx extensions")
3497 (description
3498 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3499 (license license:bsd-2)))
ec00de35
FB
3500
3501(define-public python2-numpydoc
5e4d8f67 3502 (package-with-python2 python-numpydoc))
1c65314c 3503
1e656049
RW
3504(define-public python-numexpr
3505 (package
3506 (name "python-numexpr")
26112c0a 3507 (version "2.6.0")
1e656049
RW
3508 (source
3509 (origin
3510 (method url-fetch)
26112c0a 3511 (uri (pypi-uri "numexpr" version))
1e656049
RW
3512 (sha256
3513 (base32
26112c0a 3514 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3515 (build-system python-build-system)
3516 (arguments `(#:tests? #f)) ; no tests included
3517 (propagated-inputs
3518 `(("python-numpy" ,python-numpy)))
3519 (home-page "https://github.com/pydata/numexpr")
3520 (synopsis "Fast numerical expression evaluator for NumPy")
3521 (description
3522 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3523expressions that operate on arrays are accelerated and use less memory than
3524doing the same calculation in Python. In addition, its multi-threaded
3525capabilities can make use of all your cores, which may accelerate
3526computations, most specially if they are not memory-bounded (e.g. those using
3527transcendental functions).")
f210e944 3528 (license license:expat)))
1e656049
RW
3529
3530(define-public python2-numexpr
f210e944 3531 (package-with-python2 python-numexpr))
1e656049 3532
1c65314c
FB
3533(define-public python-matplotlib
3534 (package
3535 (name "python-matplotlib")
1bbc659f 3536 (version "1.4.3")
1c65314c
FB
3537 (source
3538 (origin
3539 (method url-fetch)
de67e922
LF
3540 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3541 "/matplotlib-" version
1c65314c
FB
3542 "/matplotlib-" version ".tar.gz"))
3543 (sha256
3544 (base32
1bbc659f 3545 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3546 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3547 (build-system python-build-system)
3548 (outputs '("out" "doc"))
25f9a068
FB
3549 (propagated-inputs ; the following packages are all needed at run time
3550 `(("python-pyparsing" ,python-pyparsing)
3551 ("python-pygobject" ,python-pygobject)
3552 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3553 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3554 ("python-dateutil" ,python-dateutil-2)
3555 ("python-numpy" ,python-numpy-bootstrap)
3556 ("python-pillow" ,python-pillow)
3557 ("python-pytz" ,python-pytz)
3558 ("python-six" ,python-six)
25f9a068
FB
3559 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3560 ;; from 'gtk+') provides the required 'typelib' files used by
3561 ;; 'gobject-introspection'. The location of these files is set with the
3562 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3563 ;; is done automatically by a 'native-search-path' procedure. However,
3564 ;; at run-time the user must set this variable as follows:
3565 ;;
3566 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3567 ("gtk+" ,gtk+)
3568 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3569 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3570 ;; object. For this reason we need to import both libraries.
3571 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3572 ("python-pycairo" ,python-pycairo)
3573 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3574 (inputs
ca33a3ad 3575 `(("libpng" ,libpng)
1c65314c
FB
3576 ("imagemagick" ,imagemagick)
3577 ("freetype" ,freetype)
25f9a068
FB
3578 ("cairo" ,cairo)
3579 ("glib" ,glib)
1c65314c 3580 ;; FIXME: Add backends when available.
1c65314c
FB
3581 ;("python-wxpython" ,python-wxpython)
3582 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3583 ("tcl" ,tcl)
3584 ("tk" ,tk)))
1c65314c
FB
3585 (native-inputs
3586 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3587 ("python-sphinx" ,python-sphinx)
3588 ("python-numpydoc" ,python-numpydoc)
3589 ("python-nose" ,python-nose)
3590 ("python-mock" ,python-mock)
1c65314c
FB
3591 ("texlive" ,texlive)
3592 ("texinfo" ,texinfo)))
3593 (arguments
3594 `(#:phases
25f9a068
FB
3595 (alist-cons-before
3596 'build 'configure-environment
3597 (lambda* (#:key outputs inputs #:allow-other-keys)
3598 (let ((cairo (assoc-ref inputs "cairo"))
3599 (gtk+ (assoc-ref inputs "gtk+")))
3600 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3601 ;; has not effect.
25f9a068
FB
3602 (setenv "LD_LIBRARY_PATH"
3603 (string-append cairo "/lib:" gtk+ "/lib"))
3604 (setenv "HOME" (getcwd))
3605 (call-with-output-file "setup.cfg"
3606 (lambda (port)
1bbc659f
FB
3607 (format port "[directories]~%
3608basedirlist = ~a,~a~%
57b7b8cd 3609 [rc_options]~%
1bbc659f
FB
3610backend = TkAgg~%"
3611 (assoc-ref inputs "tcl")
3612 (assoc-ref inputs "tk"))))))
25f9a068
FB
3613 (alist-cons-after
3614 'install 'install-doc
ca33a3ad 3615 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3616 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3617 (doc (string-append data "/doc/" ,name "-" ,version))
3618 (info (string-append data "/info"))
3619 (html (string-append doc "/html")))
ca33a3ad
HG
3620 ;; Make installed package available for building the
3621 ;; documentation
3622 (add-installed-pythonpath inputs outputs)
25f9a068 3623 (with-directory-excursion "doc"
25f9a068
FB
3624 ;; Produce pdf in 'A4' format.
3625 (substitute* (find-files "." "conf\\.py")
3626 (("latex_paper_size = 'letter'")
3627 "latex_paper_size = 'a4'"))
3628 (mkdir-p html)
3629 (mkdir-p info)
3630 ;; The doc recommends to run the 'html' target twice.
3631 (system* "python" "make.py" "html")
3632 (system* "python" "make.py" "html")
18b31516 3633 (copy-recursively "build/html" html)
25f9a068
FB
3634 (system* "python" "make.py" "latex")
3635 (system* "python" "make.py" "texinfo")
18b31516
FB
3636 (symlink (string-append html "/_images")
3637 (string-append info "/matplotlib-figures"))
3638 (with-directory-excursion "build/texinfo"
3639 (substitute* "matplotlib.texi"
3640 (("@image\\{([^,]*)" all file)
3641 (string-append "@image{matplotlib-figures/" file)))
3642 (symlink (string-append html "/_images")
3643 "./matplotlib-figures")
3644 (system* "makeinfo" "--no-split"
3645 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3646 (copy-file "build/texinfo/matplotlib.info"
3647 (string-append info "/matplotlib.info"))
3648 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3649 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3650 %standard-phases))))
1c65314c
FB
3651 (home-page "http://matplotlib.org")
3652 (synopsis "2D plotting library for Python")
3653 (description
3654 "Matplotlib is a Python 2D plotting library which produces publication
3655quality figures in a variety of hardcopy formats and interactive environments
3656across platforms. Matplotlib can be used in Python scripts, the python and
3657ipython shell, web application servers, and six graphical user interface
3658toolkits.")
3f641af0 3659 (license license:psfl)
57b7b8cd 3660 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3661
764c077b 3662(define-public python2-matplotlib
57b7b8cd
LC
3663 (let ((matplotlib (package-with-python2
3664 (strip-python2-variant python-matplotlib))))
764c077b 3665 (package (inherit matplotlib)
88c26834
AE
3666 ;; Make sure to use special packages for Python 2 instead
3667 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3668 (propagated-inputs
7ca0dbc3 3669 `(("python2-pycairo" ,python2-pycairo)
764c077b 3670 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3671 ("python2-tkinter" ,python-2 "tk")
3672 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3673 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3674
0dde6232
RW
3675(define-public python2-pysnptools
3676 (package
3677 (name "python2-pysnptools")
a800018e 3678 (version "0.3.9")
0dde6232
RW
3679 (source
3680 (origin
3681 (method url-fetch)
3f2e9675 3682 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3683 (sha256
3684 (base32
a800018e 3685 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3686 (build-system python-build-system)
3687 (arguments
3688 `(#:python ,python-2)) ; only Python 2.7 is supported
3689 (propagated-inputs
3690 `(("python2-numpy" ,python2-numpy)
3691 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3692 ("python2-pandas" ,python2-pandas)))
3693 (native-inputs
3694 `(("python2-cython" ,python2-cython)))
0dde6232 3695 (native-inputs
f3b98f4f 3696 `(("unzip" ,unzip)))
0dde6232
RW
3697 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3698 (synopsis "Library for reading and manipulating genetic data")
3699 (description
3700 "PySnpTools is a library for reading and manipulating genetic data. It
3701can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3702those files. It can also efficiently manipulate ranges of integers using set
3703operators such as union, intersection, and difference.")
3f641af0 3704 (license license:asl2.0)))
0dde6232 3705
c9b1b4f9
RW
3706(define-public python-rpy2
3707 (package
3708 (name "python-rpy2")
ec3bcbc7 3709 (version "2.7.6")
c9b1b4f9
RW
3710 (source
3711 (origin
3712 (method url-fetch)
ec3bcbc7 3713 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3714 (sha256
3715 (base32
ec3bcbc7 3716 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3717 (build-system python-build-system)
482d9591
HG
3718 (propagated-inputs
3719 `(("python-six" ,python-six)))
c9b1b4f9 3720 (inputs
482d9591 3721 `(("readline" ,readline)
c9b1b4f9
RW
3722 ("icu4c" ,icu4c)
3723 ("pcre" ,pcre)
3724 ("r" ,r)))
3725 (native-inputs
f3b98f4f 3726 `(("zlib" ,zlib)))
c9b1b4f9
RW
3727 (home-page "http://rpy.sourceforge.net/")
3728 (synopsis "Python interface to the R language")
3729 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3730low-level interface to R from Python, a proposed high-level interface,
3731including wrappers to graphical libraries, as well as R-like structures and
3732functions.")
3f641af0 3733 (license license:gpl3+)))
c9b1b4f9
RW
3734
3735(define-public python2-rpy2
3736 (let ((rpy2 (package-with-python2 python-rpy2)))
3737 (package (inherit rpy2)
3738 (native-inputs
3739 `(("python2-singledispatch" ,python2-singledispatch)
3740 ,@(package-native-inputs rpy2))))))
3741
bb986599
FB
3742(define-public python-scipy
3743 (package
3744 (name "python-scipy")
ba8a0824 3745 (version "0.16.0")
bb986599
FB
3746 (source
3747 (origin
3748 (method url-fetch)
de67e922
LF
3749; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3750 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3751 "/scipy-" version ".tar.xz"))
bb986599
FB
3752 (sha256
3753 (base32
ba8a0824 3754 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3755 (build-system python-build-system)
dd86c0d1 3756 (propagated-inputs
bb986599
FB
3757 `(("python-numpy" ,python-numpy)
3758 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3759 ("python-pyparsing" ,python-pyparsing)))
3760 (inputs
3761 `(("lapack" ,lapack)
719b01c1 3762 ("openblas" ,openblas)))
bb986599 3763 (native-inputs
dd86c0d1
RW
3764 `(("python-nose" ,python-nose)
3765 ("python-sphinx" ,python-sphinx)
5248d49e 3766 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3767 ("gfortran" ,gfortran)
bb986599
FB
3768 ("texlive" ,texlive)
3769 ("perl" ,perl)))
3770 (outputs '("out" "doc"))
3771 (arguments
3772 `(#:phases
3773 (alist-cons-before
719b01c1 3774 'build 'configure-openblas
bb986599 3775 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3776 (call-with-output-file "site.cfg"
3777 (lambda (port)
3778 (format port
3779 "[blas]
3780libraries = openblas
3781library_dirs = ~a/lib
3782include_dirs = ~a/include
d548e6aa
HG
3783
3784# backslash-n to make emacs happy
3785\n[atlas]
719b01c1
RW
3786library_dirs = ~a/lib
3787atlas_libs = openblas
3788"
3789 (assoc-ref inputs "openblas")
3790 (assoc-ref inputs "openblas")
3791 (assoc-ref inputs "openblas"))))
3792 #t)
bb986599
FB
3793 (alist-cons-after
3794 'install 'install-doc
d548e6aa 3795 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3796 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3797 (doc (string-append data "/doc/" ,name "-" ,version))
3798 (html (string-append doc "/html"))
3799 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3800 ;; Make installed package available for building the
3801 ;; documentation
3802 (add-installed-pythonpath inputs outputs)
bb986599 3803 (with-directory-excursion "doc"
bb986599
FB
3804 ;; Fix generation of images for mathematical expressions.
3805 (substitute* (find-files "source" "conf\\.py")
3806 (("pngmath_use_preview = True")
3807 "pngmath_use_preview = False"))
3808 (mkdir-p html)
3809 (system* "make" "html" pyver)
3810 (system* "make" "latex" "PAPER=a4" pyver)
3811 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3812 (copy-file "build/latex/scipy-ref.pdf"
3813 (string-append doc "/scipy-ref.pdf"))
3814 (with-directory-excursion "build/html"
3815 (for-each (lambda (file)
3816 (let* ((dir (dirname file))
3817 (tgt-dir (string-append html "/" dir)))
96c46210 3818 (install-file file html)))
bb986599
FB
3819 (find-files "." ".*"))))))
3820 ;; Tests can only be run after the library has been installed and not
3821 ;; within the source directory.
3822 (alist-cons-after
3823 'install 'check
89b5c60e 3824 (lambda _
bb986599
FB
3825 (with-directory-excursion "/tmp"
3826 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3827 (alist-delete
3828 'check
4f9ff21e
RW
3829 (alist-cons-after
3830 'unpack 'fix-tests
3831 (lambda _
3832 (substitute* "scipy/integrate/tests/test_quadpack.py"
3833 (("libm.so") "libm.so.6"))
3834 #t)
3835 %standard-phases)))))))
bb986599
FB
3836 (home-page "http://www.scipy.org/")
3837 (synopsis "The Scipy library provides efficient numerical routines")
3838 (description "The SciPy library is one of the core packages that make up
3839the SciPy stack. It provides many user-friendly and efficient numerical
3840routines such as routines for numerical integration and optimization.")
3f641af0 3841 (license license:bsd-3)))
bb986599 3842
764c077b 3843(define-public python2-scipy
57b7b8cd 3844 (package-with-python2 python-scipy))
bb986599 3845
73acc193 3846(define-public python-socksipy-branch
3847 (package
3848 (name "python-socksipy-branch")
3849 (version "1.01")
3850 (source
3851 (origin
3852 (method url-fetch)
3853 (uri (pypi-uri "SocksiPy-branch" version))
3854 (sha256
3855 (base32
3856 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3857 (build-system python-build-system)
3858 (arguments
3859 `(#:tests? #f)) ; There are no tests
3860 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3861 (synopsis "Python SOCKS module")
3862 (description
3863 "SocksiPy - A Python SOCKS client module. It provides a
3864socket-like interface that supports connections to any TCP
3865service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3866The original version was developed by Dan Haim, this is a
3867branch created by Mario Vilas to address some open issues,
3868as the original project seems to have been abandoned circa 2007.")
3869 (license license:bsd-3)))
3870
3871(define-public python2-socksipy-branch
3872 (package-with-python2 python-socksipy-branch))
3873
94914805
EB
3874(define-public python-sqlalchemy
3875 (package
3876 (name "python-sqlalchemy")
a4ba286b 3877 (version "1.0.12")
94914805
EB
3878 (source
3879 (origin
3880 (method url-fetch)
3881 (uri (string-append "https://pypi.python.org/packages/source/S/"
3882 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3883 (sha256
3884 (base32
a4ba286b 3885 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3886 (build-system python-build-system)
3887 (native-inputs
3888 `(("python-cython" ,python-cython) ;for c extensions
3889 ("python-pytest" ,python-pytest)
3890 ("python-mock" ,python-mock))) ;for tests
3891 (arguments
3892 `(#:phases (alist-replace
3893 'check
3894 (lambda _ (zero? (system* "py.test")))
3895 %standard-phases)))
3896 (home-page "http://www.sqlalchemy.org")
3897 (synopsis "Database abstraction library")
3898 (description
3899 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3900gives application developers the full power and flexibility of SQL. It
3901provides a full suite of well known enterprise-level persistence patterns,
3902designed for efficient and high-performing database access, adapted into a
3903simple and Pythonic domain language.")
3f641af0 3904 (license license:x11)))
94914805
EB
3905
3906(define-public python2-sqlalchemy
3907 (package-with-python2 python-sqlalchemy))
c937562e 3908
4a093330
DM
3909(define-public python-pycodestyle
3910 (package
3911 (name "python-pycodestyle")
3912 (version "2.0.0")
3913 (source
3914 (origin
3915 (method url-fetch)
3916 (uri (pypi-uri "pycodestyle" version))
3917 (sha256
3918 (base32
3919 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3920 (build-system python-build-system)
3921 (home-page "https://pycodestyle.readthedocs.io/")
3922 (synopsis "Python style guide checker")
3923 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3924Python code against some of the style conventions in
3925@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3926 (license license:expat)))
4a093330
DM
3927
3928(define-public python2-pycodestyle
f210e944 3929 (package-with-python2 python-pycodestyle))
b91912c4
DM
3930
3931(define-public python-orderedmultidict
3932 (package
3933 (name "python-orderedmultidict")
3934 (version "0.7.10")
3935 (source
3936 (origin
3937 (method url-fetch)
3938 (uri (pypi-uri "orderedmultidict" version))
3939 (sha256
3940 (base32
3941 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3942 (build-system python-build-system)
3943 (arguments
3944 `(#:phases
3945 (modify-phases %standard-phases
3946 (add-after 'unpack 'fix-tests
3947 (lambda _
3948 ;; The package uses nosetest for running the tests.
3949 ;; Adding this initfile allows to run the test suite
3950 ;; without requiring nosetest.
3951 (zero? (system* "touch" "tests/__init__.py")))))))
3952 (propagated-inputs
3953 `(("python-six" ,python-six)))
3954 (native-inputs
3955 `(("python-pycodestyle" ,python-pycodestyle)))
3956 (home-page "https://github.com/gruns/orderedmultidict")
3957 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3958 (description "This package contains a library for ordered multivalue
3959dictionaries. A multivalue dictionary is a dictionary that can store
3960multiple values for the same key. An ordered multivalue dictionary is a
3961multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3962 (license license:unlicense)))
b91912c4
DM
3963
3964(define-public python2-orderedmultidict
f210e944 3965 (package-with-python2 python-orderedmultidict))
9dede065
DM
3966
3967(define-public python-furl
3968 (package
3969 (name "python-furl")
3970 (version "0.5.6")
3971 (source
3972 (origin
3973 (method url-fetch)
3974 (uri (pypi-uri "furl" version))
3975 (sha256
3976 (base32
3977 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3978 (build-system python-build-system)
3979 (propagated-inputs
3980 `(("python-six" ,python-six)
3981 ("python-orderedmultidict" ,python-orderedmultidict)))
3982 (native-inputs
3983 `(("python-pycodestyle" ,python-pycodestyle)))
3984 (home-page "https://github.com/gruns/furl")
3985 (synopsis "URL manipulation in Python")
3986 (description "Furl provides an easy-to-use alternative to the
3987@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3988 (license license:unlicense)))
9dede065
DM
3989
3990(define-public python2-furl
f210e944 3991 (package-with-python2 python-furl))
462bf271
DM
3992
3993(define-public python-flask-babel
3994 (package
3995 (name "python-flask-babel")
3996 (version "0.11.1")
3997 (source
3998 (origin
3999 (method url-fetch)
4000 (uri (pypi-uri "Flask-Babel" version))
4001 (sha256
4002 (base32
4003 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4004 (build-system python-build-system)
4005 (propagated-inputs
4006 `(("python-flask" ,python-flask)
4007 ("python-babel" ,python-babel)
4008 ("python-jinja2" ,python-jinja2)
4009 ("python-pytz" ,python-pytz)))
4010 (home-page "https://github.com/python-babel/flask-babel")
4011 (synopsis "Add i18n/l10n support to Flask applications")
4012 (description "This package implements internationalization and localization
4013support for Flask. This is based on the Python babel module as well as pytz -
4014both of which are installed automatically if you install this library.")
f210e944 4015 (license license:bsd-3)))
462bf271
DM
4016
4017(define-public python2-flask-babel
f210e944 4018 (package-with-python2 python-flask-babel))
4a093330 4019
de2966cf
EF
4020(define-public python-sqlalchemy-utils
4021 (package
4022 (name "python-sqlalchemy-utils")
bb4b1706 4023 (version "0.32.11")
de2966cf
EF
4024 (source
4025 (origin
4026 (method url-fetch)
4027 (uri (pypi-uri "SQLAlchemy-Utils" version))
4028 (sha256
4029 (base32
bb4b1706 4030 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 4031 (build-system python-build-system)
c22b4f87 4032 (propagated-inputs
de2966cf
EF
4033 `(("python-six" ,python-six)
4034 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
4035 (native-inputs
4036 `(("python-pytest" ,python-pytest)))
de2966cf
EF
4037 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4038 (synopsis "Various utility functions for SQLAlchemy")
4039 (description
4040 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4041for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4042
4043You might also want to install the following optional dependencies:
4044@enumerate
4045@item @code{python-passlib}
4046@item @code{python-babel}
4047@item @code{python-cryptography}
4048@item @code{python-pytz}
4049@item @code{python-psycopg2}
4050@item @code{python-furl}
4051@item @code{python-flask-babel}
4052@end enumerate
4053")
de2966cf
EF
4054 (license license:bsd-3)))
4055
4056(define-public python2-sqlalchemy-utils
f210e944 4057 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4058
af5a4602
CAW
4059(define-public python-alembic
4060 (package
4061 (name "python-alembic")
bb484529 4062 (version "0.8.7")
af5a4602
CAW
4063 (source
4064 (origin
4065 (method url-fetch)
4066 (uri (pypi-uri "alembic" version))
4067 (sha256
4068 (base32
bb484529 4069 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4070 (build-system python-build-system)
4071 (native-inputs
4072 `(("python-mock" ,python-mock)
4073 ("python-pytest-cov" ,python-pytest-cov)))
4074 (propagated-inputs
4075 `(("python-sqlalchemy" ,python-sqlalchemy)
4076 ("python-mako" ,python-mako)
4077 ("python-editor" ,python-editor)))
4078 (home-page "http://bitbucket.org/zzzeek/alembic")
4079 (synopsis
4080 "Database migration tool for SQLAlchemy")
4081 (description
4082 "Alembic is a lightweight database migration tool for usage with the
4083SQLAlchemy Database Toolkit for Python.")
f210e944 4084 (license license:expat)))
af5a4602
CAW
4085
4086(define-public python2-alembic
f210e944 4087 (package-with-python2 python-alembic))
af5a4602 4088
1671c07c
EB
4089(define-public python-distutils-extra
4090 (package
4091 (name "python-distutils-extra")
4092 (version "2.38")
4093 (source
4094 (origin
4095 (method url-fetch)
4096 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4097 version "/+download/python-distutils-extra-"
4098 version ".tar.gz"))
4099 (sha256
4100 (base32
4101 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4102 (build-system python-build-system)
1671c07c
EB
4103 (home-page "https://launchpad.net/python-distutils-extra/")
4104 (synopsis "Enhancements to Python's distutils")
4105 (description
4106 "The python-distutils-extra module enables you to easily integrate
4107gettext support, themed icons, and scrollkeeper-based documentation into
4108Python's distutils.")
3f641af0 4109 (license license:gpl2)))
1671c07c
EB
4110
4111(define-public python2-distutils-extra
4112 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4113
4114(define-public python2-elib.intl
4115 (package
4116 (name "python2-elib.intl")
4117 (version "0.0.3")
4118 (source
4119 (origin
4120 ;; This project doesn't tag releases or publish tarballs, so we take
4121 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4122 (method git-fetch)
4123 (uri (git-reference
4124 (url "https://github.com/dieterv/elib.intl.git")
4125 (commit "d09997cfef")))
4126 (sha256
4127 (base32
4128 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4129 (build-system python-build-system)
ea5456c8
EB
4130 (arguments
4131 ;; incompatible with Python 3 (exception syntax)
4132 `(#:python ,python-2
b41a05ce 4133 #:tests? #f))
ea5456c8
EB
4134 (home-page "https://github.com/dieterv/elib.intl")
4135 (synopsis "Enhanced internationalization for Python")
4136 (description
4137 "The elib.intl module provides enhanced internationalization (I18N)
4138services for your Python modules and applications.")
3f641af0 4139 (license license:lgpl3+)))
ea5456c8 4140
c937562e
EB
4141(define-public python-pillow
4142 (package
4143 (name "python-pillow")
aba5182c 4144 (version "3.3.3")
c937562e
EB
4145 (source
4146 (origin
4147 (method url-fetch)
f1d9231d 4148 (uri (pypi-uri "Pillow" version))
c937562e
EB
4149 (sha256
4150 (base32
aba5182c 4151 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4152 (build-system python-build-system)
4153 (native-inputs
f3b98f4f 4154 `(("python-nose" ,python-nose)))
c937562e 4155 (inputs
5ff408d9
SB
4156 `(("freetype" ,freetype)
4157 ("lcms" ,lcms)
c937562e
EB
4158 ("zlib" ,zlib)
4159 ("libjpeg" ,libjpeg)
4160 ("openjpeg" ,openjpeg)
5ff408d9
SB
4161 ("libtiff" ,libtiff)
4162 ("libwebp" ,libwebp)))
c937562e 4163 (arguments
e5358a6b 4164 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4165 (add-after
4166 'install 'check-installed
6151120a 4167 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4168 (begin
4169 (setenv "HOME" (getcwd))
6151120a
HG
4170 ;; Make installed package available for running the
4171 ;; tests
4172 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4173 (and (zero? (system* "python" "selftest.py"
4174 "--installed"))
4175 (zero? (system* "python" "test-installed.py"))))))
4176 (delete 'check))))
c937562e
EB
4177 (home-page "https://pypi.python.org/pypi/Pillow")
4178 (synopsis "Fork of the Python Imaging Library")
4179 (description
4180 "The Python Imaging Library adds image processing capabilities to your
4181Python interpreter. This library provides extensive file format support, an
4182efficient internal representation, and fairly powerful image processing
4183capabilities. The core image library is designed for fast access to data
4184stored in a few basic pixel formats. It should provide a solid foundation for
4185a general image processing tool.")
3f641af0 4186 (license (license:x11-style
c937562e
EB
4187 "http://www.pythonware.com/products/pil/license.htm"
4188 "The PIL Software License"))))
4189
4190(define-public python2-pillow
4191 (package-with-python2 python-pillow))
bb986599 4192
a415f036
FB
4193(define-public python-pycparser
4194 (package
4195 (name "python-pycparser")
38eb6919 4196 (version "2.14")
a415f036
FB
4197 (source
4198 (origin
4199 (method url-fetch)
38eb6919 4200 (uri (pypi-uri "pycparser" version))
a415f036
FB
4201 (sha256
4202 (base32
38eb6919 4203 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4204 (outputs '("out" "doc"))
4205 (build-system python-build-system)
4206 (native-inputs
f3b98f4f 4207 `(("pkg-config" ,pkg-config)))
a415f036 4208 (arguments
89b5c60e 4209 `(#:phases
a415f036
FB
4210 (alist-replace
4211 'check
4212 (lambda _
4213 (with-directory-excursion "tests"
4214 (zero? (system* "python" "all_tests.py"))))
4215 (alist-cons-after
4216 'install 'install-doc
4217 (lambda* (#:key outputs #:allow-other-keys)
4218 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4219 (doc (string-append data "/doc/" ,name "-" ,version))
4220 (examples (string-append doc "/examples")))
4221 (mkdir-p examples)
4222 (for-each (lambda (file)
4223 (copy-file (string-append "." file)
4224 (string-append doc file)))
4225 '("/README.rst" "/CHANGES" "/LICENSE"))
4226 (copy-recursively "examples" examples)))
4227 %standard-phases))))
4228 (home-page "https://github.com/eliben/pycparser")
4229 (synopsis "C parser in Python")
4230 (description
4231 "Pycparser is a complete parser of the C language, written in pure Python
4232using the PLY parsing library. It parses C code into an AST and can serve as
4233a front-end for C compilers or analysis tools.")
3f641af0 4234 (license license:bsd-3)))
a415f036
FB
4235
4236(define-public python2-pycparser
4237 (package-with-python2 python-pycparser))
57c3f716
FB
4238
4239(define-public python-cffi
4240 (package
4241 (name "python-cffi")
2d3a437c 4242 (version "1.4.2")
57c3f716
FB
4243 (source
4244 (origin
4245 (method url-fetch)
2d3a437c 4246 (uri (pypi-uri "cffi" version))
89b5c60e 4247 (sha256
2d3a437c 4248 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4249 (build-system python-build-system)
4250 (outputs '("out" "doc"))
4251 (inputs
4252 `(("libffi" ,libffi)))
4253 (propagated-inputs ; required at run-time
4254 `(("python-pycparser" ,python-pycparser)))
4255 (native-inputs
4256 `(("pkg-config" ,pkg-config)
4257 ("python-sphinx" ,python-sphinx)
f3b98f4f 4258 ("python-pytest" ,python-pytest)))
57c3f716 4259 (arguments
4179f952 4260 `(#:phases
57c3f716
FB
4261 (alist-cons-after
4262 'install 'install-doc
4263 (lambda* (#:key outputs #:allow-other-keys)
4264 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4265 (doc (string-append data "/doc/" ,name "-" ,version))
4266 (html (string-append doc "/html")))
4267 (with-directory-excursion "doc"
4268 (system* "make" "html")
4269 (mkdir-p html)
4270 (copy-recursively "build/html" html))
4271 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4272 %standard-phases)))
4273 (home-page "http://cffi.readthedocs.org")
4274 (synopsis "Foreign function interface for Python")
4275 (description
4276 "Foreign Function Interface for Python calling C code.")
bd3fa666 4277 (license license:expat)))
57c3f716
FB
4278
4279(define-public python2-cffi
4280 (package-with-python2 python-cffi))
6fa14469
FB
4281
4282(define-public python-xcffib
4283 (package
4284 (name "python-xcffib")
4285 (version "0.1.9")
4286 (source
4287 (origin
4288 (method url-fetch)
4289 (uri (string-append "https://pypi.python.org/packages/source/x/"
4290 "xcffib/xcffib-" version ".tar.gz"))
4291 (sha256
4292 (base32
4293 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4294 (build-system python-build-system)
4295 (inputs
482d9591 4296 `(("libxcb" ,libxcb)))
6fa14469 4297 (propagated-inputs
482d9591
HG
4298 `(("python-cffi" ,python-cffi) ; used at run time
4299 ("python-six" ,python-six)))
6fa14469 4300 (arguments
89b5c60e 4301 `(#:phases
6fa14469
FB
4302 (alist-cons-after
4303 'install 'install-doc
4304 (lambda* (#:key outputs #:allow-other-keys)
4305 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4306 "/doc/" ,name "-" ,version)))
4307 (mkdir-p doc)
4308 (copy-file "README.md"
4309 (string-append doc "/README.md"))))
4310 %standard-phases)))
4311 (home-page "https://github.com/tych0/xcffib")
4312 (synopsis "XCB Python bindings")
4313 (description
4314 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4315support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4316 (license license:expat)))
6fa14469
FB
4317
4318(define-public python2-xcffib
4319 (package-with-python2 python-xcffib))
4320
9e099723
FB
4321(define-public python-cairocffi
4322 (package
4323 (name "python-cairocffi")
4324 (version "0.6")
4325 (source
4326 (origin
4327 (method url-fetch)
4328 ;; The archive on pypi is missing the 'utils' directory!
4329 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4330 version ".tar.gz"))
f586c877 4331 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4332 (sha256
4333 (base32
4334 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4335 (build-system python-build-system)
4336 (outputs '("out" "doc"))
4337 (inputs
4338 `(("gdk-pixbuf" ,gdk-pixbuf)
4339 ("cairo" ,cairo)))
4340 (native-inputs
4341 `(("pkg-config" ,pkg-config)
4342 ("python-sphinx" ,python-sphinx)
f3b98f4f 4343 ("python-docutils" ,python-docutils)))
9e099723
FB
4344 (propagated-inputs
4345 `(("python-xcffib" ,python-xcffib))) ; used at run time
4346 (arguments
89b5c60e 4347 `(#:phases
9e099723
FB
4348 (alist-cons-after
4349 'install 'install-doc
4350 (lambda* (#:key inputs outputs #:allow-other-keys)
4351 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4352 (doc (string-append data "/doc/" ,name "-" ,version))
4353 (html (string-append doc "/html")))
89b5c60e 4354 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4355 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4356 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4357 (setenv "LANG" "en_US.UTF-8")
4358 (mkdir-p html)
4359 (for-each (lambda (file)
4360 (copy-file (string-append "." file)
4361 (string-append doc file)))
4362 '("/README.rst" "/CHANGES" "/LICENSE"))
4363 (system* "python" "setup.py" "build_sphinx")
4364 (copy-recursively "docs/_build/html" html)))
4365 %standard-phases)))
4366 (home-page "https://github.com/SimonSapin/cairocffi")
4367 (synopsis "Python bindings and object-oriented API for Cairo")
4368 (description
4369 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4370Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4371graphics library with support for multiple backends including image buffers,
4372PNG, PostScript, PDF, and SVG file output.")
3f641af0 4373 (license license:bsd-3)))
9e099723
FB
4374
4375(define-public python2-cairocffi
4376 (package-with-python2 python-cairocffi))
4377
3cff95cb
RW
4378(define-public python-decorator
4379 (package
4380 (name "python-decorator")
eb6e2e81 4381 (version "4.0.9")
3cff95cb
RW
4382 (source
4383 (origin
4384 (method url-fetch)
e21338be 4385 (uri (pypi-uri "decorator" version))
3cff95cb 4386 (sha256
eb6e2e81 4387 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4388 (build-system python-build-system)
4389 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4390 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4391 (synopsis "Python module to simplify usage of decorators")
4392 (description
4393 "The aim of the decorator module is to simplify the usage of decorators
4394for the average programmer, and to popularize decorators usage giving examples
4395of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4396etc. The core of this module is a decorator factory.")
4397 (license license:expat)))
4398
4399(define-public python2-decorator
4400 (package-with-python2 python-decorator))
4401
2c0499ad
RW
4402(define-public python-drmaa
4403 (package
4404 (name "python-drmaa")
4405 (version "0.7.6")
4406 (source
4407 (origin
4408 (method url-fetch)
4409 (uri (string-append
4410 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4411 version ".tar.gz"))
4412 (sha256
4413 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4414 (build-system python-build-system)
4415 ;; The test suite requires libdrmaa which is provided by the cluster
4416 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4417 ;; should be set to the path of the libdrmaa library.
4418 (arguments '(#:tests? #f))
4419 (native-inputs
f3b98f4f 4420 `(("python-nose" ,python-nose)))
2c0499ad
RW
4421 (home-page "https://pypi.python.org/pypi/drmaa")
4422 (synopsis "Python bindings for the DRMAA library")
4423 (description
4424 "A Python package for Distributed Resource Management (DRM) job
4425submission and control. This package is an implementation of the DRMAA 1.0
4426Python language binding specification.")
3f641af0 4427 (license license:bsd-3)))
2c0499ad
RW
4428
4429(define-public python2-drmaa
4430 (package-with-python2 python-drmaa))
4431
d05c6da0
RW
4432(define-public python-gridmap
4433 (package
4434 (name "python-gridmap")
4435 (version "0.13.0")
4436 (source
4437 (origin
4438 (method url-fetch)
4439 (uri (string-append
4440 "https://github.com/pygridtools/gridmap/archive/v"
4441 version ".tar.gz"))
4442 (file-name (string-append name "-" version ".tar.gz"))
4443 (sha256
4444 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4445 (build-system python-build-system)
f22efa01 4446 (propagated-inputs
d05c6da0
RW
4447 `(("python-psutil" ,python-psutil)
4448 ("python-drmaa" ,python-drmaa)
4449 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4450 (home-page "https://github.com/pygridtools/gridmap")
4451 (synopsis "Create jobs on a cluster directly from Python")
4452 (description
4453 "Gridmap is a Python package to allow you to easily create jobs on the
4454cluster directly from Python. You can directly map Python functions onto the
4455cluster without needing to write any wrapper code yourself.")
3f641af0 4456 (license license:gpl3+)))
d05c6da0
RW
4457
4458(define-public python2-gridmap
4459 (package-with-python2 python-gridmap))
4460
cb6d5c54
RW
4461(define-public python-pexpect
4462 (package
4463 (name "python-pexpect")
4464 (version "3.3")
4465 (source
4466 (origin
4467 (method url-fetch)
4468 (uri (string-append "https://pypi.python.org/packages/source/p/"
4469 "pexpect/pexpect-" version ".tar.gz"))
4470 (sha256
4471 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4472 (build-system python-build-system)
4473 (arguments
4474 `(#:phases
4475 (modify-phases %standard-phases
4476 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4477 (native-inputs
4478 `(("python-nose" ,python-nose)))
4479 (home-page "http://pexpect.readthedocs.org/")
4480 (synopsis "Controlling interactive console applications")
4481 (description
4482 "Pexpect is a pure Python module for spawning child applications;
4483controlling them; and responding to expected patterns in their output.
4484Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4485child application and control it as if a human were typing commands.")
3f641af0 4486 (license license:isc)))
cb6d5c54
RW
4487
4488(define-public python2-pexpect
4489 (package-with-python2 python-pexpect))
4490
229ad120
RW
4491(define-public python-setuptools-scm
4492 (package
4493 (name "python-setuptools-scm")
42d6d0d0 4494 (version "1.11.1")
229ad120
RW
4495 (source (origin
4496 (method url-fetch)
383af6b0 4497 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4498 (sha256
4499 (base32
42d6d0d0 4500 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4501 (build-system python-build-system)
4502 (home-page "https://github.com/pypa/setuptools_scm/")
4503 (synopsis "Manage Python package versions in SCM metadata")
4504 (description
383af6b0 4505 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4506@dfn{software configuration management} (SCM) metadata instead of declaring
4507them as the version argument or in a SCM managed file.")
4508 (license license:expat)))
4509
4510(define-public python2-setuptools-scm
4511 (package-with-python2 python-setuptools-scm))
4512
b74270ee
RW
4513(define-public python-pathpy
4514 (package
4515 (name "python-pathpy")
4516 (version "8.1.1")
4517 (source
4518 (origin
4519 (method url-fetch)
4520 (uri (string-append "https://pypi.python.org/packages/source/p/"
4521 "path.py/path.py-" version ".tar.gz"))
4522 (sha256
4523 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4524 (outputs '("out" "doc"))
b74270ee
RW
4525 (build-system python-build-system)
4526 (propagated-inputs
4527 `(("python-appdirs" ,python-appdirs)))
4528 (native-inputs
f3b98f4f 4529 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4530 ("python-sphinx" ,python-sphinx)
4531 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4532 ("python-pytest" ,python-pytest)
4533 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4534 (arguments
4535 `(#:phases
4536 (modify-phases %standard-phases
4537 (add-after 'build 'build-doc
4538 (lambda _
4539 (setenv "LANG" "en_US.UTF-8")
4540 (zero? (system* "python" "setup.py" "build_sphinx"))))
4541 (add-after 'install 'install-doc
4542 (lambda* (#:key outputs #:allow-other-keys)
4543 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4544 (doc (string-append data "/doc/" ,name "-" ,version))
4545 (html (string-append doc "/html")))
4546 (mkdir-p html)
4547 (for-each (lambda (file)
4548 (copy-file file (string-append doc "/" file)))
4549 '("README.rst" "CHANGES.rst"))
4550 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4551 (home-page "http://github.com/jaraco/path.py")
4552 (synopsis "Python module wrapper for built-in os.path")
4553 (description
4554 "@code{path.py} implements path objects as first-class entities, allowing
4555common operations on files to be invoked on those path objects directly.")
4556 (license license:expat)))
4557
4558(define-public python2-pathpy
4559 (package-with-python2 python-pathpy))
4560
0d34e01b
RW
4561(define-public python-pickleshare
4562 (package
4563 (name "python-pickleshare")
4564 (version "0.5")
4565 (source
4566 (origin
4567 (method url-fetch)
4568 (uri (string-append "https://pypi.python.org/packages/source/p/"
4569 "pickleshare/pickleshare-" version ".tar.gz"))
4570 (sha256
4571 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4572 (build-system python-build-system)
4573 (propagated-inputs
4574 `(("python-pathpy" ,python-pathpy)))
4575 (home-page "https://github.com/vivainio/pickleshare")
4576 (synopsis "Tiny key value database with concurrency support")
4577 (description
4578 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4579Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4580shelve, many processes can access the database simultaneously. Changing a
4581value in database is immediately visible to other processes accessing the same
4582database. Concurrency is possible because the values are stored in separate
4583files. Hence the “database” is a directory where all files are governed by
4584PickleShare.")
4585 (license license:expat)))
4586
4587(define-public python2-pickleshare
4588 (package-with-python2 python-pickleshare))
4589
cd6e5189
RW
4590(define-public python-simplegeneric
4591 (package
4592 (name "python-simplegeneric")
4593 (version "0.8.1")
4594 (source
4595 (origin
4596 (method url-fetch)
4597 (uri (string-append "https://pypi.python.org/packages/source/s/"
4598 "simplegeneric/simplegeneric-" version ".zip"))
4599 (sha256
4600 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4601 (build-system python-build-system)
4602 (native-inputs
f3b98f4f 4603 `(("unzip" ,unzip)))
cd6e5189
RW
4604 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4605 (synopsis "Python module for simple generic functions")
4606 (description
4607 "The simplegeneric module lets you define simple single-dispatch generic
4608functions, akin to Python’s built-in generic functions like @code{len()},
4609@code{iter()} and so on. However, instead of using specially-named methods,
4610these generic functions use simple lookup tables, akin to those used by
4611e.g. @code{pickle.dump()} and other generic functions found in the Python
4612standard library.")
3f641af0 4613 (license license:zpl2.1)))
cd6e5189
RW
4614
4615(define-public python2-simplegeneric
4616 (package-with-python2 python-simplegeneric))
4617
ddc7d8ed 4618(define-public python-ipython-genutils
c4abbac3 4619 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4620 (package
4621 (name "python-ipython-genutils")
4622 (version "0.1.0")
4623 (source
4624 (origin
4625 (method url-fetch)
4626 (uri (string-append "https://pypi.python.org/packages/source/i/"
4627 "ipython_genutils/ipython_genutils-"
4628 version ".tar.gz"))
4629 (sha256
4630 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4631 (build-system python-build-system)
4632 (arguments `(#:tests? #f)) ; no tests
4633 (home-page "http://ipython.org")
4634 (synopsis "Vestigial utilities from IPython")
4635 (description
c4abbac3
HG
4636 "This package provides retired utilities from IPython. No packages
4637outside IPython/Jupyter should depend on it.
4638
4639This package shouldn't exist. It contains some common utilities shared by
4640Jupyter and IPython projects during The Big Split. As soon as possible, those
4641packages will remove their dependency on this, and this package will go
4642away.")
3f641af0 4643 (license license:bsd-3)))
ddc7d8ed
RW
4644
4645(define-public python2-ipython-genutils
4646 (package-with-python2 python-ipython-genutils))
4647
2b10eb48
RW
4648(define-public python-traitlets
4649 (package
4650 (name "python-traitlets")
a5ba1481 4651 (version "4.2.0")
2b10eb48
RW
4652 (source
4653 (origin
4654 (method url-fetch)
cc0c4fde 4655 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4656 (sha256
4657 (base32
a5ba1481 4658 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4659 (build-system python-build-system)
4660 (arguments
4661 `(#:phases
4662 (modify-phases %standard-phases
4663 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4664 (propagated-inputs
4665 `(("python-ipython-genutils" ,python-ipython-genutils)
4666 ("python-decorator" ,python-decorator)))
4667 (native-inputs
cc0c4fde
EF
4668 `(("python-mock" ,python-mock)
4669 ("python-nose" ,python-nose)))
2b10eb48
RW
4670 (home-page "http://ipython.org")
4671 (synopsis "Configuration system for Python applications")
4672 (description
4673 "Traitlets is a framework that lets Python classes have attributes with
4674type checking, dynamically calculated default values, and ‘on change’
4675callbacks. The package also includes a mechanism to use traitlets for
4676configuration, loading values from files or from command line arguments. This
4677is a distinct layer on top of traitlets, so you can use traitlets in your code
4678without using the configuration machinery.")
3f641af0 4679 (license license:bsd-3)))
2b10eb48
RW
4680
4681(define-public python2-traitlets
4682 (package-with-python2 python-traitlets))
4683
4263b06f
RW
4684(define-public python-jupyter-core
4685 (package
4686 (name "python-jupyter-core")
4687 (version "4.2.0")
4688 (source
4689 (origin
4690 (method url-fetch)
4691 (uri (string-append (pypi-uri "jupyter_core" version)))
4692 (sha256
4693 (base32
4694 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4695 (build-system python-build-system)
4696 ;; FIXME: not sure how to run the tests
4697 (arguments `(#:tests? #f))
4698 (propagated-inputs
4699 `(("python-traitlets" ,python-traitlets)))
4700 (home-page "http://jupyter.org/")
4701 (synopsis "Jupyter base package")
4702 (description
4703 "Jupyter core is the base package on which Jupyter projects rely.")
4704 (license license:bsd-3)))
4705
4706(define-public python2-jupyter-core
4707 (package-with-python2 python-jupyter-core))
4708
9ff01f2d
RW
4709(define-public python-jupyter-client
4710 (package
4711 (name "python-jupyter-client")
4712 (version "4.4.0")
4713 (source
4714 (origin
4715 (method url-fetch)
4716 (uri (pypi-uri "jupyter_client" version))
4717 (sha256
4718 (base32
4719 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4720 (build-system python-build-system)
4721 ;; Tests fail because of missing native python kernel which I assume is
4722 ;; provided by the ipython package, which we cannot use because it would
4723 ;; cause a dependency cycle.
4724 (arguments `(#:tests? #f))
4725 (propagated-inputs
4726 `(("python-pyzmq" ,python-pyzmq)
4727 ("python-traitlets" ,python-traitlets)
4728 ("python-jupyter-core" ,python-jupyter-core)))
4729 (home-page "http://jupyter.org/")
4730 (synopsis "Jupyter protocol implementation and client libraries")
4731 (description
4732 "The @code{jupyter_client} package contains the reference implementation
4733of the Jupyter protocol. It also provides client and kernel management APIs
4734for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4735installing @code{kernelspec}s for use with Jupyter frontends.")
4736 (license license:bsd-3)))
4737
4738(define-public python2-jupyter-client
4739 (package-with-python2 python-jupyter-client))
4740
ab526102
RW
4741(define-public python-ipykernel
4742 (package
4743 (name "python-ipykernel")
4744 (version "4.5.0")
4745 (source
4746 (origin
4747 (method url-fetch)
4748 (uri (pypi-uri "ipykernel" version))
4749 (sha256
4750 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4751 (build-system python-build-system)
4752 ;; The tests load a submodule of IPython. However, IPython itself depends
4753 ;; on ipykernel.
4754 (arguments `(#:tests? #f))
4755 (propagated-inputs
4756 ;; imported at runtime during connect
4757 `(("python-jupyter-client" ,python-jupyter-client)))
4758 (home-page "http://ipython.org")
4759 (synopsis "IPython Kernel for Jupyter")
4760 (description
4761 "This package provides the IPython kernel for Jupyter.")
4762 (license license:bsd-3)))
4763
4764(define-public python2-ipykernel
4765 (package-with-python2 python-ipykernel))
4766
5ff6effc
RW
4767(define-public python-testpath
4768 (package
4769 (name "python-testpath")
4770 (version "0.2")
4771 (source
4772 (origin
4773 (method url-fetch)
4774 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4775 version ".tar.gz"))
4776 (file-name (string-append name "-" version ".tar.gz"))
4777 (sha256
4778 (base32
4779 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4780 (build-system python-build-system)
4781 (arguments
4782 `(#:tests? #f ; this package does not even have a setup.py
4783 #:phases
4784 (modify-phases %standard-phases
4785 (delete 'install)
4786 (replace 'build
4787 (lambda* (#:key inputs outputs #:allow-other-keys)
4788 (let ((dir (string-append
4789 (assoc-ref outputs "out")
4790 "/lib/python"
4791 (string-take (string-take-right
4792 (assoc-ref inputs "python") 5) 3)
4793 "/site-packages/testpath")))
4794 (mkdir-p dir)
4795 (copy-recursively "testpath" dir))
4796 #t)))))
4797 (home-page "https://github.com/takluyver/testpath")
4798 (synopsis "Test utilities for code working with files and commands")
4799 (description
4800 "Testpath is a collection of utilities for Python code working with files
4801and commands. It contains functions to check things on the filesystem, and
4802tools for mocking system commands and recording calls to those.")
4803 (license license:expat)))
4804
4805(define-public python2-testpath
4806 (package-with-python2 python-testpath))
4807
ae1ab9fe
FB
4808(define-public python-ipython
4809 (package
4810 (name "python-ipython")
4dbc8ec4 4811 (version "4.0.3")
ae1ab9fe
FB
4812 (source
4813 (origin
fceac880 4814 (method url-fetch)
accd5f99 4815 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4816 (sha256
4dbc8ec4 4817 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4818 (build-system python-build-system)
4819 (outputs '("out" "doc"))
3a0b1b9a
FB
4820 (propagated-inputs
4821 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4822 ("python-terminado" ,python-terminado)
ae1ab9fe 4823 ("python-matplotlib" ,python-matplotlib)
5d26e542 4824 ("python-numpy" ,python-numpy)
ae1ab9fe 4825 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4826 ("python-jinja2" ,python-jinja2)
4827 ("python-mistune" ,python-mistune)
accd5f99
RW
4828 ("python-pexpect" ,python-pexpect)
4829 ("python-pickleshare" ,python-pickleshare)
4830 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4831 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4832 ("python-traitlets" ,python-traitlets)
4833 ("python-ipykernel" ,python-ipykernel)
4834 ("python-pygments" ,python-pygments)))
4835 (inputs
4836 `(("readline" ,readline)
4837 ("which" ,which)))
ae1ab9fe
FB
4838 (native-inputs
4839 `(("pkg-config" ,pkg-config)
accd5f99
RW
4840 ("python-requests" ,python-requests) ;; for tests
4841 ("python-testpath" ,python-testpath)
4842 ("python-nose" ,python-nose)
ae1ab9fe
FB
4843 ("python-sphinx" ,python-sphinx)
4844 ("texlive" ,texlive)
f3b98f4f 4845 ("texinfo" ,texinfo)))
ae1ab9fe 4846 (arguments
89b5c60e 4847 `(#:phases
3a0b1b9a
FB
4848 (modify-phases %standard-phases
4849 (add-after
4850 'install 'install-doc
4851 (lambda* (#:key inputs outputs #:allow-other-keys)
4852 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4853 (doc (string-append data "/doc/" ,name "-" ,version))
4854 (html (string-append doc "/html"))
4855 (man1 (string-append data "/man/man1"))
4856 (info (string-append data "/info"))
4857 (examples (string-append doc "/examples")))
afd3d931 4858 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4859 ;; Make installed package available for running the tests
4860 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4861 (with-directory-excursion "docs"
accd5f99
RW
4862 ;; FIXME: pdf fails to build
4863 ;;(system* "make" "pdf" "PAPER=a4")
4864 (system* "make" "html")
3a0b1b9a
FB
4865 (system* "make" "info"))
4866 (copy-recursively "docs/man" man1)
4867 (copy-recursively "examples" examples)
accd5f99 4868 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4869 ;; (copy-file "docs/build/latex/ipython.pdf"
4870 ;; (string-append doc "/ipython.pdf"))
4871 (mkdir-p info)
4872 (copy-file "docs/build/texinfo/ipython.info"
4873 (string-append info "/ipython.info"))
4874 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4875 ;; Tests can only be run after the library has been installed and not
4876 ;; within the source directory.
4877 (delete 'check)
4878 (add-after
4879 'install 'check
eee5cd04 4880 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4881 (if tests?
4882 (with-directory-excursion "/tmp"
eee5cd04
HG
4883 ;; Make installed package available for running the tests
4884 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4885 (setenv "HOME" "/tmp/") ;; required by a test
4886 (zero? (system* (string-append (assoc-ref outputs "out")
4887 "/bin/iptest"))))
4888 #t)))
4889 (add-before
4890 'install 'fix-tests
4891 (lambda* (#:key inputs #:allow-other-keys)
4892 (substitute* "./IPython/utils/_process_posix.py"
4893 (("/usr/bin/env', 'which") (which "which")))
4894 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4895 (("#!/usr/bin/env python")
4896 (string-append "#!" (which "python"))))
4897 ;; Disable 1 failing test
4898 (substitute* "./IPython/core/tests/test_magic.py"
4899 (("def test_dirops\\(\\):" all)
4900 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4901 (home-page "http://ipython.org")
4902 (synopsis "IPython is a tool for interactive computing in Python")
4903 (description
4904 "IPython provides a rich architecture for interactive computing with:
4905Powerful interactive shells, a browser-based notebook, support for interactive
4906data visualization, embeddable interpreters and tools for parallel
4907computing.")
135ba811
EF
4908 (license license:bsd-3)
4909 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4910
4911(define-public python2-ipython
135ba811 4912 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4913 (package
4914 (inherit ipython)
4915 ;; FIXME: some tests are failing
4916 (arguments
4917 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4918 ;; FIXME: add pyreadline once available.
e62600fe 4919 (native-inputs
135ba811 4920 `(("python2-mock" ,python2-mock)
77a6932a 4921 ,@(package-native-inputs ipython))))))
03411993
AE
4922
4923(define-public python-isodate
4924 (package
4925 (name "python-isodate")
b6785c2e 4926 (version "0.5.4")
03411993
AE
4927 (source
4928 (origin
4929 (method url-fetch)
b6785c2e 4930 (uri (pypi-uri "isodate" version))
03411993
AE
4931 (sha256
4932 (base32
b6785c2e 4933 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4934 (build-system python-build-system)
03411993
AE
4935 (home-page
4936 "http://cheeseshop.python.org/pypi/isodate")
4937 (synopsis
4938 "Python date parser and formatter")
4939 (description
4940 "Python-isodate is a python module for parsing and formatting
4941ISO 8601 dates, time and duration.")
3f641af0 4942 (license license:bsd-3)))
03411993
AE
4943
4944(define-public python2-isodate
4945 (package-with-python2 python-isodate))
673ab897
AE
4946
4947(define-public python-html5lib
4948 (package
4949 (name "python-html5lib")
a14061aa 4950 (version "1.0b10")
673ab897
AE
4951 (source
4952 (origin
4953 (method url-fetch)
fee04c19 4954 (uri (pypi-uri "html5lib" version))
673ab897
AE
4955 (sha256
4956 (base32
a14061aa 4957 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 4958 (build-system python-build-system)
3dd75476 4959 (propagated-inputs
4eb6ed28
MB
4960 `(("python-six" ,python-six)
4961 ("python-webencodings" ,python-webencodings)))
673ab897
AE
4962 (arguments
4963 `(#:test-target "check"))
4964 (home-page
4965 "https://github.com/html5lib/html5lib-python")
4966 (synopsis
4967 "Python HTML parser based on the WHATWG HTML specifcation")
4968 (description
4969 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4970and written in Python.")
bd3fa666 4971 (license license:expat)))
673ab897
AE
4972
4973(define-public python2-html5lib
4974 (package-with-python2 python-html5lib))
e99f4211 4975
8ee62c97
RW
4976;; Needed for python-bleach, a dependency of python-notebook
4977(define-public python-html5lib-0.9
4978 (package
4979 (inherit python-html5lib)
4980 (version "0.999")
4981 (source
4982 (origin
4983 (method url-fetch)
4984 (uri (pypi-uri "html5lib" version))
4985 (sha256
4986 (base32
4987 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4988
4989(define-public python2-html5lib-0.9
4990 (package-with-python2 python-html5lib-0.9))
4991
adbca19e
MB
4992(define-public python-webencodings
4993 (package
4994 (name "python-webencodings")
4995 (version "0.5")
4996 (source (origin
4997 (method url-fetch)
4998 (uri (pypi-uri "webencodings" version))
4999 (sha256
5000 (base32
5001 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5002 (build-system python-build-system)
5003 (arguments
5004 '(#:phases
5005 (modify-phases %standard-phases
5006 (replace 'check
5007 (lambda _
5008 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5009 (native-inputs
5010 `(("python-pytest" ,python-pytest)))
5011 (home-page "https://github.com/SimonSapin/python-webencodings")
5012 (synopsis "Character encoding aliases for legacy web content")
5013 (description
5014 "In order to be compatible with legacy web content when interpreting
5015something like @code{Content-Type: text/html; charset=latin1}, tools need
5016to use a particular set of aliases for encoding labels as well as some
5017overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5018the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5019or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5020The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5021defines all such details so that implementations do not have to
5022reverse-engineer each other.
5023
5024This module implements the Encoding standard and has encoding labels and
5025BOM detection, but the actual implementation for encoders and decoders
5026is Python’s.")
5027 (license license:bsd-3)))
5028
5029(define-public python2-webencodings
5030 (package-with-python2 python-webencodings))
5031
e99f4211
MW
5032(define-public python-urwid
5033 (package
5034 (name "python-urwid")
51ff41f6 5035 (version "1.3.1")
e99f4211
MW
5036 (source
5037 (origin
5038 (method url-fetch)
b97c1bfd 5039 (uri (pypi-uri "urwid" version))
e99f4211
MW
5040 (sha256
5041 (base32
51ff41f6 5042 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5043 (build-system python-build-system)
b97c1bfd
LF
5044 (arguments
5045 `(#:phases
5046 (modify-phases %standard-phases
5047 ;; Disable failing test. Bug filed upstream:
5048 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5049 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5050 (add-after 'unpack 'disable-failing-test
5051 (lambda _
5052 (substitute* "urwid/tests/test_event_loops.py"
5053 (("test_remove_watch_file")
5054 "disable_remove_watch_file")))))))
e99f4211
MW
5055 (home-page "http://urwid.org")
5056 (synopsis "Console user interface library for Python")
5057 (description
5058 "Urwid is a curses-based UI/widget library for Python. It includes many
5059features useful for text console applications.")
3f641af0 5060 (license license:lgpl2.1+)))
e99f4211
MW
5061
5062(define-public python2-urwid
5063 (package-with-python2 python-urwid))
d95a56c6 5064
47d0b292
TS
5065(define-public python-urwidtrees
5066 (package
5067 (name "python-urwidtrees")
37ec4623 5068 (version "1.0.2")
47d0b292
TS
5069 (source
5070 (origin
5071 (method url-fetch)
37ec4623
TS
5072 ;; package author intends on distributing via github rather than pypi:
5073 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5074 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5075 version ".tar.gz"))
5076 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5077 (sha256
5078 (base32
37ec4623 5079 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5080 (build-system python-build-system)
5081 (arguments
5082 '(#:tests? #f)) ; no tests
f22efa01 5083 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5084 (home-page "https://github.com/pazz/urwidtrees")
5085 (synopsis "Tree widgets for urwid")
5086 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5087toolkit. Use it to build trees of widgets.")
3f641af0 5088 (license license:gpl3+)))
47d0b292
TS
5089
5090(define-public python2-urwidtrees
5091 (package-with-python2 python-urwidtrees))
5092
d95a56c6
PAR
5093(define-public python-dbus
5094 (package
5095 (name "python-dbus")
5096 (version "1.2.0")
5097 (source
5098 (origin
5099 (method url-fetch)
5100 (uri (string-append
5cc3096c 5101 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5102 version ".tar.gz"))
5103 (sha256
5104 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5105 (build-system gnu-build-system)
6717c879
SB
5106 (arguments
5107 '(#:phases
5108 (modify-phases %standard-phases
5109 (add-before
5110 'check 'pre-check
5111 (lambda _
5112 ;; XXX: For the missing '/etc/machine-id'.
5113 (substitute* "test/run-test.sh"
5114 (("DBUS_FATAL_WARNINGS=1")
5115 "DBUS_FATAL_WARNINGS=0"))
5116 #t)))))
d95a56c6
PAR
5117 (native-inputs
5118 `(("pkg-config" ,pkg-config)))
5119 (inputs
5120 `(("python" ,python)
2e88d113 5121 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5122 (synopsis "Python bindings for D-bus")
5123 (description "python-dbus provides bindings for libdbus, the reference
5124implementation of D-Bus.")
5125 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5126 (license license:expat)))
b52af02b
MW
5127
5128(define-public python2-dbus
5129 (package (inherit python-dbus)
5130 (name "python2-dbus")
5131 (inputs `(("python" ,python-2)
5132 ,@(alist-delete "python"
5133 (package-inputs python-dbus)
5134 equal?)))
5135 ;; FIXME: on Python 2, the test_utf8 fails with:
5136 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5137 (arguments `(#:tests? #f))))
a6ac8332
AE
5138
5139(define-public python-apsw
5140 (package
5141 (name "python-apsw")
917708c2 5142 (version "3.9.2-r1")
a6ac8332
AE
5143 (source
5144 (origin
5145 (method url-fetch)
917708c2 5146 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5147 (sha256
5148 (base32
917708c2 5149 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5150 (build-system python-build-system)
5151 (inputs
f3b98f4f 5152 `(("sqlite" ,sqlite)))
a6ac8332
AE
5153 (arguments
5154 `(#:phases
5155 ;; swap check and install phases
5156 (alist-cons-after
5157 'install 'check
5158 (assoc-ref %standard-phases 'check)
5159 (alist-delete
5160 'check
5161 %standard-phases))))
5162 (home-page "https://github.com/rogerbinns/apsw/")
5163 (synopsis "Another Python SQLite Wrapper")
5164 (description "APSW is a Python wrapper for the SQLite
5165embedded relational database engine. In contrast to other wrappers such as
5166pysqlite it focuses on being a minimal layer over SQLite attempting just to
5167translate the complete SQLite API into Python.")
abde5f37 5168 (license license:zlib)))
a6ac8332
AE
5169
5170(define-public python2-apsw
5171 (package-with-python2 python-apsw))
26b307e2
AE
5172
5173(define-public python-lxml
5174 (package
5175 (name "python-lxml")
d58a3203 5176 (version "3.6.0")
26b307e2
AE
5177 (source
5178 (origin
5179 (method url-fetch)
97bbc480 5180 (uri (pypi-uri "lxml" version))
26b307e2 5181 (sha256
d58a3203
EF
5182 (base32
5183 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5184 (build-system python-build-system)
5185 (inputs
5186 `(("libxml2" ,libxml2)
f3b98f4f 5187 ("libxslt" ,libxslt)))
26b307e2
AE
5188 (home-page "http://lxml.de/")
5189 (synopsis
5190 "Python XML processing library")
5191 (description
5192 "The lxml XML toolkit is a Pythonic binding for the C libraries
5193libxml2 and libxslt.")
3f641af0 5194 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5195
5196(define-public python2-lxml
5197 (package-with-python2 python-lxml))
4ed20663 5198
b32a1e47
CAW
5199;; beautifulsoup4 has a totally different namespace than 3.x,
5200;; and pypi seems to put it under its own name, so I guess we should too
5201(define-public python-beautifulsoup4
5202 (package
5203 (name "python-beautifulsoup4")
67fd4a12 5204 (version "4.5.1")
b32a1e47
CAW
5205 (source
5206 (origin
5207 (method url-fetch)
5208 (uri (pypi-uri "beautifulsoup4" version))
5209 (sha256
5210 (base32
67fd4a12 5211 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5212 (build-system python-build-system)
5f37f0b6
LF
5213 (arguments
5214 `(#:phases
5215 (modify-phases %standard-phases
5216 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5217 ;; must use this conversion script when building with Python 3. The
5218 ;; conversion script also runs the tests.
5219 ;; For more information, see the file 'convert-py3k' in the source
5220 ;; distribution.
5221 (replace 'check
5222 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5223 (home-page
5224 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5225 (synopsis
5226 "Python screen-scraping library")
5227 (description
5228 "Beautiful Soup is a Python library designed for rapidly setting up
5229screen-scraping projects. It offers Pythonic idioms for navigating,
5230searching, and modifying a parse tree, providing a toolkit for
5231dissecting a document and extracting what you need. It automatically
5232converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5233 (license license:expat)))
b32a1e47
CAW
5234
5235(define-public python2-beautifulsoup4
5236 (package
5237 (inherit (package-with-python2
5238 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5239 (arguments `(#:python ,python-2))))
b32a1e47 5240
092e86f5
AE
5241(define-public python2-cssutils
5242 (package
5243 (name "python2-cssutils")
58d1d816 5244 (version "1.0.1")
092e86f5
AE
5245 (source
5246 (origin
5247 (method url-fetch)
58d1d816 5248 (uri (pypi-uri "cssutils" version))
092e86f5 5249 (sha256
58d1d816
EF
5250 (base32
5251 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5252 (build-system python-build-system)
5253 (native-inputs
5254 `(("python2-mock" ,python2-mock) ; for the tests
5255 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5256 (arguments
5257 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5258 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5259 ))
092e86f5
AE
5260 (home-page "http://cthedot.de/cssutils/")
5261 (synopsis
5262 "CSS Cascading Style Sheets library for Python")
5263 (description
5264 "Cssutils is a Python package for parsing and building CSS
5265Cascading Style Sheets. Currently it provides a DOM only and no rendering
5266options.")
3f641af0 5267 (license license:lgpl3+)))
880ff77c
AE
5268
5269(define-public python-cssselect
5270 (package
5271 (name "python-cssselect")
d5ccd9ab 5272 (version "0.9.2")
880ff77c
AE
5273 (source
5274 (origin
5275 (method url-fetch)
d5ccd9ab 5276 (uri (pypi-uri "cssselect" version))
880ff77c 5277 (sha256
d5ccd9ab
EF
5278 (base32
5279 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5280 (build-system python-build-system)
880ff77c
AE
5281 (arguments
5282 ;; tests fail with message
5283 ;; AttributeError: 'module' object has no attribute 'tests'
5284 `(#:tests? #f))
5285 (home-page
5286 "https://pythonhosted.org/cssselect/")
5287 (synopsis
5288 "CSS3 selector parser and translator to XPath 1.0")
5289 (description
5290 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5291them to XPath 1.0 expressions. Such expressions can be used in lxml or
5292another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5293 (license license:bsd-3)))
880ff77c
AE
5294
5295(define-public python2-cssselect
5296 (package-with-python2 python-cssselect))
60357f99
AE
5297
5298(define-public python-netifaces
5299 (package
5300 (name "python-netifaces")
5301 (version "0.10.4")
5302 (source
5303 (origin
5304 (method url-fetch)
5305 (uri (string-append
5306 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5307 version
5308 ".tar.gz"))
5309 (sha256
5310 (base32
5311 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5312 (build-system python-build-system)
60357f99
AE
5313 (home-page
5314 "https://bitbucket.org/al45tair/netifaces")
5315 (synopsis
5316 "Python module for portable network interface information")
5317 (description
5318 "Netifaces is a Python module providing information on network
5319interfaces in an easy and portable manner.")
5320 (license license:expat)))
5321
5322(define-public python2-netifaces
5323 (package-with-python2 python-netifaces))
92cb152b 5324
32f77c04
RW
5325(define-public python-networkx
5326 (package
5327 (name "python-networkx")
a4d9609c 5328 (version "1.11")
32f77c04
RW
5329 (source
5330 (origin
5331 (method url-fetch)
a4d9609c 5332 (uri (pypi-uri "networkx" version))
32f77c04 5333 (sha256
a4d9609c 5334 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5335 (build-system python-build-system)
5336 ;; python-decorator is needed at runtime
5337 (propagated-inputs
5338 `(("python-decorator" ,python-decorator)))
5339 (native-inputs
f3b98f4f 5340 `(("python-nose" ,python-nose)))
32f77c04
RW
5341 (home-page "http://networkx.github.io/")
5342 (synopsis "Python module for creating and manipulating graphs and networks")
5343 (description
5344 "NetworkX is a Python package for the creation, manipulation, and study
5345of the structure, dynamics, and functions of complex networks.")
3f641af0 5346 (license license:bsd-3)))
32f77c04
RW
5347
5348(define-public python2-networkx
5349 (package-with-python2 python-networkx))
5350
92cb152b
RW
5351(define-public snakemake
5352 (package
5353 (name "snakemake")
5354 (version "3.2.1")
5355 (source
5356 (origin
5357 (method url-fetch)
5358 (uri (string-append
5359 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5360 version ".tar.gz"))
5361 (sha256
5362 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5363 (build-system python-build-system)
92cb152b
RW
5364 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5365 (synopsis "Python-based execution environment for make-like workflows")
5366 (description
5367 "Snakemake aims to reduce the complexity of creating workflows by
5368providing a clean and modern domain specific specification language (DSL) in
5369Python style, together with a fast and comfortable execution environment.")
5370 (license license:expat)))
a1920bc9 5371
35de1fbd
RW
5372(define-public python-seaborn
5373 (package
5374 (name "python-seaborn")
fc899d4f 5375 (version "0.7.0")
35de1fbd
RW
5376 (source
5377 (origin
5378 (method url-fetch)
fc899d4f 5379 (uri (pypi-uri "seaborn" version))
35de1fbd 5380 (sha256
fc899d4f 5381 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5382 (build-system python-build-system)
5383 (propagated-inputs
5384 `(("python-pandas" ,python-pandas)
5385 ("python-matplotlib" ,python-matplotlib)
5386 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5387 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5388 (synopsis "Statistical data visualization")
5389 (description
5390 "Seaborn is a library for making attractive and informative statistical
5391graphics in Python. It is built on top of matplotlib and tightly integrated
5392with the PyData stack, including support for numpy and pandas data structures
5393and statistical routines from scipy and statsmodels.")
3f641af0 5394 (license license:bsd-3)
fc899d4f 5395 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5396
5397(define-public python2-seaborn
fc899d4f
EF
5398 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5399 (package
5400 (inherit base)
5401 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5402 ,@(package-propagated-inputs base))))))
35de1fbd 5403
90fc547f
RW
5404(define-public python-sympy
5405 (package
5406 (name "python-sympy")
5407 (version "0.7.6")
5408 (source
5409 (origin
5410 (method url-fetch)
5411 (uri (string-append
5412 "https://github.com/sympy/sympy/releases/download/sympy-"
5413 version "/sympy-" version ".tar.gz"))
5414 (sha256
5415 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5416 (build-system python-build-system)
90fc547f
RW
5417 (home-page "http://www.sympy.org/")
5418 (synopsis "Python library for symbolic mathematics")
5419 (description
5420 "SymPy is a Python library for symbolic mathematics. It aims to become a
5421full-featured computer algebra system (CAS) while keeping the code as simple
5422as possible in order to be comprehensible and easily extensible.")
3f641af0 5423 (license license:bsd-3)))
90fc547f
RW
5424
5425(define-public python2-sympy
5426 (package-with-python2 python-sympy))
5427
e8c9b010
SR
5428(define-public python-q
5429 (package
5430 (name "python-q")
5431 (version "2.6")
5432 (source
5433 (origin
5434 (method url-fetch)
5435 (uri (pypi-uri "q" version))
5436 (sha256
5437 (base32
5438 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5439 (build-system python-build-system)
5440 (home-page "https://github.com/zestyping/q")
5441 (synopsis "Quick-and-dirty debugging output for tired programmers")
5442 (description
5443 "q is a Python module for \"print\" style of debugging Python code. It
5444provides convenient short API for print out of values, tracebacks, and
5445falling into the Python interpreter.")
f210e944 5446 (license license:asl2.0)))
e8c9b010
SR
5447
5448(define-public python2-q
f210e944 5449 (package-with-python2 python-q))
e8c9b010 5450
a1920bc9
FB
5451(define-public python-testlib
5452 (package
5453 (name "python-testlib")
5454 (version "0.6.5")
5455 (source
5456 (origin
5457 (method url-fetch)
5458 (uri (string-append
5459 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5460 version ".zip"))
5461 (sha256
5462 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5463 (build-system python-build-system)
a1920bc9 5464 (native-inputs
632735f2 5465 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5466 (synopsis "Python micro test suite harness")
5467 (description "A micro unittest suite harness for Python.")
5468 (home-page "https://github.com/trentm/testlib")
1cb9c006 5469 (license license:expat)))
a1920bc9
FB
5470
5471(define-public python2-testlib
5472 (package-with-python2 python-testlib))
db62afa5
LC
5473
5474(define-public python2-xlib
5475 (package
5476 (name "python2-xlib")
5477 (version "0.14")
5478 (source (origin
5479 (method url-fetch)
de67e922
LF
5480 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5481 "/" version "/"
db62afa5
LC
5482 "python-xlib-" version ".tar.gz"))
5483 (sha256
5484 (base32
5485 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5486 (build-system python-build-system)
5487 (arguments
5488 `(#:python ,python-2 ;Python 2 only
5489 #:tests? #f)) ;no tests
db62afa5
LC
5490 (home-page "http://python-xlib.sourceforge.net/")
5491 (synopsis "Python X11 client library")
5492 (description
5493 "The Python X Library is intended to be a fully functional X client
5494library for Python programs. It is useful to implement low-level X clients.
5495It is written entirely in Python.")
3f641af0 5496 (license license:gpl2+)))
0234ca06
DT
5497
5498(define-public python-singledispatch
5499 (package
5500 (name "python-singledispatch")
5501 (version "3.4.0.3")
5502 (source
5503 (origin
5504 (method url-fetch)
bdb67d84 5505 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5506 (sha256
5507 (base32
5508 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5509 (build-system python-build-system)
5e1c9d24
HG
5510 (native-inputs
5511 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5512 (home-page
5513 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5514 (synopsis "Backport of singledispatch feature from Python 3.4")
5515 (description
5516 "This library brings functools.singledispatch from Python 3.4 to Python
55172.6-3.3.")
5518 (license license:expat)))
5519
5520(define-public python2-singledispatch
5521 (package-with-python2 python-singledispatch))
feaae484 5522
310d218f
RW
5523(define-public python-tornado
5524 (package
5525 (name "python-tornado")
a724924b 5526 (version "4.3")
310d218f
RW
5527 (source
5528 (origin
5529 (method url-fetch)
a724924b 5530 (uri (pypi-uri "tornado" version))
310d218f 5531 (sha256
a724924b 5532 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5533 (build-system python-build-system)
310d218f 5534 (native-inputs
b455439b 5535 `(("python-certifi" ,python-certifi)))
f22efa01 5536 (propagated-inputs
b455439b 5537 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5538 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5539 (synopsis "Python web framework and asynchronous networking library")
5540 (description
5541 "Tornado is a Python web framework and asynchronous networking library,
5542originally developed at FriendFeed. By using non-blocking network I/O,
5543Tornado can scale to tens of thousands of open connections, making it ideal
5544for long polling, WebSockets, and other applications that require a long-lived
5545connection to each user.")
3f641af0 5546 (license license:asl2.0)
b455439b 5547 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5548
5549(define-public python2-tornado
b455439b 5550 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5551 (package (inherit tornado)
f22efa01 5552 (propagated-inputs
310d218f
RW
5553 `(("python2-backport-ssl-match-hostname"
5554 ,python2-backport-ssl-match-hostname)
b455439b 5555 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5556 ,@(package-propagated-inputs tornado))))))
310d218f 5557
6b59fc10
EF
5558;; the python- version can be removed with python-3.5
5559(define-public python-backports-abc
5560 (package
5561 (name "python-backports-abc")
5562 (version "0.4")
5563 (source
5564 (origin
5565 (method url-fetch)
5566 (uri (pypi-uri "backports_abc" version))
5567 (sha256
5568 (base32
5569 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5570 (build-system python-build-system)
6b59fc10 5571 (home-page "https://github.com/cython/backports_abc")
66e07664 5572 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5573 (description
5574 "Python-backports-abc provides a backport of additions to the
5575'collections.abc' module in Python-3.5.")
3f641af0 5576 (license license:psfl)))
6b59fc10
EF
5577
5578(define-public python2-backports-abc
5579 (package-with-python2 python-backports-abc))
5580
feaae484
SB
5581(define-public python-waf
5582 (package
5583 (name "python-waf")
7dd55dfe 5584 (version "1.9.5")
feaae484
SB
5585 (source (origin
5586 (method url-fetch)
bae67829 5587 (uri (string-append "https://waf.io/"
feaae484
SB
5588 "waf-" version ".tar.bz2"))
5589 (sha256
5590 (base32
7dd55dfe 5591 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5592 (build-system python-build-system)
5593 (arguments
5594 '(#:phases
5595 (modify-phases %standard-phases
5596 (replace 'build
7dd55dfe
EF
5597 (lambda _
5598 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5599 (replace 'check
7dd55dfe
EF
5600 (lambda _
5601 (zero? (system* "python" "waf" "--version"))))
feaae484 5602 (replace 'install
7dd55dfe
EF
5603 (lambda _
5604 (copy-file "waf" %output))))))
5605 (home-page "http://waf.io/")
feaae484
SB
5606 (synopsis "Python-based build system")
5607 (description
5608 "Waf is a Python-based framework for configuring, compiling and installing
5609applications.")
3f641af0 5610 (license license:bsd-3)))
feaae484
SB
5611
5612(define-public python2-waf
5613 (package-with-python2 python-waf))
45203542
RW
5614
5615(define-public python-pyzmq
5616 (package
5617 (name "python-pyzmq")
3655ee76 5618 (version "15.1.0")
45203542
RW
5619 (source
5620 (origin
5621 (method url-fetch)
3655ee76 5622 (uri (pypi-uri "pyzmq" version))
45203542 5623 (sha256
3655ee76 5624 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5625 (build-system python-build-system)
5626 (arguments
5627 `(#:configure-flags
5628 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5629 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5630 ;; --inplace' for 'python setup.py test' to work.
5631 #:tests? #f))
5632 (inputs
5633 `(("zeromq" ,zeromq)))
5634 (native-inputs
5635 `(("pkg-config" ,pkg-config)
f3b98f4f 5636 ("python-nose" ,python-nose)))
45203542
RW
5637 (home-page "http://github.com/zeromq/pyzmq")
5638 (synopsis "Python bindings for 0MQ")
5639 (description
5640 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5641 (license license:bsd-4)))
45203542
RW
5642
5643(define-public python2-pyzmq
5644 (package-with-python2 python-pyzmq))
d889e6c4
CR
5645
5646(define-public python-pep8
5647 (package
5648 (name "python-pep8")
db251311 5649 (version "1.7.0")
d889e6c4
CR
5650 (source
5651 (origin
5652 (method url-fetch)
db251311 5653 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5654 (sha256
5655 (base32
db251311 5656 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5657 (build-system python-build-system)
d889e6c4
CR
5658 (home-page "http://pep8.readthedocs.org/")
5659 (synopsis "Python style guide checker")
5660 (description
5661 "This tools checks Python code against some of the style conventions in
5662PEP 8.")
5663 (license license:expat)))
5664
5665(define-public python2-pep8
5666 (package-with-python2 python-pep8))
e31d7f44
CR
5667
5668(define-public python-pyflakes
5669 (package
5670 (name "python-pyflakes")
2abc3972 5671 (version "1.0.0")
e31d7f44
CR
5672 (source
5673 (origin
5674 (method url-fetch)
2abc3972 5675 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5676 (sha256
5677 (base32
2abc3972 5678 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5679 (build-system python-build-system)
e31d7f44
CR
5680 (home-page
5681 "https://github.com/pyflakes/pyflakes")
5682 (synopsis "Passive checker of Python programs")
5683 (description
5684 "Pyflakes statically checks Python source code for common errors.")
5685 (license license:expat)))
a59e017c 5686
7261d9eb
CR
5687(define-public python2-pyflakes
5688 (package-with-python2 python-pyflakes))
5689
a59e017c
CR
5690(define-public python-mccabe
5691 (package
5692 (name "python-mccabe")
c6ebd40d 5693 (version "0.4.0")
a59e017c
CR
5694 (source
5695 (origin
5696 (method url-fetch)
c6ebd40d 5697 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5698 (sha256
5699 (base32
c6ebd40d 5700 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5701 (build-system python-build-system)
328bb95d 5702 (native-inputs
c6ebd40d 5703 `(("python-pytest" ,python-pytest)
f3b98f4f 5704 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5705 (home-page "https://github.com/flintwork/mccabe")
5706 (synopsis "McCabe checker, plugin for flake8")
5707 (description
5708 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5709complexity of Python source code.")
7362371d 5710 (license license:expat)))
a59e017c
CR
5711
5712(define-public python2-mccabe
5713 (package-with-python2 python-mccabe))
e8df8f47 5714
7477fbb1
CR
5715(define-public python-mccabe-0.2.1
5716 (package (inherit python-mccabe)
5717 (version "0.2.1")
5718 (source
5719 (origin
5720 (method url-fetch)
5721 (uri (pypi-uri "mccabe" version))
5722 (sha256
5723 (base32
f3b98f4f 5724 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5725
5726(define-public python2-mccabe-0.2.1
5727 (package-with-python2 python-mccabe-0.2.1))
5728
e8df8f47
CR
5729;; Flake8 2.4.1 requires an older version of pep8.
5730;; This should be removed ASAP.
5731(define-public python-pep8-1.5.7
5732 (package (inherit python-pep8)
5733 (version "1.5.7")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (string-append
5738 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5739 version
5740 ".tar.gz"))
5741 (sha256
5742 (base32
5743 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5744
5745(define-public python2-pep8-1.5.7
5746 (package-with-python2 python-pep8-1.5.7))
5747
5748;; Flake8 2.4.1 requires an older version of pyflakes.
5749;; This should be removed ASAP.
5750(define-public python-pyflakes-0.8.1
5751 (package (inherit python-pyflakes)
5752 (version "0.8.1")
5753 (source
5754 (origin
5755 (method url-fetch)
5756 (uri (string-append
5757 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5758 version
5759 ".tar.gz"))
5760 (sha256
5761 (base32
5762 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5763
5764(define-public python2-pyflakes-0.8.1
7261d9eb 5765 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5766
5767(define-public python-flake8
5768 (package
5769 (name "python-flake8")
43789136 5770 (version "2.5.4")
e8df8f47
CR
5771 (source
5772 (origin
5773 (method url-fetch)
1b995533 5774 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5775 (sha256
5776 (base32
011271c7
HG
5777 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5778 (modules '((guix build utils)))
5779 (snippet
5780 '(begin
5781 ;; Remove pre-compiled .pyc files from source.
5782 (for-each delete-file-recursively
5783 (find-files "." "__pycache__" #:directories? #t))
5784 (for-each delete-file (find-files "." "\\.pyc$"))
5785 #t))))
e8df8f47 5786 (build-system python-build-system)
482d9591 5787 (propagated-inputs
f3b98f4f 5788 `(("python-pep8" ,python-pep8)
43789136 5789 ("python-pyflakes" ,python-pyflakes)
482d9591 5790 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5791 (native-inputs
5792 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5793 ("python-nose" ,python-nose)))
5794 (home-page "https://gitlab.com/pycqa/flake8")
5795 (synopsis
5796 "The modular source code checker: pep8, pyflakes and co")
5797 (description
5798 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5799 (license license:expat)))
5800
5801(define-public python2-flake8
5802 (package-with-python2 python-flake8))
61b9ac53 5803
abf21efc
CR
5804;; This will only be needed by the python-hacking package and will not be
5805;; necessary once python-hacking > 0.10.2 is released.
5806(define-public python-flake8-2.2.4
5807 (package (inherit python-flake8)
482d9591 5808 (propagated-inputs
f3b98f4f 5809 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5810 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5811 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5812 (native-inputs
482d9591 5813 `(("python-mock" ,python-mock)
abf21efc
CR
5814 ("python-nose" ,python-nose)))
5815 (version "2.2.4")
5816 (source
5817 (origin
5818 (method url-fetch)
5819 (uri (pypi-uri "flake8" version))
5820 (sha256
5821 (base32
b9c8ccce
HG
5822 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5823 (modules '((guix build utils)))
5824 (snippet
5825 '(begin
5826 ;; Remove pre-compiled .pyc files from source.
5827 (for-each delete-file-recursively
5828 (find-files "." "__pycache__" #:directories? #t))
5829 (for-each delete-file (find-files "." "\\.pyc$"))
5830 #t))))))
abf21efc
CR
5831
5832(define-public python2-flake8-2.2.4
5833 (package-with-python2 python-flake8-2.2.4))
5834
61b9ac53
FB
5835(define-public python-mistune
5836 (package
5837 (name "python-mistune")
5838 (version "0.7")
5839 (source
5840 (origin
5841 (method url-fetch)
5842 (uri (string-append
5843 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5844 version
5845 ".tar.gz"))
5846 (sha256
5847 (base32
5848 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5849 (build-system python-build-system)
328bb95d 5850 (native-inputs
f3b98f4f 5851 `(("python-nose" ,python-nose)
61b9ac53
FB
5852 ("python-cython" ,python-cython)))
5853 (home-page "https://github.com/lepture/mistune")
5854 (synopsis "Markdown parser in pure Python")
5855 (description "This package provides a fast markdown parser in pure
5856Python.")
3f641af0 5857 (license license:bsd-3)))
61b9ac53
FB
5858
5859(define-public python2-mistune
5860 (package-with-python2 python-mistune))
6d992d07 5861
b9893908
EE
5862(define-public python-markdown
5863 (package
5864 (name "python-markdown")
5865 (version "2.6.5")
5866 (source
5867 (origin
5868 (method url-fetch)
5869 (uri (pypi-uri "Markdown" version))
5870 (sha256
5871 (base32
5872 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5873 (build-system python-build-system)
5874 (arguments
5875 `(#:phases
5876 (modify-phases %standard-phases
5877 (replace 'check
5878 (lambda _
5879 (zero? (system* "python" "run-tests.py")))))))
5880 (native-inputs
5881 `(("python-nose" ,python-nose)
5882 ("python-pyyaml" ,python-pyyaml)))
5883 (home-page "https://pythonhosted.org/Markdown/")
5884 (synopsis "Python implementation of Markdown")
5885 (description
5886 "This package provides a Python implementation of John Gruber's
5887Markdown. The library features international input, various Markdown
5888extensions, and several HTML output formats. A command line wrapper
5889markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5890 (license license:bsd-3)))
b9893908
EE
5891
5892(define-public python2-markdown
5893 (package-with-python2 python-markdown))
5894
6d992d07
FB
5895(define-public python-ptyprocess
5896 (package
5897 (name "python-ptyprocess")
5898 (version "0.5")
5899 (source
5900 (origin
5901 (method url-fetch)
5902 (uri (string-append
5903 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5904 version ".tar.gz"))
5905 (sha256
5906 (base32
5907 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5908 (build-system python-build-system)
328bb95d 5909 (native-inputs
f3b98f4f 5910 `(("python-nose" ,python-nose)))
6d992d07
FB
5911 (arguments
5912 `(#:phases
5913 (modify-phases %standard-phases
5914 (replace 'check
5915 (lambda _
5916 (zero? (system* "nosetests")))))))
5917 (home-page "https://github.com/pexpect/ptyprocess")
5918 (synopsis "Run a subprocess in a pseudo terminal")
5919 (description
5920 "This package provides a Python library used to launch a subprocess in a
5921pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5922 (license license:isc)))
6d992d07
FB
5923
5924(define-public python2-ptyprocess
5925 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5926
5927(define-public python-terminado
5928 (package
5929 (name "python-terminado")
783fb0a3 5930 (version "0.6")
4aadb1df
FB
5931 (source
5932 (origin
5933 (method url-fetch)
783fb0a3 5934 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5935 (sha256
5936 (base32
783fb0a3 5937 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5938 (build-system python-build-system)
5939 (propagated-inputs
5940 `(("python-tornado" ,python-tornado)
5941 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5942 (native-inputs
5943 `(("python-nose" ,python-nose)))
4aadb1df
FB
5944 (arguments
5945 `(#:phases
5946 (modify-phases %standard-phases
5947 (replace 'check
5948 (lambda _
5949 (zero? (system* "nosetests")))))))
5950 (home-page "https://github.com/takluyver/terminado")
5951 (synopsis "Terminals served to term.js using Tornado websockets")
5952 (description "This package provides a Tornado websocket backend for the
5953term.js Javascript terminal emulator library.")
3f641af0 5954 (license license:bsd-2)
783fb0a3 5955 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5956
5957(define-public python2-terminado
783fb0a3 5958 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5959 (package (inherit terminado)
783fb0a3
EF
5960 (propagated-inputs
5961 `(("python2-backport-ssl-match-hostname"
5962 ,python2-backport-ssl-match-hostname)
00e10c6e 5963 ,@(package-propagated-inputs terminado))))))
5faa5ce4 5964
d582eaac
SB
5965(define-public python-fonttools
5966 (package
5967 (name "python-fonttools")
5968 (version "2.5")
5969 (source (origin
5970 (method url-fetch)
5971 (uri (string-append
5972 "https://pypi.python.org/packages/source/F/FontTools/"
5973 "fonttools-" version ".tar.gz"))
5974 (sha256
5975 (base32
5976 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5977 (build-system python-build-system)
9e8c6a37
HG
5978 (arguments
5979 '(#:test-target "check"
5980 #:phases
5981 (modify-phases %standard-phases
5982 (add-after 'unpack 'patch-setuppy
5983 ;; Remove the undocumented "extra_path" argument, which adds an
5984 ;; intervening directories between site-packages and the package
5985 ;; directory.
5986 (lambda _
5987 (substitute* "setup.py"
5988 (("^[ \t]*extra_path *= *'FontTools',") ""))
5989 #t)))))
d582eaac
SB
5990 (home-page "http://github.com/behdad/fonttools")
5991 (synopsis "Tools to manipulate font files")
5992 (description
5993 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 5994supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
5995of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5996also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5997from an XML-based format.")
3f641af0
DC
5998 (license (license:non-copyleft
5999 "file://LICENSE.txt"
6000 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6001
6002(define-public python2-fonttools
6003 (package-with-python2 python-fonttools))
75710da6 6004
5faa5ce4
RW
6005(define-public python-ly
6006 (package
6007 (name "python-ly")
5135354f 6008 (version "0.9.4")
5faa5ce4
RW
6009 (source
6010 (origin
6011 (method url-fetch)
5135354f
RW
6012 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6013 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6014 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6015 (sha256
6016 (base32
5135354f 6017 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6018 (build-system python-build-system)
5faa5ce4
RW
6019 (synopsis "Tool and library for manipulating LilyPond files")
6020 (description "This package provides a Python library to parse, manipulate
6021or create documents in LilyPond format. A command line program ly is also
6022provided that can be used to do various manipulations with LilyPond files.")
6023 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6024 (license license:gpl2+)))
7e7b27d9
CR
6025
6026(define-public python-appdirs
6027 (package
6028 (name "python-appdirs")
6029 (version "1.4.0")
6030 (source
6031 (origin
6032 (method url-fetch)
6033 (uri (string-append
6034 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6035 version
6036 ".tar.gz"))
6037 (sha256
6038 (base32
6039 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6040 (build-system python-build-system)
7e7b27d9
CR
6041 (home-page "http://github.com/ActiveState/appdirs")
6042 (synopsis
6043 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6044 (description
6045 "This module provides a portable way of finding out where user data
6046should be stored on various operating systems.")
6047 (license license:expat)))
6048
6049(define-public python2-appdirs
6050 (package-with-python2 python-appdirs))
89b2e0b0
LF
6051
6052(define-public python-llfuse
6053 (package
6054 (name "python-llfuse")
e36ace36 6055 (version "1.1.1")
89b2e0b0
LF
6056 (source (origin
6057 (method url-fetch)
6058 (uri (string-append
6059 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6060 "llfuse-" version ".tar.bz2"))
6061 (sha256
6062 (base32
e36ace36 6063 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6064 (build-system python-build-system)
6065 (inputs
6066 `(("fuse" ,fuse)
6067 ("attr" ,attr)))
6068 (native-inputs
f3b98f4f 6069 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6070 (synopsis "Python bindings for FUSE")
6071 (description
6072 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6073 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6074 (license license:lgpl2.0+)
cd0569c4 6075 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6076
6077(define-public python2-llfuse
cd0569c4
LF
6078 (package (inherit (package-with-python2
6079 (strip-python2-variant python-llfuse)))
6080 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6081
6082;; For attic-0.16
6083(define-public python-llfuse-0.41
6084 (package (inherit python-llfuse)
229b3661 6085 (version "0.41.1")
cd0569c4
LF
6086 (source (origin
6087 (method url-fetch)
6088 (uri (string-append
6089 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6090 "llfuse-" version ".tar.bz2"))
6091 (sha256
6092 (base32
229b3661 6093 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6094 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6095 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6096 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6097
6098(define-public python-msgpack
6099 (package
6100 (name "python-msgpack")
aed625bd 6101 (version "0.4.8")
641c9871
LF
6102 (source (origin
6103 (method url-fetch)
ae831df4 6104 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6105 (sha256
6106 (base32
aed625bd 6107 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6108 (build-system python-build-system)
641c9871
LF
6109 (synopsis "MessagePack (de)serializer")
6110 (description "MessagePack is a fast, compact binary serialization format,
6111suitable for similar data to JSON. This package provides CPython bindings for
6112reading and writing MessagePack data.")
6113 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6114 (license license:asl2.0)))
bd74be7b
LF
6115
6116(define-public python2-msgpack
f210e944 6117 (package-with-python2 python-msgpack))
641c9871 6118
6e5e39f4
CR
6119(define-public python-netaddr
6120 (package
6121 (name "python-netaddr")
6122 (version "0.7.18")
6123 (source
6124 (origin
6125 (method url-fetch)
6126 (uri (string-append
6127 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6128 version
6129 ".tar.gz"))
6130 (sha256
6131 (base32
6132 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6133 (build-system python-build-system)
6134 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6135 (home-page "https://github.com/drkjam/netaddr/")
6136 (synopsis "Pythonic manipulation of network addresses")
6137 (description
6138 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6139and MAC network addresses.")
3f641af0 6140 (license license:bsd-3)))
6e5e39f4
CR
6141
6142(define-public python2-netaddr
6143 (package-with-python2 python-netaddr))
8c692a52
CR
6144
6145(define-public python-wrapt
6146 (package
6147 (name "python-wrapt")
6148 (version "1.10.5")
6149 (source
6150 (origin
6151 (method url-fetch)
6152 (uri (string-append
6153 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6154 version
6155 ".tar.gz"))
6156 (sha256
6157 (base32
6158 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6159 (build-system python-build-system)
6160 (arguments
6161 ;; Tests are not included in the tarball, they are only available in the
6162 ;; git repository.
6163 `(#:tests? #f))
8c692a52
CR
6164 (home-page "https://github.com/GrahamDumpleton/wrapt")
6165 (synopsis "Module for decorators, wrappers and monkey patching")
6166 (description
6167 "The aim of the wrapt module is to provide a transparent object proxy for
6168 Python, which can be used as the basis for the construction of function
6169 wrappers and decorator functions.")
3f641af0 6170 (license license:bsd-2)))
8c692a52
CR
6171
6172(define-public python2-wrapt
6173 (package-with-python2 python-wrapt))
b85c85be
CR
6174
6175(define-public python-iso8601
6176 (package
6177 (name "python-iso8601")
fe84bc9a 6178 (version "0.1.11")
b85c85be
CR
6179 (source
6180 (origin
6181 (method url-fetch)
fe84bc9a 6182 (uri (pypi-uri "iso8601" version))
b85c85be 6183 (sha256
fe84bc9a
EF
6184 (base32
6185 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6186 (build-system python-build-system)
b85c85be
CR
6187 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6188 (synopsis "Module to parse ISO 8601 dates")
6189 (description
6190 "This module parses the most common forms of ISO 8601 date strings (e.g.
6191@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6192 (license license:expat)))
6193
6194(define-public python2-iso8601
6195 (package-with-python2 python-iso8601))
5e412b63
CR
6196
6197(define-public python-monotonic
6198 (package
6199 (name "python-monotonic")
6200 (version "0.3")
6201 (source
6202 (origin
6203 (method url-fetch)
6204 (uri (string-append
6205 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6206 version
6207 ".tar.gz"))
6208 (sha256
6209 (base32
6210 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6211 (build-system python-build-system)
5e412b63
CR
6212 (home-page "https://github.com/atdt/monotonic")
6213 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6214 (description
6215 "This module provides a monotonic() function which returns the value (in
6216fractional seconds) of a clock which never goes backwards.")
3f641af0 6217 (license license:asl2.0)))
5e412b63
CR
6218
6219(define-public python2-monotonic
6220 (package-with-python2 python-monotonic))
de34afac
CR
6221
6222(define-public python-webob
6223 (package
6224 (name "python-webob")
b8834c21 6225 (version "1.5.1")
de34afac
CR
6226 (source
6227 (origin
6228 (method url-fetch)
b8834c21 6229 (uri (pypi-uri "WebOb" version))
de34afac
CR
6230 (sha256
6231 (base32
b8834c21 6232 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6233 (build-system python-build-system)
328bb95d 6234 (native-inputs
f3b98f4f 6235 `(("python-nose" ,python-nose)))
de34afac
CR
6236 (home-page "http://webob.org/")
6237 (synopsis "WSGI request and response object")
6238 (description
6239 "WebOb provides wrappers around the WSGI request environment, and an
6240object to help create WSGI responses.")
6241 (license license:expat)))
6242
6243(define-public python2-webob
6244 (package-with-python2 python-webob))
350ba0a3 6245
02a8a187
BW
6246(define-public python-xlrd
6247 (package
6248 (name "python-xlrd")
c2ad4d70 6249 (version "1.0.0")
02a8a187
BW
6250 (source (origin
6251 (method url-fetch)
e775f48e 6252 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6253 (sha256
6254 (base32
c2ad4d70 6255 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6256 (build-system python-build-system)
6257 (arguments
6258 `(#:phases
6259 (modify-phases %standard-phases
c2ad4d70 6260 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6261 ;; run tests instead for now.
6262 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6263 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6264 (home-page "http://www.python-excel.org/")
6265 (synopsis "Library for extracting data from Excel files")
6266 (description "This packages provides a library to extract data from
c598e35c 6267spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6268@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6269Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6270 (license license:bsd-3)))
02a8a187
BW
6271
6272(define-public python2-xlrd
6273 (package-with-python2 python-xlrd))
6274
350ba0a3
CR
6275(define-public python-prettytable
6276 (package
6277 (name "python-prettytable")
6278 (version "0.7.2")
6279 (source
6280 (origin
6281 (method url-fetch)
6282 (uri (string-append
6283 "https://pypi.python.org/packages/source/P/PrettyTable/"
6284 "prettytable-" version ".tar.bz2"))
6285 (sha256
6286 (base32
6287 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6288 (build-system python-build-system)
350ba0a3
CR
6289 (home-page "http://code.google.com/p/prettytable/")
6290 (synopsis "Display tabular data in an ASCII table format")
6291 (description
6292 "A library designed to represent tabular data in visually appealing ASCII
6293tables. PrettyTable allows for selection of which columns are to be printed,
6294independent alignment of columns (left or right justified or centred) and
6295printing of sub-tables by specifying a row range.")
3f641af0 6296 (license license:bsd-3)))
350ba0a3
CR
6297
6298(define-public python2-prettytable
6299 (package-with-python2 python-prettytable))
7a8ac75a 6300
9f8ee3fe
RW
6301(define-public python-tables
6302 (package
6303 (name "python-tables")
6304 (version "3.2.2")
6305 (source
6306 (origin
6307 (method url-fetch)
6308 (uri (pypi-uri "tables" version))
6309 (sha256
6310 (base32
bac23672
HG
6311 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6312 (modules '((guix build utils)))
6313 (snippet
6314 '(begin
6315 ;; Remove pre-compiled .pyc files from source.
6316 (for-each delete-file-recursively
6317 (find-files "." "__pycache__" #:directories? #t))
6318 (for-each delete-file (find-files "." "\\.pyc$"))
6319 #t))))
9f8ee3fe
RW
6320 (build-system python-build-system)
6321 (arguments
6322 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6323 ;; or "check", so we must override the build and check phases.
6324 #:phases
6325 (modify-phases %standard-phases
6326 (add-after 'unpack 'use-gcc
6327 (lambda _
6328 (substitute* "setup.py"
6329 (("compiler = new_compiler\\(\\)" line)
6330 (string-append line
6331 "\ncompiler.set_executables(compiler='gcc',"
6332 "compiler_so='gcc',"
6333 "linker_exe='gcc',"
6334 "linker_so='gcc -shared')")))
6335 #t))
6336 (replace 'build
6337 (lambda* (#:key inputs #:allow-other-keys)
6338 (zero? (system* "python" "setup.py" "build"
6339 (string-append "--hdf5="
6340 (assoc-ref inputs "hdf5"))))))
6341 (replace 'check
6342 (lambda* (#:key inputs #:allow-other-keys)
6343 (zero? (system* "python" "setup.py" "check"
6344 (string-append "--hdf5="
6345 (assoc-ref inputs "hdf5")))))))))
6346 (propagated-inputs
6347 `(("python-numexpr" ,python-numexpr)
6348 ("python-numpy" ,python-numpy)))
6349 (native-inputs
f3b98f4f 6350 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6351 ("pkg-config" ,pkg-config)))
6352 (inputs
6353 `(("hdf5" ,hdf5)
6354 ("bzip2" ,bzip2)
6355 ("zlib" ,zlib)))
6356 (home-page "http://www.pytables.org/")
6357 (synopsis "Hierarchical datasets for Python")
6358 (description "PyTables is a package for managing hierarchical datasets and
6359designed to efficently cope with extremely large amounts of data.")
3f641af0 6360 (license license:bsd-3)))
9f8ee3fe
RW
6361
6362(define-public python2-tables
6363 (package-with-python2 python-tables))
6364
7a8ac75a
RW
6365(define-public python-pyasn1
6366 (package
6367 (name "python-pyasn1")
caa0edb3 6368 (version "0.1.9")
7a8ac75a
RW
6369 (source
6370 (origin
6371 (method url-fetch)
caa0edb3 6372 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6373 (sha256
6374 (base32
caa0edb3 6375 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6376 (build-system python-build-system)
6377 (home-page "http://pyasn1.sourceforge.net/")
6378 (synopsis "ASN.1 types and codecs")
6379 (description
6380 "This is an implementation of ASN.1 types and codecs in Python. It is
6381suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6382 (license license:bsd-2)))
7a8ac75a
RW
6383
6384(define-public python2-pyasn1
6385 (package-with-python2 python-pyasn1))
9a49a535 6386
5988c299
EF
6387(define-public python-pyasn1-modules
6388 (package
6389 (name "python-pyasn1-modules")
6390 (version "0.0.8")
6391 (source
6392 (origin
6393 (method url-fetch)
6394 (uri (pypi-uri "pyasn1-modules" version))
6395 (sha256
6396 (base32
6397 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6398 (build-system python-build-system)
5988c299
EF
6399 (propagated-inputs
6400 `(("python-pyasn1" ,python-pyasn1)))
6401 (home-page "http://sourceforge.net/projects/pyasn1/")
6402 (synopsis "ASN.1 codec implementations")
6403 (description
6404 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6405implementations of ASN.1-based codecs and protocols.")
3f641af0 6406 (license license:bsd-3)))
5988c299
EF
6407
6408(define-public python2-pyasn1-modules
6409 (package-with-python2 python-pyasn1-modules))
6410
520af157 6411(define-public python-ipaddress
9a49a535 6412 (package
520af157
DC
6413 (name "python-ipaddress")
6414 (version "1.0.16")
6415 (source (origin
6416 (method url-fetch)
6417 (uri (pypi-uri "ipaddress" version))
6418 (sha256
6419 (base32
6420 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6421 (build-system python-build-system)
9a49a535
RW
6422 (home-page "https://github.com/phihag/ipaddress")
6423 (synopsis "IP address manipulation library")
6424 (description
520af157
DC
6425 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6426 in Python. This library is used to create, poke at, and manipulate IPv4 and
6427 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6428 module to older versions of Python.")
f210e944 6429 (license license:psfl)))
520af157
DC
6430
6431(define-public python2-ipaddress
f210e944 6432 (package-with-python2 python-ipaddress))
3f00e078 6433
4a238186
HG
6434(define-public python2-ipaddr
6435 (package
6436 (name "python2-ipaddr")
6437 (version "2.1.11")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (pypi-uri "ipaddr" version))
6442 (sha256
6443 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6444 (build-system python-build-system)
6445 (arguments
6446 `(#:python ,python-2 ;version 2 only
6447 #:phases
6448 (modify-phases %standard-phases
6449 (replace 'check
6450 (lambda* _
6451 (zero? (system* "python" "ipaddr_test.py")))))))
6452 (home-page "https://github.com/google/ipaddr-py")
6453 (synopsis "IP address manipulation library")
6454 (description
6455 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6456IPv6 addresses and networks.
6457
6458For new implementations you may prefer to use the standard module
6459@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6460versions of Python.")
3f641af0 6461 (license license:asl2.0)))
4a238186 6462
3f00e078
RW
6463(define-public python-idna
6464 (package
6465 (name "python-idna")
6466 (version "2.0")
6467 (source
6468 (origin
6469 (method url-fetch)
6470 (uri (string-append "https://pypi.python.org/packages/source/i/"
6471 "idna/idna-" version ".tar.gz"))
6472 (sha256
6473 (base32
6474 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6475 (build-system python-build-system)
3f00e078
RW
6476 (home-page "https://github.com/kjd/idna")
6477 (synopsis "Internationalized domain names in applications")
6478 (description
6479 "This is a library to support the Internationalised Domain Names in
6480Applications (IDNA) protocol as specified in RFC 5891. This version of the
6481protocol is often referred to as “IDNA2008” and can produce different results
6482from the earlier standard from 2003. The library is also intended to act as a
6483suitable drop-in replacement for the “encodings.idna” module that comes with
6484the Python standard library but currently only supports the older 2003
6485specification.")
3f641af0 6486 (license license:bsd-4)))
3f00e078
RW
6487
6488(define-public python2-idna
6489 (package-with-python2 python-idna))
36ebf972
RW
6490
6491(define-public python-pretend
6492 (package
6493 (name "python-pretend")
6494 (version "1.0.8")
6495 (source
6496 (origin
6497 (method url-fetch)
6498 (uri (string-append "https://pypi.python.org/packages/source/p/"
6499 "pretend/pretend-" version ".tar.gz"))
6500 (sha256
6501 (base32
6502 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6503 (build-system python-build-system)
36ebf972
RW
6504 (home-page "https://github.com/alex/pretend")
6505 (synopsis "Library for stubbing in Python")
6506 (description
6507 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6508technique for writing tests. You may hear the term mixed up with mocks,
6509fakes, or doubles. Basically, a stub is an object that returns pre-canned
6510responses, rather than doing any computation.")
3f641af0 6511 (license license:bsd-3)))
36ebf972
RW
6512
6513(define-public python2-pretend
6514 (package-with-python2 python-pretend))
aa759a51
RW
6515
6516(define-public python-cryptography-vectors
6517 (package
6518 (name "python-cryptography-vectors")
27fab2bf 6519 (version "1.7.1")
aa759a51
RW
6520 (source
6521 (origin
6522 (method url-fetch)
9c509ca9 6523 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6524 (sha256
6525 (base32
27fab2bf 6526 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
aa759a51 6527 (build-system python-build-system)
aa759a51 6528 (home-page "https://github.com/pyca/cryptography")
66e07664 6529 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6530 (description
6531 "This package contains test vectors for the cryptography package.")
6532 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6533 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6534
6535(define-public python2-cryptography-vectors
6536 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6537
6538(define-public python-cryptography
6539 (package
6540 (name "python-cryptography")
27fab2bf 6541 (version "1.7.1")
88b47cb0
RW
6542 (source
6543 (origin
6544 (method url-fetch)
9c509ca9 6545 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6546 (sha256
6547 (base32
27fab2bf 6548 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
88b47cb0
RW
6549 (build-system python-build-system)
6550 (inputs
6551 `(("openssl" ,openssl)))
6552 (propagated-inputs
6553 `(("python-cffi" ,python-cffi)
6554 ("python-six" ,python-six)
6555 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6556 ("python-idna" ,python-idna)
6557 ("python-iso8601" ,python-iso8601)))
6558 (native-inputs
6559 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6560 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6561 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6562 ("python-pyasn1" ,python-pyasn1)
6563 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6564 ("python-pytz" ,python-pytz)
6565 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6566 (home-page "https://github.com/pyca/cryptography")
6567 (synopsis "Cryptographic recipes and primitives for Python")
6568 (description
6569 "cryptography is a package which provides cryptographic recipes and
6570primitives to Python developers. It aims to be the “cryptographic standard
6571library” for Python. The package includes both high level recipes, and low
6572level interfaces to common cryptographic algorithms such as symmetric ciphers,
6573message digests and key derivation functions.")
6574 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6575 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6576 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6577
6578(define-public python2-cryptography
519e2f4f
LF
6579 (let ((crypto (package-with-python2
6580 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6581 (package (inherit crypto)
6582 (propagated-inputs
6583 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6584 ("python2-backport-ssl-match-hostname"
6585 ,python2-backport-ssl-match-hostname)
68f1cdec 6586 ("python2-enum34" ,python2-enum34)
88b47cb0 6587 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6588
6589(define-public python-pyopenssl
6590 (package
6591 (name "python-pyopenssl")
61684de2 6592 (version "16.2.0")
5af999b8
RW
6593 (source
6594 (origin
6595 (method url-fetch)
eb68d268 6596 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6597 (sha256
6598 (base32
61684de2 6599 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6600 (build-system python-build-system)
5af999b8
RW
6601 (propagated-inputs
6602 `(("python-cryptography" ,python-cryptography)
6603 ("python-six" ,python-six)))
6604 (inputs
6605 `(("openssl" ,openssl)))
5af999b8
RW
6606 (home-page "https://github.com/pyca/pyopenssl")
6607 (synopsis "Python wrapper module around the OpenSSL library")
6608 (description
6609 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6610library.")
3f641af0 6611 (license license:asl2.0)))
5af999b8
RW
6612
6613(define-public python2-pyopenssl
519e2f4f 6614 (package-with-python2 python-pyopenssl))
643725a1
CR
6615
6616(define-public python-pip
6617 (package
6618 (name "python-pip")
6fb54e3b 6619 (version "8.0.2")
643725a1
CR
6620 (source
6621 (origin
6622 (method url-fetch)
6fb54e3b 6623 (uri (pypi-uri "pip" version))
643725a1
CR
6624 (sha256
6625 (base32
6fb54e3b 6626 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1 6627 (build-system python-build-system)
05e2e4cf
HG
6628 (native-inputs
6629 `(;; Tests
6630 ("python-virtualenv" ,python-virtualenv)
643725a1
CR
6631 ("python-mock" ,python-mock)
6632 ("python-pytest" ,python-pytest)
6633 ("python-scripttest" ,python-scripttest)))
6634 (home-page "https://pip.pypa.io/")
6635 (synopsis
6636 "Package manager for Python software")
6637 (description
6638 "Pip is a package manager for Python software, that finds packages on the
6639Python Package Index (PyPI).")
6640 (license license:expat)))
6641
6642(define-public python2-pip
6643 (package-with-python2 python-pip))
d8c4998f
LC
6644
6645(define-public python-tlsh
6646 (package
6647 (name "python-tlsh")
99b00dc7 6648 (version "3.4.4")
d8c4998f
LC
6649 (home-page "https://github.com/trendmicro/tlsh")
6650 (source (origin
99b00dc7
EF
6651 (method url-fetch)
6652 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6653 version ".tar.gz"))
d8c4998f
LC
6654 (sha256
6655 (base32
99b00dc7
EF
6656 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6657 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6658 (build-system cmake-build-system)
6659 (arguments
6660 '(#:out-of-source? #f
6661 #:phases (modify-phases %standard-phases
6662 (replace
6663 'install
6664 (lambda* (#:key outputs #:allow-other-keys)
6665 ;; Build and install the Python bindings. The underlying
6666 ;; C++ library is apparently not meant to be installed.
6667 (let ((out (assoc-ref outputs "out")))
6668 (with-directory-excursion "py_ext"
6669 (and (system* "python" "setup.py" "build")
6670 (system* "python" "setup.py" "install"
6671 (string-append "--prefix=" out))))))))))
6672 (inputs `(("python" ,python-wrapper))) ;for the bindings
6673 (synopsis "Fuzzy matching library for Python")
6674 (description
6675 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6676Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6677value which can be used for similarity comparisons. Similar objects have
6678similar hash values, which allows for the detection of similar objects by
6679comparing their hash values. The byte stream should have a sufficient amount
6680of complexity; for example, a byte stream of identical bytes will not generate
6681a hash value.")
3f641af0 6682 (license license:asl2.0)))
d8c4998f
LC
6683
6684(define-public python2-tlsh
6685 (package
6686 (inherit python-tlsh)
6687 (name "python2-tlsh")
6688 (inputs `(("python" ,python-2)))))
d96034ed 6689
67f66812
BW
6690(define-public python-termcolor
6691 (package
6692 (name "python-termcolor")
6693 (version "1.1.0")
6694 (source
6695 (origin
6696 (method url-fetch)
6697 (uri (pypi-uri "python-termcolor" version))
6698 (sha256
6699 (base32
6700 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6701 (build-system python-build-system)
6702 (arguments
6703 ;; There are no tests.
6704 `(#:tests? #f))
6705 (home-page "http://pypi.python.org/pypi/termcolor")
6706 (synopsis "ANSII Color formatting for terminal output")
6707 (description
6708 "This package provides ANSII Color formatting for output in terminals.")
6709 (license license:expat)))
6710
6711(define-public python2-termcolor
6712 (package-with-python2 python-termcolor))
6713
d96034ed
LC
6714(define-public python-libarchive-c
6715 (package
6716 (name "python-libarchive-c")
03fd001c 6717 (version "2.2")
d96034ed
LC
6718 (source (origin
6719 (method url-fetch)
03fd001c 6720 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6721 (sha256
6722 (base32
03fd001c 6723 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6724 (build-system python-build-system)
6725 (arguments
6726 '(#:phases (modify-phases %standard-phases
6727 (add-before
6728 'build 'reference-libarchive
6729 (lambda* (#:key inputs #:allow-other-keys)
6730 ;; Retain the absolute file name of libarchive.so.
6731 (let ((libarchive (assoc-ref inputs "libarchive")))
6732 (substitute* "libarchive/ffi.py"
6733 (("find_library\\('archive'\\)")
6734 (string-append "'" libarchive
b41a05ce 6735 "/lib/libarchive.so'")))))))))
d96034ed 6736 (inputs
f3b98f4f 6737 `(("libarchive" ,libarchive)))
d96034ed
LC
6738 (home-page "https://github.com/Changaco/python-libarchive-c")
6739 (synopsis "Python interface to libarchive")
6740 (description
6741 "This package provides Python bindings to libarchive, a C library to
6742access possibly compressed archives in many different formats. It uses
6743Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6744 (license license:lgpl2.0+)))
d96034ed
LC
6745
6746(define-public python2-libarchive-c
6747 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6748
6749(define-public python-file
6750 (package
6751 (inherit file)
6752 (name "python-file")
7ffa5d4a
LF
6753 (source (origin
6754 (inherit (package-source file))
6755 ;; This patch should not be applied to python2-file.
6756 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6757 (build-system python-build-system)
6758 (arguments
6759 '(#:tests? #f ;no tests
00bf74be 6760 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6761 #:phases (modify-phases %standard-phases
6762 (add-before 'build 'change-directory
6763 (lambda _
6764 (chdir "python")
6765 #t))
6766 (add-before 'build 'set-library-file-name
6767 (lambda* (#:key inputs #:allow-other-keys)
6768 (let ((file (assoc-ref inputs "file")))
6769 (substitute* "magic.py"
6770 (("find_library\\('magic'\\)")
6771 (string-append "'" file "/lib/libmagic.so'")))
6772 #t))))))
6773 (inputs `(("file" ,file)))
6774 (self-native-input? #f)
daeeea71
CM
6775 (synopsis "Python bindings to the libmagic file type guesser. Note that
6776this module and the python-magic module both provide a \"magic.py\" file;
6777these two modules, which are different and were developed separately, both
f210e944 6778serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6779
6780(define-public python2-file
f210e944 6781 (package-with-python2 python-file))
85d4aeac
LC
6782
6783(define-public python-debian
6784 (package
6785 (name "python-debian")
6786 (version "0.1.23")
6787 (source
6788 (origin
6789 (method url-fetch)
6790 (uri (string-append
6791 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6792 version ".tar.gz"))
6793 (sha256
6794 (base32
6795 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6796 (build-system python-build-system)
f22efa01 6797 (propagated-inputs
85d4aeac 6798 `(("python-six" ,python-six)))
85d4aeac
LC
6799 (home-page "http://packages.debian.org/sid/python-debian")
6800 (synopsis "Debian package related modules")
6801 (description
5c7bdc9a
LC
6802 ;; XXX: Use @enumerate instead of @itemize to work around
6803 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6804 "This package provides Python modules that abstract many formats of
6805Debian-related files, such as:
6806
5c7bdc9a 6807@enumerate
85d4aeac
LC
6808@item Debtags information;
6809@item @file{debian/changelog} files;
6810@item packages files, pdiffs;
6811@item control files of single or multiple RFC822-style paragraphs---e.g.
6812 @file{debian/control}, @file{.changes}, @file{.dsc};
6813@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6814 contained files and meta-information.
5c7bdc9a 6815@end enumerate\n")
85d4aeac
LC
6816
6817 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6818 (license license:gpl3+)))
85d4aeac
LC
6819
6820(define-public python2-debian
6821 (package-with-python2 python-debian))
816a6538 6822
2d321bb2
RW
6823(define-public python-nbformat
6824 (package
6825 (name "python-nbformat")
6826 (version "4.1.0")
6827 (source
6828 (origin
6829 (method url-fetch)
6830 (uri (pypi-uri "nbformat" version))
6831 (sha256
6832 (base32
6833 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6834 (build-system python-build-system)
6835 (arguments `(#:tests? #f)) ; no test target
6836 (propagated-inputs
6837 `(("python-ipython-genutils" ,python-ipython-genutils)
6838 ("python-jsonschema" ,python-jsonschema)
6839 ("python-jupyter-core" ,python-jupyter-core)
6840 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6841 (home-page "http://jupyter.org")
6842 (synopsis "Jupyter Notebook format")
6843 (description "This package provides the reference implementation of the
6844Jupyter Notebook format and Python APIs for working with notebooks.")
6845 (license license:bsd-3)))
6846
6847(define-public python2-nbformat
6848 (package-with-python2 python-nbformat))
6849
55436048
RW
6850(define-public python-bleach
6851 (package
6852 (name "python-bleach")
6853 (version "1.4.3")
6854 (source
6855 (origin
6856 (method url-fetch)
6857 (uri (pypi-uri "bleach" version))
6858 (sha256
6859 (base32
6860 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6861 (build-system python-build-system)
6862 (propagated-inputs
6863 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6864 ("python-six" ,python-six)))
6865 (native-inputs
6866 `(("python-nose" ,python-nose)))
6867 (home-page "http://github.com/jsocol/bleach")
6868 (synopsis "Whitelist-based HTML-sanitizing tool")
6869 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6870 (license license:asl2.0)))
6871
6872(define-public python2-bleach
6873 (package-with-python2 python-bleach))
6874
60590a3a
RW
6875(define-public python-entrypoints
6876 (package
6877 (name "python-entrypoints")
6878 (version "0.2.2")
6879 (source
6880 (origin
6881 (method url-fetch)
6882 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6883 version ".tar.gz"))
6884 (file-name (string-append name "-" version ".tar.gz"))
6885 (sha256
6886 (base32
6887 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6888 (build-system python-build-system)
6889 ;; The package does not come with a setup.py file, so we have to generate
6890 ;; one ourselves.
6891 (arguments
6892 `(#:tests? #f
6893 #:phases
6894 (modify-phases %standard-phases
6895 (add-after 'unpack 'create-setup.py
6896 (lambda _
6897 (call-with-output-file "setup.py"
6898 (lambda (port)
6899 (format port "\
6900from setuptools import setup
6901setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6902" ,version))))))))
6903 (home-page "https://github.com/takluyver/entrypoints")
6904 (synopsis "Discover and load entry points from installed Python packages")
6905 (description "Entry points are a way for Python packages to advertise
6906objects with some common interface. The most common examples are
6907@code{console_scripts} entry points, which define shell commands by
6908identifying a Python function to run. The @code{entrypoints} module contains
6909functions to find and load entry points.")
6910 (license license:expat)))
6911
6912(define-public python2-entrypoints
6913 (package-with-python2 python-entrypoints))
6914
c60898a8
RW
6915(define-public python-nbconvert
6916 (package
6917 (name "python-nbconvert")
6918 (version "5.0.0b1")
6919 (source
6920 (origin
6921 (method url-fetch)
6922 (uri (pypi-uri "nbconvert" version))
6923 (sha256
6924 (base32
6925 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6926 (build-system python-build-system)
6927 ;; The "bdist_egg" target is disabled by default, causing the installation
6928 ;; to fail.
6929 (arguments `(#:configure-flags (list "bdist_egg")))
6930 (propagated-inputs
6931 `(("python-bleach" ,python-bleach)
6932 ("python-entrypoints" ,python-entrypoints)
6933 ("python-jinja2" ,python-jinja2)
6934 ("python-jupyter-core" ,python-jupyter-core)
6935 ("python-mistune" ,python-mistune)
6936 ("python-nbformat" ,python-nbformat)
6937 ("python-pygments" ,python-pygments)
c60898a8
RW
6938 ("python-traitlets" ,python-traitlets)))
6939 (home-page "http://jupyter.org")
6940 (synopsis "Converting Jupyter Notebooks")
6941 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6942notebooks to various other formats via Jinja templates. It allows you to
6943convert an @code{.ipynb} notebook file into various static formats including:
6944
6945@enumerate
6946@item HTML
6947@item LaTeX
6948@item PDF
6949@item Reveal JS
6950@item Markdown (md)
6951@item ReStructured Text (rst)
6952@item executable script
6953@end enumerate\n")
6954 (license license:bsd-3)))
6955
6956(define-public python2-nbconvert
6957 (package-with-python2 python-nbconvert))
6958
a0d62280
RW
6959(define-public python-notebook
6960 (package
6961 (name "python-notebook")
6962 (version "4.2.3")
6963 (source (origin
6964 (method url-fetch)
6965 (uri (pypi-uri "notebook" version))
6966 (sha256
6967 (base32
6968 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6969 (build-system python-build-system)
6970 (arguments
6971 `(#:phases
6972 (modify-phases %standard-phases
6973 (replace 'check
6974 (lambda _
6975 ;; HOME must be set for tests
6976 (setenv "HOME" "/tmp")
6977 (zero? (system* "nosetests")))))))
6978 (propagated-inputs
6979 `(("python-jupyter-core" ,python-jupyter-core)
6980 ("python-nbformat" ,python-nbformat)
6981 ("python-nbconvert" ,python-nbconvert)
6982 ("python-ipython" ,python-ipython)))
6983 (native-inputs
6984 `(("python-nose" ,python-nose)
6985 ("python-sphinx" ,python-sphinx)
6986 ("python-requests" ,python-requests)))
6987 (home-page "http://jupyter.org/")
6988 (synopsis "Web-based notebook environment for interactive computing")
6989 (description
6990 "The Jupyter HTML notebook is a web-based notebook environment for
6991interactive computing.")
3a735ecf 6992 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
6993 (license license:bsd-3)))
6994
6995(define-public python2-notebook
3a735ecf
HG
6996 (let ((base (package-with-python2
6997 (strip-python2-variant python-notebook))))
6998 (package (inherit base)
6999 (native-inputs
7000 `(("python2-mock" ,python2-mock)
7001 ,@(package-native-inputs base)))
7002 (arguments
7003 (substitute-keyword-arguments (package-arguments base)
7004 ((#:phases phases)
7005 `(modify-phases ,phases
7006 (add-before 'check 'disable-test-case
7007 ;; The test requires network access to localhost. Curiously it
7008 ;; fails with Python 2 only. Simply make the test-case return
7009 ;; immediately.
7010 (lambda _
7011 (substitute*
7012 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7013 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7014
d55724ed
RW
7015(define-public python-widgetsnbextension
7016 (package
7017 (name "python-widgetsnbextension")
7018 (version "1.2.6")
7019 (source
7020 (origin
7021 (method url-fetch)
7022 (uri (pypi-uri "widgetsnbextension" version))
7023 (sha256
7024 (base32
7025 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7026 (build-system python-build-system)
7027 (propagated-inputs
7028 `(("python-notebook" ,python-notebook)))
7029 (native-inputs
f3b98f4f 7030 `(("python-nose" ,python-nose)))
d55724ed
RW
7031 (home-page "http://ipython.org")
7032 (synopsis "IPython HTML widgets for Jupyter")
7033 (description "This package provides interactive HTML widgets for Jupyter
7034notebooks.")
7035 (license license:bsd-3)))
7036
7037(define-public python2-widgetsnbextension
7038 (package-with-python2 python-widgetsnbextension))
7039
4fe2e344
RW
7040(define-public python-ipywidgets
7041 (package
7042 (name "python-ipywidgets")
7043 (version "5.2.2")
7044 (source
7045 (origin
7046 (method url-fetch)
7047 (uri (pypi-uri "ipywidgets" version))
7048 (sha256
7049 (base32
7050 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7051 (build-system python-build-system)
7052 ;; FIXME: it's not clear how to run the tests.
7053 (arguments `(#:tests? #f))
7054 (propagated-inputs
7055 `(("python-ipykernel" ,python-ipykernel)
7056 ("python-ipython" ,python-ipython)
4fe2e344
RW
7057 ("python-traitlets" ,python-traitlets)
7058 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7059 (home-page "http://ipython.org")
7060 (synopsis "IPython HTML widgets for Jupyter")
7061 (description "Ipywidgets are interactive HTML widgets for Jupyter
7062notebooks and the IPython kernel. Notebooks come alive when interactive
7063widgets are used. Users gain control of their data and can visualize changes
7064in the data.")
7065 (license license:bsd-3)))
7066
7067(define-public python2-ipywidgets
7068 (package-with-python2 python-ipywidgets))
7069
8ceebf8f
RW
7070(define-public python-jupyter-console
7071 (package
7072 (name "python-jupyter-console")
7073 (version "5.0.0")
7074 (source
7075 (origin
7076 (method url-fetch)
7077 (uri (pypi-uri "jupyter_console" version))
7078 (sha256
7079 (base32
7080 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7081 (build-system python-build-system)
7082 ;; FIXME: it's not clear how to run the tests.
7083 (arguments `(#:tests? #f))
7084 (propagated-inputs
7085 `(("python-ipykernel" ,python-ipykernel)
7086 ("python-ipython" ,python-ipython)
7087 ("python-jupyter-client" ,python-jupyter-client)
7088 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7089 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7090 (home-page "https://jupyter.org")
7091 (synopsis "Jupyter terminal console")
7092 (description "This package provides a terminal-based console frontend for
7093Jupyter kernels. It also allows for console-based interaction with non-Python
7094Jupyter kernels such as IJulia and IRKernel.")
7095 (license license:bsd-3)))
7096
7097(define-public python2-jupyter-console
7098 (package-with-python2 python-jupyter-console))
7099
c27ae827
RW
7100(define-public jupyter
7101 (package
7102 (name "jupyter")
7103 (version "1.0.0")
7104 (source
7105 (origin
7106 (method url-fetch)
7107 (uri (pypi-uri "jupyter" version))
7108 (sha256
7109 (base32
7110 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7111 (build-system python-build-system)
7112 ;; FIXME: it's not clear how to run the tests.
7113 (arguments `(#:tests? #f))
7114 (propagated-inputs
7115 `(("python-ipykernel" ,python-ipykernel)
7116 ("python-ipywidgets" ,python-ipywidgets)
7117 ("python-jupyter-console" ,python-jupyter-console)
7118 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7119 ("python-notebook" ,python-notebook)))
c27ae827
RW
7120 (home-page "http://jupyter.org")
7121 (synopsis "Web application for interactive documents")
7122 (description
7123 "The Jupyter Notebook is a web application that allows you to create and
7124share documents that contain live code, equations, visualizations and
7125explanatory text. Uses include: data cleaning and transformation, numerical
7126simulation, statistical modeling, machine learning and much more.")
7127 (license license:bsd-3)))
7128
816a6538
LC
7129(define-public python-chardet
7130 (package
7131 (name "python-chardet")
7132 (version "2.3.0")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (string-append
7137 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7138 version
7139 ".tar.gz"))
7140 (sha256
7141 (base32
7142 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7143 (build-system python-build-system)
816a6538
LC
7144 (home-page "https://github.com/chardet/chardet")
7145 (synopsis "Universal encoding detector for Python 2 and 3")
7146 (description
7147 "This package provides @code{chardet}, a Python module that can
7148automatically detect a wide range of file encodings.")
3f641af0 7149 (license license:lgpl2.1+)))
816a6538
LC
7150
7151(define-public python2-chardet
7152 (package-with-python2 python-chardet))
2fc5f186 7153
1872f1bb
KM
7154(define-public python-docopt
7155 (package
7156 (name "python-docopt")
7157 (version "0.6.2")
7158 (source
7159 (origin
7160 (method url-fetch)
7161 ;; The release on PyPI does not include tests.
7162 (uri (string-append
7163 "https://github.com/docopt/docopt/archive/"
7164 version ".tar.gz"))
7165 (file-name (string-append name "-" version ".tar.gz"))
7166 (sha256
7167 (base32
7168 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7169 (build-system python-build-system)
7170 (native-inputs
f3b98f4f 7171 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7172 (arguments
7173 `(#:phases (alist-replace
7174 'check
7175 (lambda _ (zero? (system* "py.test")))
7176 %standard-phases)))
7177 (home-page "http://docopt.org")
7178 (synopsis "Command-line interface description language for Python")
7179 (description "This library allows the user to define a command-line
7180interface from a program's help message rather than specifying it
7181programatically with command-line parsers like @code{getopt} and
7182@code{argparse}.")
7183 (license license:expat)))
7184
7185(define-public python2-docopt
7186 (package-with-python2 python-docopt))
7187
2fc5f186
LF
7188(define-public python-zope-event
7189 (package
7190 (name "python-zope-event")
7191 (version "4.1.0")
7192 (source
7193 (origin
7194 (method url-fetch)
7195 (uri (string-append "https://pypi.python.org/packages/source/z"
7196 "/zope.event/zope.event-" version ".tar.gz"))
7197 (sha256
7198 (base32
7199 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7200 (build-system python-build-system)
2fc5f186
LF
7201 (home-page "http://pypi.python.org/pypi/zope.event")
7202 (synopsis "Event publishing system for Python")
7203 (description "Zope.event provides an event publishing API, intended for
7204use by applications which are unaware of any subscribers to their events. It
7205is a simple event-dispatching system on which more sophisticated event
7206dispatching systems can be built.")
3f641af0 7207 (license license:zpl2.1)))
2fc5f186
LF
7208
7209(define-public python2-zope-event
7210 (package-with-python2 python-zope-event))
97abe268
LF
7211
7212(define-public python-zope-interface
7213 (package
7214 (name "python-zope-interface")
7215 (version "4.1.3")
7216 (source
7217 (origin
7218 (method url-fetch)
7219 (uri (string-append "https://pypi.python.org/packages/source/z"
7220 "/zope.interface/zope.interface-" version ".tar.gz"))
7221 (sha256
7222 (base32
7223 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7224 (build-system python-build-system)
38d480a8 7225 (native-inputs
97abe268
LF
7226 `(("python-zope-event" ,python-zope-event)))
7227 (home-page "https://github.com/zopefoundation/zope.interface")
7228 (synopsis "Python implementation of the \"design by contract\"
7229methodology")
7230 (description "Zope.interface provides an implementation of \"object
7231interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7232conforming to a given API or contract.")
3f641af0 7233 (license license:zpl2.1)))
97abe268
LF
7234
7235(define-public python2-zope-interface
7236 (package-with-python2 python-zope-interface))
81f2373c
LF
7237
7238(define-public python-zope-exceptions
7239 (package
7240 (name "python-zope-exceptions")
7241 (version "4.0.8")
7242 (source
7243 (origin
7244 (method url-fetch)
7245 (uri (string-append "https://pypi.python.org/packages/source/z"
7246 "/zope.exceptions/zope.exceptions-"
7247 version ".tar.gz"))
7248 (sha256
7249 (base32
7250 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7251 (build-system python-build-system)
7252 (arguments
7253 '(#:tests? #f)) ; circular dependency with zope.testrunner
7254 (propagated-inputs
7255 `(("python-zope-interface" ,python-zope-interface)))
7256 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7257 (synopsis "Zope exceptions")
7258 (description "Zope.exceptions provides general-purpose exception types
7259that have uses outside of the Zope framework.")
3f641af0 7260 (license license:zpl2.1)))
81f2373c
LF
7261
7262(define-public python2-zope-exceptions
7263 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7264
7265(define-public python-zope-testing
7266 (package
7267 (name "python-zope-testing")
7268 (version "4.5.0")
7269 (source
7270 (origin
7271 (method url-fetch)
7272 (uri (string-append "https://pypi.python.org/packages/source/z"
7273 "/zope.testing/zope.testing-" version ".tar.gz"))
7274 (sha256
7275 (base32
b02f7a21
HG
7276 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7277 (modules '((guix build utils)))
7278 (snippet
7279 '(begin
7280 ;; Remove pre-compiled .pyc files backup files from source.
7281 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7282 #t))))
900e3c0e
LF
7283 (build-system python-build-system)
7284 (native-inputs
7285 `(("python-zope-exceptions" ,python-zope-exceptions)))
7286 (propagated-inputs
7287 `(("python-zope-interface" ,python-zope-interface)))
7288 (home-page "http://pypi.python.org/pypi/zope.testing")
7289 (synopsis "Zope testing helpers")
7290 (description "Zope.testing provides a number of testing utilities for HTML
7291forms, HTTP servers, regular expressions, and more.")
3f641af0 7292 (license license:zpl2.1)))
900e3c0e
LF
7293
7294(define-public python2-zope-testing
7295 (package-with-python2 python-zope-testing))
01614c4f
LF
7296
7297(define-public python-zope-testrunner
7298 (package
7299 (name "python-zope-testrunner")
7300 (version "4.4.9")
7301 (source
7302 (origin
7303 (method url-fetch)
7304 (uri (string-append "https://pypi.python.org/packages/source/z"
7305 "/zope.testrunner/zope.testrunner-"
7306 version ".zip"))
7307 (sha256
7308 (base32
7309 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7310 (build-system python-build-system)
7311 (native-inputs
7312 `(("python-six" ,python-six)
e408ffc3 7313 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7314 ("python-zope-exceptions" ,python-zope-exceptions)
7315 ("python-zope-testing" ,python-zope-testing)
7316 ("unzip" ,unzip)))
7317 (propagated-inputs
7318 `(("python-zope-interface" ,python-zope-interface)))
7319 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7320 (synopsis "Zope testrunner script")
7321 (description "Zope.testrunner provides a script for running Python
7322tests.")
3f641af0 7323 (license license:zpl2.1)))
01614c4f
LF
7324
7325(define-public python2-zope-testrunner
7326 (let ((base (package-with-python2 python-zope-testrunner)))
7327 (package
7328 (inherit base)
7329 (native-inputs
7330 (append (package-native-inputs base)
7331 `(("python2-subunit" ,python2-subunit)
7332 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7333
7334(define-public python-zope-i18nmessageid
7335 (package
7336 (name "python-zope-i18nmessageid")
7337 (version "4.0.3")
7338 (source
7339 (origin
7340 (method url-fetch)
7341 (uri (string-append
7342 "https://pypi.python.org/packages/source/z"
7343 "/zope.i18nmessageid/zope.i18nmessageid-"
7344 version ".tar.gz"))
7345 (sha256
7346 (base32
7347 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7348 (build-system python-build-system)
6a5c710c
LF
7349 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7350 (synopsis "Message identifiers for internationalization")
7351 (description "Zope.i18nmessageid provides facilities for declaring
7352internationalized messages within program source text.")
3f641af0 7353 (license license:zpl2.1)))
6a5c710c
LF
7354
7355(define-public python2-zope-i18nmessageid
7356 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7357
7358(define-public python-zope-schema
7359 (package
7360 (name "python-zope-schema")
7361 (version "4.4.2")
7362 (source
7363 (origin
7364 (method url-fetch)
7365 (uri (string-append "https://pypi.python.org/packages/source/z"
7366 "/zope.schema/zope.schema-" version ".tar.gz"))
7367 (sha256
7368 (base32
7369 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7370 (build-system python-build-system)
7371 (propagated-inputs
7372 `(("python-zope-event" ,python-zope-event)
7373 ("python-zope-interface" ,python-zope-interface)))
7374 (native-inputs
47f77210
HG
7375 `(("python-zope-testing" ,python-zope-testing)
7376 ("python-coverage" ,python-coverage)
7377 ("python-nose" ,python-nose)))
71fb09f3
LF
7378 (home-page "http://pypi.python.org/pypi/zope.schema")
7379 (synopsis "Zope data schemas")
7380 (description "Zope.scheme provides extensions to zope.interface for
7381defining data schemas.")
3f641af0 7382 (license license:zpl2.1)))
71fb09f3
LF
7383
7384(define-public python2-zope-schema
7385 (package-with-python2 python-zope-schema))
fbac9b17
LF
7386
7387(define-public python-zope-configuration
7388 (package
7389 (name "python-zope-configuration")
7390 (version "4.0.3")
7391 (source (origin
7392 (method url-fetch)
7393 (uri (string-append "https://pypi.python.org/packages/source/z"
7394 "/zope.configuration/zope.configuration-"
7395 version ".tar.gz"))
7396 (sha256
7397 (base32
7398 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7399 (build-system python-build-system)
7400 (propagated-inputs
7401 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7402 ("python-zope-schema" ,python-zope-schema)))
7403 (home-page "http://pypi.python.org/pypi/zope.configuration")
7404 (synopsis "Zope Configuration Markup Language")
7405 (description "Zope.configuration implements ZCML, the Zope Configuration
7406Markup Language.")
3f641af0 7407 (license license:zpl2.1)))
fbac9b17
LF
7408
7409(define-public python2-zope-configuration
7410 (package-with-python2 python-zope-configuration))
2ad52086
LF
7411
7412(define-public python-zope-proxy
7413 (package
7414 (name "python-zope-proxy")
7415 (version "4.1.6")
7416 (source
7417 (origin
7418 (method url-fetch)
7419 (uri (string-append "https://pypi.python.org/packages/source/z"
7420 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7421 (sha256
7422 (base32
7423 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7424 (build-system python-build-system)
7425 (propagated-inputs
7426 `(("python-zope-interface" ,python-zope-interface)))
7427 (home-page "http://pypi.python.org/pypi/zope.proxy")
7428 (synopsis "Generic, transparent proxies")
7429 (description "Zope.proxy provides generic, transparent proxies for Python.
7430Proxies are special objects which serve as mostly-transparent wrappers around
7431another object, intervening in the apparent behavior of the wrapped object
7432only when necessary to apply the policy (e.g., access checking, location
7433brokering, etc.) for which the proxy is responsible.")
3f641af0 7434 (license license:zpl2.1)))
2ad52086
LF
7435
7436(define-public python2-zope-proxy
7437 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7438
7439(define-public python-zope-location
7440 (package
7441 (name "python-zope-location")
7442 (version "4.0.3")
7443 (source
7444 (origin
7445 (method url-fetch)
7446 (uri (string-append "https://pypi.python.org/packages/source/z"
7447 "/zope.location/zope.location-" version ".tar.gz"))
7448 (sha256
7449 (base32
7450 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7451 (build-system python-build-system)
d27f176a 7452 (propagated-inputs
f404b5ea
LF
7453 `(("python-zope-proxy" ,python-zope-proxy)
7454 ("python-zope-schema" ,python-zope-schema)))
7455 (home-page "http://pypi.python.org/pypi/zope.location/")
7456 (synopsis "Zope location library")
7457 (description "Zope.location implements the concept of \"locations\" in
7458Zope3, which are are special objects that have a structural location.")
3f641af0 7459 (license license:zpl2.1)))
f404b5ea
LF
7460
7461(define-public python2-zope-location
7462 (package-with-python2 python-zope-location))
d4b77f36
LF
7463
7464(define-public python-zope-security
7465 (package
7466 (name "python-zope-security")
7467 (version "4.0.3")
7468 (source
7469 (origin
7470 (method url-fetch)
7471 (uri (string-append "https://pypi.python.org/packages/source/z"
7472 "/zope.security/zope.security-" version ".tar.gz"))
7473 (sha256
7474 (base32
7475 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7476 (build-system python-build-system)
7477 (propagated-inputs
7478 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7479 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7
HG
7480 ("python-zope-schema" ,python-zope-schema)))
7481 (native-inputs
7482 `(("python-zope-component" ,python-zope-component)
7483 ("python-zope-configuration" ,python-zope-configuration)
7484 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7485 ("python-zope-testrunner" ,python-zope-testrunner)
7486 ("python-zope-testing" ,python-zope-testing)))
7487 (home-page "http://pypi.python.org/pypi/zope.security")
7488 (synopsis "Zope security framework")
7489 (description "Zope.security provides a generic mechanism to implement
7490security policies on Python objects.")
3f641af0 7491 (license license:zpl2.1)))
d4b77f36
LF
7492
7493(define-public python2-zope-security
04417662
EF
7494 (let ((zope-security (package-with-python2 python-zope-security)))
7495 (package (inherit zope-security)
7496 (propagated-inputs
7497 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7498 ,@(alist-delete
7499 "python-zope-testrunner"
7500 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7501
7502(define-public python-zope-component
7503 (package
7504 (name "python-zope-component")
7505 (version "4.2.2")
7506 (source
7507 (origin
7508 (method url-fetch)
7509 (uri (string-append "https://pypi.python.org/packages/source/z"
7510 "/zope.component/zope.component-" version ".tar.gz"))
7511 (sha256
7512 (base32
7513 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7514 (build-system python-build-system)
7515 (arguments
7516 ;; Skip tests due to circular dependency with python-zope-security.
7517 '(#:tests? #f))
7518 (native-inputs
7519 `(("python-zope-testing" ,python-zope-testing)))
7520 (propagated-inputs
7521 `(("python-zope-event" ,python-zope-event)
7522 ("python-zope-interface" ,python-zope-interface)
7523 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7524 ("python-zope-configuration" ,python-zope-configuration)))
7525 (home-page "https://github.com/zopefoundation/zope.component")
7526 (synopsis "Zope Component Architecture")
7527 (description "Zope.component represents the core of the Zope Component
7528Architecture. Together with the zope.interface package, it provides
7529facilities for defining, registering and looking up components.")
3f641af0 7530 (license license:zpl2.1)))
a6b61b27
LF
7531
7532(define-public python2-zope-component
7533 (package-with-python2 python-zope-component))
3859ac12 7534
1ae44b80 7535(define-public python-pythondialog
b5f218be 7536 (package
1ae44b80 7537 (name "python-pythondialog")
42c4b246 7538 (version "3.4.0")
b5f218be
LF
7539 (source
7540 (origin
7541 (method url-fetch)
1ae44b80 7542 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7543 (sha256
7544 (base32
1ae44b80 7545 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7546 (build-system python-build-system)
7547 (arguments
7548 `(#:phases
7549 (modify-phases %standard-phases
7550 (add-after 'unpack 'patch-path
7551 (lambda* (#:key inputs #:allow-other-keys)
7552 (let* ((dialog (assoc-ref inputs "dialog")))
7553 ;; Since this library really wants to grovel the search path, we
7554 ;; must hardcode dialog's store path into it.
7555 (substitute* "dialog.py"
7556 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7557 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7558 #t))))
b5f218be
LF
7559 #:tests? #f)) ; no test suite
7560 (propagated-inputs
7561 `(("dialog" ,dialog)))
7562 (home-page "http://pythondialog.sourceforge.net/")
7563 (synopsis "Python interface to the UNIX dialog utility")
7564 (description "A Python wrapper for the dialog utility. Its purpose is to
7565provide an easy to use, pythonic and comprehensive Python interface to dialog.
7566This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7567 (license license:lgpl2.1)
1ae44b80
LF
7568 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7569
7570(define-public python2-pythondialog
7571 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7572 (package
7573 (inherit base)
7574 (version (package-version python-pythondialog))
7575 (source (origin
7576 (method url-fetch)
7577 (uri (pypi-uri "python2-pythondialog" version))
7578 (sha256
7579 (base32
7580 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7581
3859ac12
LF
7582(define-public python-pyrfc3339
7583 (package
7584 (name "python-pyrfc3339")
d9aa097b 7585 (version "1.0")
3859ac12
LF
7586 (source
7587 (origin
7588 (method url-fetch)
d9aa097b 7589 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7590 (sha256
7591 (base32
d9aa097b 7592 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7593 (build-system python-build-system)
7594 (propagated-inputs
7595 `(("python-pytz" ,python-pytz)))
7596 (native-inputs
f3b98f4f 7597 `(("python-nose" ,python-nose)))
3859ac12
LF
7598 (home-page "https://github.com/kurtraschke/pyRFC3339")
7599 (synopsis "Python timestamp library")
7600 (description "Python library for generating and parsing RFC 3339-compliant
7601timestamps.")
7602 (license license:expat)))
7603
7604(define-public python2-pyrfc3339
7605 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7606
7607(define-public python-werkzeug
7608 (package
7609 (name "python-werkzeug")
0580e383 7610 (version "0.11.11")
5eea2005
LF
7611 (source
7612 (origin
7613 (method url-fetch)
4b47cbfa 7614 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7615 (sha256
7616 (base32
0580e383 7617 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7618 (build-system python-build-system)
7619 (native-inputs
7620 `(("python-pytest" ,python-pytest)))
7621 (home-page "http://werkzeug.pocoo.org/")
7622 (synopsis "Utilities for WSGI applications")
7623 (description "One of the most advanced WSGI utility modules. It includes a
7624powerful debugger, full-featured request and response objects, HTTP utilities to
7625handle entity tags, cache control headers, HTTP dates, cookie handling, file
7626uploads, a powerful URL routing system and a bunch of community-contributed
7627addon modules.")
3f641af0 7628 (license license:x11)))
5eea2005
LF
7629
7630(define-public python2-werkzeug
7631 (package-with-python2 python-werkzeug))
99fffa8a
LF
7632
7633(define-public python-configobj
7634 (package
7635 (name "python-configobj")
7636 (version "5.0.6")
7637 (source (origin
7638 (method url-fetch)
7639 (uri (string-append
7640 "https://pypi.python.org/packages/source/c/configobj/"
7641 "configobj-" version ".tar.gz"))
7642 (sha256
7643 (base32
7644 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7645 ;; Patch setup.py so it looks for python-setuptools, which is
7646 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7647 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7648 (build-system python-build-system)
861f70c9 7649 (propagated-inputs
f3b98f4f 7650 `(("python-six" ,python-six)))
99fffa8a
LF
7651 (synopsis "Config file reading, writing and validation")
7652 (description "ConfigObj is a simple but powerful config file reader and
7653writer: an ini file round tripper. Its main feature is that it is very easy to
7654use, with a straightforward programmer’s interface and a simple syntax for
7655config files.")
7656 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7657 (license license:bsd-3)))
99fffa8a
LF
7658
7659(define-public python2-configobj
7660 (package-with-python2 python-configobj))
79e8a291
LF
7661
7662(define-public python-configargparse
7663 (package
7664 (name "python-configargparse")
7665 (version "0.10.0")
7666 (source (origin
7667 (method url-fetch)
7668 (uri (string-append
7669 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7670 "ConfigArgParse-" version ".tar.gz"))
7671 (sha256
7672 (base32
7673 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7674 (build-system python-build-system)
7675 (arguments
7676 ;; FIXME: Bug in test suite filed upstream:
7677 ;; https://github.com/bw2/ConfigArgParse/issues/32
7678 '(#:tests? #f))
7679 (synopsis "Replacement for argparse")
7680 (description "A drop-in replacement for argparse that allows options to also
7681be set via config files and/or environment variables.")
7682 (home-page "https://github.com/bw2/ConfigArgParse")
7683 (license license:expat)))
7684
7685(define-public python2-configargparse
7686 (package-with-python2 python-configargparse))
ab41f979
LF
7687
7688(define-public python-ndg-httpsclient
7689 (package
7690 (name "python-ndg-httpsclient")
7691 (version "0.4.0")
7692 (source (origin
7693 (method url-fetch)
7694 (uri (string-append
7695 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7696 "ndg_httpsclient-" version ".tar.gz"))
7697 (sha256
7698 (base32
7699 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7700 (build-system python-build-system)
a39cc016
LF
7701 (arguments
7702 '(;; The tests appear to require networking.
7703 #:tests? #f))
ab41f979
LF
7704 (propagated-inputs
7705 `(("python-pyopenssl" ,python-pyopenssl)))
7706 (synopsis "HTTPS support for Python's httplib and urllib2")
7707 (description "This is a HTTPS client implementation for httplib and urllib2
7708based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7709over the default provided with Python and importantly enables full verification
7710of the SSL peer.")
7711 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7712 (license license:bsd-3)))
ab41f979
LF
7713
7714;; python2-openssl requires special care, so package-with-python2 is
7715;; insufficient.
7716(define-public python2-ndg-httpsclient
7717 (package (inherit python-ndg-httpsclient)
7718 (name "python2-ndg-httpsclient")
7719 (arguments `(#:python ,python-2))
7720 (propagated-inputs
7721 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7722
7723(define-public python-contextlib2
7724 (package
7725 (name "python-contextlib2")
7726 (version "0.4.0")
7727 (source
7728 (origin
7729 (method url-fetch)
7730 (uri (pypi-uri "contextlib2" version))
7731 (sha256
7732 (base32
7733 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7734 (build-system python-build-system)
7735 (arguments
7736 `(#:phases
7737 (modify-phases %standard-phases
7738 (replace 'check
7739 (lambda _ (zero?
7740 (system*
b3546174 7741 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7742 (home-page "http://contextlib2.readthedocs.org/")
7743 (synopsis "Tools for decorators and context managers")
7744 (description "This module is primarily a backport of the Python
77453.2 contextlib to earlier Python versions. Like contextlib, it
7746provides utilities for common tasks involving decorators and context
7747managers. It also contains additional features that are not part of
7748the standard library.")
3f641af0 7749 (license license:psfl)))
03f964a5
CM
7750
7751(define-public python2-contextlib2
7752 (package-with-python2 python-contextlib2))
210bf497
DT
7753
7754(define-public python-texttable
7755 (package
7756 (name "python-texttable")
7757 (version "0.8.4")
7758 (source
7759 (origin
7760 (method url-fetch)
7761 (uri (pypi-uri "texttable" version))
7762 (sha256
7763 (base32
7764 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7765 (build-system python-build-system)
7766 (arguments '(#:tests? #f)) ; no tests
7767 (home-page "https://github.com/foutaise/texttable/")
7768 (synopsis "Python module for creating simple ASCII tables")
7769 (description "Texttable is a Python module for creating simple ASCII
7770tables.")
3f641af0 7771 (license license:lgpl2.1+)))
210bf497
DT
7772
7773(define-public python2-texttable
7774 (package-with-python2 python-texttable))
67c52bb3
DT
7775
7776(define-public python-websocket-client
7777 (package
7778 (name "python-websocket-client")
6b810897 7779 (version "0.37.0")
67c52bb3
DT
7780 (source
7781 (origin
7782 (method url-fetch)
6b810897 7783 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7784 (sha256
7785 (base32
6b810897 7786 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7787 (build-system python-build-system)
a5333f7c
HG
7788 (propagated-inputs
7789 `(("python-six" ,python-six)))
67c52bb3
DT
7790 (home-page "https://github.com/liris/websocket-client")
7791 (synopsis "WebSocket client for Python")
7792 (description "The Websocket-client module provides the low level APIs for
7793WebSocket usage in Python programs.")
3f641af0 7794 (license license:lgpl2.1+)))
67c52bb3
DT
7795
7796(define-public python2-websocket-client
7797 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7798
7799(define-public python-atomicwrites
7800 (package
7801 (name "python-atomicwrites")
4e92d76a 7802 (version "1.1.0")
5c6eea2a
LF
7803 (source (origin
7804 (method url-fetch)
7805 (uri (pypi-uri "atomicwrites" version))
7806 (sha256
7807 (base32
4e92d76a 7808 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7809 (build-system python-build-system)
7810 (synopsis "Atomic file writes in Python")
7811 (description "Library for atomic file writes using platform dependent tools
8f65585b 7812for atomic file system operations.")
5c6eea2a 7813 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7814 (license license:expat)))
9bb6d184
LF
7815
7816(define-public python2-atomicwrites
f210e944 7817 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7818
7819(define-public python-requests-toolbelt
7820 (package
7821 (name "python-requests-toolbelt")
c02af1c8 7822 (version "0.6.2")
561bb3cb
LF
7823 (source (origin
7824 (method url-fetch)
c02af1c8
LF
7825 (uri (string-append
7826 "https://pypi.python.org/packages/"
7827 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7828 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7829 (sha256
7830 (base32
c02af1c8 7831 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7832 (build-system python-build-system)
759aadd4
LF
7833 (native-inputs
7834 `(("python-betamax" ,python-betamax)
7835 ("python-mock" ,python-mock)
7836 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7837 (propagated-inputs
7838 `(("python-requests" ,python-requests)))
7839 (synopsis "Extensions to python-requests")
7840 (description "This is a toolbelt of useful classes and functions to be used
7841with python-requests.")
7842 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7843 (license license:asl2.0)))
d1deb90b
LF
7844
7845(define-public python-click-threading
7846 (package
7847 (name "python-click-threading")
3d2e0dbc 7848 (version "0.2.0")
d1deb90b
LF
7849 (source (origin
7850 (method url-fetch)
3d2e0dbc
LF
7851 (uri (string-append
7852 "https://pypi.python.org/packages/"
7853 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7854 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7855 (sha256
7856 (base32
3d2e0dbc 7857 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7858 (build-system python-build-system)
7859 (propagated-inputs
7860 `(("python-click" ,python-click)))
7861 (synopsis "Utilities for multithreading in Click")
7862 (description "This package provides utilities for multithreading in Click
7863applications.")
7864 (home-page "https://github.com/click-contrib/click-threading")
7865 (license license:expat)))
7b17cab9
LF
7866
7867(define-public python-click-log
7868 (package
7869 (name "python-click-log")
a9da8fec 7870 (version "0.1.3")
7b17cab9
LF
7871 (source (origin
7872 (method url-fetch)
7873 (uri (pypi-uri "click-log" version))
7874 (sha256
7875 (base32
a9da8fec 7876 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7877 (build-system python-build-system)
7878 (propagated-inputs
7879 `(("python-click" ,python-click)))
7880 (synopsis "Logging for click applications")
7881 (description "This package provides a Python library for logging Click
7882applications.")
7883 (home-page "https://github.com/click-contrib/click-log")
7884 (license license:expat)))
7b3a4ee4
LF
7885
7886(define-public python-apipkg
7887 (package
7888 (name "python-apipkg")
7889 (version "1.4")
7890 (source (origin
7891 (method url-fetch)
7892 (uri (pypi-uri "apipkg" version))
7893 (sha256
7894 (base32
7895 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7896 (build-system python-build-system)
328bb95d 7897 (native-inputs
7b3a4ee4
LF
7898 `(("python-pytest" ,python-pytest)))
7899 (synopsis "Namespace control and lazy-import mechanism")
7900 (description "With apipkg you can control the exported namespace of a Python
7901package and greatly reduce the number of imports for your users. It is a small
7902pure Python module that works on virtually all Python versions.")
7903 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 7904 (license license:expat)))
e08739c3
CAW
7905
7906(define-public python2-apipkg
f210e944 7907 (package-with-python2 python-apipkg))
848964fe
LF
7908
7909(define-public python-execnet
7910 (package
7911 (name "python-execnet")
7912 (version "1.4.1")
7913 (source (origin
7914 (method url-fetch)
7915 (uri (pypi-uri "execnet" version))
7916 (sha256
7917 (base32
7918 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7919 (build-system python-build-system)
ca0eee9d
LF
7920 (arguments
7921 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7922 ;; The two test failures are caused by the lack of an `ssh` executable.
7923 ;; The test suite can be run with pytest after the 'install' phase.
7924 #:tests? #f))
848964fe 7925 (native-inputs
ca0eee9d
LF
7926 `(("python-pytest" ,python-pytest)
7927 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 7928 (propagated-inputs
848964fe
LF
7929 `(("python-apipkg" ,python-apipkg)))
7930 (synopsis "Rapid multi-Python deployment")
7931 (description "Execnet provides a share-nothing model with
7932channel-send/receive communication for distributing execution across many
7933Python interpreters across version, platform and network barriers. It has a
7934minimal and fast API targetting the following uses:
7935@enumerate
7936@item distribute tasks to (many) local or remote CPUs
7937@item write and deploy hybrid multi-process applications
7938@item write scripts to administer multiple environments
7939@end enumerate")
7940 (home-page "http://codespeak.net/execnet/")
f210e944 7941 (license license:expat)))
16c84f90
CAW
7942
7943(define-public python2-execnet
f210e944 7944 (package-with-python2 python-execnet))
6720dbb4
LF
7945
7946;;; The software provided by this package was integrated into pytest 2.8.
7947(define-public python-pytest-cache
7948 (package
7949 (name "python-pytest-cache")
7950 (version "1.0")
7951 (source (origin
7952 (method url-fetch)
7953 (uri (pypi-uri "pytest-cache" version))
7954 (sha256
7955 (base32
7956 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7957 (build-system python-build-system)
f22efa01 7958 (propagated-inputs
630d938f
EF
7959 `(("python-apipkg" ,python-apipkg)
7960 ("python-execnet" ,python-execnet)
7961 ("python-py" ,python-py)
7962 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7963 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7964 (description "The pytest-cache plugin provides tools to rerun failures from
7965the last py.test invocation.")
7966 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 7967 (license license:expat)))
0adc21c2
EF
7968
7969(define-public python2-pytest-cache
f210e944 7970 (package-with-python2 python-pytest-cache))
d7e729fe
LF
7971
7972(define-public python-pytest-localserver
7973 (package
7974 (name "python-pytest-localserver")
29f20168 7975 (version "0.3.5")
d7e729fe
LF
7976 (source (origin
7977 (method url-fetch)
29f20168 7978 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7979 (sha256
7980 (base32
29f20168 7981 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7982 (build-system python-build-system)
7983 (arguments
7984 `(#:phases (modify-phases %standard-phases
7985 (replace 'check
7986 (lambda _
7987 (zero? (system* "py.test" "--genscript=runtests.py"))
7988 (zero? (system* "py.test")))))))
7989 (native-inputs
d7e729fe
LF
7990 `(("python-pytest" ,python-pytest)
7991 ("python-requests" ,python-requests)
9ba40f05 7992 ("python-six" ,python-six)))
f22efa01 7993 (propagated-inputs
9ba40f05 7994 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7995 (synopsis "Py.test plugin to test server connections locally")
7996 (description "Pytest-localserver is a plugin for the pytest testing
7997framework which enables you to test server connections locally.")
7998 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7999 (license license:expat)))
28cecbb7
LF
8000
8001(define-public python-wsgi-intercept
8002 (package
8003 (name "python-wsgi-intercept")
909fbd2b 8004 (version "1.2.2")
28cecbb7
LF
8005 (source (origin
8006 (method url-fetch)
909fbd2b
LF
8007 (uri (string-append
8008 "https://pypi.python.org/packages/"
8009 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8010 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8011 (sha256
8012 (base32
909fbd2b 8013 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8014 (build-system python-build-system)
b9fc496f
HG
8015 (propagated-inputs
8016 `(("python-six" ,python-six)))
28cecbb7 8017 (native-inputs
9d813ec1 8018 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8019 ("python-httplib2" ,python-httplib2)
8020 ("python-requests" ,python-requests)
8757f050 8021 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8022 (synopsis "Puts a WSGI application in place of a real URI for testing")
8023 (description "Wsgi_intercept installs a WSGI application in place of a real
8024URI for testing. Testing a WSGI application normally involves starting a
8025server at a local host and port, then pointing your test code to that address.
8026Instead, this library lets you intercept calls to any specific host/port
8027combination and redirect them into a WSGI application importable by your test
8028program. Thus, you can avoid spawning multiple processes or threads to test
8029your Web app.")
8030 (home-page "https://github.com/cdent/wsgi-intercept")
8031 (license license:expat)))
89b8a551
LF
8032
8033(define-public python-pytest-xprocess
8034 (package
8035 (name "python-pytest-xprocess")
8036 (version "0.9.1")
8037 (source (origin
8038 (method url-fetch)
8039 (uri (pypi-uri "pytest-xprocess" version))
8040 (sha256
8041 (base32
8042 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8043 (build-system python-build-system)
8044 (propagated-inputs
8045 `(("python-pytest" ,python-pytest)
8046 ("python-pytest-cache" ,python-pytest-cache)
8047 ("python-psutil" ,python-psutil)))
8048 (synopsis "Pytest plugin to manage external processes across test runs")
8049 (description "Pytest-xprocess is an experimental py.test plugin for managing
8050processes across test runs.")
8051 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8052 (license license:expat)))
5c299bf0
LF
8053
8054(define-public python-icalendar
8055 (package
8056 (name "python-icalendar")
25291aca 8057 (version "3.11")
5c299bf0
LF
8058 (source (origin
8059 (method url-fetch)
8060 (uri (pypi-uri "icalendar" version))
8061 (sha256
8062 (base32
25291aca 8063 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8064 (build-system python-build-system)
8065 (propagated-inputs
8066 `(("python-dateutil-2" ,python-dateutil-2)
8067 ("python-pytz" ,python-pytz)))
8068 (synopsis "Python library for parsing iCalendar files")
8069 (description "The icalendar package is a parser/generator of iCalendar
8070files for use with Python.")
8071 (home-page "https://github.com/collective/icalendar")
3f641af0 8072 (license license:bsd-2)))
6bbbb53e
LF
8073
8074(define-public python-sphinxcontrib-newsfeed
8075 (package
8076 (name "python-sphinxcontrib-newsfeed")
8077 (version "0.1.4")
8078 (source (origin
8079 (method url-fetch)
8080 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8081 (sha256
8082 (base32
8083 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8084 (build-system python-build-system)
8085 (propagated-inputs
251ed7f2 8086 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8087 (synopsis "News Feed extension for Sphinx")
8088 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8089Blog, News or Announcements section to a Sphinx website.")
8090 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8091 (license license:bsd-2)))
2216e15c
SB
8092
8093(define-public python-args
8094 (package
8095 (name "python-args")
8096 (version "0.1.0")
8097 (source (origin
8098 (method url-fetch)
8099 (uri (pypi-uri "args" version))
8100 (sha256
8101 (base32
8102 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8103 (build-system python-build-system)
2216e15c
SB
8104 (home-page "https://github.com/kennethreitz/args")
8105 (synopsis "Command-line argument parser")
8106 (description
8107 "This library provides a Python module to parse command-line arguments.")
3f641af0 8108 (license license:bsd-3)))
2216e15c
SB
8109
8110(define-public python2-args
8111 (package-with-python2 python-args))
c06a3de9
SB
8112
8113(define-public python-clint
8114 (package
8115 (name "python-clint")
8116 (version "0.5.1")
8117 (source (origin
8118 (method url-fetch)
8119 (uri (pypi-uri "clint" version))
8120 (sha256
8121 (base32
8122 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8123 (build-system python-build-system)
f22efa01 8124 (propagated-inputs
f3b98f4f 8125 `(("python-args" ,python-args)))
c06a3de9
SB
8126 (home-page "https://github.com/kennethreitz/clint")
8127 (synopsis "Command-line interface tools")
8128 (description
8129 "Clint is a Python module filled with a set of tools for developing
8130command-line applications, including tools for colored and indented
8131output, progress bar display, and pipes.")
3f641af0 8132 (license license:isc)))
c06a3de9
SB
8133
8134(define-public python2-clint
8135 (package-with-python2 python-clint))
4ecdeef8
SB
8136
8137(define-public python-astor
8138 (package
8139 (name "python-astor")
8140 (version "0.5")
8141 (source (origin
8142 (method url-fetch)
8143 (uri (pypi-uri "astor" version))
8144 (sha256
8145 (base32
8146 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8147 (build-system python-build-system)
4ecdeef8
SB
8148 (home-page "https://github.com/berkerpeksag/astor")
8149 (synopsis "Read and write Python ASTs")
8150 (description
8151 "Astor is designed to allow easy manipulation of Python source via the
8152Abstract Syntax Tree.")
3f641af0 8153 (license license:bsd-3)))
4ecdeef8
SB
8154
8155(define-public python2-astor
8156 (package-with-python2 python-astor))
e224b7d0
SB
8157
8158(define-public python-rply
8159 (package
8160 (name "python-rply")
8161 (version "0.7.4")
8162 (source (origin
8163 (method url-fetch)
8164 (uri (pypi-uri "rply" version))
8165 (sha256
8166 (base32
8167 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8168 (build-system python-build-system)
f22efa01 8169 (propagated-inputs
f3b98f4f 8170 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8171 (home-page "https://github.com/alex/rply")
8172 (synopsis "Parser generator for Python")
8173 (description
8174 "This package provides a pure Python based parser generator, that also
8175works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8176with a new public API, and RPython support.")
3f641af0 8177 (license license:bsd-3)))
e224b7d0
SB
8178
8179(define-public python2-rply
8180 (package-with-python2 python-rply))
c3e919d7
SB
8181
8182(define-public python-hy
8183 (package
8184 (name "python-hy")
8185 (version "0.11.1")
8186 (source (origin
8187 (method url-fetch)
8188 (uri (pypi-uri "hy" version))
8189 (sha256
8190 (base32
8191 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8192 (build-system python-build-system)
f22efa01 8193 (propagated-inputs
c3e919d7
SB
8194 `(("python-astor" ,python-astor)
8195 ("python-clint" ,python-clint)
f3b98f4f 8196 ("python-rply" ,python-rply)))
c3e919d7
SB
8197 (home-page "http://hylang.org/")
8198 (synopsis "Lisp frontend to Python")
8199 (description
8200 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8201its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8202Python at your fingertips, in Lisp form.")
8203 (license license:expat)))
8204
8205(define-public python2-hy
8206 (package-with-python2 python-hy))
7a5b944e 8207
81f7f297
EF
8208(define-public python-rauth
8209 (package
8210 (name "python-rauth")
8211 (version "0.7.2")
8212 (source
8213 (origin
8214 (method url-fetch)
8215 (uri (pypi-uri "rauth" version))
8216 (sha256
8217 (base32
8218 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8219 (build-system python-build-system)
8220 (arguments
8221 `(#:test-target "check"))
f22efa01 8222 (propagated-inputs
81f7f297
EF
8223 `(("python-requests" ,python-requests)))
8224 (home-page "https://github.com/litl/rauth")
8225 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8226 (description
8227 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8228provides service wrappers for convenient connection initialization and
8229authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8230 (license license:expat)
8231 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8232
8233(define-public python2-rauth
0848d8d3
EF
8234 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8235 (package
8236 (inherit base)
00e10c6e 8237 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8238 ,@(package-native-inputs base))))))
81f7f297 8239
1abe448d
EF
8240(define-public python2-functools32
8241 (package
8242 (name "python2-functools32")
8243 (version "3.2.3-2")
8244 (source
8245 (origin
8246 (method url-fetch)
8247 (uri (pypi-uri "functools32" version))
8248 (sha256
8249 (base32
8250 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8251 (build-system python-build-system)
8252 (arguments
8253 `(#:python ,python-2
8254 #:tests? #f)) ; no test target
1abe448d
EF
8255 (home-page "https://github.com/MiCHiLU/python-functools32")
8256 (synopsis
8257 "Backport of the functools module from Python 3.2.3")
8258 (description
8259 "This package is a backport of the @code{functools} module from Python
82603.2.3 for use with older versions of Python and PyPy.")
8261 (license license:expat)))
8262
877889f3 8263(define-public python2-futures
7a5b944e 8264 (package
877889f3 8265 (name "python2-futures")
7a5b944e
EF
8266 (version "3.0.3")
8267 (source
8268 (origin
8269 (method url-fetch)
8270 (uri (pypi-uri "futures" version))
8271 (sha256
8272 (base32
8273 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8274 (build-system python-build-system)
877889f3 8275 (arguments `(#:python ,python-2))
7a5b944e
EF
8276 (home-page "https://github.com/agronholm/pythonfutures")
8277 (synopsis
8278 "Backport of the concurrent.futures package from Python 3.2")
8279 (description
8280 "The concurrent.futures module provides a high-level interface for
8281asynchronously executing callables. This package backports the
8282concurrent.futures package from Python 3.2")
3f641af0 8283 (license license:bsd-3)))
7a5b944e 8284
5cb2fe44
EF
8285(define-public python-promise
8286 (package
8287 (name "python-promise")
8288 (version "0.4.2")
8289 (source
8290 (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "promise" version))
8293 (sha256
8294 (base32
8295 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8296 (build-system python-build-system)
8297 ;; Tests wants python-futures, which is a python2 only program, and
8298 ;; can't be found by python-promise at test time.
8299 (arguments `(#:tests? #f))
8300 (home-page "https://github.com/syrusakbary/promise")
8301 (synopsis "Promises/A+ implementation for Python")
8302 (description
8303 "Promises/A+ implementation for Python")
8304 (properties `((python2-variant . ,(delay python2-promise))))
8305 (license license:expat)))
8306
8307(define-public python2-promise
8308 (let ((promise (package-with-python2
8309 (strip-python2-variant python-promise))))
8310 (package (inherit promise)
8311 (arguments (substitute-keyword-arguments (package-arguments promise)
8312 ((#:tests? _) #t)))
8313 (native-inputs
8314 `(("python2-futures" ,python2-futures)
8315 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8316 ,@(package-native-inputs promise))))))
8317
c18f6368
EF
8318(define-public python-urllib3
8319 (package
8320 (name "python-urllib3")
6178274d 8321 (version "1.18.1")
c18f6368
EF
8322 (source
8323 (origin
8324 (method url-fetch)
8325 (uri (pypi-uri "urllib3" version))
8326 (sha256
8327 (base32
6178274d 8328 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8329 (build-system python-build-system)
8330 (arguments `(#:tests? #f))
8331 (native-inputs
f3b98f4f 8332 `(;; some packages for tests
c18f6368
EF
8333 ("python-nose" ,python-nose)
8334 ("python-mock" ,python-mock)
8335 ("python-tornado" ,python-tornado)))
8336 (propagated-inputs
8322749a 8337 `(;; extra packages for https security
c18f6368
EF
8338 ("python-certifi" ,python-certifi)
8339 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8340 ("python-pyasn1" ,python-pyasn1)
8341 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8342 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8343 (synopsis "HTTP library with thread-safe connection pooling")
8344 (description
8345 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8346can reuse the same socket connection for multiple requests, it can POST files,
8347supports url redirection and retries, and also gzip and deflate decoding.")
8348 (license license:expat)))
8349
8350(define-public python2-urllib3
8351 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8352
8353(define-public python-colorama
8354 (package
8355 (name "python-colorama")
8356 (version "0.3.3")
8357 (source
8358 (origin
8359 (method url-fetch)
8360 (uri (pypi-uri "colorama" version))
8361 (sha256
8362 (base32
8363 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8364 (build-system python-build-system)
2b2f2fc1
DT
8365 (synopsis "colored terminal text rendering for Python")
8366 (description "Colorama is a Python library for rendering colored terminal
8367text.")
8368 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8369 (license license:bsd-3)))
2b2f2fc1
DT
8370
8371(define-public python2-colorama
8372 (package-with-python2 python-colorama))
f5bcec6e
DT
8373
8374(define-public python-rsa
8375 (package
8376 (name "python-rsa")
ecd68c53 8377 (version "3.4.2")
f5bcec6e
DT
8378 (source
8379 (origin
8380 (method url-fetch)
8381 (uri (pypi-uri "rsa" version))
8382 (sha256
8383 (base32
ecd68c53 8384 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8385 (build-system python-build-system)
f22efa01 8386 (propagated-inputs
f3b98f4f 8387 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8388 (synopsis "Pure-Python RSA implementation")
8389 (description "Python-RSA is a pure-Python RSA implementation. It supports
8390encryption and decryption, signing and verifying signatures, and key
8391generation according to PKCS#1 version 1.5. It can be used as a Python
8392library as well as on the command line.")
8393 (home-page "http://stuvel.eu/rsa")
3f641af0 8394 (license license:asl2.0)))
f5bcec6e
DT
8395
8396(define-public python2-rsa
8397 (package-with-python2 python-rsa))
c0aacfa5
DT
8398
8399(define-public python-pluggy
8400 (package
8401 (name "python-pluggy")
8402 (version "0.3.1")
8403 (source
8404 (origin
8405 (method url-fetch)
8406 (uri (pypi-uri "pluggy" version))
8407 (sha256
8408 (base32
8409 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8410 (build-system python-build-system)
c0aacfa5
DT
8411 (synopsis "Plugin and hook calling mechanism for Python")
8412 (description "Pluggy is an extraction of the plugin manager as used by
8413Pytest but stripped of Pytest specific details.")
8414 (home-page "https://pypi.python.org/pypi/pluggy")
8415 (license license:expat)))
8416
8417(define-public python2-pluggy
8418 (package-with-python2 python-pluggy))
a4af21ca
DT
8419
8420(define-public python-tox
8421 (package
8422 (name "python-tox")
8423 (version "2.3.1")
8424 (source
8425 (origin
8426 (method url-fetch)
8427 (uri (pypi-uri "tox" version))
8428 (sha256
8429 (base32
8430 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8431 (build-system python-build-system)
8432 (arguments
7ba07edf
HG
8433 ;; FIXME: Tests require pytest-timeout, which itself requires
8434 ;; pytest>=2.8.0 for installation.
a4af21ca 8435 '(#:tests? #f))
482d9591
HG
8436 (propagated-inputs
8437 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8438 ("python-py" ,python-py)
482d9591 8439 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8440 (native-inputs
7ba07edf
HG
8441 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8442 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8443 (home-page "http://tox.testrun.org/")
8444 (synopsis "Virtualenv-based automation of test activities")
8445 (description "Tox is a generic virtualenv management and test command line
8446tool. It can be used to check that a package installs correctly with
8447different Python versions and interpreters, or run tests in each type of
8448supported environment, or act as a frontend to continuous integration
8449servers.")
8450 (license license:expat)))
8451
8452(define-public python2-tox
8453 (package-with-python2 python-tox))
ba9da248
DT
8454
8455(define-public python-jmespath
8456 (package
8457 (name "python-jmespath")
8458 (version "0.9.0")
8459 (source
8460 (origin
8461 (method url-fetch)
8462 (uri (pypi-uri "jmespath" version))
8463 (sha256
8464 (base32
8465 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8466 (build-system python-build-system)
ba9da248
DT
8467 (synopsis "JSON Matching Expressions")
8468 (description "JMESPath (pronounced “james path”) is a Python library that
8469allows one to declaratively specify how to extract elements from a JSON
8470document.")
8471 (home-page "https://github.com/jmespath/jmespath.py")
8472 (license license:expat)))
8473
8474(define-public python2-jmespath
8475 (package-with-python2 python-jmespath))
935fcd5c
DT
8476
8477(define-public python-botocore
8478 (package
8479 (name "python-botocore")
e09f952d 8480 (version "1.4.62")
935fcd5c
DT
8481 (source
8482 (origin
8483 (method url-fetch)
8484 (uri (pypi-uri "botocore" version))
8485 (sha256
8486 (base32
e09f952d 8487 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8488 (build-system python-build-system)
482d9591 8489 (propagated-inputs
935fcd5c
DT
8490 `(("python-dateutil" ,python-dateutil-2)
8491 ("python-docutils" ,python-docutils)
482d9591 8492 ("python-jmespath" ,python-jmespath)))
8fa6890b 8493 (native-inputs
482d9591 8494 `(("python-mock" ,python-mock)
935fcd5c 8495 ("python-nose" ,python-nose)
482d9591 8496 ("behave" ,behave)
935fcd5c 8497 ("python-tox" ,python-tox)
482d9591 8498 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8499 (home-page "https://github.com/boto/botocore")
8500 (synopsis "Low-level interface to AWS")
8501 (description "Botocore is a Python library that provides a low-level
8502interface to the Amazon Web Services (AWS) API.")
3f641af0 8503 (license license:asl2.0)))
935fcd5c
DT
8504
8505(define-public python2-botocore
8506 (package-with-python2 python-botocore))
f861b8b8
DT
8507
8508(define-public awscli
8509 (package
8510 (name "awscli")
d5ccf71e 8511 (version "1.11.5")
f861b8b8
DT
8512 (source
8513 (origin
8514 (method url-fetch)
d5ccf71e 8515 (uri (pypi-uri name version))
f861b8b8
DT
8516 (sha256
8517 (base32
d5ccf71e 8518 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8519 (build-system python-build-system)
482d9591 8520 (propagated-inputs
f861b8b8 8521 `(("python-colorama" ,python-colorama)
482d9591
HG
8522 ("python-botocore" ,python-botocore)
8523 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8524 ("python-docutils" ,python-docutils)
482d9591 8525 ("python-rsa" ,python-rsa)))
d4649177 8526 (native-inputs
482d9591 8527 `(("python-mock" ,python-mock)
f861b8b8 8528 ("python-nose" ,python-nose)
f861b8b8
DT
8529 ("python-sphinx" ,python-sphinx)
8530 ("python-tox" ,python-tox)
482d9591 8531 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8532 (home-page "http://aws.amazon.com/cli/")
8533 (synopsis "Command line client for AWS")
8534 (description "AWS CLI provides a unified command line interface to the
8535Amazon Web Services (AWS) API.")
3f641af0 8536 (license license:asl2.0)))
6a44697d
LF
8537
8538(define-public python-hypothesis
8539 (package
8540 (name "python-hypothesis")
bea6d94d 8541 (version "3.1.0")
6a44697d
LF
8542 (source (origin
8543 (method url-fetch)
8544 (uri (pypi-uri "hypothesis" version))
8545 (sha256
8546 (base32
bea6d94d 8547 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8548 (build-system python-build-system)
6a44697d
LF
8549 (propagated-inputs
8550 `(("python-flake8" ,python-flake8)
8551 ("python-pytest" ,python-pytest)))
8552 (synopsis "Library for property based testing")
8553 (description "Hypothesis is a library for testing your Python code against a
8554much larger range of examples than you would ever want to write by hand. It’s
8555based on the Haskell library, Quickcheck, and is designed to integrate
8556seamlessly into your existing Python unit testing work flow.")
8557 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8558 (license license:mpl2.0)
6f068e08 8559 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8560
8561(define-public python2-hypothesis
6f068e08
EF
8562 (let ((hypothesis (package-with-python2
8563 (strip-python2-variant python-hypothesis))))
8564 (package (inherit hypothesis)
8565 (native-inputs
f3b98f4f 8566 `(("python2-enum34" ,python2-enum34))))))
7517e73c
LF
8567
8568(define-public python-pytest-subtesthack
8569 (package
8570 (name "python-pytest-subtesthack")
8571 (version "0.1.1")
8572 (source (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "pytest-subtesthack" version))
8575 (sha256
8576 (base32
8577 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8578 (build-system python-build-system)
7517e73c
LF
8579 (propagated-inputs
8580 `(("python-pytest" ,python-pytest)))
8581 (synopsis "Set-up and tear-down fixtures for unit tests")
8582 (description "This plugin allows you to set up and tear down fixtures within
8583unit test functions that use @code{py.test}. This is useful for using
8584@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8585function multiple times, without setting up or tearing down fixture state as is
8586normally the case.")
8587 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8588 (license license:unlicense)))
7517e73c
LF
8589
8590(define-public python2-pytest-subtesthack
8591 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8592
8593(define-public python2-xdo
8594 (package
8595 (name "python2-xdo")
8596 (version "0.2")
8597 (source (origin
8598 (method url-fetch)
8599 (uri (string-append
8600 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8601 "python-xdo_" version ".orig.tar.gz"))
8602 (sha256
8603 (base32
8604 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8605 (build-system python-build-system)
8606 (arguments
8607 `(#:python ,python-2
8608 #:tests? #f)) ; no tests provided
8609 (inputs
8610 `(("xdotool" ,xdotool)
8611 ("libX11" ,libx11)))
8612 (home-page "https://tracker.debian.org/pkg/python-xdo")
8613 (synopsis "Python library for simulating X11 keyboard/mouse input")
8614 (description "Provides bindings to libxdo for manipulating X11 via simulated
8615input. (Note that this is mostly a legacy library; you may wish to look at
8616python-xdo for newer bindings.)")
3f641af0 8617 (license license:bsd-3)))
0bdc1671 8618
cb34dc6c
CAW
8619(define-public python-wtforms
8620 (package
8621 (name "python-wtforms")
8622 (version "2.1")
8623 (source
8624 (origin
8625 (method url-fetch)
8626 (uri (pypi-uri "WTForms" version ".zip"))
8627 (sha256
8628 (base32
8629 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8630 (build-system python-build-system)
13c4d874
EF
8631 (arguments
8632 '(#:phases
8633 (modify-phases %standard-phases
8634 (add-after 'unpack 'remove-django-test
8635 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8636 (lambda _
8637 (substitute*
8638 "tests/runtests.py"
8639 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8640 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8641 #t)))))
cb34dc6c
CAW
8642 (native-inputs
8643 `(("unzip" ,unzip)))
8644 (home-page "http://wtforms.simplecodes.com/")
8645 (synopsis
8646 "Form validation and rendering library for Python web development")
8647 (description
8648 "WTForms is a flexible forms validation and rendering library
8649for Python web development. It is very similar to the web form API
8650available in Django, but is a standalone package.")
f210e944 8651 (license license:bsd-3)))
cb34dc6c
CAW
8652
8653(define-public python2-wtforms
f210e944 8654 (package-with-python2 python-wtforms))
50aaec25
DT
8655
8656(define-public python-mako
8657 (package
8658 (name "python-mako")
8659 (version "1.0.3")
8660 (source
8661 (origin
8662 (method url-fetch)
8663 (uri (pypi-uri "Mako" version))
8664 (sha256
8665 (base32
8666 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8667 (build-system python-build-system)
482d9591
HG
8668 (propagated-inputs
8669 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8670 (native-inputs
482d9591 8671 `(("python-mock" ,python-mock)
50aaec25
DT
8672 ("python-nose" ,python-nose)))
8673 (home-page "http://www.makotemplates.org/")
8674 (synopsis "Templating language for Python")
8675 (description "Mako is a templating language for Python that compiles
8676templates into Python modules.")
f210e944 8677 (license license:expat)))
50aaec25
DT
8678
8679(define-public python2-mako
f210e944 8680 (package-with-python2 python-mako))
ae00a41f
CAW
8681
8682(define-public python-waitress
8683 (package
8684 (name "python-waitress")
8685 (version "0.8.10")
8686 (source
8687 (origin
8688 (method url-fetch)
8689 (uri (pypi-uri "waitress" version))
8690 (sha256
8691 (base32
8692 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8693 (build-system python-build-system)
8694 (home-page "https://github.com/Pylons/waitress")
8695 (synopsis "Waitress WSGI server")
8696 (description "Waitress is meant to be a production-quality pure-Python WSGI
8697server with very acceptable performance.")
f210e944 8698 (license license:zpl2.1)))
ae00a41f
CAW
8699
8700(define-public python2-waitress
f210e944 8701 (package-with-python2 python-waitress))
778a284b
CAW
8702
8703(define-public python-wsgiproxy2
8704 (package
8705 (name "python-wsgiproxy2")
8706 (version "0.4.2")
8707 (source
8708 (origin
8709 (method url-fetch)
8710 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8711 (sha256
8712 (base32
8713 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8714 (build-system python-build-system)
e359b31a
LF
8715 (arguments
8716 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8717 ;; support Python 3:
8718 ;; https://github.com/benoitc/restkit/issues/140
8719 #:tests? #f))
778a284b
CAW
8720 (native-inputs
8721 `(("unzip" ,unzip)
8722 ("python-nose" ,python-nose)
8723 ("python-coverage" ,python-coverage)))
8724 (propagated-inputs
8725 `(("python-six" ,python-six)
8726 ("python-webob" ,python-webob)))
8727 (home-page
8728 "https://github.com/gawel/WSGIProxy2/")
8729 (synopsis "WSGI Proxy with various http client backends")
8730 (description "WSGI turns HTTP requests into WSGI function calls.
8731WSGIProxy turns WSGI function calls into HTTP requests.
8732It also includes code to sign requests and pass private data,
8733and to spawn subprocesses to handle requests.")
f210e944 8734 (license license:expat)))
778a284b
CAW
8735
8736(define-public python2-wsgiproxy2
f210e944 8737 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8738
8739(define-public python-pastedeploy
8740 (package
8741 (name "python-pastedeploy")
8742 (version "1.5.2")
8743 (source
8744 (origin
8745 (method url-fetch)
8746 (uri (pypi-uri "PasteDeploy" version))
8747 (sha256
8748 (base32
8749 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8750 (build-system python-build-system)
8751 (native-inputs
8752 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8753 (home-page "http://pythonpaste.org/deploy/")
8754 (synopsis
8755 "Load, configure, and compose WSGI applications and servers")
8756 (description
8757 "This tool provides code to load WSGI applications and servers from URIs;
8758these URIs can refer to Python Eggs for INI-style configuration files. Paste
8759Script provides commands to serve applications based on this configuration
8760file.")
8761 (license license:expat)))
8762
8763(define-public python2-pastedeploy
8764 (package-with-python2 python-pastedeploy))
1cf53652 8765
c4a7904c
CAW
8766(define-public python-paste
8767 (package
8768 (name "python-paste")
8769 (version "2.0.2")
8770 (source
8771 (origin
8772 (method url-fetch)
8773 (uri (pypi-uri "Paste" version))
8774 (sha256
8775 (base32
8776 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8777 (patches (search-patches "python-paste-remove-website-test.patch"
8778 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8779 (build-system python-build-system)
8780 (native-inputs
8781 `(("python-nose" ,python-nose)))
8782 (propagated-inputs
f3b98f4f 8783 `(("python-six" ,python-six)))
c4a7904c
CAW
8784 (arguments
8785 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8786 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8787 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8788 ;; still... things should be better by the next Paste release.)
8789 #:tests? #f))
8790 (home-page "http://pythonpaste.org")
8791 (synopsis
8792 "Python web development tools, focusing on WSGI")
8793 (description
8794 "Paste provides a variety of web development tools and middleware which
8795can be nested together to build web applications. Paste's design closely
8796follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8797 (license license:expat)
8798 (properties `((python2-variant . ,(delay python2-paste))))))
8799
8800(define-public python2-paste
8801 (let ((paste (package-with-python2
8802 (strip-python2-variant python-paste))))
8803 (package
8804 (inherit paste)
8805 (arguments
8806 ;; Tests are back for Python 2!
8807 `(#:tests? #t
8808 ,@(package-arguments paste))))))
8809
a8f20f63
CAW
8810(define-public python-pastescript
8811 (package
8812 (name "python-pastescript")
8813 (version "2.0.2")
8814 (source
8815 (origin
8816 (method url-fetch)
8817 (uri (pypi-uri "PasteScript" version))
8818 (sha256
8819 (base32
8820 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8821 (build-system python-build-system)
8822 (native-inputs
8823 `(("python-nose" ,python-nose)))
8824 (propagated-inputs
f3b98f4f 8825 `(("python-paste" ,python-paste)
a8f20f63
CAW
8826 ("python-pastedeploy" ,python-pastedeploy)))
8827 (home-page "http://pythonpaste.org/script/")
8828 (arguments
8829 '(;; Unfortunately, this requires the latest unittest2,
8830 ;; but that requires traceback2 which requires linecache2 which requires
8831 ;; unittest2. So we're skipping tests for now.
8832 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8833 ;; so in theory we could get around this situation somehow.)
8834 #:tests? #f))
8835 (synopsis
8836 "Pluggable command line tool for serving web applications and more")
8837 (description
8838 "PasteScript is a plugin-friendly command line tool which provides a
8839variety of features, from launching web applications to bootstrapping project
8840layouts.")
8841 (license license:expat)))
8842
8843(define-public python2-pastescript
8844 (package-with-python2 python-pastescript))
8845
1cf53652
CAW
8846(define-public python-pyquery
8847 (package
8848 (name "python-pyquery")
aab76e80 8849 (version "1.2.13")
1cf53652
CAW
8850 (source
8851 (origin
8852 (method url-fetch)
8853 (uri (pypi-uri "pyquery" version))
8854 (sha256
8855 (base32
aab76e80 8856 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8857 (build-system python-build-system)
2ddbfa8c
LF
8858 (native-inputs
8859 `(("python-webob" ,python-webob)
8860 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8861 (propagated-inputs
8862 `(("python-lxml" ,python-lxml)
8863 ("python-cssselect" ,python-cssselect)))
8864 (home-page "https://github.com/gawel/pyquery")
8865 (synopsis "Make jQuery-like queries on xml documents")
8866 (description "pyquery allows you to make jQuery queries on xml documents.
8867The API is as much as possible the similar to jQuery. pyquery uses lxml for
8868fast xml and html manipulation.")
f210e944 8869 (license license:bsd-3)))
1cf53652
CAW
8870
8871(define-public python2-pyquery
f210e944 8872 (package-with-python2 python-pyquery))
aa6313d6
CAW
8873
8874(define-public python-webtest
8875 (package
8876 (name "python-webtest")
8877 (version "2.0.20")
8878 (source
8879 (origin
8880 (method url-fetch)
8881 (uri (pypi-uri "WebTest" version))
8882 (sha256
8883 (base32
8884 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8885 (build-system python-build-system)
8886 (arguments
8887 `(;; Unfortunately we have to disable tests!
8888 ;; This release of WebTest is pinned to python-nose < 1.3,
8889 ;; but older versions of python-nose are plagued with the following
8890 ;; bug(s), which rears its ugly head during test execution:
8891 ;; https://github.com/nose-devs/nose/issues/759
8892 ;; https://github.com/nose-devs/nose/pull/811
8893 #:tests? #f))
8894 ;; Commented out code is no good, but in this case, once tests
8895 ;; are ready to be enabled again, we should put the following
8896 ;; in place:
8897 ;; (native-inputs
8898 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8899 ;; ; but see above comment
8900 ;; ("python-coverage" ,python-coverage)
8901 ;; ("python-mock" ,python-mock)
8902 ;; ("python-pastedeploy" ,python-pastedeploy)
8903 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8904 ;; ("python-pyquery" ,python-pyquery)))
8905 (propagated-inputs
8906 `(("python-waitress" ,python-waitress)
8907 ("python-webob" ,python-webob)
8908 ("python-six" ,python-six)
8909 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8910 (home-page "http://webtest.pythonpaste.org/")
8911 (synopsis "Helper to test WSGI applications")
8912 (description "Webtest allows you to test your Python web applications
8913without starting an HTTP server. It supports anything that supports the
8914minimum of WSGI.")
f210e944 8915 (license license:expat)))
aa6313d6
CAW
8916
8917(define-public python2-webtest
f210e944 8918 (package-with-python2 python-webtest))
4cb122cd
CAW
8919
8920(define-public python-anyjson
8921 (package
8922 (name "python-anyjson")
8923 (version "0.3.3")
8924 (source
8925 (origin
8926 (method url-fetch)
8927 (uri (pypi-uri "anyjson" version))
8928 (sha256
8929 (base32
8930 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8931 (build-system python-build-system)
8932 (arguments
8933 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8934 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8935 ;; whatever) so this transformation needs to be done before the tests
8936 ;; can be run. Maybe we could add a build step to transform beforehand
8937 ;; but it could be annoying/difficult.
8938 ;; We can enable tests for the Python 2 version, though, and do below.
8939 #:tests? #f))
8940 (home-page "http://bitbucket.org/runeh/anyjson/")
8941 (synopsis
8942 "Wraps best available JSON implementation in a common interface")
8943 (description
8944 "Anyjson loads whichever is the fastest JSON module installed
8945and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8946 (license license:bsd-3)
4cb122cd
CAW
8947 (properties `((python2-variant . ,(delay python2-anyjson))))))
8948
8949(define-public python2-anyjson
8950 (let ((anyjson (package-with-python2
8951 (strip-python2-variant python-anyjson))))
8952 (package
8953 (inherit anyjson)
8954 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8955 #:tests? #t
8956 ,@(package-arguments anyjson)))
00e10c6e 8957 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8958
8959(define-public python-amqp
8960 (package
8961 (name "python-amqp")
8962 (version "1.4.9")
8963 (source
8964 (origin
8965 (method url-fetch)
8966 (uri (pypi-uri "amqp" version))
8967 (sha256
8968 (base32
8969 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8970 (build-system python-build-system)
8971 (native-inputs
8972 `(("python-nose" ,python-nose)
8973 ("python-mock" ,python-mock)))
8974 (home-page "http://github.com/celery/py-amqp")
8975 (synopsis
8976 "Low-level AMQP client for Python (fork of amqplib)")
8977 (description
8978 "This is a fork of amqplib which was originally written by Barry Pederson.
8979It is maintained by the Celery project, and used by kombu as a pure python
8980alternative when librabbitmq is not available.")
3f641af0 8981 (license license:lgpl2.1+)
8dfceab7
CAW
8982 (properties `((python2-variant . ,(delay python2-amqp))))))
8983
8984(define-public python2-amqp
8985 (let ((amqp (package-with-python2
8986 (strip-python2-variant python-amqp))))
8987 (package
8988 (inherit amqp)
8989 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8990 ;; unmaintained. Weirdly, does not do this on the python 3
8991 ;; version?
8992 #:tests? #f
00e10c6e 8993 ,@(package-arguments amqp))))))
7d387305
CAW
8994
8995(define-public python-kombu
8996 (package
8997 (name "python-kombu")
0cb59822 8998 (version "3.0.37")
7d387305
CAW
8999 (source
9000 (origin
9001 (method url-fetch)
9002 (uri (pypi-uri "kombu" version))
9003 (sha256
9004 (base32
0cb59822 9005 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9006 (build-system python-build-system)
9007 (native-inputs
9008 `(("python-mock" ,python-mock)
9009 ("python-nose" ,python-nose)))
9010 (propagated-inputs
9011 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9012 ("python-amqp" ,python-amqp)
9013 ("python-redis" ,python-redis)))
7d387305
CAW
9014 (home-page "http://kombu.readthedocs.org")
9015 (synopsis "Message passing library for Python")
9016 (description "The aim of Kombu is to make messaging in Python as easy as
9017possible by providing an idiomatic high-level interface for the AMQ protocol,
9018and also provide proven and tested solutions to common messaging problems.
9019AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9020message orientation, queuing, routing, reliability and security, for which the
9021RabbitMQ messaging server is the most popular implementation.")
3f641af0 9022 (license license:bsd-3)
7d387305
CAW
9023 (properties `((python2-variant . ,(delay python2-kombu))))))
9024
9025(define-public python2-kombu
9026 (let ((kombu (package-with-python2
9027 (strip-python2-variant python-kombu))))
9028 (package
9029 (inherit kombu)
328bb95d
HG
9030 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9031 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9032
9033(define-public python-billiard
9034 (package
9035 (name "python-billiard")
a6bb9e44 9036 (version "3.3.0.23")
b6f0b9fb
CAW
9037 (source
9038 (origin
9039 (method url-fetch)
9040 (uri (pypi-uri "billiard" version))
9041 (sha256
9042 (base32
a6bb9e44 9043 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9044 (build-system python-build-system)
9045 (native-inputs
9046 `(("python-nose" ,python-nose)))
9047 (home-page "http://github.com/celery/billiard")
9048 (synopsis
9049 "Python multiprocessing fork with improvements and bugfixes")
9050 (description
9051 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9052multiprocessing package itself is a renamed and updated version of R Oudkerk's
9053pyprocessing package. This standalone variant is intended to be compatible with
9054Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9055 (license license:bsd-3)
b6f0b9fb
CAW
9056 (properties `((python2-variant . ,(delay python2-billiard))))))
9057
9058(define-public python2-billiard
9059 (let ((billiard (package-with-python2
9060 (strip-python2-variant python-billiard))))
9061 (package
9062 (inherit billiard)
00e10c6e 9063 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9064 ("python2-mock" ,python2-mock)
9065 ,@(package-native-inputs billiard))))))
22df6419
CAW
9066
9067(define-public python-celery
9068 (package
9069 (name "python-celery")
9ebe87fe 9070 (version "3.1.24")
22df6419
CAW
9071 (source
9072 (origin
9073 (method url-fetch)
9074 (uri (pypi-uri "celery" version))
9075 (sha256
9076 (base32
9ebe87fe 9077 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9078 (build-system python-build-system)
9ebe87fe
LF
9079 (arguments
9080 `(#:phases
9081 (modify-phases %standard-phases
9082 ;; These tests break with Python 3.5:
9083 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9084 (replace 'check
9085 (lambda _
9086 (zero?
9087 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9088 (native-inputs
9089 `(("python-nose" ,python-nose)))
f22efa01 9090 (propagated-inputs
22df6419
CAW
9091 `(("python-pytz" ,python-pytz)
9092 ("python-billiard" ,python-billiard)
9093 ("python-kombu" ,python-kombu)))
9094 (home-page "http://celeryproject.org")
9095 (synopsis "Distributed Task Queue")
9096 (description "Celery is an asynchronous task queue/job queue based on
9097distributed message passing. It is focused on real-time operation, but
9098supports scheduling as well. The execution units, called tasks, are executed
9099concurrently on a single or more worker servers using multiprocessing,
9100Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9101synchronously (wait until ready).")
3f641af0 9102 (license license:bsd-3)
22df6419
CAW
9103 (properties `((python2-variant . ,(delay python2-celery))))))
9104
9105(define-public python2-celery
9106 (let ((celery (package-with-python2
9107 (strip-python2-variant python-celery))))
9108 (package
9109 (inherit celery)
00e10c6e 9110 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9111 ("python2-mock" ,python2-mock)
9112 ,@(package-native-inputs celery))))))
97e32948
CAW
9113
9114(define-public python-translitcodec
9115 (package
9116 (name "python-translitcodec")
9117 (version "0.4.0")
9118 (source
9119 (origin
9120 (method url-fetch)
9121 (uri (pypi-uri "translitcodec" version))
9122 (sha256
9123 (base32
9124 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9125 (build-system python-build-system)
9126 (arguments
9127 `(#:tests? #f)) ; no tests provided
9128 (home-page
9129 "https://github.com/claudep/translitcodec")
9130 (synopsis
9131 "Unicode to 8-bit charset transliteration codec")
9132 (description
9133 "This package contains codecs for transliterating ISO 10646 texts into
9134best-effort representations using smaller coded character sets (ASCII,
9135ISO 8859, etc.).")
f210e944 9136 (license license:expat)))
97e32948
CAW
9137
9138(define-public python2-translitcodec
f210e944 9139 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9140
9141(define-public python-editor
9142 (package
9143 (name "python-editor")
9144 (version "0.5")
9145 (source
9146 (origin
9147 (method url-fetch)
9148 (uri (pypi-uri "python-editor" version))
9149 (sha256
9150 (base32
9151 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9152 (build-system python-build-system)
9153 (home-page
9154 "https://github.com/fmoo/python-editor")
9155 (synopsis
9156 "Programmatically open an editor, capture the result")
9157 (description
9158 "python-editor is a library that provides the editor module for
9159programmatically interfacing with your system's $EDITOR.")
f210e944 9160 (license license:asl2.0)))
0c3b90d4
CAW
9161
9162(define-public python2-editor
f210e944 9163 (package-with-python2 python-editor))
3276517c
LF
9164
9165(define-public python-sphinxcontrib-programoutput
9166 (package
9167 (name "python-sphinxcontrib-programoutput")
9168 (version "0.8")
9169 (source (origin
9170 (method url-fetch)
9171 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9172 (sha256
9173 (base32
9174 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9175 (build-system python-build-system)
9176 (propagated-inputs
a0a09859 9177 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9178 (synopsis "Sphinx extension to include program output")
9179 (description "A Sphinx extension to literally insert the output of arbitrary
9180commands into documents, helping you to keep your command examples up to date.")
9181 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9182 (license license:bsd-2)))
3276517c
LF
9183
9184(define-public python2-sphinxcontrib-programoutput
f210e944 9185 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9186
9187(define-public python-sphinx-repoze-autointerface
9188 (package
9189 (name "python-sphinx-repoze-autointerface")
328ae341 9190 (version "0.8")
548d7165
LF
9191 (source (origin
9192 (method url-fetch)
9193 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9194 (sha256
9195 (base32
328ae341 9196 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9197 (build-system python-build-system)
9198 (propagated-inputs
47c7dc4a 9199 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9200 ("python-zope-interface" ,python-zope-interface)))
9201 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9202 (description "This package defines an extension for the Sphinx documentation
9203system. The extension allows generation of API documentation by
9204introspection of @code{zope.interface} instances in code.")
9205 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9206 (license license:repoze)))
548d7165
LF
9207
9208(define-public python2-sphinx-repoze-autointerface
9209 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9210
9211(define-public python-psycopg2
9212 (package
9213 (name "python-psycopg2")
9214 (version "2.6.1")
9215 (source
9216 (origin
9217 (method url-fetch)
9218 (uri (pypi-uri "psycopg2" version))
9219 (sha256
9220 (base32
9221 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9222 (build-system python-build-system)
9223 (arguments
9224 ;; Tests would require a postgresql database "psycopg2_test"
9225 ;; and a running postgresql database management service.
9226 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9227 (inputs
9228 `(("postgresql" ,postgresql))) ; libpq
9229 (home-page "http://initd.org/psycopg/")
9230 (synopsis "Python PostgreSQL adapter")
9231 (description
9232 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9233 (license license:lgpl3+)))
b31fbea5
DM
9234
9235(define-public python2-psycopg2
f210e944 9236 (package-with-python2 python-psycopg2))
eed1a61f
LF
9237
9238(define-public python-vobject
9239 (package
9240 (name "python-vobject")
9bed9b15 9241 (version "0.9.2")
eed1a61f
LF
9242 (source (origin
9243 (method url-fetch)
9244 (uri (pypi-uri "vobject" version))
9245 (sha256
9246 (base32
9bed9b15 9247 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9248 (build-system python-build-system)
a9871b7b
LF
9249 (arguments
9250 '(;; The test suite relies on some non-portable Windows interfaces.
9251 #:tests? #f))
f22efa01 9252 (propagated-inputs
eed1a61f
LF
9253 `(("python-dateutil-2" ,python-dateutil-2)
9254 ("python-pyicu" ,python-pyicu)))
9255 (synopsis "Parse and generate vCard and vCalendar files")
9256 (description "Vobject is intended to be a full featured Python package for
9257parsing and generating vCard and vCalendar files. Currently, iCalendar files
9258are supported and well tested. vCard 3.0 files are supported, and all data
9259should be imported, but only a few components are understood in a sophisticated
9260way.")
9261 (home-page "http://eventable.github.io/vobject/")
f210e944 9262 (license license:asl2.0)))
eed1a61f
LF
9263
9264(define-public python2-vobject
f210e944 9265 (package-with-python2 python-vobject))
cedac813
LF
9266
9267(define-public python-munkres
9268 (package
9269 (name "python-munkres")
38e81a2c 9270 (version "1.0.8")
cedac813
LF
9271 (source (origin
9272 (method url-fetch)
9273 (uri (pypi-uri "munkres" version))
9274 (sha256
9275 (base32
38e81a2c 9276 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9277 (build-system python-build-system)
9278 (arguments
9279 '(#:tests? #f)) ; no test suite
9280 (home-page "http://software.clapper.org/munkres/")
9281 (synopsis "Implementation of the Munkres algorithm")
9282 (description "The Munkres module provides an implementation of the Munkres
9283algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9284useful for solving the Assignment Problem.")
3f641af0 9285 (license license:bsd-3)))
cedac813
LF
9286
9287(define-public python2-munkres
9288 (package-with-python2 python-munkres))
f3b3d78f
LF
9289
9290(define-public python-flask
9291 (package
9292 (name "python-flask")
c6c80104 9293 (version "0.11.1")
f3b3d78f
LF
9294 (source (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "Flask" version))
9297 (sha256
9298 (base32
c6c80104 9299 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9300 (build-system python-build-system)
9301 (propagated-inputs
9302 `(("python-itsdangerous" ,python-itsdangerous)
9303 ("python-jinja2" ,python-jinja2)
8f35c030 9304 ("python-click" ,python-click)
f3b3d78f
LF
9305 ("python-werkzeug" ,python-werkzeug)))
9306 (home-page "https://github.com/mitsuhiko/flask/")
9307 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9308 (description "Flask is a micro web framework based on the Werkzeug toolkit
9309and Jinja2 template engine. It is called a micro framework because it does not
9310presume or force a developer to use a particular tool or library.")
f210e944 9311 (license license:bsd-3)))
f3b3d78f
LF
9312
9313(define-public python2-flask
f210e944 9314 (package-with-python2 python-flask))
603d665b
LF
9315
9316(define-public python-cookies
9317 (package
9318 (name "python-cookies")
9319 (version "2.2.1")
9320 (source (origin
9321 (method url-fetch)
9322 (uri (pypi-uri "cookies" version))
9323 (sha256
9324 (base32
9325 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9326 (build-system python-build-system)
9327 (arguments
9328 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9329 #:tests? #f))
9330 (native-inputs
9331 `(("python-pytest" ,python2-pytest)))
9332 (synopsis "HTTP cookie parser and renderer")
9333 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9334Python.")
9335 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9336 (license license:expat)))
603d665b
LF
9337
9338(define-public python2-cookies
f210e944 9339 (package-with-python2 python-cookies))
0efde7d6
LF
9340
9341(define-public python-responses
9342 (package
9343 (name "python-responses")
9344 (version "0.5.1")
9345 (source (origin
9346 (method url-fetch)
9347 (uri (pypi-uri "responses" version))
9348 (sha256
9349 (base32
9350 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9351 (build-system python-build-system)
9352 (arguments
9353 `(;; Test suite is not distributed:
9354 ;; https://github.com/getsentry/responses/issues/38
9355 #:tests? #f))
9356 (native-inputs
d8ea5f2f 9357 `(("python-mock" ,python-mock)))
0efde7d6
LF
9358 (propagated-inputs
9359 `(("python-requests" ,python-requests)
d8ea5f2f 9360 ("python-cookies" ,python-cookies)
0efde7d6
LF
9361 ("python-six" ,python-six)))
9362 (home-page "https://github.com/getsentry/responses")
9363 (synopsis "Utility for mocking out the `requests` Python library")
9364 (description "A utility library for mocking out the `requests` Python
9365library.")
f210e944 9366 (license license:asl2.0)))
0efde7d6
LF
9367
9368(define-public python2-responses
f210e944 9369 (package-with-python2 python-responses))
76b94885 9370
b7afd018
RW
9371(define-public python-whoosh
9372 (package
9373 (name "python-whoosh")
9374 (version "2.7.4")
9375 (source
9376 (origin
9377 (method url-fetch)
9378 (uri (pypi-uri "Whoosh" version))
9379 (sha256
9380 (base32
9381 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9382 (build-system python-build-system)
9383 (native-inputs
f3b98f4f 9384 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9385 (home-page "http://bitbucket.org/mchaput/whoosh")
9386 (synopsis "Full text indexing, search, and spell checking library")
9387 (description
9388 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9389checking library.")
9390 (license license:bsd-2)))
9391
9392(define-public python2-whoosh
9393 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9394 (package (inherit whoosh)
9395 (propagated-inputs
9396 `(("python2-backport-ssl-match-hostname"
9397 ,python2-backport-ssl-match-hostname)
9398 ,@(package-propagated-inputs whoosh))))))
9399
76b94885
LF
9400(define-public python-pathlib
9401 (package
9402 (name "python-pathlib")
9403 (version "1.0.1")
9404 (source (origin
9405 (method url-fetch)
9406 (uri (pypi-uri "pathlib" version))
9407 (sha256
9408 (base32
9409 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9410 (build-system python-build-system)
92a312dc
RW
9411 ;; The tests depend on the internal "test" module, which does not provide
9412 ;; a stable interface.
9413 (arguments `(#:tests? #f))
76b94885 9414 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9415 (synopsis "Object-oriented file system paths")
9416 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9417It offers the following advantages over using string objects:
9418
9419@enumerate
9420@item No more cumbersome use of os and os.path functions. Everything can
9421be done easily through operators, attribute accesses, and method calls.
9422@item Embodies the semantics of different path types. For example,
9423comparing Windows paths ignores casing.
9424@item Well-defined semantics, eliminating any inconsistencies or
9425ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9426@end enumerate
9427
9428Note: In Python 3.4, pathlib is now part of the standard library. For other
9429Python versions please consider python-pathlib2 instead, which tracks the
9430standard library module. This module (python-pathlib) isn't maintained
9431anymore.")
76b94885
LF
9432 (license license:expat)))
9433
9434(define-public python2-pathlib
9435 (package-with-python2 python-pathlib))
25a7db0a 9436
b7703c81
HG
9437(define-public python2-pathlib2
9438 (package
9439 (name "python2-pathlib2")
9440 (version "2.1.0")
9441 (source (origin
9442 (method url-fetch)
9443 (uri (pypi-uri "pathlib2" version))
9444 (sha256
9445 (base32
9446 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9447 (build-system python-build-system)
49a531f5
HG
9448 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9449 ;; version is 3.4 which already includes this package as part of the
9450 ;; standard library.
b7703c81
HG
9451 (arguments
9452 `(#:python ,python-2))
9453 (native-inputs
f3b98f4f 9454 `(("python2-six" ,python2-six)))
b7703c81
HG
9455 (home-page "http://pypi.python.org/pypi/pathlib2/")
9456 (synopsis "Object-oriented file system paths - backport of standard
9457pathlib module")
9458 (description "The goal of pathlib2 is to provide a backport of standard
9459pathlib module which tracks the standard library module, so all the newest
9460features of the standard pathlib can be used also on older Python versions.
9461
9462Pathlib offers a set of classes to handle file system paths. It offers the
9463following advantages over using string objects:
9464
9465@enumerate
9466@item No more cumbersome use of os and os.path functions. Everything can
9467be done easily through operators, attribute accesses, and method calls.
9468@item Embodies the semantics of different path types. For example,
9469comparing Windows paths ignores casing.
9470@item Well-defined semantics, eliminating any inconsistencies or
9471ambiguities (forward vs. backward slashes, etc.).
9472@end enumerate")
9473 (license license:expat)))
9474
25a7db0a
LF
9475(define-public python-jellyfish
9476 (package
9477 (name "python-jellyfish")
8c4964dd 9478 (version "0.5.6")
25a7db0a
LF
9479 (source (origin
9480 (method url-fetch)
9481 (uri (pypi-uri "jellyfish" version))
9482 (sha256
9483 (base32
8c4964dd 9484 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9485 (build-system python-build-system)
9486 (native-inputs
9487 `(("python-pytest" ,python-pytest)))
9488 (home-page "https://github.com/jamesturk/jellyfish")
9489 (synopsis "Approximate and phonetic matching of strings")
9490 (description "Jellyfish uses a variety of string comparison and phonetic
9491encoding algorithms to do fuzzy string matching.")
3f641af0 9492 (license license:bsd-2)
25a7db0a
LF
9493 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9494
9495(define-public python2-jellyfish
9496 (let ((jellyfish (package-with-python2
9497 (strip-python2-variant python-jellyfish))))
9498 (package (inherit jellyfish)
00e10c6e 9499 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9500 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9501
9502(define-public python2-unicodecsv
9503 (package
9504 (name "python2-unicodecsv")
9505 (version "0.14.1")
9506 (source (origin
9507 (method url-fetch)
9508 ;; The test suite is not included in the PyPi release.
9509 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9510 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9511 "archive/" version ".tar.gz"))
9512 (file-name (string-append name "-" version ".tar.gz"))
9513 (sha256
9514 (base32
9515 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9516 (build-system python-build-system)
9517 (arguments
9518 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9519 #:python ,python-2))
9520 (native-inputs
f3b98f4f 9521 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9522 (home-page "https://github.com/jdunck/python-unicodecsv")
9523 (synopsis "Unicode CSV module for Python 2")
9524 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9525module, adding support for Unicode strings.")
3f641af0 9526 (license license:bsd-2)))
064503aa
LF
9527
9528(define-public python-rarfile
9529 (package
9530 (name "python-rarfile")
67824447 9531 (version "2.8")
064503aa
LF
9532 (source (origin
9533 (method url-fetch)
9534 (uri (pypi-uri "rarfile" version))
9535 (sha256
9536 (base32
67824447 9537 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9538 (build-system python-build-system)
9539 (arguments
9540 '(#:phases
9541 (modify-phases %standard-phases
9542 (replace 'check
9543 ;; Many tests fail, but the installation proceeds.
9544 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9545 (native-inputs
9546 `(("which" ,which))) ; required for tests
9547 (propagated-inputs
9548 `(("libarchive" ,libarchive)))
9549 (home-page "https://github.com/markokr/rarfile")
9550 (synopsis "RAR archive reader for Python")
9551 (description "This is Python module for RAR archive reading. The interface
9552is made as zipfile like as possible.")
3f641af0 9553 (license license:isc)))
064503aa
LF
9554
9555(define-public python2-rarfile
9556 (package-with-python2 python-rarfile))
daeeea71
CM
9557
9558(define-public python-magic
9559 (package
9560 (name "python-magic")
9561 (version "0.4.3")
9562 (source
9563 (origin
9564 (method url-fetch)
9565 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9566 version ".tar.gz"))
9567 (sha256
9568 (base32
9569 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9570 (file-name (string-append name "-" version "-checkout"))))
9571 (build-system python-build-system)
9572 (arguments
9573 ;; The tests are unreliable, so don't run them. The tests fail
9574 ;; under Python3 because they were written for Python2 and
9575 ;; contain import statements that do not work in Python3. One of
9576 ;; the tests fails under Python2 because its assertions are
9577 ;; overly stringent; it relies on comparing output strings which
9578 ;; are brittle and can change depending on the version of
9579 ;; libmagic being used and the system on which the test is
9580 ;; running. In my case, under GuixSD 0.10.0, only one test
9581 ;; failed, and it seems to have failed only because the version
9582 ;; of libmagic that is packaged in Guix outputs a slightly
9583 ;; different (but not wrong) string than the one that the test
9584 ;; expected.
9585 '(#:tests? #f
9586 #:phases (modify-phases %standard-phases
9587 ;; Replace a specific method call with a hard-coded
9588 ;; path to the necessary libmagic.so file in the
9589 ;; store. If we don't do this, then the method call
9590 ;; will fail to find the libmagic.so file, which in
9591 ;; turn will cause any application using
9592 ;; python-magic to fail.
9593 (add-before 'build 'hard-code-path-to-libmagic
9594 (lambda* (#:key inputs #:allow-other-keys)
9595 (let ((file (assoc-ref inputs "file")))
9596 (substitute* "magic.py"
9597 (("ctypes.util.find_library\\('magic'\\)")
9598 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9599 #t)))
9600 (add-before 'install 'disable-egg-compression
9601 (lambda _
9602 (let ((port (open-file "setup.cfg" "a")))
9603 (display "\n[easy_install]\nzip_ok = 0\n"
9604 port)
9605 (close-port port)
9606 #t))))))
daeeea71
CM
9607 (inputs
9608 ;; python-magic needs to be able to find libmagic.so.
9609 `(("file" ,file)))
9610 (home-page "https://github.com/ahupp/python-magic")
9611 (synopsis "File type identification using libmagic")
9612 (description
9613 "This module uses ctypes to access the libmagic file type
9614identification library. It makes use of the local magic database and
9615supports both textual and MIME-type output. Note that this module and
9616the python-file module both provide a \"magic.py\" file; these two
9617modules, which are different and were developed separately, both serve
9618the same purpose: to provide Python bindings for libmagic.")
9619 (license license:expat)))
9620
9621(define-public python2-magic
9622 (package-with-python2 python-magic))
12af303f
CM
9623
9624(define-public python2-s3cmd
9625 (package
9626 (name "python2-s3cmd")
9627 (version "1.6.1")
9628 (source
9629 (origin
9630 (method url-fetch)
de67e922 9631 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9632 "s3cmd-" version ".tar.gz"))
9633 (sha256
9634 (base32
9635 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9636 (build-system python-build-system)
9637 (arguments
9638 ;; s3cmd is written for python2 only and contains no tests.
9639 `(#:python ,python-2
9640 #:tests? #f))
f22efa01 9641 (propagated-inputs
12af303f
CM
9642 `(("python2-dateutil" ,python2-dateutil)
9643 ;; The python-file package also provides a magic.py module.
9644 ;; This is an unfortunate state of affairs; however, s3cmd
9645 ;; fails to install if it cannot find specifically the
9646 ;; python-magic package. Thus we include it, instead of using
9647 ;; python-file. Ironically, s3cmd sometimes works better
9648 ;; without libmagic bindings at all:
9649 ;; https://github.com/s3tools/s3cmd/issues/198
9650 ("python2-magic" ,python2-magic)))
9651 (home-page "http://s3tools.org/s3cmd")
9652 (synopsis "Command line tool for S3-compatible storage services")
9653 (description
9654 "S3cmd is a command line tool for uploading, retrieving and managing data
9655in storage services that are compatible with the Amazon Simple Storage
9656Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9657GnuPG encryption, and more. It also supports management of Amazon's
9658CloudFront content delivery network.")
3f641af0 9659 (license license:gpl2+)))
4323a5f0
AE
9660
9661(define-public python-pkgconfig
9662 (package
9663 (name "python-pkgconfig")
9664 (version "1.1.0")
9665 (source
9666 (origin
9667 (method url-fetch)
9668 (uri (pypi-uri "pkgconfig" version))
9669 (sha256
9670 (base32
9671 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9672 (build-system python-build-system)
9673 (native-inputs
f3b98f4f 9674 `(("python-nose" ,python-nose)))
4323a5f0
AE
9675 (inputs
9676 `(("pkg-config" ,pkg-config)))
9677 (arguments
9678 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9679 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9680 #:tests? #f
4323a5f0
AE
9681 ;; Hard-code the path to pkg-config.
9682 #:phases
9683 (modify-phases %standard-phases
9684 (add-before
9685 'build 'patch
9686 (lambda _
9687 (substitute* "pkgconfig/pkgconfig.py"
9688 (("cmd = 'pkg-config")
9689 (string-append "cmd = '" (which "pkg-config"))))
9690 #t)))))
9691 (home-page "http://github.com/matze/pkgconfig")
9692 (synopsis "Python interface for pkg-config")
9693 (description "This module provides a Python interface to pkg-config. It
9694can be used to find all pkg-config packages, check if a package exists,
9695check if a package meets certain version requirements, query CFLAGS and
9696LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9697 (license license:expat)))
4323a5f0
AE
9698
9699(define-public python2-pkgconfig
9700 (package-with-python2 python-pkgconfig))
9701
2e697322
BW
9702(define-public python-bz2file
9703 (package
9704 (name "python-bz2file")
9705 (version "0.98")
9706 (source
9707 (origin
9708 (method url-fetch)
9709 (uri (pypi-uri "bz2file" version))
9710 (sha256
9711 (base32
9712 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9713 (build-system python-build-system)
9714 (arguments
124df723 9715 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9716 (home-page "https://github.com/nvawda/bz2file")
9717 (synopsis "Read and write bzip2-compressed files")
9718 (description
9719 "Bz2file is a Python library for reading and writing bzip2-compressed
9720files. It contains a drop-in replacement for the I/O interface in the
9721standard library's @code{bz2} module, including features from the latest
9722development version of CPython that are not available in older releases.")
3f641af0 9723 (license license:asl2.0)
2e697322
BW
9724 (properties `((python2-variant . ,(delay python2-bz2file))))))
9725
9726(define-public python2-bz2file
9727 (let ((base (package-with-python2
9728 (strip-python2-variant python-bz2file))))
9729 (package
9730 (inherit base)
124df723 9731 (arguments
752bb447
BW
9732 `(#:python ,python-2
9733 #:phases
124df723
BW
9734 (modify-phases %standard-phases
9735 ;; 'python setup.py test' does not work as of 0.98.
9736 ;; There is only the one test file, so we run it directly.
9737 (replace 'check
9738 (lambda _ (zero? (system* "python"
9739 "test_bz2file.py"))))))))))
2e697322 9740
da4ac1aa
BW
9741(define-public python-future
9742 (package
9743 (name "python-future")
9744 (version "0.15.2")
9745 (source
9746 (origin
9747 (method url-fetch)
9748 (uri (pypi-uri "future" version))
9749 (sha256
9750 (base32
9751 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9752 (build-system python-build-system)
9753 ;; Many tests connect to the network or are otherwise flawed.
9754 ;; https://github.com/PythonCharmers/python-future/issues/210
9755 (arguments
9756 `(#:tests? #f))
9757 (home-page "http://python-future.org")
9758 (synopsis "Single-source support for Python 3 and 2")
9759 (description
9760 "@code{python-future} is the missing compatibility layer between Python 2 and
9761Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9762to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9763 (license license:expat)))
da4ac1aa
BW
9764
9765(define-public python2-future
f210e944 9766 (package-with-python2 python-future))
da4ac1aa 9767
8e451885
AE
9768(define-public python-cysignals
9769 (package
9770 (name "python-cysignals")
9771 (version "1.1.0")
9772 (source
9773 (origin
9774 (method url-fetch)
9775 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9776 (sha256
9777 (base32
9778 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9779 (build-system python-build-system)
9780 (native-inputs
9781 `(("python-cython" ,python-cython)
8e451885
AE
9782 ("python-sphinx" ,python-sphinx)))
9783 (inputs
9784 `(("pari-gp" ,pari-gp)))
9785 (arguments
9786 `(#:modules ((guix build python-build-system)
9787 ((guix build gnu-build-system) #:prefix gnu:)
9788 (guix build utils))
9789 ;; FIXME: Tests are executed after installation and currently fail
9790 ;; when not installing into standard locations; the author is working
9791 ;; on a fix.
9792 #:tests? #f
9793 #:phases
9794 (modify-phases %standard-phases
9795 (add-before
9796 'build 'configure
9797 (assoc-ref gnu:%standard-phases 'configure)))))
9798 (home-page
9799 "https://github.com/sagemath/cysignals")
9800 (synopsis
9801 "Handling of interrupts and signals for Cython")
9802 (description
9803 "The cysignals package provides mechanisms to handle interrupts (and
9804other signals and errors) in Cython code, using two related approaches,
9805for mixed Cython/Python code or external C libraries and pure Cython code,
9806respectively.")
3f641af0 9807 (license license:lgpl3+)))
8e451885
AE
9808
9809(define-public python2-cysignals
9810 (package-with-python2 python-cysignals))
9811
63bcec71
DM
9812(define-public python2-shedskin
9813 (package
9814 (name "python2-shedskin")
9815 (version "0.9.4")
9816 (source
9817 (origin
9818 (method url-fetch)
9819 (uri (string-append "https://github.com/shedskin/shedskin/"
9820 "releases/download/v" version
9821 "/shedskin-" version ".tgz"))
9822 (sha256
9823 (base32
9824 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9825 (build-system python-build-system)
9826 (arguments
9827 `(#:python ,python-2
9828 #:phases (modify-phases %standard-phases
9829 (add-after 'unpack 'fix-resulting-include-libs
9830 (lambda* (#:key inputs #:allow-other-keys)
9831 (let ((libgc (assoc-ref inputs "libgc"))
9832 (pcre (assoc-ref inputs "pcre")))
9833 (substitute* "shedskin/makefile.py"
9834 (("variable == 'CCFLAGS':[ ]*")
9835 (string-append "variable == 'CCFLAGS':\n"
9836 " line += ' -I " pcre "/include"
9837 " -I " libgc "/include'"))
9838 (("variable == 'LFLAGS':[ ]*")
9839 (string-append "variable == 'LFLAGS':\n"
9840 " line += ' -L" pcre "/lib"
9841 " -L " libgc "/lib'")))
9842 #t))))))
63bcec71
DM
9843 (inputs `(("pcre" ,pcre)
9844 ("libgc" ,libgc)))
9845 (home-page "https://shedskin.github.io/")
9846 (synopsis "Experimental Python-2 to C++ Compiler")
9847 (description (string-append "This is an experimental compiler for a subset of
9848Python. It generates C++ code and a Makefile."))
3f641af0 9849 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9850
9851(define-public python2-rope
9852 (package
9853 (name "python2-rope")
9854 (version "0.10.3")
9855 (source
9856 (origin
9857 (method url-fetch)
9858 (uri (pypi-uri "rope" version))
9859 (sha256
9860 (base32
9861 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9862 (arguments
9863 ;; Rope is currently python-2 only.
9864 ;; https://github.com/python-rope/rope/issues/57
9865 `(#:python ,python-2))
9866 (build-system python-build-system)
9867 (native-inputs
f3b98f4f 9868 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
9869 (home-page "https://github.com/python-rope/rope")
9870 (synopsis "Refactoring library for Python")
9871 (description "Rope is a refactoring library for Python. It facilitates
9872the renaming, moving and extracting of attributes, functions, modules, fields
9873and parameters in Python 2 source code. These refactorings can also be applied
9874to occurences in strings and comments.")
3f641af0 9875 (license license:gpl2)))
6ba8ca17
9876
9877(define-public python-py3status
9878 (package
9879 (name "python-py3status")
d2262d70 9880 (version "3.1")
6ba8ca17
9881 (source
9882 (origin
9883 (method url-fetch)
9884 (uri (pypi-uri "py3status" version))
9885 (sha256
9886 (base32
d2262d70 9887 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 9888 (build-system python-build-system)
6ba8ca17
9889 (home-page "https://github.com/ultrabug/py3status")
9890 (synopsis "Extensible i3status wrapper written in Python")
9891 (description "py3status is an i3status wrapper which extends i3status
9892functionality in a modular way, allowing you to extend your panel with your
9893own code, responding to click events and updating clock every second.")
3f641af0 9894 (license license:bsd-3)))
b8fdbca3
HG
9895
9896(define-public python-tblib
9897 (package
9898 (name "python-tblib")
9899 (version "1.3.0")
9900 (source (origin
9901 (method url-fetch)
9902 (uri (pypi-uri "tblib" version))
9903 (sha256 (base32
9904 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9905 (build-system python-build-system)
9906 (arguments
9907 `(#:phases
9908 (modify-phases %standard-phases
9909 (replace 'check
9910 (lambda _
9911 ;; Upstream runs tests after installation and the package itself
9912 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9913 ;; found.
9914 (setenv "PYTHONPATH"
9915 (string-append (getcwd) "/build/lib:"
9916 (getenv "PYTHONPATH")))
9917 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9918 (native-inputs
9919 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
9920 ("python-six" ,python-six)))
9921 (home-page "https://github.com/ionelmc/python-tblib")
9922 (synopsis "Traceback serialization library")
9923 (description
9924 "Traceback serialization allows you to:
9925
9926@enumerate
9927@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9928different processes. This allows better error handling when running code over
9929multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9930
9931@item Parse traceback strings and raise with the parsed tracebacks.
9932@end itemize")
3f641af0 9933 (license license:bsd-3)))
b8fdbca3
HG
9934
9935(define-public python2-tblib
9936 (package-with-python2 python-tblib))
1a024de4
HG
9937
9938(define-public python-sqlparse
9939 (package
9940 (name "python-sqlparse")
9941 (version "0.1.19")
9942 (source (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "sqlparse" version))
9945 (sha256
9946 (base32
9947 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9948 (build-system python-build-system)
9949 (arguments
9950 `(#:phases
9951 (modify-phases %standard-phases
9952 (replace 'check
9953 (lambda* _
9954 ;; setup.py-integrated 2to3 only affects the build files, but
9955 ;; py.test is using the source files. So we need to convert them
9956 ;; manually.
9957 (when (zero? (system* "python3"))
9958 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9959 (zero? (system* "py.test")))))))
9960 (native-inputs
f3b98f4f 9961 `(("python-pytest" ,python-pytest)))
1a024de4
HG
9962 (home-page "https://github.com/andialbrecht/sqlparse")
9963 (synopsis "Non-validating SQL parser")
9964 (description "Sqlparse is a non-validating SQL parser for Python. It
9965provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9966 (license license:bsd-3)))
1a024de4
HG
9967
9968(define-public python2-sqlparse
9969 (package-with-python2 python-sqlparse))
68b9d242
SB
9970
9971(define-public python-greenlet
9972 (package
9973 (name "python-greenlet")
9974 (version "0.4.9")
9975 (source (origin
9976 (method url-fetch)
9977 (uri (pypi-uri "greenlet" version))
9978 (sha256
9979 (base32
9980 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9981 (build-system python-build-system)
68b9d242
SB
9982 (home-page "https://greenlet.readthedocs.io/")
9983 (synopsis "Lightweight in-process concurrent programming")
9984 (description
9985 "Greenlet package is a spin-off of Stackless, a version of CPython
9986that supports micro-threads called \"tasklets\". Tasklets run
9987pseudo-concurrently (typically in a single or a few OS-level threads) and
9988are synchronized with data exchanges on \"channels\".")
3f641af0 9989 (license (list license:psfl license:expat))))
68b9d242
SB
9990
9991(define-public python2-greenlet
9992 (package-with-python2 python-greenlet))
d79a343b
SB
9993
9994(define-public python-gevent
9995 (package
9996 (name "python-gevent")
9997 (version "1.1.1")
9998 (source (origin
9999 (method url-fetch)
10000 (uri (pypi-uri "gevent" version))
10001 (sha256
10002 (base32
10003 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10004 (modules '((guix build utils)))
10005 (snippet
10006 '(begin
10007 ;; unbunding libev and c-ares
10008 (for-each delete-file-recursively '("libev" "c-ares"))
10009 ;; fixing testsuite
10010 (call-with-output-file "greentest/__init__.py" noop)
10011 (substitute* "greentest/testrunner.py"
10012 (("import util") "from . import util")
10013 (("from util import log") "from .util import log"))))))
10014 (build-system python-build-system)
10015 (propagated-inputs
10016 `(("python-greenlet" ,python-greenlet)))
10017 (native-inputs
f3b98f4f 10018 `(("python-six" ,python-six)))
d79a343b
SB
10019 (inputs
10020 `(("c-ares" ,c-ares)
10021 ("libev" ,libev)))
10022 (home-page "http://www.gevent.org/")
10023 (synopsis "Coroutine-based network library")
10024 (description
10025 "gevent is a coroutine-based Python networking library that uses greenlet
10026to provide a high-level synchronous API on top of the libev event loop.")
10027 (license license:expat)))
10028
10029(define-public python2-gevent
10030 (package-with-python2 python-gevent))
da3aeeb6
SB
10031
10032(define-public python-twisted
10033 (package
10034 (name "python-twisted")
10035 (version "16.2.0")
10036 (source (origin
10037 (method url-fetch)
8ea8e8d3 10038 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10039 (sha256
10040 (base32
10041 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10042 (build-system python-build-system)
45912170
SB
10043 (propagated-inputs
10044 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10045 (home-page "https://twistedmatrix.com/")
10046 (synopsis "Asynchronous networking framework written in Python")
10047 (description
10048 "Twisted is an extensible framework for Python programming, with special
10049focus on event-based network programming and multiprotocol integration.")
10050 (license license:expat)))
10051
10052(define-public python2-twisted
10053 (package-with-python2 python-twisted))
d0b6fed6 10054
4d3fa5a4
EF
10055(define-public python-pika
10056 (package
10057 (name "python-pika")
10058 (version "0.10.0")
10059 (source
10060 (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "pika" version))
10063 (sha256
10064 (base32
10065 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10066 (build-system python-build-system)
10067 (native-inputs
269d9172
LF
10068 `(("python-pyev" ,python-pyev)
10069 ("python-tornado" ,python-tornado)
10070 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10071 (home-page "https://pika.readthedocs.org")
10072 (synopsis "Pure Python AMQP Client Library")
10073 (description
10074 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10075Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10076network support library.")
10077 (license license:bsd-3)))
10078
10079(define-public python2-pika
10080 (package-with-python2 python-pika))
10081
d0b6fed6
DM
10082(define-public python-ply
10083 (package
10084 (name "python-ply")
10085 (version "3.8")
10086 (source
10087 (origin
10088 (method url-fetch)
10089 (uri (string-append
10090 "https://pypi.python.org/packages/"
10091 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10092 "/ply-" version ".tar.gz"))
10093 (sha256
10094 (base32
10095 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10096 (build-system python-build-system)
10097 (home-page "http://www.dabeaz.com/ply/")
10098 (synopsis "Python Lex & Yacc")
10099 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10100It uses LR parsing and does extensive error checking.")
f210e944 10101 (license license:bsd-3)))
d0b6fed6
DM
10102
10103(define-public python2-ply
f210e944 10104 (package-with-python2 python-ply))
d951bd54
SB
10105
10106(define-public python-tabulate
10107 (package
10108 (name "python-tabulate")
10109 (version "0.7.5")
10110 (source (origin
10111 (method url-fetch)
10112 (uri (pypi-uri "tabulate" version))
10113 (sha256
10114 (base32
10115 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10116 ;; Fix tests
10117 (modules '((guix build utils)))
10118 (snippet '(substitute* '("test/test_cli.py"
10119 "test/test_input.py"
10120 "test/test_output.py"
10121 "test/test_regression.py")
10122 (("from common") "from nose.tools")))))
10123 (build-system python-build-system)
10124 (native-inputs
f3b98f4f 10125 `(;; For testing
d951bd54
SB
10126 ("python-nose" ,python-nose)))
10127 (home-page "https://bitbucket.org/astanin/python-tabulate")
10128 (synopsis "Pretty-print tabular data")
10129 (description
10130 "Tabulate is a library and command-line utility to pretty-print tabular
10131data in Python.")
10132 (license license:expat)))
10133
10134(define-public python2-tabulate
10135 (package-with-python2 python-tabulate))
1c4c8a33
SB
10136
10137(define-public python-kazoo
10138 (package
10139 (name "python-kazoo")
10140 (version "2.2.1")
10141 (source
10142 (origin
10143 (method url-fetch)
10144 (uri (pypi-uri "kazoo" version))
10145 (sha256
10146 (base32
10147 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10148 (build-system python-build-system)
10149 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10150 (propagated-inputs
10151 `(("python-six" ,python-six)))
1c4c8a33
SB
10152 (home-page "https://kazoo.readthedocs.org")
10153 (synopsis "High-level Zookeeper client library")
10154 (description
10155 "Kazoo is a Python client library for the Apache Zookeeper distributed
10156application service. It is designed to be easy to use and to avoid common
10157programming errors.")
3f641af0 10158 (license license:asl2.0)))
1c4c8a33
SB
10159
10160(define-public python2-kazoo
10161 (package-with-python2 python-kazoo))
45dda35e
SB
10162
10163(define-public python-pykafka
10164 (package
10165 (name "python-pykafka")
10166 (version "2.4.0")
10167 (source (origin
10168 (method url-fetch)
c6bccf71
EF
10169 (uri (string-append
10170 "https://pypi.python.org/packages/8b/3e/"
10171 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10172 "pykafka-" version ".tar.gz"))
45dda35e
SB
10173 (sha256
10174 (base32
10175 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10176 (build-system python-build-system)
10177 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10178 (propagated-inputs
45dda35e
SB
10179 `(("python-gevent" ,python-gevent)
10180 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10181 ("python-tabulate" ,python-tabulate)))
10182 (inputs
10183 `(("librdkafka" ,librdkafka)))
10184 (home-page "https://pykafka.readthedocs.io/")
10185 (synopsis "Apache Kafka client for Python")
10186 (description
10187 "PyKafka is a client for the Apache Kafka distributed messaging system.
10188It includes Python implementations of Kafka producers and consumers, which
10189are optionally backed by a C extension built on librdkafka.")
3f641af0 10190 (license license:asl2.0)))
45dda35e
SB
10191
10192(define-public python2-pykafka
10193 (package-with-python2 python-pykafka))
a44fd439
DM
10194
10195(define-public python-wcwidth
10196 (package
10197 (name "python-wcwidth")
10198 (version "0.1.6")
10199 (source
10200 (origin
10201 (method url-fetch)
10202 (uri (string-append
10203 "https://pypi.python.org/packages/"
10204 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10205 "wcwidth-" version ".tar.gz"))
10206 (sha256
10207 (base32
10208 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10209 (build-system python-build-system)
10210 (home-page "https://github.com/jquast/wcwidth")
66e07664 10211 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10212 (description "Wcwidth measures the number of terminal column cells of
10213wide-character codes. It is useful for those implementing a terminal emulator,
10214or programs that carefully produce output to be interpreted by one. It is a
10215Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10216specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10217 (license license:expat)))
a44fd439
DM
10218
10219(define-public python2-wcwidth
f210e944 10220 (package-with-python2 python-wcwidth))
0de78c95
DP
10221
10222(define-public python2-jsonrpclib
10223 (package
10224 (name "python2-jsonrpclib")
10225 (version "0.1.7")
10226 (source (origin
10227 (method url-fetch)
10228 (uri (string-append
10229 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10230 "jsonrpclib-" version ".tar.gz"))
10231 (sha256
10232 (base32
10233 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10234 (build-system python-build-system)
0de78c95
DP
10235 (arguments
10236 `(#:tests? #f
10237 #:python ,python-2))
10238 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10239 (synopsis "Implementation of JSON-RPC specification for Python")
10240 (description
10241 "This library is an implementation of the JSON-RPC specification.
10242It supports both the original 1.0 specification, as well as the
10243new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10244etc.")
3f641af0 10245 (license license:asl2.0)))
9250b0f3
SB
10246
10247(define-public python-chai
10248 (package
10249 (name "python-chai")
10250 (version "1.1.1")
10251 (source (origin
10252 (method url-fetch)
10253 (uri (pypi-uri "chai" version))
10254 (sha256
10255 (base32
10256 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10257 (build-system python-build-system)
9250b0f3
SB
10258 (home-page "https://github.com/agoragames/chai")
10259 (synopsis "Mocking framework for Python")
10260 (description
10261 "Chai provides an api for mocking, stubbing and spying your python
10262objects, patterned after the Mocha library for Ruby.")
3f641af0 10263 (license license:bsd-3)))
9250b0f3
SB
10264
10265(define-public python2-chai
10266 (package-with-python2 python-chai))
10267
ae43baa8
SB
10268(define-public python-arrow
10269 (package
10270 (name "python-arrow")
10271 (version "0.8.0")
10272 (source (origin
10273 (method url-fetch)
10274 (uri (pypi-uri "arrow" version))
10275 (sha256
10276 (base32
10277 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10278 (build-system python-build-system)
10279 (native-inputs
f3b98f4f 10280 `(;; For testing
ae43baa8
SB
10281 ("python-chai" ,python-chai)
10282 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10283 (propagated-inputs
10284 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10285 (home-page "https://github.com/crsmithdev/arrow/")
10286 (synopsis "Dates and times for Python")
10287 (description
10288 "Arrow is a Python library to creating, manipulating, formatting and
10289converting dates, times, and timestamps. It implements and updates the
10290datetime type.")
3f641af0 10291 (license license:asl2.0)))
ae43baa8
SB
10292
10293(define-public python2-arrow
10294 (package-with-python2 python-arrow))
10295
1f2b62a4
SB
10296(define-public python-inflection
10297 (package
10298 (name "python-inflection")
10299 (version "0.3.1")
10300 (source
10301 (origin (method url-fetch)
10302 (uri (pypi-uri "inflection" version))
10303 (sha256
10304 (base32
10305 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10306 (build-system python-build-system)
1f2b62a4
SB
10307 (home-page "http://github.com/jpvanhal/inflection")
10308 (synopsis "Python string transformation library")
10309 (description
10310 "Inflection is a string transformation library. It singularizes
10311and pluralizes English words, and transforms strings from CamelCase to
10312underscored string.")
10313 (license license:expat)))
10314
10315(define-public python2-inflection
10316 (package-with-python2 python-inflection))
10317
18995566
SB
10318(define-public python-pylev
10319 (package
10320 (name "python-pylev")
10321 (version "1.3.0")
10322 (source (origin
10323 (method url-fetch)
10324 (uri (pypi-uri "pylev" version))
10325 (sha256
10326 (base32
10327 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10328 (build-system python-build-system)
18995566
SB
10329 (home-page "http://github.com/toastdriven/pylev")
10330 (synopsis "Levenshtein distance implementation in Python")
10331 (description "Pure Python Levenshtein implementation, based off the
10332Wikipedia code samples at
10333@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10334 (license license:bsd-3)))
18995566
SB
10335
10336(define-public python2-pylev
10337 (package-with-python2 python-pylev))
10338
f5deff7a
SB
10339(define-public python-cleo
10340 (package
10341 (name "python-cleo")
10342 (version "0.4.1")
10343 (source (origin
10344 (method url-fetch)
10345 (uri (pypi-uri "cleo" version))
10346 (sha256
10347 (base32
10348 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10349 (build-system python-build-system)
10350 (native-inputs
f3b98f4f 10351 `(;; For testing
f5deff7a
SB
10352 ("python-mock" ,python-mock)
10353 ("python-pytest" ,python-pytest)))
9403150a
SB
10354 (propagated-inputs
10355 `(("python-psutil" ,python-psutil)
10356 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10357 (home-page "https://github.com/sdispater/cleo")
10358 (synopsis "Command-line arguments library for Python")
10359 (description
10360 "Cleo allows you to create command-line commands with signature in
10361docstring and colored output.")
10362 (license license:expat)))
10363
10364(define-public python2-cleo
10365 (package-with-python2 python-cleo))
10366
77cadb43
SB
10367(define-public python-lazy-object-proxy
10368 (package
10369 (name "python-lazy-object-proxy")
10370 (version "1.2.2")
10371 (source (origin
10372 (method url-fetch)
10373 (uri (pypi-uri "lazy-object-proxy" version))
10374 (sha256
10375 (base32
10376 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10377 (build-system python-build-system)
77cadb43
SB
10378 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10379 (synopsis "Lazy object proxy for python")
10380 (description
10381 "Lazy object proxy is an object that wraps a callable but defers the call
10382until the object is actually required, and caches the result of said call.")
3f641af0 10383 (license license:bsd-2)))
77cadb43
SB
10384
10385(define-public python2-lazy-object-proxy
10386 (package-with-python2 python-lazy-object-proxy))
10387
5477e05f
SB
10388(define-public python-dnspython
10389 (package
10390 (name "python-dnspython")
6c514128 10391 (version "1.15.0")
5477e05f
SB
10392 (source (origin
10393 (method url-fetch)
10394 (uri (string-append "http://www.dnspython.org/kits/"
10395 version "/dnspython-" version ".tar.gz"))
10396 (sha256
10397 (base32
6c514128 10398 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10399 (build-system python-build-system)
10400 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10401 (home-page "http://www.dnspython.org")
10402 (synopsis "DNS toolkit for Python")
10403 (description
10404 "dnspython is a DNS toolkit for Python. It supports almost all record
10405types. It can be used for queries, zone transfers, and dynamic updates.
10406It supports TSIG authenticated messages and EDNS0.")
10407 (license license:expat)))
10408
10409(define-public python2-dnspython
10410 (package-with-python2 python-dnspython))
10411
22711e25
SB
10412(define-public python-email-validator
10413 (package
10414 (name "python-email-validator")
10415 (version "1.0.1")
10416 (source
10417 (origin (method url-fetch)
10418 (uri (pypi-uri "email_validator" version))
10419 (sha256
10420 (base32
10421 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10422 (build-system python-build-system)
10423 (arguments
10424 '(#:phases
10425 (modify-phases %standard-phases
10426 (add-before 'build 'use-dnspython
10427 (lambda _
10428 (substitute* "setup.py"
10429 (("dnspython3") "dnspython"))
10430 #t)))))
d42560bd 10431 (propagated-inputs
22711e25 10432 `(("python-dnspython" ,python-dnspython)
d42560bd 10433 ("python-idna" ,python-idna)))
22711e25
SB
10434 (home-page "https://github.com/JoshData/python-email-validator")
10435 (synopsis "Email address validation library for Python")
10436 (description
10437 "This library validates email address syntax and deliverability.")
3f641af0 10438 (license license:cc0)))
22711e25
SB
10439
10440(define-public python2-email-validator
10441 (package-with-python2 python-email-validator))
10442
8987d91e
SB
10443(define-public python-ukpostcodeparser
10444 (package
10445 (name "python-ukpostcodeparser")
10446 (version "1.0.3")
10447 (source (origin
10448 (method url-fetch)
10449 (uri (pypi-uri "UkPostcodeParser" version))
10450 (sha256
10451 (base32
10452 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10453 (build-system python-build-system)
8987d91e
SB
10454 (home-page "https://github.com/hamstah/ukpostcodeparser")
10455 (synopsis "UK Postcode parser for Python")
10456 (description
10457 "This library provides the @code{parse_uk_postcode} function for
10458parsing UK postcodes.")
10459 (license license:expat)))
10460
10461(define-public python2-ukpostcodeparser
10462 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10463
10464(define-public python-fake-factory
10465 (package
10466 (name "python-fake-factory")
7adc698f 10467 (version "0.7.2")
ea92ae01
SB
10468 (source (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "fake-factory" version))
10471 (sha256
10472 (base32
7adc698f 10473 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10474 (build-system python-build-system)
ea92ae01 10475 (native-inputs
f3b98f4f 10476 `(;; For testing
ea92ae01
SB
10477 ("python-email-validator" ,python-email-validator)
10478 ("python-mock" ,python-mock)
10479 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10480 (propagated-inputs
10481 `(("python-dateutil" ,python-dateutil-2)
10482 ("python-six" ,python-six)))
7adc698f 10483 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10484 (synopsis "Python package that generates fake data")
10485 (description
10486 "Faker is a Python package that generates fake data such as names,
10487addresses, and phone numbers.")
10488 (license license:expat)
10489 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10490
10491(define-public python2-fake-factory
10492 (let ((base (package-with-python2 (strip-python2-variant
10493 python-fake-factory))))
10494 (package
10495 (inherit base)
24c9aa18 10496 (propagated-inputs
ea92ae01 10497 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10498 ,@(package-propagated-inputs base))))))
ea92ae01 10499
b49504fd
SB
10500(define-public python-pyaml
10501 (package
10502 (name "python-pyaml")
10503 (version "15.8.2")
10504 (source (origin
10505 (method url-fetch)
10506 (uri (pypi-uri "pyaml" version))
10507 (sha256
10508 (base32
10509 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10510 (build-system python-build-system)
b49504fd
SB
10511 (propagated-inputs
10512 `(("python-pyyaml" ,python-pyyaml)))
10513 (home-page "https://github.com/mk-fg/pretty-yaml")
10514 (synopsis "YAML pretty-print library for Python")
10515 (description
10516 "pyaml is a PyYAML based python module to produce pretty and readable
10517YAML-serialized data.")
3f641af0 10518 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10519
10520(define-public python2-pyaml
10521 (package-with-python2 python-pyaml))
10522
347175a2
SB
10523(define-public python-flexmock
10524 (package
10525 (name "python-flexmock")
10526 (version "0.10.2")
10527 (source (origin
10528 (method url-fetch)
10529 (uri (pypi-uri "flexmock" version))
10530 (sha256
10531 (base32
10532 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10533 (build-system python-build-system)
347175a2
SB
10534 (home-page "https://flexmock.readthedocs.org")
10535 (synopsis "Testing library for Python")
10536 (description
10537 "flexmock is a testing library for Python that makes it easy to create
10538mocks, stubs and fakes.")
3f641af0 10539 (license license:bsd-3)))
347175a2
SB
10540
10541(define-public python2-flexmock
10542 (package-with-python2 python-flexmock))
10543
5a744191
SB
10544(define-public python-orator
10545 (package
10546 (name "python-orator")
10547 (version "0.8.2")
10548 (source (origin
10549 (method url-fetch)
10550 (uri (pypi-uri "orator" version))
10551 (sha256
10552 (base32
10553 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10554 (build-system python-build-system)
10555 (arguments '(#:tests? #f)) ; no tests
b2676030 10556 (propagated-inputs
5a744191
SB
10557 `(("python-arrow" ,python-arrow)
10558 ("python-blinker" ,python-blinker)
10559 ("python-cleo" ,python-cleo)
10560 ("python-fake-factory" ,python-fake-factory)
10561 ("python-inflection" ,python-inflection)
10562 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10563 ("python-pyaml" ,python-pyaml)
5a744191
SB
10564 ("python-simplejson" ,python-simplejson)
10565 ("python-wrapt" ,python-wrapt)))
10566 (home-page "https://orator-orm.com/")
10567 (synopsis "ActiveRecord ORM for Python")
10568 (description
10569 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10570implementation for Python.")
10571 (license license:expat)
10572 (properties `((python2-variant . ,(delay python2-orator))))))
10573
10574(define-public python2-orator
10575 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10576 (package
10577 (inherit base)
06961617 10578 (propagated-inputs
5a744191 10579 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10580 ,@(package-propagated-inputs base))))))
f4155188
DM
10581
10582(define-public python-prompt-toolkit
10583 (package
10584 (name "python-prompt-toolkit")
d15e2ef0 10585 (version "1.0.7")
f4155188
DM
10586 (source
10587 (origin
10588 (method url-fetch)
d15e2ef0 10589 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10590 (sha256
10591 (base32
d15e2ef0 10592 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10593 (build-system python-build-system)
bae18710
LF
10594 (arguments
10595 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10596 (propagated-inputs
10597 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10598 ("python-six" ,python-six)
f22efa01 10599 ("python-pygments" ,python-pygments)))
f4155188
DM
10600 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10601 (synopsis "Library for building command line interfaces in Python")
10602 (description
10603 "Prompt-Toolkit is a library for building interactive command line
10604interfaces in Python. It's like GNU Readline but it also features syntax
10605highlighting while typing, out-of-the-box multi-line input editing, advanced
10606code completion, incremental search, support for Chinese double-width
10607characters, mouse support, and auto suggestions.")
f210e944 10608 (license license:bsd-3)))
f4155188
DM
10609
10610(define-public python2-prompt-toolkit
f210e944 10611 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10612
10613(define-public python-jedi
10614 (package
10615 (name "python-jedi")
10616 (version "0.9.0")
10617 (source
10618 (origin
10619 (method url-fetch)
10620 (uri (pypi-uri "jedi" version))
10621 (sha256
10622 (base32
10623 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10624 (build-system python-build-system)
10625 (home-page "https://github.com/davidhalter/jedi")
10626 (synopsis
10627 "Autocompletion for Python that can be used for text editors")
10628 (description
10629 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10630 (license license:expat)))
a502dfbf
DM
10631
10632(define-public python2-jedi
f210e944 10633 (package-with-python2 python-jedi))
c2f0dc6e
DM
10634
10635(define-public ptpython
10636 (package
10637 (name "ptpython")
10638 (version "0.34")
10639 (source (origin
10640 (method url-fetch)
10641 (uri (pypi-uri "ptpython" version))
10642 (sha256
10643 (base32
10644 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10645 (build-system python-build-system)
f22efa01 10646 (propagated-inputs
c2f0dc6e
DM
10647 `(("python-docopt" ,python-docopt)
10648 ("python-jedi" ,python-jedi)
10649 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10650 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10651 (home-page "https://github.com/jonathanslenders/ptpython")
10652 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10653 (description
10654 "ptpython is a Python read-eval-print loop with IDE-like features.
10655It supports syntax highlighting, multiline editing, autocompletion, mouse,
10656color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10657etc.")
3f641af0 10658 (license license:bsd-3)
c2f0dc6e
DM
10659 (properties `((python2-variant . ,(delay ptpython-2))))))
10660
10661(define-public ptpython-2
10662 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10663 (package
10664 (inherit base)
10665 (name "ptpython2"))))
b227f0be 10666
b04a52a6
DJ
10667(define-public python-requests-oauthlib
10668 (package
10669 (name "python-requests-oauthlib")
10670 (version "0.6.2")
10671 (source
10672 (origin
10673 (method url-fetch)
10674 (uri (pypi-uri "requests-oauthlib" version))
10675 (sha256
10676 (base32
10677 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10678 (build-system python-build-system)
10679 (arguments
10680 `(#:phases
10681 (modify-phases %standard-phases
10682 ;; removes tests that require network access
10683 (add-before 'check 'pre-check
10684 (lambda _
10685 (delete-file "tests/test_core.py")
10686 #t)))))
10687 (native-inputs
10688 `(("python-requests-mock" ,python-requests-mock)
10689 ("python-mock" ,python-mock)))
f22efa01 10690 (propagated-inputs
b04a52a6
DJ
10691 `(("python-oauthlib" ,python-oauthlib)
10692 ("python-requests" ,python-requests)))
10693 (home-page
10694 "https://github.com/requests/requests-oauthlib")
10695 (synopsis
10696 "OAuthlib authentication support for Requests")
10697 (description
10698 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10699provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10700 (license license:isc)))
b04a52a6
DJ
10701
10702(define-public python2-requests-oauthlib
f210e944 10703 (package-with-python2 python-requests-oauthlib))
b04a52a6 10704
b227f0be 10705(define-public python-stem
10706 (package
10707 (name "python-stem")
c976b319 10708 (version "1.5.3")
b227f0be 10709 (source
10710 (origin
10711 (method url-fetch)
c976b319 10712 (uri (pypi-uri "stem" version))
b227f0be 10713 (sha256
10714 (base32
c976b319 10715 "0fm67dfx6qaj0mg80r4yw2i72birpzn7cnbyz4p1857max3zfc97"))))
b227f0be 10716 (build-system python-build-system)
10717 (arguments
10718 `(#:phases
10719 (modify-phases %standard-phases
10720 (replace 'check
10721 (lambda _
10722 (zero? (system* "./run_tests.py" "--unit")))))))
10723 (native-inputs
10724 `(("python-mock" ,python-mock)
10725 ("python-pep8" ,python-pep8)
10726 ("python-pyflakes" ,python-pyflakes)))
b227f0be 10727 (home-page "https://stem.torproject.org/")
10728 (synopsis
10729 "Python controller library that allows applications to interact with Tor")
10730 (description
10731 "Stem is a Python controller library for Tor. With it you can use Tor's
10732control protocol to script against the Tor process and read descriptor data
10733relays publish about themselves.")
3f641af0 10734 (license license:lgpl3)))
b227f0be 10735
10736(define-public python2-stem
10737 (package-with-python2 python-stem))
517a6c0c
DM
10738
10739(define-public python-pyserial
10740 (package
10741 (name "python-pyserial")
10742 (version "3.1.1")
10743 (source
10744 (origin
10745 (method url-fetch)
10746 (uri (pypi-uri "pyserial" version))
10747 (sha256
10748 (base32
10749 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10750 (build-system python-build-system)
10751 (home-page
10752 "https://github.com/pyserial/pyserial")
10753 (synopsis "Python Serial Port Bindings")
10754 (description "@code{pyserial} provide serial port bindings for Python. It
10755supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10756and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10757 (license license:bsd-3)))
517a6c0c
DM
10758
10759(define-public python2-pyserial
f210e944 10760 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10761
10762(define-public python-kivy
10763 (package
10764 (name "python-kivy")
10765 (version "1.9.1")
10766 (source
10767 (origin
10768 (method url-fetch)
10769 (uri (pypi-uri "kivy" version))
10770 (file-name (string-append name "-" version ".tar.gz"))
10771 (sha256
10772 (base32
10773 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10774 (build-system python-build-system)
10775 (arguments
10776 `(#:tests? #f ; Tests require many optional packages
10777 #:phases
10778 (modify-phases %standard-phases
10779 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10780 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10781 (lambda* (#:key inputs #:allow-other-keys)
10782 (setenv "KIVY_SDL2_PATH"
10783 (string-append (assoc-ref inputs "sdl-union")
10784 "/include/SDL2"))
10785 #t)))))
10786 (native-inputs
f2516de2
HG
10787 `(("pkg-config" ,pkg-config)
10788 ("python-cython" ,python-cython)))
6eb7af2a 10789 (inputs
f2516de2 10790 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10791 ("mesa" ,mesa)
10792 ("sdl-union"
10793 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10794 (home-page "http://kivy.org")
10795 (synopsis
10796 "Multitouch application framework")
10797 (description
10798 "A software library for rapid development of
10799hardware-accelerated multitouch applications.")
10800 (license license:expat)))
10801
10802(define-public python2-kivy
10803 (package-with-python2 python-kivy))
10804
10805(define-public python-kivy-next
10806 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10807 (revision "1"))
10808 (package (inherit python-kivy)
10809 (name "python-kivy-next")
d80a71eb 10810 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10811 (string-take commit 7)))
10812 (source
10813 (origin
10814 (method git-fetch)
10815 (uri (git-reference
10816 (url "https://github.com/kivy/kivy")
10817 (commit commit)))
10818 (file-name (string-append name "-" version "-checkout"))
10819 (sha256
10820 (base32
10821 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10822
10823(define-public python2-kivy-next
10824 (package-with-python2 python-kivy-next))
8794bd8b
DC
10825
10826(define-public python-binaryornot
10827 (package
10828 (name "python-binaryornot")
10829 (version "0.4.0")
10830 (source (origin
10831 (method url-fetch)
10832 (uri (pypi-uri "binaryornot" version))
10833 (sha256
10834 (base32
10835 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10836 (build-system python-build-system)
f22efa01 10837 (propagated-inputs
8794bd8b
DC
10838 `(("python-chardet" ,python-chardet)
10839 ("python-hypothesis" ,python-hypothesis)))
10840 (home-page "https://github.com/audreyr/binaryornot")
10841 (synopsis "Package to check if a file is binary or text")
10842 (description "Ultra-lightweight pure Python package to check if a file is
10843binary or text.")
10844 (license license:bsd-3)
10845 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10846
10847(define-public python2-binaryornot
10848 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10849 (package (inherit base)
f22efa01 10850 (propagated-inputs
8794bd8b 10851 `(("python2-enum34" ,python2-enum34)
f22efa01 10852 ,@(package-propagated-inputs base))))))
a9ac982a
DC
10853
10854(define-public python-nltk
10855 (package
10856 (name "python-nltk")
10857 (version "3.2.1")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "nltk" version))
10861 (sha256
10862 (base32
10863 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10864 (build-system python-build-system)
59f12985
LF
10865 (arguments
10866 '(;; The tests require some extra resources to be downloaded.
10867 ;; TODO Try packaging these resources.
10868 #:tests? #f))
a9ac982a
DC
10869 (home-page "http://nltk.org/")
10870 (synopsis "Natural Language Toolkit")
10871 (description "It provides interfaces to over 50 corpora and lexical
10872resources such as WordNet, along with a suite of text processing libraries
10873for classification, tokenization, stemming, tagging, parsing, and semantic
10874reasoning, wrappers for natural language processing libraries.")
f210e944 10875 (license license:asl2.0)))
a9ac982a
DC
10876
10877(define-public python2-nltk
f210e944 10878 (package-with-python2 python-nltk))
691cd90d
DC
10879
10880(define-public python-pymongo
10881 (package
10882 (name "python-pymongo")
10883 (version "3.3.0")
10884 (source (origin
10885 (method url-fetch)
10886 (uri (pypi-uri "pymongo" version))
10887 (sha256
10888 (base32
10889 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10890 (build-system python-build-system)
f22efa01 10891 (propagated-inputs
691cd90d
DC
10892 `(("python-certifi" ,python-certifi)))
10893 (home-page "http://github.com/mongodb/mongo-python-driver")
10894 (synopsis "Python driver for MongoDB")
10895 (description "Python driver for MongoDB.")
f210e944 10896 (license license:asl2.0)))
691cd90d
DC
10897
10898(define-public python2-pymongo
f210e944 10899 (package-with-python2 python-pymongo))
6a6c9d43
DC
10900
10901(define-public python-sh
10902 (package
10903 (name "python-sh")
10904 (version "1.11")
10905 (source (origin
10906 (method url-fetch)
10907 (uri (pypi-uri "sh" version))
10908 (sha256
10909 (base32
10910 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10911 (build-system python-build-system)
10912 (arguments
10913 `(#:tests? #f)) ; no tests
10914 (home-page "https://github.com/amoffat/sh")
10915 (synopsis "Python subprocess interface")
10916 (description "Abstracts process invocation by providing a function
10917interface for programs.")
f210e944 10918 (license license:expat)))
6a6c9d43
DC
10919
10920(define-public python2-sh
f210e944 10921 (package-with-python2 python-sh))
05b59190 10922
25702397
EF
10923(define-public python-consul
10924 (package
10925 (name "python-consul")
10926 (version "0.6.1")
10927 (source
10928 (origin
10929 (method url-fetch)
10930 (uri (pypi-uri "python-consul" version))
10931 (sha256
10932 (base32
10933 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10934 (build-system python-build-system)
10935 (native-inputs
fd1d6de7
HG
10936 `(("python-pytest" ,python-pytest)))
10937 (propagated-inputs
10938 `(("python-requests" ,python-requests)
25702397
EF
10939 ("python-six" ,python-six)))
10940 (home-page "https://github.com/cablehead/python-consul")
10941 (synopsis "Python client for Consul")
10942 (description
10943 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10944discovery, monitoring and configuration.")
10945 (license license:expat)))
10946
10947(define-public python2-consul
f210e944 10948 (package-with-python2 python-consul))
25702397 10949
05b59190
DC
10950(define-public python-schematics
10951 (package
10952 (name "python-schematics")
10953 (version "1.1.1")
10954 (source
10955 (origin
10956 (method url-fetch)
10957 (uri (string-append
10958 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10959 (file-name (string-append name "-" version ".tar.gz"))
10960 (sha256
10961 (base32
10962 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10963 (build-system python-build-system)
f22efa01 10964 (propagated-inputs
05b59190
DC
10965 `(("python-six" ,python-six)))
10966 (arguments
10967 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10968 ; version requirements (eg python-coveralls)
10969 (home-page "https://github.com/schematics/schematics")
10970 (synopsis "Python Data Structures for Humans")
10971 (description "Python Data Structures for Humans.")
f210e944 10972 (license license:bsd-3)))
05b59190
DC
10973
10974(define-public python2-schematics
f210e944 10975 (package-with-python2 python-schematics))
d6907ff7
DC
10976
10977(define-public python-publicsuffix
10978 (package
10979 (name "python-publicsuffix")
10980 (version "1.1.0")
10981 (source (origin
10982 (method url-fetch)
10983 (uri (pypi-uri "publicsuffix" version))
10984 (sha256
10985 (base32
10986 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10987 (build-system python-build-system)
10988 (arguments
10989 `(#:tests? #f)) ; tests use the internet
10990 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10991 (synopsis "Get suffix for a domain name")
10992 (description "Get a public suffix for a domain name using the Public Suffix
10993List.")
f210e944 10994 (license license:expat)))
d6907ff7
DC
10995
10996(define-public python2-publicsuffix
f210e944 10997 (package-with-python2 python-publicsuffix))
b2319996
DC
10998
10999(define-public python-publicsuffix2
11000 (package
11001 (name "python-publicsuffix2")
11002 (version "2.20160621")
11003 (source
11004 (origin
11005 (method url-fetch)
11006 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11007 (sha256
11008 (base32
11009 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11010 (build-system python-build-system)
10797a0a
LF
11011 (arguments
11012 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11013 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11014 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11015 (description "Get a public suffix for a domain name using the Public Suffix
11016List. Forked from and using the same API as the publicsuffix package.")
f210e944 11017 (license (list license:expat license:mpl2.0))))
b2319996
DC
11018
11019(define-public python2-publicsuffix2
f210e944 11020 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11021
11022(define-public python-url
11023 (package
11024 (name "python-url")
11025 (version "0.2.0")
11026 (source (origin
11027 (method url-fetch)
11028 (uri (pypi-uri "url" version))
11029 (sha256
11030 (base32
11031 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11032 (build-system python-build-system)
f22efa01 11033 (propagated-inputs
81f1515d
DC
11034 `(("python-publicsuffix" ,python-publicsuffix)))
11035 (native-inputs
11036 `(("python-coverage" ,python-coverage)
11037 ("python-nose" ,python-nose)))
11038 (arguments
11039 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11040 (home-page "http://github.com/seomoz/url-py")
11041 (synopsis "URL Parsing")
11042 (description "Library for parsing urls.")
11043 (license license:expat)
11044 (properties `((python2-variant . ,(delay python2-url))))))
11045
11046(define-public python2-url
11047 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11048 (package (inherit base)
f22efa01 11049 (propagated-inputs
f210e944 11050 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11051
11052(define-public python-freezegun
11053 (package
11054 (name "python-freezegun")
11055 (version "0.3.7")
11056 (source
11057 (origin
11058 (method url-fetch)
11059 (uri (pypi-uri "freezegun" version))
11060 (sha256
11061 (base32
11062 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11063 (build-system python-build-system)
11064 (native-inputs
11065 `(("python-mock" ,python-mock)
11066 ("python-nose" ,python-nose)
4e096968 11067 ("python-coverage" ,python-coverage)))
f22efa01 11068 (propagated-inputs
4e096968
HG
11069 `(("python-six" ,python-six)
11070 ("python-dateutil-2" ,python-dateutil-2)))
974ee2c1
TS
11071 (arguments
11072 `(#:phases (modify-phases %standard-phases
11073 ;; The tests are normally executed via `make test`, but the PyPi
11074 ;; package does not include the Makefile.
11075 (replace 'check
11076 (lambda _
11077 (zero? (system* "nosetests" "./tests/")))))))
11078 (home-page "https://github.com/spulec/freezegun")
11079 (synopsis "Test utility for mocking the datetime module")
11080 (description
11081 "FreezeGun is a library that allows your python tests to travel through
11082time by mocking the datetime module.")
11083 (license license:asl2.0)))
11084
11085(define-public python2-freezegun
f210e944
HG
11086 (package-with-python2 python-freezegun))
11087
dddcb25c
MB
11088
11089(define-public python-odfpy
11090 (package
11091 (name "python-odfpy")
11092 (version "1.3.3")
11093 (source (origin
11094 (method url-fetch)
11095 (uri (pypi-uri "odfpy" version))
11096 (sha256
11097 (base32
11098 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11099 (arguments
11100 `(#:modules ((srfi srfi-1)
11101 (guix build python-build-system)
11102 (guix build utils))
11103 #:phases
11104 (modify-phases %standard-phases
11105 (replace 'check
11106 ;; The test runner invokes python2 and python3 for test*.py.
11107 ;; To avoid having both in inputs, we replicate it here.
11108 (lambda _
11109 (every (lambda (test-file)
11110 (zero? (system* "python" test-file)))
11111 (find-files "tests" "^test.*\\.py$")))))))
11112 (build-system python-build-system)
11113 (home-page "https://github.com/eea/odfpy")
11114 (synopsis "Python API and tools to manipulate OpenDocument files")
11115 (description "Collection of libraries and utility programs written in
11116Python to manipulate OpenDocument 1.2 files.")
11117 (license
11118 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11119 ;; number of files with other licenses.
11120 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11121
11122(define-public python2-odfpy
11123 (package-with-python2 python-odfpy))
b30565bd
MB
11124
11125(define-public python-cachecontrol
11126 (package
11127 (name "python-cachecontrol")
11128 (version "0.11.6")
11129 (source
11130 (origin
11131 (method url-fetch)
11132 ;; Pypi does not have tests.
11133 (uri (string-append
11134 "https://github.com/ionrock/cachecontrol/archive/v"
11135 version ".tar.gz"))
11136 (file-name (string-append name "-" version ".tar.gz"))
11137 (sha256
11138 (base32
11139 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11140 (build-system python-build-system)
11141 (arguments
11142 `(#:phases
11143 (modify-phases %standard-phases
11144 (replace 'check
11145 (lambda _
11146 ;; Drop test that requires internet access.
11147 (delete-file "tests/test_regressions.py")
11148 (setenv "PYTHONPATH"
11149 (string-append (getcwd) "/build/lib:"
11150 (getenv "PYTHONPATH")))
11151 (zero? (system* "py.test" "-vv")))))))
11152 (native-inputs
11153 `(("python-pytest" ,python-pytest)
11154 ("python-redis" ,python-redis)
11155 ("python-webtest" ,python-webtest)
11156 ("python-mock" ,python-mock)))
11157 (propagated-inputs
11158 `(("python-requests" ,python-requests)
11159 ("python-lockfile" ,python-lockfile)))
11160 (home-page "https://github.com/ionrock/cachecontrol")
11161 (synopsis "The httplib2 caching algorithms for use with requests")
11162 (description "CacheControl is a port of the caching algorithms in
11163@code{httplib2} for use with @code{requests} session objects.")
f210e944 11164 (license license:asl2.0)))
b30565bd
MB
11165
11166(define-public python2-cachecontrol
f210e944 11167 (package-with-python2 python-cachecontrol))
243db824
DM
11168
11169(define-public python-lit
11170 (package
11171 (name "python-lit")
11172 (version "0.5.0")
11173 (source
11174 (origin
11175 (method url-fetch)
11176 (uri (pypi-uri "lit" version))
11177 (sha256
11178 (base32
11179 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11180 (build-system python-build-system)
11181 (home-page "http://llvm.org/")
11182 (synopsis "LLVM Software Testing Tool")
11183 (description "@code{lit} is a portable tool for executing LLVM and Clang
11184style test suites, summarizing their results, and providing indication of
11185failures.")
f210e944 11186 (license license:ncsa)))
243db824
DM
11187
11188(define-public python2-lit
f210e944 11189 (package-with-python2 python-lit))
66f95b20
MB
11190
11191(define-public python-pytest-pep8
11192 (package
11193 (name "python-pytest-pep8")
11194 (version "1.0.6")
11195 (source (origin
11196 (method url-fetch)
11197 (uri (pypi-uri "pytest-pep8" version))
11198 (sha256
11199 (base32
11200 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11201 (build-system python-build-system)
11202 (arguments
b41a05ce 11203 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11204 (native-inputs
11205 `(("python-pytest" ,python-pytest)))
11206 (propagated-inputs
11207 `(("python-pep8" ,python-pep8)))
11208 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11209 (synopsis "Py.test plugin to check PEP8 requirements")
11210 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11211 (license license:expat)))
66f95b20
MB
11212
11213(define-public python2-pytest-pep8
f210e944 11214 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11215
11216(define-public python-pytest-flakes
11217 (package
11218 (name "python-pytest-flakes")
11219 (version "1.0.1")
11220 (source (origin
11221 (method url-fetch)
11222 (uri (pypi-uri "pytest-flakes" version))
11223 (sha256
11224 (base32
11225 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11226 (build-system python-build-system)
11227 (arguments
b41a05ce 11228 `(#:phases
df94a6b5
MB
11229 (modify-phases %standard-phases
11230 (delete 'check)
11231 (add-after 'install 'check
05c2fd36
HG
11232 (lambda* (#:key outputs inputs #:allow-other-keys)
11233 ;; It's easier to run tests after install.
11234 ;; Make installed package available for running the tests
11235 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11236 (zero? (system* "py.test" "-vv")))))))
11237 (native-inputs
11238 `(("python-coverage" ,python-coverage)
11239 ("python-pytest" ,python-pytest)
11240 ("python-pytest-cache" ,python-pytest-cache)
11241 ("python-pytest-pep8" ,python-pytest-pep8)))
11242 (propagated-inputs
11243 `(("python-pyflakes" ,python-pyflakes)))
11244 (home-page "https://github.com/fschulze/pytest-flakes")
11245 (synopsis "Py.test plugin to check source code with pyflakes")
11246 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11247 (license license:expat)))
df94a6b5
MB
11248
11249(define-public python2-pytest-flakes
f210e944 11250 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11251
11252(define-public python-natsort
11253 (package
11254 (name "python-natsort")
11255 (version "5.0.1")
11256 (source (origin
11257 (method url-fetch)
11258 (uri (pypi-uri "natsort" version))
11259 (sha256
11260 (base32
11261 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11262 (build-system python-build-system)
11263 (arguments
11264 `(#:phases
11265 (modify-phases %standard-phases
11266 (add-before 'check 'set-cachedir
11267 ;; Tests require write access to $HOME by default
11268 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11269 (native-inputs
11270 `(("python-hypothesis" ,python-hypothesis)
11271 ("python-pytest-cache" ,python-pytest-cache)
11272 ("python-pytest-cov" ,python-pytest-cov)
11273 ("python-pytest-flakes" ,python-pytest-flakes)
11274 ("python-pytest-pep8" ,python-pytest-pep8)))
11275 (propagated-inputs ; TODO: Add python-fastnumbers.
11276 `(("python-pyicu" ,python-pyicu)))
11277 (home-page "https://github.com/SethMMorton/natsort")
11278 (synopsis "Natural sorting for python and shell")
11279 (description
11280 "Natsort lets you apply natural sorting on lists instead of
11281lexicographical. If you use the built-in @code{sorted} method in python
11282on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11283returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11284function @code{natsorted} that identifies numbers and sorts them separately
11285from strings. It can also sort version numbers, real numbers, mixed types
11286and more, and comes with a shell command @command{natsort} that exposes this
11287functionality in the command line.")
11288 (license license:expat)
11289 (properties `((python2-variant . ,(delay python2-natsort))))))
11290
11291(define-public python2-natsort
11292 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11293 (package (inherit base)
11294 (native-inputs
00e10c6e 11295 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11296 ("python2-mock" ,python2-mock)
11297 ("python2-enum34" ,python2-enum34)
11298 ,@(package-native-inputs base))))))
4efb9c54
SR
11299
11300(define-public python-glances
11301 (package
11302 (name "python-glances")
11303 (version "2.7.1")
11304 (source
11305 (origin
11306 (method url-fetch)
11307 (uri (pypi-uri "Glances" version))
11308 (sha256
11309 (base32
11310 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11311 (build-system python-build-system)
f22efa01 11312 (propagated-inputs
4efb9c54
SR
11313 `(("python-psutil" ,python-psutil)))
11314 (home-page
11315 "https://github.com/nicolargo/glances")
11316 (synopsis
11317 "A cross-platform curses-based monitoring tool")
11318 (description
11319 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11320Glances uses the PsUtil library to get information from your system. It monitors
11321CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11322 (license license:lgpl3+)))
4efb9c54
SR
11323
11324(define-public python2-glances
f210e944 11325 (package-with-python2 python-glances))
05b7a593
EF
11326
11327(define-public python-graphql-core
11328 (package
11329 (name "python-graphql-core")
11330 (version "0.5.3")
11331 (source
11332 (origin
11333 (method url-fetch)
11334 (uri (pypi-uri "graphql-core" version))
11335 (sha256
11336 (base32
11337 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11338 (build-system python-build-system)
11339 (arguments
326f8285
LF
11340 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11341 #:phases
05b7a593
EF
11342 (modify-phases %standard-phases
11343 (add-after 'unpack 'patch-hardcoded-version
11344 (lambda _ (substitute*
11345 "setup.py"
11346 (("'gevent==1.1rc1'") "'gevent'"))
11347 #t)))))
11348 (native-inputs
11349 `(("python-gevent" ,python-gevent)
11350 ("python-mock" ,python-mock)
11351 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11352 (propagated-inputs
05b7a593
EF
11353 `(("python-promise" ,python-promise)
11354 ("python-six" ,python-six)))
11355 (home-page "https://github.com/graphql-python/graphql-core")
11356 (synopsis "GraphQL implementation for Python")
11357 (description
11358 "GraphQL implementation for Python. GraphQL is a data query language and
11359runtime designed and used to request and deliver data to mobile and web apps.
11360This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11361to Python.")
05b7a593
EF
11362 (license license:expat)))
11363
11364(define-public python2-graphql-core
f210e944 11365 (package-with-python2 python-graphql-core))
7ee51575
EF
11366
11367(define-public python-graphql-relay
11368 (package
11369 (name "python-graphql-relay")
11370 (version "0.4.4")
11371 (source
11372 (origin
11373 (method url-fetch)
11374 (uri (pypi-uri "graphql-relay" version))
11375 (sha256
11376 (base32
11377 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11378 (build-system python-build-system)
11379 (native-inputs
11380 `(("python-pytest" ,python-pytest)))
f22efa01 11381 (propagated-inputs
7ee51575
EF
11382 `(("python-graphql-core" ,python-graphql-core)
11383 ("python-promise" ,python-promise)
11384 ("python-six" ,python-six)))
11385 (home-page "https://github.com/graphql-python/graphql-relay-py")
11386 (synopsis "Relay implementation for Python")
11387 (description
11388 "This is a library to allow the easy creation of Relay-compliant servers
11389using the GraphQL Python reference implementation of a GraphQL server. It
11390should be noted that the code is a exact port of the original
11391@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11392from Facebook.")
7ee51575
EF
11393 (license license:expat)))
11394
11395(define-public python2-graphql-relay
f210e944 11396 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11397
11398(define-public python-graphene
11399 (package
11400 (name "python-graphene")
11401 (version "0.10.2")
11402 (source
11403 (origin
11404 (method url-fetch)
11405 (uri (pypi-uri "graphene" version))
11406 (sha256
11407 (base32
11408 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11409 (build-system python-build-system)
11410 (native-inputs
11411 `(("python-django-filter" ,python-django-filter)
11412 ("python-mock" ,python-mock)
11413 ("python-psycopg2" ,python-psycopg2)
11414 ("python-pytest-django" ,python-pytest-django)
11415 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11416 (propagated-inputs
ddc63a56
EF
11417 `(("python-graphql-core" ,python-graphql-core)
11418 ("python-graphql-relay" ,python-graphql-relay)
11419 ("python-iso8601" ,python-iso8601)
11420 ("python-promise" ,python-promise)
11421 ("python-six" ,python-six)))
11422 (home-page "http://graphene-python.org/")
11423 (synopsis "GraphQL Framework for Python")
11424 (description
11425 "Graphene is a Python library for building GraphQL schemas/types.
11426A GraphQL schema describes your data model, and provides a GraphQL server
11427with an associated set of resolve methods that know how to fetch data.")
11428 (properties `((python2-variant . ,(delay python2-graphene))))
11429 (license license:expat)))
11430
11431(define-public python2-graphene
11432 (let ((base (package-with-python2
11433 (strip-python2-variant python-graphene))))
11434 (package (inherit base)
11435 (native-inputs
00e10c6e 11436 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11437 ,@(package-native-inputs base))))))
d488d5d6
EF
11438
11439(define-public python-nautilus
11440 (package
11441 (name "python-nautilus")
11442 (version "0.4.9")
11443 (source
11444 (origin
11445 (method url-fetch)
11446 (uri (pypi-uri "nautilus" version))
11447 (sha256
11448 (base32
11449 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11450 (build-system python-build-system)
11451 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11452 (propagated-inputs
d488d5d6
EF
11453 `(("python-bcrypt" ,python-bcrypt)
11454 ("python-click" ,python-click)
11455 ("python-consul" ,python-consul)
d488d5d6
EF
11456 ("python-graphene" ,python-graphene)
11457 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11458 ("python-peewee" ,python-peewee)
11459 ("python-pika" ,python-pika)
d488d5d6
EF
11460 ("python-tornado" ,python-tornado)
11461 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11462 (native-inputs
11463 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11464 (home-page "https://github.com/AlecAivazis/nautilus")
11465 (synopsis "Library for creating microservice applications")
11466 (description
11467 "Nautilus is a framework for flux based microservices that looks to
11468provide extendible implementations of common aspects of a cloud so that you can
11469focus on building massively scalable web applications.")
11470 (license license:expat)))
94cffc63 11471
66d3f50a
LF
11472(define-public python-betamax
11473 (package
11474 (name "python-betamax")
11475 (version "0.8.0")
11476 (source
11477 (origin
11478 (method url-fetch)
11479 (uri (pypi-uri "betamax" version))
11480 (sha256
11481 (base32
11482 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11483 (build-system python-build-system)
11484 (arguments
11485 '(;; Many tests fail because they require networking.
11486 #:tests? #f))
c415f763 11487 (propagated-inputs
66d3f50a
LF
11488 `(("python-requests" ,python-requests)))
11489 (home-page "https://github.com/sigmavirus24/betamax")
11490 (synopsis "Record HTTP interactions with python-requests")
11491 (description "Betamax will record your test suite's HTTP interactions and
11492replay them during future tests. It is designed to work with python-requests.")
f210e944 11493 (license license:expat)))
66d3f50a
LF
11494
11495(define-public python2-betamax
f210e944 11496 (package-with-python2 python-betamax))
ca0635b4 11497
94cffc63
LF
11498(define-public python-s3transfer
11499 (package
11500 (name "python-s3transfer")
11501 (version "0.1.8")
11502 (source (origin
11503 (method url-fetch)
11504 (uri (pypi-uri "s3transfer" version))
11505 (sha256
11506 (base32
11507 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11508 (build-system python-build-system)
fad8bf97
LF
11509 (arguments
11510 `(#:phases
11511 (modify-phases %standard-phases
11512 (replace 'check
11513 (lambda _
11514 ;; 7 of the 'integration' tests require network access or login
11515 ;; credentials.
11516 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11517 (native-inputs
fad8bf97
LF
11518 `(("python-docutils" ,python-docutils)
11519 ("python-mock" ,python-mock)
11520 ("python-nose" ,python-nose)))
f22efa01 11521 (propagated-inputs
94cffc63
LF
11522 `(("python-botocore" ,python-botocore)))
11523 (synopsis "Amazon S3 Transfer Manager")
11524 (description "S3transfer is a Python library for managing Amazon S3
11525transfers.")
11526 (home-page "https://github.com/boto/s3transfer")
11527 (license license:asl2.0)
11528 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11529
11530(define-public python2-s3transfer
11531 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11532 (package
11533 (inherit base)
11534 (native-inputs
11535 `(("python2-futures" ,python2-futures)
94cffc63 11536 ,@(package-native-inputs base))))))
8ab59181
HG
11537
11538(define-public python-setproctitle
11539(package
11540 (name "python-setproctitle")
11541 (version "1.1.10")
11542 (source
11543 (origin
11544 (method url-fetch)
11545 (uri (pypi-uri "setproctitle" version))
11546 (sha256
11547 (base32
11548 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11549 (build-system python-build-system)
11550 (arguments
11551 '(#:phases
11552 (modify-phases %standard-phases
11553 (add-before 'check 'patch-Makefile
11554 ;; Stricly this is only required for the python2 variant.
11555 ;; But adding a phase in an inherited package seems to be
11556 ;; cumbersum. So we patch even for python3.
11557 (lambda _
11558 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11559 (when nose
11560 (substitute* "Makefile"
11561 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11562 (string-append nose "/bin/nosetests "))))
11563 #t)))
11564 (replace 'check
11565 (lambda _
11566 (setenv "PYTHON" (or (which "python3") (which "python")))
11567 (setenv "PYCONFIG" (or (which "python3-config")
11568 (which "python-config")))
11569 (setenv "CC" "gcc")
11570 ;; No need to extend PYTHONPATH to find the built package, since
11571 ;; the Makefile will build anyway
11572 (zero? (system* "make" "check")))))))
11573 (native-inputs
11574 `(("procps" ,procps))) ; required for tests
11575 (home-page
11576 "https://github.com/dvarrazzo/py-setproctitle")
11577 (synopsis
11578 "Setproctitle implementation for Python to customize the process title")
11579 (description "The library allows a process to change its title (as displayed
11580by system tools such as ps and top).
11581
11582Changing the title is mostly useful in multi-process systems, for
11583example when a master process is forked: changing the children's title
11584allows to identify the task each process is busy with. The technique
11585is used by PostgreSQL and the OpenSSH Server for example.")
11586 (license license:bsd-3)
11587 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11588
11589(define-public python2-setproctitle
11590 (let ((base (package-with-python2
11591 (strip-python2-variant python-setproctitle))))
11592 (package
11593 (inherit base)
11594 (native-inputs `(("python2-nose" ,python2-nose)
11595 ,@(package-native-inputs base))))))
162e42d8
HG
11596
11597(define-public python-validictory
11598 (package
11599 (name "python-validictory")
11600 (version "1.0.1")
11601 (source
11602 (origin
11603 (method url-fetch)
11604 (uri (pypi-uri "validictory" version))
11605 (sha256
11606 (base32
11607 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11608 (build-system python-build-system)
11609 (arguments
11610 '(#:phases
11611 (modify-phases %standard-phases
11612 (add-after 'unpack 'bootstrap
11613 ;; Move the tests out of the package directory to avoid
11614 ;; packaging them.
11615 (lambda* _
11616 (rename-file "validictory/tests" "tests")
11617 (delete-file "tests/__init__.py")))
11618 (replace 'check
11619 (lambda _
11620 ;; Extend PYTHONPATH so the built package will be found.
11621 (setenv "PYTHONPATH"
11622 (string-append (getcwd) "/build/lib:"
11623 (getenv "PYTHONPATH")))
11624 (zero? (system* "py.test" "-vv" )))))))
11625 (native-inputs
11626 `(("python-pytest" ,python-pytest)))
11627 (home-page
11628 "https://github.com/jamesturk/validictory")
11629 (synopsis "General purpose Python data validator")
11630 (description "It allows validation of arbitrary Python data structures.
11631
11632The schema format is based on the JSON Schema
11633proposal (http://json-schema.org), so combined with json the library is also
11634useful as a validator for JSON data.")
f210e944 11635 (license license:expat)))
162e42d8
HG
11636
11637(define-public python2-validictory
f210e944 11638 (package-with-python2 python-validictory))
0990edfe
DM
11639
11640(define-public python-aniso8601
11641 (package
11642 (name "python-aniso8601")
11643 (version "1.1.0")
11644 (source
11645 (origin
11646 (method url-fetch)
11647 (uri (pypi-uri "aniso8601" version))
11648 (sha256
11649 (base32
11650 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11651 (build-system python-build-system)
11652 (propagated-inputs
11653 `(("python-dateutil-2" ,python-dateutil-2)))
11654 (home-page
11655 "https://bitbucket.org/nielsenb/aniso8601")
11656 (synopsis
11657 "Python library for parsing ISO 8601 strings")
11658 (description
11659 "This package contains a library for parsing ISO 8601 datetime strings.")
11660 (license license:bsd-3)))
999d964d
DM
11661
11662(define-public python-flask-restful
11663 (package
11664 (name "python-flask-restful")
11665 (version "0.3.5")
11666 (source
11667 (origin
11668 (method url-fetch)
11669 (uri (pypi-uri "Flask-RESTful" version))
11670 (sha256
11671 (base32
11672 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11673 (build-system python-build-system)
11674 (propagated-inputs
11675 `(("python-aniso8601" ,python-aniso8601)
11676 ("python-flask" ,python-flask)
11677 ("python-pycrypto" ,python-pycrypto)
11678 ("python-pytz" ,python-pytz)))
11679 (native-inputs
11680 `(;; Optional dependency of Flask. Tests need it.
11681 ("python-blinker" ,python-blinker)
11682 ("python-mock" ,python-mock) ; For tests
11683 ("python-nose" ,python-nose) ; For tests
11684 ("python-sphinx" ,python-sphinx)))
11685 (home-page
11686 "https://www.github.com/flask-restful/flask-restful/")
11687 (synopsis
11688 "Flask module for creating REST APIs")
11689 (description
11690 "This package contains a Flask module for creating REST APIs.")
11691 (license license:bsd-3)))
31288222
DM
11692
11693(define-public python-flask-basicauth
11694 (package
11695 (name "python-flask-basicauth")
11696 (version "0.2.0")
11697 (source
11698 (origin
11699 (method url-fetch)
11700 (uri (pypi-uri "Flask-BasicAuth" version))
11701 (sha256
11702 (base32
11703 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11704 (build-system python-build-system)
11705 (propagated-inputs
11706 `(("python-flask" ,python-flask)))
11707 (home-page
11708 "https://github.com/jpvanhal/flask-basicauth")
11709 (synopsis
11710 "HTTP basic access authentication for Flask")
11711 (description
11712 "This package provides HTTP basic access authentication for Flask.")
11713 (license license:bsd-3)))
903276d0
DM
11714
11715(define-public python-flask-sqlalchemy
11716 (package
11717 (name "python-flask-sqlalchemy")
11718 (version "2.1")
11719 (source
11720 (origin
11721 (method url-fetch)
11722 (uri (pypi-uri "Flask-SQLAlchemy" version))
11723 (sha256
11724 (base32
11725 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11726 (build-system python-build-system)
11727 (propagated-inputs
11728 `(("python-flask" ,python-flask)
11729 ("python-sqlalchemy" ,python-sqlalchemy)))
11730 (home-page
11731 "http://github.com/mitsuhiko/flask-sqlalchemy")
11732 (synopsis
11733 "Module adding SQLAlchemy support to your Flask application")
11734 (description
11735 "This package adds SQLAlchemy support to your Flask application.")
11736 (license license:bsd-3)))
329b4b3b
LF
11737
11738(define-public python-pyev
11739 (package
11740 (name "python-pyev")
11741 (version "0.9.0")
11742 (source
11743 (origin
11744 (method url-fetch)
11745 (uri (pypi-uri "pyev" version))
11746 (sha256
11747 (base32
11748 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11749 (build-system python-build-system)
11750 (arguments
11751 `(#:tests? #f ; no test suite
11752 #:phases
11753 (modify-phases %standard-phases
11754 (add-after 'unpack 'patch
11755 (lambda* (#:key inputs #:allow-other-keys)
11756 (let ((libev (string-append (assoc-ref inputs "libev")
11757 "/lib/libev.so.4")))
11758 (substitute* "setup.py"
11759 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11760 (string-append "libev_dll_name = \"" libev "\"")))))))))
11761 (inputs
11762 `(("libev" ,libev)))
11763 (home-page "http://pythonhosted.org/pyev/")
11764 (synopsis "Python libev interface")
11765 (description "Pyev provides a Python interface to libev.")
11766 (license license:gpl3)))
11767
11768(define-public python2-pyev
11769 (package-with-python2 python-pyev))
45b4f127
DM
11770
11771(define-public python-imagesize
11772 (package
11773 (name "python-imagesize")
11774 (version "0.7.1")
11775 (source
11776 (origin
11777 (method url-fetch)
11778 (uri (pypi-uri "imagesize" version))
11779 (sha256
11780 (base32
11781 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11782 (build-system python-build-system)
9422c98a
LF
11783 (arguments
11784 '(;; Test files are not distributed on PyPi:
11785 ;; https://github.com/shibukawa/imagesize_py/issues/7
11786 #:tests? #f))
45b4f127
DM
11787 (home-page "https://github.com/shibukawa/imagesize_py")
11788 (synopsis "Gets image size of files in variaous formats in Python")
11789 (description
11790 "This package allows determination of image size from
11791PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11792 (license license:expat)))
45b4f127
DM
11793
11794(define-public python2-imagesize
f210e944 11795 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11796
11797(define-public python-axolotl-curve25519
11798 (package
11799 (name "python-axolotl-curve25519")
11800 (version "0.1")
11801 (source
11802 (origin
11803 (method git-fetch)
11804 (uri (git-reference
11805 (url "git://github.com/tgalal/python-axolotl-curve25519")
11806 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11807 (file-name (string-append name "-" version "-checkout"))
11808 (sha256
11809 (base32
11810 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11811 (build-system python-build-system)
11812 (arguments
11813 `(;; Prevent creation of the egg. This works around
11814 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11815 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11816 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11817 (synopsis "Python wrapper for curve25519 library")
11818 (description "This is a python wrapper for the curve25519 library
11819with ed25519 signatures. The C code was pulled from
11820libaxolotl-android. At the moment this wrapper is meant for use by
11821python-axolotl.")
11822 (license (list license:gpl3 ; Most files
683cdbf5 11823 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11824
11825(define-public python2-axolotl-curve25519
11826 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11827
11828(define-public python-axolotl
11829 (package
11830 (name "python-axolotl")
11831 (version "0.1.35")
11832 (source
11833 (origin
11834 (method url-fetch)
11835 (uri (string-append
11836 "https://github.com/tgalal/python-axolotl/archive/"
11837 version ".tar.gz"))
11838 (file-name (string-append name "-" version ".tar.gz"))
11839 (sha256
11840 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11841 (build-system python-build-system)
11842 (arguments
11843 `(#:phases
11844 (modify-phases %standard-phases
11845 ;; Don't install tests
11846 (add-before 'install 'remove-tests
11847 (lambda _
11848 (for-each delete-file-recursively
11849 '("axolotl/tests" "build/lib/axolotl/tests"))
11850 #t)))
11851 ;; Prevent creation of the egg. This works around
11852 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11853 #:configure-flags '("--root=/")))
06ff0837
AI
11854 (propagated-inputs
11855 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11856 ("python-dateutil" ,python-dateutil)
11857 ("python-protobuf" ,python-protobuf)
11858 ("python-pycrypto" ,python-pycrypto)))
11859 (home-page "https://github.com/tgalal/python-axolotl")
11860 (synopsis "Python port of libaxolotl-android")
11861 (description "This is a python port of libaxolotl-android. This
11862is a ratcheting forward secrecy protocol that works in synchronous and
11863asynchronous messaging environments.")
11864 (license license:gpl3)))
11865
11866(define-public python2-axolotl
11867 (package-with-python2 python-axolotl))
e2fca490
DM
11868
11869(define-public python-termstyle
11870 (package
11871 (name "python-termstyle")
11872 (version "0.1.11")
11873 (source
11874 (origin
11875 (method url-fetch)
11876 (uri (pypi-uri "termstyle" version))
11877 (sha256
11878 (base32
11879 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11880 (build-system python-build-system)
11881 (home-page "http://github.com/gfxmonk/termstyle")
11882 (synopsis "Console text coloring for Python")
11883 (description "This package provides console text coloring for Python.")
11884 (license license:bsd-3)))
1e6112d8
DM
11885
11886(define-public python-rednose
11887 (package
11888 (name "python-rednose")
11889 (version "1.2.1")
11890 (source
11891 (origin
11892 (method url-fetch)
11893 (uri (pypi-uri "rednose" version))
11894 (sha256
11895 (base32
11896 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11897 (build-system python-build-system)
11898 (arguments
11899 `(#:phases
11900 (modify-phases %standard-phases
11901 (add-after 'unpack 'fix-deps
11902 (lambda _
11903 ;; See <https://github.com/JBKahn/rednose/issues/12>
11904 (substitute* "setup.py"
11905 (("python-termstyle") "termstyle"))
11906 #t)))))
11907 (propagated-inputs
11908 `(("python-colorama" ,python-colorama)
11909 ("python-termstyle" ,python-termstyle)))
11910 (native-inputs
11911 `(("python-six" ,python-six)
11912 ("python-nose" ,python-nose)))
11913 (home-page "https://github.com/JBKahn/rednose")
11914 (synopsis "Colored output for Python nosetests")
11915 (description "This package provides colored output for the
11916@command{nosetests} command of the Python Nose unit test framework.")
11917 (license license:bsd-3)))
0a7f17f0
DM
11918
11919(define-public python-flask-restplus
11920 (package
11921 (name "python-flask-restplus")
11922 (version "0.9.2")
11923 (source
11924 (origin
11925 (method url-fetch)
11926 (uri (pypi-uri "flask-restplus" version))
11927 (sha256
11928 (base32
11929 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11930 (build-system python-build-system)
11931 (propagated-inputs
11932 `(("python-aniso8601" ,python-aniso8601)
11933 ("python-flask" ,python-flask)
11934 ("python-jsonschema" ,python-jsonschema)
11935 ("python-pytz" ,python-pytz)
11936 ("python-six" ,python-six)))
11937 (native-inputs
11938 `(("python-tzlocal" ,python-tzlocal)
11939 ("python-blinker" ,python-blinker)
11940 ("python-nose" ,python-nose)
11941 ("python-rednose" ,python-rednose)))
11942 (home-page "https://github.com/noirbizarre/flask-restplus")
11943 (synopsis "Framework for documented API development with Flask")
11944 (description "This package provides a framework for API development with
11945the Flask web framework in Python. It is similar to package
11946@code{python-flask-restful} but supports the @code{python-swagger}
11947documentation builder.")
11948 (license license:expat)))
1ed21519
DM
11949
11950(define-public python-sadisplay
11951 (package
11952 (name "python-sadisplay")
11953 (version "0.4.6")
11954 (source
11955 (origin
11956 (method url-fetch)
11957 (uri (pypi-uri "sadisplay" version))
11958 (sha256
11959 (base32
11960 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
11961 (build-system python-build-system)
11962 (propagated-inputs
11963 `(("python-sqlalchemy" ,python-sqlalchemy)))
11964 (native-inputs
11965 `(("python-nose" ,python-nose)))
11966 (home-page "https://bitbucket.org/estin/sadisplay")
11967 (synopsis "SQLAlchemy schema displayer")
11968 (description "This package provides a program to build Entity
11969Relationship diagrams from a SQLAlchemy model (or directly from the
11970database).")
11971 (license license:bsd-3)))
11972
11973(define-public python2-sadisplay
11974 (package-with-python2 python-sadisplay))
444a79b6
DM
11975
11976(define-public python-flask-restful-swagger
11977 (package
11978 (name "python-flask-restful-swagger")
11979 (version "0.19")
11980 (source
11981 (origin
11982 (method url-fetch)
11983 (uri (pypi-uri "flask-restful-swagger" version))
11984 (sha256
11985 (base32
11986 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
11987 (build-system python-build-system)
11988 (propagated-inputs
11989 `(("python-flask-restful" ,python-flask-restful)))
11990 (home-page "https://github.com/rantav/flask-restful-swagger")
11991 (synopsis "Extract Swagger specs from Flask-Restful projects")
11992 (description "This package lets you extract Swagger API documentation
11993specs from your Flask-Restful projects.")
11994 (license license:expat)))
11995
11996(define-public python2-flask-restful-swagger
11997 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
11998
11999(define-public python-argcomplete
12000 (package
12001 (name "python-argcomplete")
12002 (version "1.7.0")
12003 (source
12004 (origin
12005 (method url-fetch)
12006 (uri (pypi-uri "argcomplete" version))
12007 (sha256
12008 (base32
12009 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12010 (build-system python-build-system)
12011 (home-page "https://github.com/kislyuk/argcomplete")
12012 (synopsis "Shell tab completion for Python argparse")
12013 (description "argcomplete provides extensible command line tab completion
12014of arguments and options for Python scripts using @code{argparse}. It's
12015particularly useful for programs with many options or sub-parsers that can
12016dynamically suggest completions; for example, when browsing resources over the
12017network.")
12018 (license license:asl2.0)))
12019
12020(define-public python2-argcomplete
12021 (package-with-python2 python-argcomplete))
361a2fcf
TGR
12022
12023(define-public python-xopen
12024 (package
12025 (name "python-xopen")
12026 (version "0.1.1")
12027 (source
12028 (origin
12029 (method url-fetch)
12030 (uri (pypi-uri "xopen" version))
12031 (sha256
12032 (base32
12033 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
12034 (file-name (string-append name "-" version ".tar.gz"))))
12035 (build-system python-build-system)
12036 (home-page "https://github.com/marcelm/xopen/")
12037 (synopsis "Open compressed files transparently")
12038 (description "This module provides an @code{xopen} function that works like
12039Python's built-in @code{open} function, but can also deal with compressed files.
12040Supported compression formats are gzip, bzip2 and, xz, and are automatically
12041recognized by their file extensions. The focus is on being as efficient as
12042possible on all supported Python versions.")
12043 (license license:expat)))
12044
12045(define-public python2-xopen
12046 (package-with-python2 python-xopen))