gnu: python-pylast: Update 1.6.0.
[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>
a01b6da7
NK
35;;;
36;;; This file is part of GNU Guix.
37;;;
38;;; GNU Guix is free software; you can redistribute it and/or modify it
39;;; under the terms of the GNU General Public License as published by
40;;; the Free Software Foundation; either version 3 of the License, or (at
41;;; your option) any later version.
42;;;
43;;; GNU Guix is distributed in the hope that it will be useful, but
44;;; WITHOUT ANY WARRANTY; without even the implied warranty of
45;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46;;; GNU General Public License for more details.
47;;;
48;;; You should have received a copy of the GNU General Public License
49;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50
1ffa7090 51(define-module (gnu packages python)
3f641af0 52 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 53 #:use-module (gnu packages)
8e451885 54 #:use-module (gnu packages algebra)
d79a343b 55 #:use-module (gnu packages adns)
89b2e0b0 56 #:use-module (gnu packages attr)
d96034ed 57 #:use-module (gnu packages backup)
3969ca54 58 #:use-module (gnu packages bash)
1ffa7090 59 #:use-module (gnu packages compression)
4ed20663 60 #:use-module (gnu packages databases)
ddc63a56 61 #:use-module (gnu packages django)
5e1c9367 62 #:use-module (gnu packages file)
4ed20663 63 #:use-module (gnu packages fontutils)
4ed20663
AE
64 #:use-module (gnu packages gcc)
65 #:use-module (gnu packages ghostscript)
6eb7af2a 66 #:use-module (gnu packages gl)
4ed20663 67 #:use-module (gnu packages glib)
6eb7af2a 68 #:use-module (gnu packages gstreamer)
4ed20663 69 #:use-module (gnu packages gtk)
421a80a2 70 #:use-module (gnu packages icu4c)
c937562e 71 #:use-module (gnu packages image)
4ed20663 72 #:use-module (gnu packages imagemagick)
d79a343b 73 #:use-module (gnu packages libevent)
b10ab723 74 #:use-module (gnu packages libffi)
89b2e0b0 75 #:use-module (gnu packages linux)
0da98533 76 #:use-module (gnu packages maths)
4ed20663 77 #:use-module (gnu packages multiprecision)
45203542 78 #:use-module (gnu packages networking)
be7134bf 79 #:use-module (gnu packages ncurses)
b04a52a6 80 #:use-module (gnu packages openstack)
d488d5d6 81 #:use-module (gnu packages password-utils)
c9b1b4f9 82 #:use-module (gnu packages pcre)
4ed20663 83 #:use-module (gnu packages perl)
b10ab723 84 #:use-module (gnu packages pkg-config)
06ff0837 85 #:use-module (gnu packages protobuf)
4ed20663 86 #:use-module (gnu packages readline)
6eb7af2a 87 #:use-module (gnu packages sdl)
c9b1b4f9 88 #:use-module (gnu packages statistics)
8f9ac901 89 #:use-module (gnu packages tex)
1c65314c 90 #:use-module (gnu packages texinfo)
cc2b77df 91 #:use-module (gnu packages tls)
e25f0174 92 #:use-module (gnu packages version-control)
02f8f804 93 #:use-module (gnu packages video)
8d12be1e 94 #:use-module (gnu packages web)
ce0614dd 95 #:use-module (gnu packages base)
26b307e2 96 #:use-module (gnu packages xml)
6fa14469 97 #:use-module (gnu packages xorg)
0bdc1671 98 #:use-module (gnu packages xdisorg)
4ed20663 99 #:use-module (gnu packages zip)
afa181ff 100 #:use-module (gnu packages tcl)
63bcec71 101 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
102 #:use-module (guix packages)
103 #:use-module (guix download)
ea5456c8 104 #:use-module (guix git-download)
11bb85a1 105 #:use-module (guix utils)
acc26ff1 106 #:use-module (guix build-system gnu)
d8c4998f 107 #:use-module (guix build-system cmake)
898238b9 108 #:use-module (guix build-system python)
1c65314c
FB
109 #:use-module (guix build-system trivial)
110 #:use-module (srfi srfi-1))
a01b6da7 111
45848023 112(define-public python-2.7
a01b6da7
NK
113 (package
114 (name "python")
f0499100 115 (version "2.7.12")
a01b6da7
NK
116 (source
117 (origin
118 (method url-fetch)
9b43a0ff 119 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
120 version "/Python-" version ".tar.xz"))
121 (sha256
122 (base32
f0499100 123 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
124 (patches (search-patches "python-2.7-search-paths.patch"
125 "python-2-deterministic-build-info.patch"
126 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
127 (modules '((guix build utils)))
128 ;; suboptimal to delete failing tests here, but if we delete them in the
129 ;; arguments then we need to make sure to strip out that phase when it
130 ;; gets inherited by python and python-minimal.
131 (snippet
132 '(begin
133 (for-each delete-file
134 '("Lib/test/test_compileall.py"
f0499100 135 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
136 "Lib/test/test_distutils.py"
137 "Lib/test/test_import.py"
138 "Lib/test/test_shutil.py"
139 "Lib/test/test_socket.py"
1bb163b0 140 "Lib/test/test_subprocess.py"))
10a42aa2 141 #t))))
02f0c3b2
LC
142 (outputs '("out"
143 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 144 (build-system gnu-build-system)
3fdc99da 145 (arguments
10a42aa2 146 `(;; 356 tests OK.
e7e7a1eb
EF
147 ;; 6 tests failed:
148 ;; test_compileall test_distutils test_import test_shutil test_socket
149 ;; test_subprocess
150 ;; 39 tests skipped:
ff6f33cf
ED
151 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
152 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
153 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
154 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
155 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
156 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
157 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
158 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
159 ;; test_winreg test_winsound test_zipfile64
160 ;; 4 skips unexpected on linux2:
161 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 162 #:test-target "test"
3fdc99da 163 #:configure-flags
6a20289d
LC
164 (list "--enable-shared" ;allow embedding
165 "--with-system-ffi" ;build ctypes
166 (string-append "LDFLAGS=-Wl,-rpath="
167 (assoc-ref %outputs "out") "/lib"))
fd982732 168
d2cc9c7c
LC
169 #:modules ((ice-9 ftw) (ice-9 match)
170 (guix build utils) (guix build gnu-build-system))
fd982732 171 #:phases
46472ecd
MW
172 (modify-phases %standard-phases
173 (add-before
174 'configure 'patch-lib-shells
175 (lambda _
176 ;; Filter for existing files, since some may not exist in all
177 ;; versions of python that are built with this recipe.
178 (substitute* (filter file-exists?
179 '("Lib/subprocess.py"
180 "Lib/popen2.py"
181 "Lib/distutils/tests/test_spawn.py"
182 "Lib/test/test_subprocess.py"))
183 (("/bin/sh") (which "sh")))
dedc8320
LC
184
185 ;; Use zero as the timestamp in .pyc files so that builds are
186 ;; deterministic. TODO: Remove it when this variable is set in
187 ;; gnu-build-system.scm.
a665996f 188 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 189 #t))
5b4e2791
LC
190 (add-before 'configure 'do-not-record-configure-flags
191 (lambda* (#:key configure-flags #:allow-other-keys)
192 ;; Remove configure flags from the installed '_sysconfigdata.py'
193 ;; and 'Makefile' so we don't end up keeping references to the
194 ;; build tools.
195 ;;
196 ;; Preserve at least '--with-system-ffi' since otherwise the
197 ;; thing tries to build libffi, fails, and we end up with a
198 ;; Python that lacks ctypes.
199 (substitute* "configure"
200 (("^CONFIG_ARGS=.*$")
201 (format #f "CONFIG_ARGS='~a'\n"
202 (if (member "--with-system-ffi" configure-flags)
203 "--with-system-ffi"
204 ""))))
205 #t))
46472ecd
MW
206 (add-before
207 'check 'pre-check
208 (lambda _
209 ;; 'Lib/test/test_site.py' needs a valid $HOME
210 (setenv "HOME" (getcwd))
211 #t))
212 (add-after
213 'unpack 'set-source-file-times-to-1980
214 ;; XXX One of the tests uses a ZIP library to pack up some of the
215 ;; source tree, and fails with "ZIP does not support timestamps
216 ;; before 1980". Work around this by setting the file times in the
217 ;; source tree to sometime in early 1980.
218 (lambda _
219 (let ((circa-1980 (* 10 366 24 60 60)))
220 (ftw "." (lambda (file stat flag)
221 (utime file circa-1980 circa-1980)
222 #t))
02f0c3b2 223 #t)))
9ffe61b0
LC
224 (add-after 'install 'remove-tests
225 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
226 ;; because these files are used by some libraries out there.
227 (lambda* (#:key outputs #:allow-other-keys)
228 (let ((out (assoc-ref outputs "out")))
229 (match (scandir (string-append out "/lib")
230 (lambda (name)
231 (string-prefix? "python" name)))
232 ((pythonX.Y)
233 (let ((testdir (string-append out "/lib/" pythonX.Y
234 "/test")))
235 (with-directory-excursion testdir
236 (for-each delete-file-recursively
237 (scandir testdir
238 (match-lambda
239 ((or "." "..") #f)
240 (file
241 (not
242 (string-prefix? "test_support."
243 file))))))
244 (call-with-output-file "__init__.py" (const #t))
245 #t)))))))
216c283b
LC
246 (add-before 'strip 'make-libraries-writable
247 (lambda* (#:key outputs #:allow-other-keys)
248 ;; Make .so files writable so they can be stripped.
249 (let ((out (assoc-ref outputs "out")))
250 (for-each (lambda (file)
251 (chmod file #o755))
252 (find-files (string-append out "/lib")
253 "\\.so"))
254 #t)))
02f0c3b2
LC
255 (add-after 'install 'move-tk-inter
256 (lambda* (#:key outputs #:allow-other-keys)
257 ;; When Tkinter support is built move it to a separate output so
258 ;; that the main output doesn't contain a reference to Tcl/Tk.
259 (let ((out (assoc-ref outputs "out"))
260 (tk (assoc-ref outputs "tk")))
261 (when tk
262 (match (find-files out "tkinter.*\\.so")
263 ((tkinter.so)
264 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
265 ;; want it under TK/lib/pythonX.Y/site-packages.
266 (let* ((len (string-length out))
267 (target (string-append
268 tk "/"
269 (string-drop
270 (dirname (dirname tkinter.so))
271 len)
272 "/site-packages")))
273 (install-file tkinter.so target)
274 (delete-file tkinter.so)))))
275 #t))))))
a01b6da7 276 (inputs
3fdc99da
CR
277 `(("bzip2" ,bzip2)
278 ("gdbm" ,gdbm)
b10ab723 279 ("libffi" ,libffi) ; for ctypes
b88e1b0a 280 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 281 ("openssl" ,openssl)
3fdc99da 282 ("readline" ,readline)
afa181ff
LC
283 ("zlib" ,zlib)
284 ("tcl" ,tcl)
285 ("tk" ,tk))) ; for tkinter
b10ab723
CR
286 (native-inputs
287 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
288 (native-search-paths
289 (list (search-path-specification
290 (variable "PYTHONPATH")
af070955 291 (files '("lib/python2.7/site-packages")))))
f0499100 292 (home-page "https://www.python.org")
afa181ff 293 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
294 (description
295 "Python is a remarkably powerful dynamic programming language that
296is used in a wide variety of application domains. Some of its key
297distinguishing features include: clear, readable syntax; strong
298introspection capabilities; intuitive object orientation; natural
299expression of procedural code; full modularity, supporting hierarchical
300packages; exception-based error handling; and very high level dynamic
301data types.")
3f641af0 302 (license license:psfl)))
acc26ff1 303
45848023
HG
304;; Current 2.x version.
305(define-public python-2 python-2.7)
306
72df6680 307(define-public python-3.5
b24d1cfc 308 (package (inherit python-2)
72df6680 309 (version "3.5.2")
717003e3
LC
310 (source (origin
311 (method url-fetch)
312 (uri (string-append "https://www.python.org/ftp/python/"
313 version "/Python-" version ".tar.xz"))
fc1adab1
AK
314 (patches (search-patches
315 "python-fix-tests.patch"
72df6680 316 "python-3.5-fix-tests.patch"
fc1adab1
AK
317 "python-3-deterministic-build-info.patch"
318 "python-3-search-paths.patch"))
717003e3
LC
319 (patch-flags '("-p0"))
320 (sha256
321 (base32
72df6680 322 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
323 (arguments (substitute-keyword-arguments (package-arguments python-2)
324 ((#:tests? _) #t)))
1aebc0cb
AE
325 (native-search-paths
326 (list (search-path-specification
327 (variable "PYTHONPATH")
0e05d01e
SB
328 (files (list (string-append "lib/python"
329 (version-major+minor version)
330 "/site-packages"))))))))
f26a77ff 331
72df6680
LF
332(define-public python-3.4
333 (package (inherit python-3.5)
334 (version "3.4.5")
335 (source (origin
336 (method url-fetch)
337 (uri (string-append "https://www.python.org/ftp/python/"
338 version "/Python-" version ".tar.xz"))
339 (patches (search-patches
340 "python-fix-tests.patch"
341 "python-3.4-fix-tests.patch"
342 "python-3-deterministic-build-info.patch"
343 "python-3-search-paths.patch"))
344 (patch-flags '("-p0"))
345 (sha256
346 (base32
347 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
348
45848023 349;; Current 3.x version.
72df6680 350(define-public python-3 python-3.5)
45848023
HG
351
352;; Current major version.
353(define-public python python-3)
354
95288fcc
LC
355;; Minimal variants of Python, mostly used to break the cycle between Tk and
356;; Python (Tk -> libxcb -> Python.)
357
358(define-public python2-minimal
359 (package (inherit python-2)
360 (name "python-minimal")
02f0c3b2 361 (outputs '("out"))
95288fcc
LC
362 (arguments
363 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
364 ((#:configure-flags cf)
365 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
366 (inputs '()))) ;none of the optional dependencies
367
368(define-public python-minimal
898238b9 369 (package (inherit python)
95288fcc 370 (name "python-minimal")
02f0c3b2 371 (outputs '("out"))
95288fcc 372
d0b73960 373 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
374 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
375 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
376 (inputs `(("libffi" ,libffi)
377 ("openssl" ,openssl)
95288fcc
LC
378 ("zlib" ,zlib)))))
379
64cb064c
LC
380(define* (wrap-python3 python
381 #:optional
382 (name (string-append (package-name python) "-wrapper")))
898238b9 383 (package (inherit python)
95288fcc 384 (name name)
898238b9
AE
385 (source #f)
386 (build-system trivial-build-system)
02f0c3b2 387 (outputs '("out"))
3969ca54 388 (inputs `(("bash" ,bash)))
3c0f2329 389 (propagated-inputs `(("python" ,python)))
898238b9
AE
390 (arguments
391 `(#:modules ((guix build utils))
392 #:builder
393 (begin
394 (use-modules (guix build utils))
395 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
396 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
397 (mkdir-p bin)
398 (for-each
399 (lambda (old new)
400 (symlink (string-append python old)
401 (string-append bin "/" new)))
3969ca54
SB
402 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
403 `("python" ,"pydoc" ,"idle" ,"pip"))
404 ;; python-config outputs search paths based upon its location,
405 ;; use a bash wrapper to avoid changing its outputs.
406 (let ((bash (string-append (assoc-ref %build-inputs "bash")
407 "/bin/bash"))
408 (old (string-append python "python3-config"))
409 (new (string-append bin "/python-config")))
410 (with-output-to-file new
411 (lambda ()
412 (format #t "#!~a~%" bash)
413 (format #t "exec \"~a\" \"$@\"~%" old)
414 (chmod new #o755)
415 #t)))))))
0d56e3e1
LC
416 (synopsis "Wrapper for the Python 3 commands")
417 (description
418 "This package provides wrappers for the commands of Python@tie{}3.x such
419that they can be invoked under their usual name---e.g., @command{python}
420instead of @command{python3}.")))
421
95288fcc
LC
422(define-public python-wrapper (wrap-python3 python))
423(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 424
aaf625b8
RW
425(define-public python-psutil
426 (package
427 (name "python-psutil")
88535a44 428 (version "4.3.0")
aaf625b8
RW
429 (source
430 (origin
431 (method url-fetch)
f56777be 432 (uri (pypi-uri "psutil" version))
aaf625b8
RW
433 (sha256
434 (base32
88535a44 435 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8
RW
436 (build-system python-build-system)
437 (native-inputs
438 `(("python-setuptools" ,python-setuptools)))
88535a44 439 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
440 (synopsis "Library for retrieving information on running processes")
441 (description
442 "psutil (Python system and process utilities) is a library for retrieving
443information on running processes and system utilization (CPU, memory, disks,
444network) in Python. It is useful mainly for system monitoring, profiling and
445limiting process resources and management of running processes. It implements
446many functionalities offered by command line tools such as: ps, top, lsof,
447netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
448pidof, tty, taskset, pmap.")
3f641af0 449 (license license:bsd-3)))
aaf625b8
RW
450
451(define-public python2-psutil
452 (package-with-python2 python-psutil))
898238b9 453
f9da1d8a
ED
454(define-public python-passlib
455 (package
456 (name "python-passlib")
1c9f78ec 457 (version "1.7.0")
f9da1d8a
ED
458 (source
459 (origin
460 (method url-fetch)
690e8c66 461 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
462 (sha256
463 (base32
1c9f78ec 464 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
465 (build-system python-build-system)
466 (native-inputs
467 `(("python-nose" ,python-nose)
468 ("python-setuptools" ,python-setuptools)))
469 (inputs
470 `(("python-py-bcrypt" ,python-py-bcrypt)))
471 (arguments
472 `(#:phases
473 (alist-cons-before
474 'check 'set-PYTHON_EGG_CACHE
475 ;; some tests require access to "$HOME/.cython"
476 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
477 %standard-phases)))
478 (home-page "https://bitbucket.org/ecollins/passlib")
479 (synopsis
480 "Comprehensive password hashing framework")
481 (description
482 "Passlib is a password hashing library for Python 2 & 3, which provides
483cross-platform implementations of over 30 password hashing algorithms, as well
484as a framework for managing existing password hashes. It's designed to be
485useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
486to providing full-strength password hashing for multi-user application.")
3f641af0 487 (license license:bsd-3)))
f9da1d8a
ED
488
489(define-public python2-passlib
490 (package-with-python2 python-passlib))
491
feb0d9c3
ED
492(define-public python-py-bcrypt
493 (package
494 (name "python-py-bcrypt")
495 (version "0.4")
496 (source
497 (origin
498 (method url-fetch)
499 (uri (string-append
500 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
501 version
502 ".tar.gz"))
503 (sha256
504 (base32
505 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
506 (build-system python-build-system)
507 (native-inputs
508 `(("python-setuptools" ,python-setuptools)))
509 (home-page "https://code.google.com/p/py-bcrypt")
510 (synopsis
511 "Bcrypt password hashing and key derivation")
512 (description
513 "A python wrapper of OpenBSD's Blowfish password hashing code. This
514system hashes passwords using a version of Bruce Schneier's Blowfish block
515cipher with modifications designed to raise the cost of off-line password
516cracking and frustrate fast hardware implementation. The computation cost of
517the algorithm is parametised, so it can be increased as computers get faster.
518The intent is to make a compromise of a password database less likely to
519result in an attacker gaining knowledge of the plaintext passwords (e.g. using
520John the Ripper).")
521 ;; "sha2.c" is under BSD-3;
522 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
523 ;; the rest is under ISC.
3f641af0 524 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
525
526(define-public python2-py-bcrypt
527 (package-with-python2 python-py-bcrypt))
528
529
429fdea1
ED
530(define-public python-paramiko
531 (package
532 (name "python-paramiko")
81b9bbbd 533 (version "1.16.0")
429fdea1
ED
534 (source
535 (origin
536 (method url-fetch)
81b9bbbd 537 (uri (pypi-uri "paramiko" version))
429fdea1
ED
538 (sha256
539 (base32
81b9bbbd 540 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1
ED
541 (build-system python-build-system)
542 (native-inputs
543 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
544 (propagated-inputs
545 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 546 (inputs
a3fc12da 547 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
548 (home-page "http://www.paramiko.org/")
549 (synopsis "SSHv2 protocol library")
550 (description "Paramiko is a python implementation of the SSHv2 protocol,
551providing both client and server functionality. While it leverages a Python C
552extension for low level cryptography (PyCrypto), Paramiko itself is a pure
553Python interface around SSH networking concepts.")
3f641af0 554 (license license:lgpl2.1+)))
429fdea1
ED
555
556(define-public python2-paramiko
557 (package-with-python2 python-paramiko))
558
559
de73dbf6
ED
560(define-public python-httplib2
561 (package
562 (name "python-httplib2")
286f1bac 563 (version "0.9.2")
de73dbf6
ED
564 (source
565 (origin
566 (method url-fetch)
286f1bac 567 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
568 (sha256
569 (base32
286f1bac 570 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6
ED
571 (build-system python-build-system)
572 (native-inputs
573 `(("python-setuptools" ,python-setuptools)))
286f1bac 574 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
575 (synopsis "Comprehensive HTTP client library")
576 (description
577 "A comprehensive HTTP client library supporting many features left out of
578other HTTP libraries.")
579 (license license:expat)))
580
581(define-public python2-httplib2
582 (package-with-python2 python-httplib2))
583
67039875
ED
584(define-public python-ecdsa
585 (package
586 (name "python-ecdsa")
587 (version "0.13")
588 (source
589 (origin
590 (method url-fetch)
591 (uri (string-append
592 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
593 version
594 ".tar.gz"))
595 (sha256
596 (base32
597 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
598 (build-system python-build-system)
599 (native-inputs
600 `(("python-setuptools" ,python-setuptools)))
601 (inputs
602 `(("openssl" ,openssl)))
603 (home-page
604 "http://github.com/warner/python-ecdsa")
605 (synopsis
606 "ECDSA cryptographic signature library (pure python)")
607 (description
608 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
609Curve Digital Signature Algorithm), implemented purely in Python. With this
610library, you can quickly create keypairs (signing key and verifying key), sign
611messages, and verify the signatures. The keys and signatures are very short,
612making them easy to handle and incorporate into other protocols.")
613 (license license:expat)))
614
615(define-public python2-ecdsa
616 (package-with-python2 python-ecdsa))
617
52323f32
ED
618(define-public python-ccm
619 (package
620 (name "python-ccm")
db5567f7 621 (version "2.1.6")
52323f32
ED
622 (source
623 (origin
624 (method url-fetch)
db5567f7 625 (uri (pypi-uri "ccm" version))
52323f32
ED
626 (sha256
627 (base32
db5567f7 628 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32
ED
629 (build-system python-build-system)
630 (native-inputs
631 `(("python-setuptools" ,python-setuptools)))
632 (inputs
633 `(("python-pyyaml" ,python-pyyaml)
634 ("python-six" ,python-six)))
635 (home-page "https://github.com/pcmanus/ccm")
636 (synopsis "Cassandra Cluster Manager")
637 (description "A script/library to create, launch and remove an Apache
638Cassandra cluster on localhost.")
3f641af0 639 (license license:asl2.0)))
52323f32
ED
640
641(define-public python2-ccm
642 (package-with-python2 python-ccm))
643
89114f39 644(define-public python-pytz
acc26ff1 645 (package
89114f39 646 (name "python-pytz")
61c9babb 647 (version "2016.3")
acc26ff1
CR
648 (source
649 (origin
650 (method url-fetch)
61c9babb 651 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
652 (sha256
653 (base32
61c9babb 654 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 655 (build-system python-build-system)
8498b8cf 656 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 657 (home-page "http://pythonhosted.org/pytz")
9e771e3b 658 (synopsis "Python timezone library")
acc26ff1
CR
659 (description
660 "This library allows accurate and cross platform timezone calculations
661using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 662 (license license:expat)))
5ace6e2f 663
89114f39 664(define-public python2-pytz
11bb85a1 665 (package-with-python2 python-pytz))
89114f39 666
fc50e9c6 667
89114f39 668(define-public python-babel
5ace6e2f 669 (package
89114f39 670 (name "python-babel")
3f37db6b 671 (version "2.3.2")
5ace6e2f
CR
672 (source
673 (origin
674 (method url-fetch)
b850a6d8 675 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
676 (sha256
677 (base32
3f37db6b 678 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f
CR
679 (build-system python-build-system)
680 (inputs
e1804763
AE
681 `(("python-pytz" ,python-pytz)
682 ("python-setuptools" ,python-setuptools)))
8498b8cf 683 (arguments `(#:tests? #f)) ; no test target
e1804763 684 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
685 (synopsis
686 "Tools for internationalizing Python applications")
687 (description
688 "Babel is composed of two major parts:
689- tools to build and work with gettext message catalogs
690- a Python interface to the CLDR (Common Locale Data Repository), providing
691access to various locale display names, localized number and date formatting,
692etc. ")
3f641af0 693 (license license:bsd-3)))
89114f39
AE
694
695(define-public python2-babel
11bb85a1 696 (package-with-python2 python-babel))
73adf220 697
ed377cc6
RW
698(define-public python2-backport-ssl-match-hostname
699 (package
700 (name "python2-backport-ssl-match-hostname")
f2d06d46 701 (version "3.5.0.1")
ed377cc6
RW
702 (source
703 (origin
704 (method url-fetch)
705 (uri (string-append
706 "https://pypi.python.org/packages/source/b/"
707 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
708 version ".tar.gz"))
709 (sha256
710 (base32
f2d06d46 711 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 712 (build-system python-build-system)
f2d06d46
EF
713 (arguments
714 `(#:python ,python-2
715 #:tests? #f)) ; no test target
ed377cc6
RW
716 (inputs
717 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
718 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
719 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
720 (description
721 "This backport brings the ssl.match_hostname() function to users of
722earlier versions of Python. The function checks the hostname in the
723certificate returned by the server to which a connection has been established,
724and verifies that it matches the intended target hostname.")
3f641af0 725 (license license:psfl)))
ed377cc6 726
ef5cbf9b
RW
727(define-public python-h5py
728 (package
729 (name "python-h5py")
fe147c41 730 (version "2.6.0")
ef5cbf9b
RW
731 (source
732 (origin
733 (method url-fetch)
fe147c41 734 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
735 (sha256
736 (base32
fe147c41 737 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 738 (build-system python-build-system)
797e1401
RW
739 (arguments
740 `(#:tests? #f ; no test target
741 #:phases
742 (modify-phases %standard-phases
743 (add-after 'unpack 'fix-hdf5-paths
744 (lambda* (#:key inputs #:allow-other-keys)
745 (let ((prefix (assoc-ref inputs "hdf5")))
746 (substitute* "setup_build.py"
747 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
748 (string-append "['" prefix "/lib" "']"))
749 (("'/opt/local/include', '/usr/local/include'")
750 (string-append "'" prefix "/include" "'")))
751 (substitute* "setup_configure.py"
752 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
753 (string-append "['" prefix "/lib" "']")))
754 #t))))))
3c4010b1
RW
755 (propagated-inputs
756 `(("python-numpy" ,python-numpy)))
ef5cbf9b 757 (inputs
fe147c41
EF
758 `(("hdf5" ,hdf5)
759 ("python-six" ,python-six)))
ef5cbf9b 760 (native-inputs
fe147c41
EF
761 `(("python-cython" ,python-cython)
762 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
763 (home-page "http://www.h5py.org/")
764 (synopsis "Read and write HDF5 files from Python")
765 (description
766 "The h5py package provides both a high- and low-level interface to the
767HDF5 library from Python. The low-level interface is intended to be a
768complete wrapping of the HDF5 API, while the high-level component supports
769access to HDF5 files, datasets and groups using established Python and NumPy
770concepts.")
3f641af0 771 (license license:bsd-3)
fe147c41 772 (properties `((python2-variant . ,(delay python2-h5py))))))
ef5cbf9b
RW
773
774(define-public python2-h5py
fe147c41 775 (package-with-python2 (strip-python2-variant python-h5py)))
ef5cbf9b 776
c1448c69
EB
777(define-public python-lockfile
778 (package
779 (name "python-lockfile")
692add53 780 (version "0.12.2")
c1448c69
EB
781 (source
782 (origin
783 (method url-fetch)
784 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
785 "lockfile-" version ".tar.gz"))
786 (sha256
787 (base32
692add53 788 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
789 (build-system python-build-system)
790 (arguments '(#:test-target "check"))
692add53
BW
791 (native-inputs
792 `(("python-pbr" ,python-pbr)))
6a8f26a4 793 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
794 (synopsis "Platform-independent file locking module")
795 (description
796 "The lockfile package exports a LockFile class which provides a simple
797API for locking files.")
1804527a
BW
798 (license license:expat)
799 (properties `((python2-variant . ,(delay python2-lockfile))))))
c1448c69
EB
800
801(define-public python2-lockfile
1804527a
BW
802 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
803 (package
692add53
BW
804 (inherit base)
805 (native-inputs `(("python2-setuptools" ,python2-setuptools)
806 ,@(package-native-inputs base))))))
c1448c69 807
5a1a4bf6
EB
808(define-public python-mock
809 (package
810 (name "python-mock")
811 (version "1.0.1")
812 (source
813 (origin
814 (method url-fetch)
815 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
816 "mock-" version ".tar.gz"))
817 (sha256
818 (base32
819 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
820 (build-system python-build-system)
821 (arguments '(#:test-target "check"))
07af3e5e 822 (home-page "http://code.google.com/p/mock/")
9e771e3b 823 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
824 (description
825 "Mock is a library for testing in Python. It allows you to replace parts
826of your system under test with mock objects and make assertions about how they
827have been used.")
bd3fa666 828 (license license:expat)))
5a1a4bf6
EB
829
830(define-public python2-mock
831 (package-with-python2 python-mock))
832
fc50e9c6 833
73adf220
AE
834(define-public python-setuptools
835 (package
836 (name "python-setuptools")
62a9a23b 837 (version "18.3.1")
73adf220
AE
838 (source
839 (origin
840 (method url-fetch)
841 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
842 version ".tar.gz"))
843 (sha256
844 (base32
62a9a23b 845 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 846 (build-system python-build-system)
d3d656c5
AE
847 ;; FIXME: Tests require pytest, which itself relies on setuptools.
848 ;; One could bootstrap with an internal untested setuptools.
73adf220 849 (arguments
824af8ca 850 `(#:tests? #f))
73adf220
AE
851 (home-page "https://pypi.python.org/pypi/setuptools")
852 (synopsis
853 "Library designed to facilitate packaging Python projects")
854 (description
855 "Setuptools is a fully-featured, stable library designed to facilitate
856packaging Python projects, where packaging includes:
857Python package and module definitions,
858distribution package metadata,
859test hooks,
860project installation,
861platform-specific details,
862Python 3 support.")
3f641af0 863 (license license:psfl)))
73adf220
AE
864
865(define-public python2-setuptools
866 (package-with-python2 python-setuptools))
fc50e9c6
AE
867
868
cafc3f5a
EB
869(define-public python-pycrypto
870 (package
871 (name "python-pycrypto")
872 (version "2.6.1")
873 (source
874 (origin
875 (method url-fetch)
876 (uri (string-append "https://pypi.python.org/packages/source/p/"
877 "pycrypto/pycrypto-" version ".tar.gz"))
878 (sha256
879 (base32
880 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
881 (build-system python-build-system)
882 (native-inputs
883 `(("python-setuptools" ,python-setuptools)))
884 (inputs
885 `(("python" ,python)
886 ("gmp" ,gmp)))
887 (arguments
888 `(#:phases
889 (alist-cons-before
890 'build 'set-build-env
891 ;; pycrypto runs an autoconf configure script behind the scenes
892 (lambda _
893 (setenv "CONFIG_SHELL" (which "bash")))
894 %standard-phases)))
895 (home-page "http://www.pycrypto.org/")
896 (synopsis "Cryptographic modules for Python")
897 (description
898 "Pycrypto is a collection of both secure hash functions (such as SHA256
899and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 900etc.). The package is structured to make adding new modules easy.")
3f641af0 901 (license license:public-domain)))
cafc3f5a 902
345f0611 903(define-public python2-pycrypto
1c0059da
EF
904 (let ((pycrypto (package-with-python2 python-pycrypto)))
905 (package (inherit pycrypto)
906 (inputs
907 `(("python" ,python-2)
908 ,@(alist-delete
909 "python"
910 (package-inputs pycrypto)))))))
345f0611 911
cafc3f5a
EB
912(define-public python-keyring
913 (package
914 (name "python-keyring")
13f3ff35 915 (version "8.7")
cafc3f5a
EB
916 (source
917 (origin
918 (method url-fetch)
664e6c3a 919 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
920 (sha256
921 (base32
13f3ff35 922 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
923 (build-system python-build-system)
924 (native-inputs
13f3ff35 925 `(("python-setuptools-scm" ,python-setuptools-scm)))
cafc3f5a
EB
926 (inputs
927 `(("python-pycrypto" ,python-pycrypto)))
928 (arguments
664e6c3a 929 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 930 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
931 (synopsis "Store and access your passwords safely")
932 (description
933 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 934service from python. It can be used in any application that needs safe
cafc3f5a
EB
935password storage.")
936 ;; "MIT" and PSF dual license
3f641af0 937 (license license:x11)
13f3ff35 938 (properties `((python2-variant . ,(delay python2-keyring))))))
cafc3f5a 939
d7af1069 940(define-public python2-keyring
13f3ff35
EF
941 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
942 (package
943 (inherit base)
944 (native-inputs `(("python2-setuptools" ,python2-setuptools)
945 ,@(package-native-inputs base))))))
d7af1069 946
a480bc41
EB
947(define-public python-six
948 (package
949 (name "python-six")
b6ab89ef 950 (version "1.10.0")
a480bc41
EB
951 (source
952 (origin
953 (method url-fetch)
b6ab89ef 954 (uri (pypi-uri "six" version))
a480bc41
EB
955 (sha256
956 (base32
b6ab89ef 957 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
958 (build-system python-build-system)
959 (inputs
960 `(("python-setuptools" ,python-setuptools)))
961 (home-page "http://pypi.python.org/pypi/six/")
962 (synopsis "Python 2 and 3 compatibility utilities")
963 (description
35b9e423 964 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
965functions for smoothing over the differences between the Python versions with
966the goal of writing Python code that is compatible on both Python versions.
35b9e423 967Six supports every Python version since 2.5. It is contained in only one
a480bc41 968Python file, so it can be easily copied into your project.")
3f641af0 969 (license license:x11)))
a480bc41 970
0c20025c
AE
971(define-public python2-six
972 (package-with-python2 python-six))
973
cafc3f5a
EB
974(define-public python-dateutil-2
975 (package
976 (name "python-dateutil")
394b8060 977 (version "2.5.2")
cafc3f5a
EB
978 (source
979 (origin
980 (method url-fetch)
394b8060 981 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
982 (sha256
983 (base32
394b8060 984 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a
EB
985 (build-system python-build-system)
986 (inputs
394b8060 987 `(("python-six" ,python-six)))
b5a5fb19 988 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
989 (synopsis "Extensions to the standard datetime module")
990 (description
991 "The dateutil module provides powerful extensions to the standard
992datetime module, available in Python 2.3+.")
3f641af0 993 (license license:bsd-3)
394b8060 994 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
cafc3f5a
EB
995
996(define-public python2-dateutil-2
394b8060
EF
997 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
998 (package
999 (inherit base)
1000 (inputs `(("python2-setuptools" ,python2-setuptools)
1001 ,@(package-inputs base))))))
cafc3f5a 1002
fc50e9c6
AE
1003(define-public python-dateutil
1004 (package
1005 (name "python-dateutil")
1006 (version "1.5") ; last version for python < 3
1007 (source
1008 (origin
1009 (method url-fetch)
cafc3f5a
EB
1010 (uri (string-append "http://labix.org/download/python-dateutil/"
1011 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
1012 (sha256
1013 (base32
1014 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1015 (build-system python-build-system)
1016 (inputs
1017 `(("python-setuptools" ,python-setuptools)))
b5a5fb19 1018 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 1019 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
1020 (description
1021 "The dateutil module provides powerful extensions to the standard
1022datetime module, available in Python 2.3+.")
3f641af0 1023 (license license:psfl)))
fc50e9c6
AE
1024
1025(define-public python2-dateutil
1026 (package-with-python2 python-dateutil))
1d08c01f 1027
cafc3f5a
EB
1028(define-public python-parsedatetime
1029 (package
1030 (name "python-parsedatetime")
eebf6f01 1031 (version "2.1")
cafc3f5a
EB
1032 (source
1033 (origin
1034 (method url-fetch)
eebf6f01 1035 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1036 (sha256
1037 (base32
eebf6f01 1038 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1039 (build-system python-build-system)
1040 (native-inputs
eebf6f01
EF
1041 `(("python-nose" ,python-nose)
1042 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1043 (home-page "http://github.com/bear/parsedatetime/")
1044 (synopsis
1045 "Parse human-readable date/time text")
1046 (description
e881752c 1047 "Parse human-readable date/time text.")
3f641af0 1048 (license license:asl2.0)
eebf6f01 1049 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
cafc3f5a 1050
38b8f9b2 1051(define-public python2-parsedatetime
eebf6f01
EF
1052 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1053 (package
1054 (inherit base)
1055 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1056 ,@(package-native-inputs base))))))
38b8f9b2 1057
d072efcb
RW
1058(define-public python-pandas
1059 (package
1060 (name "python-pandas")
7d0c3c8d 1061 (version "0.18.1")
d072efcb
RW
1062 (source
1063 (origin
1b96f069 1064 (method url-fetch)
7d0c3c8d
EF
1065 (uri (string-append
1066 "https://pypi.python.org/packages/11/09/"
1067 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1068 "pandas-" version ".tar.gz"))
1b96f069 1069 (sha256
7d0c3c8d 1070 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1071 (build-system python-build-system)
d072efcb 1072 (propagated-inputs
42603726
EF
1073 `(("python-numpy" ,python-numpy)))
1074 (inputs
1075 `(("python-pytz" ,python-pytz)
d072efcb
RW
1076 ("python-dateutil" ,python-dateutil-2)))
1077 (native-inputs
7d0c3c8d 1078 `(("python-nose" ,python-nose)))
d072efcb
RW
1079 (home-page "http://pandas.pydata.org")
1080 (synopsis "Data structures for data analysis, time series, and statistics")
1081 (description
1082 "Pandas is a Python package providing fast, flexible, and expressive data
1083structures designed to make working with structured (tabular,
1084multidimensional, potentially heterogeneous) and time series data both easy
1085and intuitive. It aims to be the fundamental high-level building block for
1086doing practical, real world data analysis in Python.")
3f641af0 1087 (license license:bsd-3)
7d0c3c8d 1088 (properties `((python2-variant . ,(delay python2-pandas))))))
d072efcb
RW
1089
1090(define-public python2-pandas
7d0c3c8d
EF
1091 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1092 (package
1093 (inherit base)
1094 (native-inputs `(("python2-setuptools" ,python2-setuptools)
dbd40ac1 1095 ,@(package-native-inputs base))))))
d072efcb 1096
cafc3f5a
EB
1097(define-public python-tzlocal
1098 (package
1099 (name "python-tzlocal")
ed80839b 1100 (version "1.2.2")
cafc3f5a
EB
1101 (source
1102 (origin
1103 (method url-fetch)
226d3331 1104 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1105 (sha256
1106 (base32
ed80839b 1107 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1108 (build-system python-build-system)
ed80839b 1109 (inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1110 (home-page "https://github.com/regebro/tzlocal")
1111 (synopsis
35b9e423 1112 "Local timezone information for Python")
cafc3f5a
EB
1113 (description
1114 "Tzlocal returns a tzinfo object with the local timezone information.
1115This module attempts to fix a glaring hole in pytz, that there is no way to
1116get the local timezone information, unless you know the zoneinfo name, and
1117under several distributions that's hard or impossible to figure out.")
3f641af0 1118 (license license:cc0)))
cafc3f5a 1119
1d08c01f
AE
1120(define-public python2-pysqlite
1121 (package
1122 (name "python2-pysqlite")
fe476868 1123 (version "2.8.1")
1d08c01f
AE
1124 (source
1125 (origin
1126 (method url-fetch)
fe476868 1127 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1128 (sha256
1129 (base32
fe476868 1130 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1131 (build-system python-build-system)
1132 (inputs
1133 `(("sqlite" ,sqlite)))
1134 (arguments
1135 `(#:python ,python-2 ; incompatible with Python 3
1136 #:tests? #f)) ; no test target
fe476868 1137 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1138 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1139 (description
1140 "Pysqlite provides SQLite bindings for Python that comply to the
1141Database API 2.0T.")
ed0cdf83 1142 (license license:zlib)))
1d08c01f 1143
2875caf5
AE
1144
1145(define-public python2-mechanize
1146 (package
1147 (name "python2-mechanize")
1148 (version "0.2.5")
1149 (source
1150 (origin
1151 (method url-fetch)
1152 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1153 version ".tar.gz"))
1154 (sha256
1155 (base32
1156 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1157 (build-system python-build-system)
1158 (inputs
1159 `(("python2-setuptools" ,python2-setuptools)))
1160 (arguments
1161 `(#:python ,python-2 ; apparently incompatible with Python 3
1162 #:tests? #f))
1163 ;; test fails with message
1164 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1165 ;; (python-3.3.2) or
1166 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1167 ;; (python-2.7.5).
1168 ;; The source code is from March 2011 and probably not up-to-date
1169 ;; with respect to python unit tests.
1170 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1171 (synopsis
1172 "Stateful programmatic web browsing in Python")
1173 (description
1174 "Mechanize implements stateful programmatic web browsing in Python,
1175after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1176 (license (license:non-copyleft
1177 "file://COPYING"
1178 "See COPYING in the distribution."))))
2875caf5 1179
0352532e
AE
1180
1181(define-public python-simplejson
1182 (package
1183 (name "python-simplejson")
b2e6e150 1184 (version "3.10.0")
0352532e
AE
1185 (source
1186 (origin
1187 (method url-fetch)
988d1bad 1188 (uri (pypi-uri "simplejson" version))
0352532e
AE
1189 (sha256
1190 (base32
b2e6e150 1191 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1192 (build-system python-build-system)
1193 (home-page "http://simplejson.readthedocs.org/en/latest/")
1194 (synopsis
1195 "Json library for Python")
1196 (description
e881752c
AK
1197 "JSON (JavaScript Object Notation) is a subset of JavaScript
1198syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1199format.
0352532e
AE
1200
1201Simplejson exposes an API familiar to users of the standard library marshal
1202and pickle modules. It is the externally maintained version of the json
1203library contained in Python 2.6, but maintains compatibility with Python 2.5
1204and (currently) has significant performance advantages, even without using
1205the optional C extension for speedups. Simplejson is also supported on
1206Python 3.3+.")
3f641af0 1207 (license license:x11)))
0352532e
AE
1208
1209(define-public python2-simplejson
1210 (package-with-python2 python-simplejson))
421a80a2
AE
1211
1212
ed07b08d 1213(define-public python-pyicu
421a80a2 1214 (package
ed07b08d 1215 (name "python-pyicu")
d3b29319 1216 (version "1.9.2")
421a80a2
AE
1217 (source
1218 (origin
1219 (method url-fetch)
1220 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1221 version ".tar.gz"))
1222 (sha256
1223 (base32
d3b29319 1224 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1225 (build-system python-build-system)
1226 (inputs
1227 `(("icu4c" ,icu4c)))
421a80a2 1228 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1229 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1230 (description
1231 "PyICU is a python extension wrapping the ICU C++ API.")
3f641af0 1232 (license license:x11)
ed07b08d
LF
1233 (properties `((python2-variant . ,(delay python2-pyicu))))))
1234
1235(define-public python2-pyicu
1236 (package
1237 (inherit (package-with-python2
1238 (strip-python2-variant python-pyicu)))
1239 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cc20a22a
LC
1240
1241(define-public python2-dogtail
1242 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1243 ;; spaces in indentation" with Python 3.
1244 (package
1245 (name "python2-dogtail")
1246 (version "0.8.2")
1247 (source (origin
1248 (method url-fetch)
1249 (uri (string-append
1250 "https://fedorahosted.org/released/dogtail/dogtail-"
1251 version ".tar.gz"))
1252 (sha256
1253 (base32
1254 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1255 (build-system python-build-system)
1256 (arguments `(#:python ,python-2
1257 #:tests? #f)) ; invalid command "test"
1258 (home-page "https://fedorahosted.org/dogtail/")
1259 (synopsis "GUI test tool and automation framework written in ​Python")
1260 (description
35b9e423 1261 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1262It uses Accessibility (a11y) technologies to communicate with desktop
1263applications. dogtail scripts are written in Python and executed like any
1264other Python program.")
3f641af0 1265 (license license:gpl2+)))
515e6878 1266
011b18c3
LC
1267(define-public python2-empy
1268 (package
1269 (name "python2-empy")
1270 (version "3.3")
1271 (source (origin
1272 (method url-fetch)
1273 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1274 version ".tar.gz"))
1275 (sha256
1276 (base32
1277 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1278 (build-system python-build-system)
1279 (arguments
1280 `(#:python ,python-2
1281 #:phases (alist-replace
1282 'check
1283 (lambda _
1284 (zero? (system* "./test.sh")))
1285 %standard-phases)))
1286 (home-page "http://www.alcyone.com/software/empy/")
1287 (synopsis "Templating system for Python")
1288 (description
1289 "EmPy is a system for embedding Python expressions and statements in
1290template text; it takes an EmPy source file, processes it, and produces
1291output. This is accomplished via expansions, which are special signals to the
1cd4027c 1292EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1293EmPy can expand arbitrary Python expressions and statements in this way, as
1294well as a variety of special forms. Textual data not explicitly delimited in
1295this way is sent unaffected to the output, allowing Python to be used in
1296effect as a markup language. Also supported are callbacks via hooks,
1297recording and playback via diversions, and dynamic, chainable filters. The
1298system is highly configurable via command line options and embedded
1299commands.")
3f641af0 1300 (license license:lgpl2.1+)))
011b18c3 1301
8deeda0c
LC
1302(define-public python2-element-tree
1303 (package
1304 (name "python2-element-tree")
1305 (version "1.2.6")
1306 (source (origin
1307 (method url-fetch)
1308 (uri (string-append
1309 "http://effbot.org/media/downloads/elementtree-"
1310 version "-20050316.tar.gz"))
1311 (sha256
1312 (base32
1313 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:python ,python-2 ; seems to be part of Python 3
1317 #:tests? #f)) ; no 'test' sub-command
1318 (synopsis "Toolkit for XML processing in Python")
1319 (description
1320 "ElementTree is a Python library supporting lightweight XML processing.")
1321 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1322 (license (license:x11-style
1323 "http://docs.python.org/2/license.html"
1324 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1325
1326(define-public python2-pybugz
1327 (package
1328 (name "python2-pybugz")
1329 (version "0.6.11")
1330 (source (origin
1331 (method url-fetch)
1332 (uri (string-append
1333 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1334 version ".tar.gz"))
1335 (sha256
1336 (base32
6f194a1e 1337 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1338 (patches (search-patches "pybugz-stty.patch"
1339 "pybugz-encode-error.patch"))))
8deeda0c
LC
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:python ,python-2 ; SyntaxError with Python 3
1343 #:tests? #f)) ; no 'test' sub-command
1344 (inputs `(("element-tree" ,python2-element-tree)))
1345 (synopsis "Python and command-line interface to Bugzilla")
1346 (description
1347 "PyBugz is a Python library and command-line tool to query the Bugzilla
1348bug tracking system. It is meant as an aid to speed up interaction with the
1349bug tracker.")
1350 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1351 (license license:gpl2)))
8deeda0c 1352
a480bc41
EB
1353(define-public python-enum34
1354 (package
1355 (name "python-enum34")
d39ae1e5 1356 (version "1.1.0")
a480bc41
EB
1357 (source
1358 (origin
1359 (method url-fetch)
d39ae1e5 1360 (uri (pypi-uri "enum34" version))
a480bc41
EB
1361 (sha256
1362 (base32
d39ae1e5 1363 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1364 (build-system python-build-system)
a480bc41
EB
1365 (arguments
1366 `(#:phases
1367 (alist-replace
1368 'check
1369 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1370 %standard-phases)))
1371 (home-page "https://pypi.python.org/pypi/enum34")
1372 (synopsis "Backported Python 3.4 Enum")
1373 (description
1374 "Enum34 is the new Python stdlib enum module available in Python 3.4
1375backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1376 (license license:bsd-3)))
a480bc41 1377
820acd1b
LF
1378(define-public python2-enum34
1379 (package-with-python2 python-enum34))
1380
a480bc41
EB
1381(define-public python-parse-type
1382 (package
1383 (name "python-parse-type")
1384 (version "0.3.4")
1385 (source
1386 (origin
1387 (method url-fetch)
1388 (uri (string-append "https://pypi.python.org/packages/source/p/"
1389 "parse_type/parse_type-" version ".tar.gz"))
1390 (sha256
1391 (base32
1392 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1393 (build-system python-build-system)
1394 (inputs
1395 `(("python-setuptools" ,python-setuptools)
1396 ("python-six" ,python-six)
68f1cdec 1397 ("python-parse" ,python-parse)))
a480bc41
EB
1398 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1399 (home-page "https://github.com/jenisys/parse_type")
1400 (synopsis "Extended parse module")
1401 (description
1402 "Parse_type extends the python parse module.")
3f641af0 1403 (license license:bsd-3)))
a480bc41
EB
1404
1405(define-public python-parse
1406 (package
1407 (name "python-parse")
eb3d3503 1408 (version "1.6.6")
a480bc41
EB
1409 (source
1410 (origin
1411 (method url-fetch)
eb3d3503 1412 (uri (pypi-uri "parse" version))
a480bc41
EB
1413 (sha256
1414 (base32
aa6c09ed
EF
1415 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1416 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1417 (build-system python-build-system)
1418 (arguments
1419 `(#:phases
f9a65318
EF
1420 (modify-phases %standard-phases
1421 (replace 'check
1422 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1423 (home-page "https://github.com/r1chardj0n3s/parse")
1424 (synopsis "Parse strings")
1425 (description
1426 "Parse strings using a specification based on the Python format()
1427syntax.")
3f641af0 1428 (license license:x11)))
a480bc41 1429
d3eff97a
JL
1430(define-public python-polib
1431 (package
1432 (name "python-polib")
1433 (version "1.0.8")
1434 (source (origin
1435 (method url-fetch)
1436 (uri (pypi-uri "polib" version))
1437 (sha256
1438 (base32
1439 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1440 (build-system python-build-system)
1441 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1442 (synopsis "Manipulate, create and modify gettext files")
1443 (description "Polib can manipulate any gettext format (po, pot and mo)
1444files. It can be used to create po files from scratch or to modify
1445existing ones.")
1446 (license license:expat)))
1447
1448(define-public python2-polib
1449 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1450 (package
1451 (inherit base)
1452 (arguments `(,@(package-arguments base)
1453 ;; Tests don't work with python2.
1454 #:tests? #f)))))
a480bc41 1455
515e6878
LC
1456(define-public scons
1457 (package
1458 (name "scons")
a3f61425 1459 (version "2.3.4")
515e6878
LC
1460 (source (origin
1461 (method url-fetch)
de67e922
LF
1462 (uri (string-append "mirror://sourceforge/scons/scons/" version
1463 "/scons-" version ".tar.gz"))
515e6878
LC
1464 (sha256
1465 (base32
a3f61425 1466 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1467 (build-system python-build-system)
1468 (arguments
1469 ;; With Python 3.x, fails to build with a syntax error.
1470 `(#:python ,python-2
1471 #:tests? #f)) ; no 'python setup.py test' command
1472 (home-page "http://scons.org/")
1473 (synopsis "Software construction tool written in Python")
1474 (description
1475 "SCons is a software construction tool. Think of SCons as an improved,
1476cross-platform substitute for the classic Make utility with integrated
1477functionality similar to autoconf/automake and compiler caches such as ccache.
1478In short, SCons is an easier, more reliable and faster way to build
1479software.")
3f641af0 1480 (license license:x11)))
011b18c3 1481
c15a5c0e
DT
1482(define-public python-extras
1483 (package
1484 (name "python-extras")
1485 (version "0.0.3")
1486 (source
1487 (origin
1488 (method url-fetch)
1489 (uri (string-append
1490 "https://pypi.python.org/packages/source/e/extras/extras-"
1491 version ".tar.gz"))
1492 (sha256
1493 (base32
1494 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1495 (build-system python-build-system)
1496 (inputs
1497 `(("python-setuptools" ,python-setuptools)))
1498 (arguments
1499 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1500 '(#:tests? #f))
1501 (home-page "https://github.com/testing-cabal/extras")
1502 (synopsis "Useful extensions to the Python standard library")
1503 (description
1504 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1505 (license license:expat)))
c15a5c0e
DT
1506
1507(define-public python2-extras
1508 (package-with-python2 python-extras))
1509
56ea0efd
DT
1510(define-public python-mimeparse
1511 (package
1512 (name "python-mimeparse")
1513 (version "0.1.4")
1514 (source
1515 (origin
1516 (method url-fetch)
1517 (uri (string-append
1518 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1519 version ".tar.gz"))
1520 (sha256
1521 (base32
1522 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1523 (build-system python-build-system)
1524 (inputs
1525 `(("python-setuptools" ,python-setuptools)))
1526 (arguments
1527 '(#:tests? #f)) ; no setup.py test command
1528 (home-page
1529 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1530 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1531 (description
1532 "Mimeparse provides basic functions for parsing MIME type names and
1533matching them against a list of media-ranges.")
bd3fa666 1534 (license license:expat)))
56ea0efd
DT
1535
1536(define-public python2-mimeparse
1537 (package-with-python2 python-mimeparse))
1538
4435427e
DT
1539(define-public python-nose
1540 (package
1541 (name "python-nose")
f7cb9841 1542 (version "1.3.7")
4435427e
DT
1543 (source
1544 (origin
1545 (method url-fetch)
f7cb9841 1546 (uri (pypi-uri "nose" version))
4435427e
DT
1547 (sha256
1548 (base32
f7cb9841 1549 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1550 (build-system python-build-system)
1551 (inputs
1552 `(("python-setuptools" ,python-setuptools)))
1553 (arguments
1554 '(#:tests? #f)) ; FIXME: test suite fails
1555 (home-page "http://readthedocs.org/docs/nose/")
1556 (synopsis "Python testing library")
1557 (description
1558 "Nose extends the unittest library to make testing easier.")
3f641af0 1559 (license license:lgpl2.0+)))
4435427e
DT
1560
1561(define-public python2-nose
1562 (package-with-python2 python-nose))
1563
0aea283a
EF
1564(define-public python-nose2
1565 (package
1566 (name "python-nose2")
1567 (version "0.6.5")
1568 (source
1569 (origin
1570 (method url-fetch)
1571 (uri (pypi-uri "nose2" version))
1572 (sha256
1573 (base32
1574 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1575 (build-system python-build-system)
1576 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1577 (native-inputs
1578 `(("python-setuptools" ,python-setuptools)))
1579 (inputs
1580 `(("python-cov-core" ,python-cov-core)
1581 ("python-pytest-cov" ,python-pytest-cov)
1582 ("python-six" ,python-six)))
1583 (home-page "https://github.com/nose-devs/nose2")
1584 (synopsis "Next generation of nicer testing for Python")
1585 (description
1586 "Nose2 is the next generation of nicer testing for Python, based on the
1587plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1588better plugin api, being easier for users to configure, and simplifying internal
1589interfaces and processes.")
1590 (license license:bsd-2)))
1591
1592(define-public python2-nose2
1593 (package-with-python2 python-nose2))
1594
6cd9c356
DT
1595(define-public python-unittest2
1596 (package
1597 (name "python-unittest2")
1598 (version "0.5.1")
1599 (source
1600 (origin
1601 (method url-fetch)
1602 (uri (string-append
1603 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1604 version ".tar.gz"))
1605 (sha256
1606 (base32
1607 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1608 (build-system python-build-system)
1609 (inputs
1610 `(("python-setuptools" ,python-setuptools)))
1611 (home-page "http://pypi.python.org/pypi/unittest2")
1612 (synopsis "Python unit testing library")
1613 (description
1614 "Unittest2 is a replacement for the unittest module in the Python
1615standard library.")
3f641af0 1616 (license license:psfl)))
6cd9c356
DT
1617
1618(define-public python2-unittest2
1619 (package (inherit python-unittest2)
1620 (name "python2-unittest2")
1621 (version "0.5.1")
1622 (source
1623 (origin
1624 (method url-fetch)
1625 (uri (string-append
1626 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1627 version ".tar.gz"))
1628 (sha256
1629 (base32
1630 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1631 (inputs
7957fe6c 1632 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1633 (arguments
1634 `(#:python ,python-2
1635 #:tests? #f)))) ; no setup.py test command
1636
02f8f804 1637(define-public python-pafy
1638 (package
1639 (name "python-pafy")
1640 (version "0.5.2")
1641 (source
1642 (origin
1643 (method url-fetch)
1644 (uri (pypi-uri "pafy" version))
1645 (sha256
1646 (base32
1647 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1648 (build-system python-build-system)
ed3fee5f 1649 (arguments
1650 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1651 (propagated-inputs
1652 ;; Youtube-dl is a python package which is imported in the file
1653 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1654 `(("youtube-dl" ,youtube-dl)))
1655 (home-page "https://np1.github.io/pafy/")
1656 (synopsis "Retrieve YouTube content and metadata")
1657 (description
1658 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1659 (license license:lgpl3+)))
1660
542ad60f
DT
1661(define-public python-py
1662 (package
1663 (name "python-py")
71c8a804 1664 (version "1.4.31")
542ad60f
DT
1665 (source
1666 (origin
1667 (method url-fetch)
71c8a804 1668 (uri (pypi-uri "py" version))
542ad60f
DT
1669 (sha256
1670 (base32
71c8a804 1671 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1672 (build-system python-build-system)
1673 (inputs
1674 `(("python-setuptools" ,python-setuptools)))
1675 (home-page "http://pylib.readthedocs.org/")
1676 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1677 (description
1678 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1679code introspection, and logging.")
bd3fa666 1680 (license license:expat)))
542ad60f
DT
1681
1682(define-public python2-py
1683 (package-with-python2 python-py))
1684
855d4761
DT
1685(define-public python-pytest
1686 (package
1687 (name "python-pytest")
61a4332d 1688 (version "2.7.3")
855d4761
DT
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (string-append
1693 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1694 version ".tar.gz"))
1695 (sha256
1696 (base32
61a4332d 1697 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1698 (modules '((guix build utils)))
1699 (snippet
1700 ;; One of the tests involves the /usr directory, so it fails.
1701 '(substitute* "testing/test_argcomplete.py"
1702 (("def test_remove_dir_prefix\\(self\\):")
1703 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1704 (build-system python-build-system)
1705 (inputs
1706 `(("python-setuptools" ,python-setuptools)
1707 ("python-py" ,python-py)
1708 ("python-nose" ,python-nose)
1709 ("python-mock" ,python-mock)))
1710 (home-page "http://pytest.org")
1711 (synopsis "Python testing library")
1712 (description
1713 "Pytest is a testing tool that provides auto-discovery of test modules
1714and functions, detailed info on failing assert statements, modular fixtures,
1715and many external plugins.")
bd3fa666 1716 (license license:expat)))
855d4761
DT
1717
1718(define-public python2-pytest
1719 (package-with-python2 python-pytest))
1720
fca4ff35
LF
1721;; This package is used by Borg until we can upgrade all our Python packages to
1722;; use a more recent pytest.
1723(define-public python-pytest-2.9.2
1724 (package
1725 (inherit python-pytest)
1726 (name "python-pytest")
1727 (version "2.9.2")
1728 (source (origin
1729 (method url-fetch)
1730 (uri (pypi-uri "pytest" version))
1731 (sha256
1732 (base32
1733 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1734 (arguments
1735 `(#:phases
1736 (modify-phases %standard-phases
1737 (add-before 'check 'disable-invalid-test
1738 (lambda _
1739 (substitute* "testing/test_argcomplete.py"
1740 (("def test_remove_dir_prefix" line)
1741 (string-append "@pytest.mark.skip"
1742 "(reason=\"Assumes that /usr exists.\")\n "
1743 line)))
1744 #t)))))))
1745
358c3d61
EF
1746(define-public python-pytest-cov
1747 (package
1748 (name "python-pytest-cov")
545f4a1c 1749 (version "2.2.1")
358c3d61
EF
1750 (source
1751 (origin
1752 (method url-fetch)
1753 (uri (pypi-uri "pytest-cov" version))
1754 (sha256
545f4a1c
EF
1755 (base32
1756 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1757 (build-system python-build-system)
545f4a1c 1758 (inputs
10468636
EF
1759 `(("python-coverage" ,python-coverage)
1760 ("python-pytest" ,python-pytest)))
10468636
EF
1761 (home-page "https://github.com/pytest-dev/pytest-cov")
1762 (synopsis "Pytest plugin for measuring coverage")
1763 (description
1764 "Pytest-cov produces coverage reports. It supports centralised testing and
1765distributed testing in both @code{load} and @code{each} modes. It also
1766supports coverage of subprocesses.")
545f4a1c
EF
1767 (license license:expat)
1768 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
358c3d61
EF
1769
1770(define-public python2-pytest-cov
545f4a1c
EF
1771 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1772 (package
1773 (inherit base)
1774 (inputs `(("python2-setuptools" ,python2-setuptools)
1775 ,@(package-inputs base))))))
358c3d61 1776
6784f2e3
RW
1777(define-public python-pytest-runner
1778 (package
1779 (name "python-pytest-runner")
1780 (version "2.6.2")
1781 (source
1782 (origin
1783 (method url-fetch)
54cd239b 1784 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1785 (sha256
1786 (base32
1787 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1788 (build-system python-build-system)
1789 (arguments
1790 `(#:phases
1791 (modify-phases %standard-phases
1792 ;; The fancy way of setting the version with setuptools_scm does not
1793 ;; seem to work here.
1794 (add-after 'unpack 'set-version
1795 (lambda _
1796 (substitute* "docs/conf.py"
1797 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1798 (string-append "version = \"" ,version "\"")))
1799 #t)))))
1800 (native-inputs
1801 `(("python-pytest" ,python-pytest)
1802 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1803 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1804 (synopsis "Invoke py.test as a distutils command")
1805 (description
1806 "This package provides a @command{pytest-runner} command that
1807@file{setup.py} files can use to run tests.")
54cd239b
EF
1808 (license license:expat)
1809 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1810
1811(define-public python2-pytest-runner
1812 (let ((base (package-with-python2
1813 (strip-python2-variant python-pytest-runner))))
1814 (package
1815 (inherit base)
1816 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1817 ,@(package-native-inputs base))))))
6784f2e3 1818
44547e51
EF
1819(define-public python-pytest-mock
1820 (package
1821 (name "python-pytest-mock")
1822 (version "1.2")
1823 (source
1824 (origin
1825 (method url-fetch)
1826 (uri (pypi-uri "pytest-mock" version ".zip"))
1827 (sha256
1828 (base32
1829 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1830 (build-system python-build-system)
1831 (native-inputs
1832 `(("unzip" ,unzip)))
1833 (inputs
1834 `(("python-py" ,python-py)
1835 ("python-pytest" ,python-pytest)))
1836 (home-page "https://github.com/pytest-dev/pytest-mock/")
1837 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1838 (description
1839 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1840around the patching API provided by the @code{mock} package, but with the
1841benefit of not having to worry about undoing patches at the end of a test.
1842The mocker fixture has the same API as @code{mock.patch}, supporting the
1843same arguments.")
1844 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1845 (license license:expat)))
1846
1847(define-public python2-pytest-mock
1848 (let ((base (package-with-python2
1849 (strip-python2-variant python-pytest-mock))))
1850 (package (inherit base)
1851 (native-inputs
1852 `(("python2-setuptools" ,python2-setuptools)
1853 ,@(package-native-inputs base)))
1854 (inputs
1855 `(("python2-mock" ,python2-mock)
1856 ,@(package-inputs base))))))
1857
8fa58fc9
CAW
1858(define-public python-pytest-xdist
1859 (package
1860 (name "python-pytest-xdist")
1861 (version "1.14")
1862 (source
1863 (origin
1864 (method url-fetch)
1865 (uri (pypi-uri "pytest-xdist" version ".zip"))
1866 (sha256
1867 (base32
de585a7e
HG
1868 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1869 (modules '((guix build utils)))
1870 (snippet
1871 '(begin
1872 ;; Remove pre-compiled .pyc files from source.
1873 (for-each delete-file-recursively
1874 (find-files "." "__pycache__" #:directories? #t))
1875 (for-each delete-file (find-files "." "\\.pyc$"))
1876 #t))))
8fa58fc9
CAW
1877 (build-system python-build-system)
1878 (native-inputs
1879 `(("unzip" ,unzip)
8fa58fc9 1880 ("python-setuptools-scm" ,python-setuptools-scm)))
fbe9abcc
EF
1881 (inputs
1882 `(("python-apipkg" ,python-apipkg)
1883 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1884 ("python-pytest" ,python-pytest)
1885 ("python-py" ,python-py)))
1886 (home-page
1887 "https://github.com/pytest-dev/pytest-xdist")
1888 (synopsis
1889 "Plugin for py.test with distributed testing and loop-on-failing modes")
1890 (description
1891 "The pytest-xdist plugin extends py.test with some unique test execution
1892modes: parallelization, running tests in boxed subprocesses, the ability
1893to run tests repeatedly when failed, and the ability to run tests on multiple
1894Python interpreters or platforms. It uses rsync to copy the existing
1895program code to a remote location, executes there, and then syncs the
1896result back.")
fbe9abcc
EF
1897 (license license:expat)
1898 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
8fa58fc9
CAW
1899
1900(define-public python2-pytest-xdist
fbe9abcc
EF
1901 (let ((base (package-with-python2
1902 (strip-python2-variant python-pytest-xdist))))
1903 (package
1904 (inherit base)
1905 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1906 ,@(package-native-inputs base))))))
8fa58fc9 1907
84d24017
DT
1908(define-public python-scripttest
1909 (package
1910 (name "python-scripttest")
1911 (version "1.3")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (string-append
1916 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1917 version ".tar.gz"))
1918 (sha256
1919 (base32
1920 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1921 (build-system python-build-system)
1922 (inputs
1923 `(("python-setuptools" ,python-setuptools)
1924 ("python-pytest" ,python-pytest)))
1925 (home-page "http://pythonpaste.org/scripttest/")
1926 (synopsis "Python library to test command-line scripts")
1927 (description "Scripttest is a Python helper library for testing
1928interactive command-line applications. With it you can run a script in a
1929subprocess and see the output as well as any file modifications.")
bd3fa666 1930 (license license:expat)))
84d24017
DT
1931
1932(define-public python2-scripttest
1933 (package-with-python2 python-scripttest))
1934
d8fa80e1
DT
1935(define-public python-testtools
1936 (package
1937 (name "python-testtools")
1938 (version "1.0.0")
1939 (source
1940 (origin
1941 (method url-fetch)
1942 (uri (string-append
1943 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1944 version ".tar.gz"))
1945 (sha256
1946 (base32
1947 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1948 (build-system python-build-system)
0e88cbf8
CR
1949 (propagated-inputs
1950 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1951 (inputs
1952 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1953 ("python-extras" ,python-extras)))
1954 (home-page "https://github.com/testing-cabal/testtools")
1955 (synopsis
1956 "Extensions to the Python standard library unit testing framework")
1957 (description
1958 "Testtools extends the Python standard library unit testing framework to
1959provide matchers, more debugging information, and cross-Python
1960compatibility.")
3f641af0 1961 (license license:psfl)))
d8fa80e1
DT
1962
1963(define-public python2-testtools
1964 (package-with-python2 python-testtools))
1965
5bf3afea
DT
1966(define-public python-testscenarios
1967 (package
1968 (name "python-testscenarios")
1969 (version "0.4")
1970 (source
1971 (origin
1972 (method url-fetch)
1973 (uri (string-append
1974 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1975 version ".tar.gz"))
1976 (sha256
1977 (base32
1978 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1979 (build-system python-build-system)
1980 (inputs
1981 `(("python-setuptools" ,python-setuptools)
1982 ("python-testtools" ,python-testtools)
1983 ("python-mimeparse" ,python-mimeparse)))
1984 (home-page "https://launchpad.net/testscenarios")
1985 (synopsis "Pyunit extension for dependency injection")
1986 (description
1987 "Testscenarios provides clean dependency injection for Python unittest
1988style tests.")
3f641af0 1989 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1990
1991(define-public python2-testscenarios
1992 (package-with-python2 python-testscenarios))
1993
dac79ecc
DT
1994(define-public python-testresources
1995 (package
1996 (name "python-testresources")
1997 (version "0.2.7")
1998 (source
1999 (origin
2000 (method url-fetch)
2001 (uri (string-append
2002 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2003 version ".tar.gz"))
2004 (sha256
2005 (base32
2006 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2007 (build-system python-build-system)
2008 (inputs
2009 `(("python-setuptools" ,python-setuptools)))
2010 (home-page "https://launchpad.net/testresources")
2011 (synopsis
2012 "Pyunit extension for managing test resources")
2013 (description
2014 "Testresources is an extension to Python's unittest to allow declarative
2015use of resources by test cases.")
3f641af0 2016 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2017
2018(define-public python2-testresources
2019 (package-with-python2 python-testresources))
2020
070ab058
DT
2021(define-public python-subunit
2022 (package
2023 (name "python-subunit")
2024 (version "0.0.21")
2025 (source
2026 (origin
2027 (method url-fetch)
2028 (uri (string-append
2029 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2030 version ".tar.gz"))
2031 (sha256
2032 (base32
2033 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2034 (build-system python-build-system)
2035 (inputs
2036 `(("python-setuptools" ,python-setuptools)
2037 ("python-testtools" ,python-testtools)
2038 ("python-mimeparse" ,python-mimeparse)
2039 ("python-testscenarios" ,python-testscenarios)))
2040 (home-page "http://launchpad.net/subunit")
2041 (synopsis "Python implementation of the subunit protocol")
2042 (description
2043 "Python-subunit is a Python implementation of the subunit test streaming
2044protocol.")
3f641af0 2045 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2046
2047(define-public python2-subunit
2048 (package-with-python2 python-subunit))
2049
7787ef76
CR
2050;; Recent versions of python-fixtures need a recent version of python-pbr,
2051;; which needs a recent version of python-fixtures. To fix this circular
2052;; dependency, we keep old versions of python-fixtures and python-pbr to
2053;; bootstrap the whole thing:
2054;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
2055;; - python-pbr-0.11 is used to build python-fixtures
2056;; - python-fixtures is used to build python-pbr
2057(define-public python-fixtures-0.3.16
cd49454b
DT
2058 (package
2059 (name "python-fixtures")
2060 (version "0.3.16")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (string-append
2065 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
2066 version ".tar.gz"))
2067 (sha256
2068 (base32
2069 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
2070 (build-system python-build-system)
2071 (inputs
2072 `(("python-setuptools" ,python-setuptools)))
2073 (arguments
2074 '(#:tests? #f)) ; no setup.py test command
2075 (home-page "https://launchpad.net/python-fixtures")
2076 (synopsis "Python test fixture library")
2077 (description
2078 "Fixtures provides a way to create reusable state, useful when writing
2079Python tests.")
3f641af0 2080 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
cd49454b 2081
7787ef76
CR
2082(define-public python2-fixtures-0.3.16
2083 (package-with-python2 python-fixtures-0.3.16))
2084
2085(define-public python-pbr-0.11
2086 (package
2087 (name "python-pbr")
2088 (version "0.11.0")
2089 (source
2090 (origin
2091 (method url-fetch)
2092 (uri (string-append
2093 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2094 version ".tar.gz"))
2095 (sha256
2096 (base32
2097 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
2098 (build-system python-build-system)
2099 (arguments
2100 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2101 (inputs
2102 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2103 ("python-pip" ,python-pip)
2104 ("python-setuptools" ,python-setuptools)))
2105 (home-page "https://launchpad.net/pbr")
2106 (synopsis "Change the default behavior of Python’s setuptools")
2107 (description
2108 "Python Build Reasonableness (PBR) is a library that injects some useful
2109and sensible default behaviors into your setuptools run.")
3f641af0 2110 (license license:asl2.0)))
7787ef76
CR
2111
2112(define-public python2-pbr-0.11
2113 (package-with-python2 python-pbr-0.11))
2114
1ef09c0c 2115(define-public python-pbr
e25f0174
BW
2116 (package
2117 (name "python-pbr")
1ef09c0c
BW
2118 (version "1.8.1")
2119 (source
e25f0174
BW
2120 (origin
2121 (method url-fetch)
2122 (uri (string-append
2123 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2124 version
2125 ".tar.gz"))
2126 (sha256
2127 (base32
2128 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1ef09c0c 2129 (build-system python-build-system)
e25f0174
BW
2130 (arguments
2131 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2132 (propagated-inputs
2133 `(("python-testrepository" ,python-testrepository)
2134 ("git" ,git))) ;; pbr actually uses the "git" binary.
1ef09c0c 2135 (inputs
e25f0174
BW
2136 `(("python-fixtures" ,python-fixtures)
2137 ("python-mimeparse" ,python-mimeparse)
2138 ("python-mock" ,python-mock)
2139 ("python-setuptools" ,python-setuptools)
2140 ("python-six" ,python-six)
2141 ("python-sphinx" ,python-sphinx)
2142 ("python-testrepository" ,python-testrepository)
2143 ("python-testresources" ,python-testresources)
2144 ("python-testscenarios" ,python-testscenarios)
2145 ("python-testtools" ,python-testtools)
2146 ("python-virtualenv" ,python-virtualenv)))
2147 (home-page "https://launchpad.net/pbr")
2148 (synopsis "Change the default behavior of Python’s setuptools")
2149 (description
2150 "Python Build Reasonableness (PBR) is a library that injects some useful
2151and sensible default behaviors into your setuptools run.")
3f641af0 2152 (license license:asl2.0)))
1ef09c0c
BW
2153
2154(define-public python2-pbr
e25f0174 2155 (package-with-python2 python-pbr))
1ef09c0c 2156
7787ef76
CR
2157(define-public python-fixtures
2158 (package
2159 (name "python-fixtures")
13fcc6df 2160 (version "1.4.0")
7787ef76
CR
2161 (source
2162 (origin
2163 (method url-fetch)
13fcc6df 2164 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2165 (sha256
2166 (base32
13fcc6df 2167 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2168 (build-system python-build-system)
2169 (propagated-inputs
2170 `(("python-six" ,python-six)
2171 ("python-pbr-0.11" ,python-pbr-0.11)))
2172 (inputs
2173 `(("python-pip" ,python-pip)
2174 ("python-setuptools" ,python-setuptools)
2175 ;; Tests
2176 ("python-testtools" ,python-testtools)))
2177 (arguments
2178 '(#:tests? #f)) ; no setup.py test command
2179 (home-page "https://launchpad.net/python-fixtures")
2180 (synopsis "Python test fixture library")
2181 (description
2182 "Fixtures provides a way to create reusable state, useful when writing
2183Python tests.")
3f641af0 2184 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2185
cd49454b
DT
2186(define-public python2-fixtures
2187 (package-with-python2 python-fixtures))
2188
b24a0c00
DT
2189(define-public python-testrepository
2190 (package
2191 (name "python-testrepository")
2192 (version "0.0.20")
2193 (source
2194 (origin
2195 (method url-fetch)
2196 (uri (string-append
2197 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2198 version ".tar.gz"))
2199 (sha256
2200 (base32
2201 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2202 (build-system python-build-system)
05de40c5 2203 (propagated-inputs
7787ef76 2204 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 2205 ("python-testtools" ,python-testtools)))
b24a0c00
DT
2206 (inputs
2207 `(("python-setuptools" ,python-setuptools)
b24a0c00 2208 ("python-subunit" ,python-subunit)
b24a0c00
DT
2209 ("python-mimeparse" ,python-mimeparse)))
2210 (home-page "https://launchpad.net/testrepository")
2211 (synopsis "Database for Python test results")
2212 (description "Testrepository provides a database of test results which can
2213be used as part of a developer's workflow to check things such as what tests
2214have failed since the last commit or what tests are currently failing.")
3f641af0 2215 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2216
2217(define-public python2-testrepository
2218 (package-with-python2 python-testrepository))
2219
243a009a
DT
2220(define-public python-coverage
2221 (package
2222 (name "python-coverage")
4d4cf3dd 2223 (version "4.1")
243a009a
DT
2224 (source
2225 (origin
2226 (method url-fetch)
82a3c582 2227 (uri (pypi-uri "coverage" version))
243a009a
DT
2228 (sha256
2229 (base32
4d4cf3dd 2230 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a
DT
2231 (build-system python-build-system)
2232 (inputs
2233 `(("python-setuptools" ,python-setuptools)))
2234 (home-page "http://nedbatchelder.com/code/coverage")
2235 (synopsis "Code coverage measurement for Python")
2236 (description
2237 "Coverage measures code coverage, typically during test execution. It
2238uses the code analysis tools and tracing hooks provided in the Python standard
2239library to determine which lines are executable, and which have been
2240executed.")
3f641af0 2241 (license license:bsd-3)))
243a009a
DT
2242
2243(define-public python2-coverage
2244 (package-with-python2 python-coverage))
2245
12f839fd
EF
2246(define-public python-cov-core
2247 (package
2248 (name "python-cov-core")
2249 (version "1.15.0")
2250 (source
2251 (origin
2252 (method url-fetch)
2253 (uri (pypi-uri "cov-core" version))
2254 (sha256
2255 (base32
2256 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2257 (build-system python-build-system)
2258 (native-inputs
2259 `(("python-coverage" ,python-coverage)))
2260 (home-page "https://github.com/schlamar/cov-core")
2261 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2262 (description
2263 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2264It is useful for developing coverage plugins for these testing frameworks.")
8120205c
EF
2265 (license license:expat)
2266 (properties `((python2-variant . ,(delay python2-cov-core))))))
12f839fd
EF
2267
2268(define-public python2-cov-core
8120205c 2269 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
12f839fd
EF
2270 (package (inherit cov-core)
2271 (native-inputs
2272 `(("python2-setuptools" ,python2-setuptools)
2273 ,@(package-native-inputs cov-core))))))
2274
041358fb
DT
2275(define-public python-discover
2276 (package
2277 (name "python-discover")
2278 (version "0.4.0")
2279 (source
2280 (origin
2281 (method url-fetch)
2282 (uri (string-append
2283 "https://pypi.python.org/packages/source/d/discover/discover-"
2284 version ".tar.gz"))
2285 (sha256
2286 (base32
2287 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2288 (build-system python-build-system)
2289 (inputs
2290 `(("python-setuptools" ,python-setuptools)))
2291 (home-page "http://pypi.python.org/pypi/discover/")
2292 (synopsis
2293 "Python test discovery for unittest")
2294 (description
2295 "Discover provides test discovery for unittest, a feature that has been
e881752c 2296backported from Python 2.7 for Python 2.4+.")
3f641af0 2297 (license license:bsd-3)))
041358fb
DT
2298
2299(define-public python2-discover
2300 (package-with-python2 python-discover))
2301
a480bc41
EB
2302(define-public behave
2303 (package
2304 (name "behave")
287cfd1a 2305 (version "1.2.5")
a480bc41
EB
2306 (source (origin
2307 (method url-fetch)
287cfd1a 2308 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2309 (sha256
2310 (base32
287cfd1a 2311 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41
EB
2312 (build-system python-build-system)
2313 (inputs
2314 `(("python-setuptools" ,python-setuptools)
2315 ("python-six" ,python-six)
a480bc41
EB
2316 ("python-parse" ,python-parse)
2317 ("python-parse-type" ,python-parse-type)))
2318 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2319 ;PyHamcrest>=1.8
2320 (home-page "http://github.com/behave/behave")
2321 (synopsis "Python behavior-driven development")
2322 (description
2323 "Behave is a tool for behavior-driven development in python.
2324Behavior-driven development (or BDD) is an agile software development
2325technique that encourages collaboration between developers, QA and
2326non-technical or business participants in a software project. Behave uses
2327tests written in a natural language style, backed up by Python code.")
3f641af0 2328 (license license:x11)))
c7303d3c
DT
2329
2330(define-public python-exif-read
2331 (package
2332 (name "python-exif-read")
2a2d0981 2333 (version "2.1.2")
c7303d3c
DT
2334 (source (origin
2335 (method url-fetch)
2a2d0981 2336 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2337 (sha256
2338 (base32
2a2d0981 2339 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2340 (build-system python-build-system)
2341 (inputs
2342 `(("python-setuptools" ,python-setuptools)))
2343 (arguments `(#:tests? #f)) ; no tests
2344 (home-page "https://github.com/ianare/exif-py")
2345 (synopsis "Python library to extract EXIF data from image files")
2346 (description
2347 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2348files.")
3f641af0 2349 (license license:bsd-3)))
c7303d3c
DT
2350
2351(define-public python2-exif-read
2352 (package-with-python2 python-exif-read))
d5f89b22
DT
2353
2354(define-public python-pyld
2355 (package
2356 (name "python-pyld")
8957af32 2357 (version "0.7.1")
d5f89b22
DT
2358 (source (origin
2359 (method url-fetch)
af1ab773 2360 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2361 (sha256
2362 (base32
8957af32 2363 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22
DT
2364 (build-system python-build-system)
2365 (inputs
2366 `(("python-setuptools" ,python-setuptools)))
2367 (arguments `(#:tests? #f)) ; no tests
2368 (home-page "http://github.com/digitalbazaar/pyld")
2369 (synopsis "Python implementation of the JSON-LD specification")
2370 (description
2371 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2372 (license license:bsd-3)))
d5f89b22
DT
2373
2374(define-public python2-pyld
2375 (package-with-python2 python-pyld))
3a1f9a68
DT
2376
2377(define-public python-certifi
2378 (package
2379 (name "python-certifi")
b2a2232c 2380 (version "2016.8.31")
3a1f9a68
DT
2381 (source (origin
2382 (method url-fetch)
9a41f443 2383 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2384 (sha256
2385 (base32
b2a2232c 2386 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68
DT
2387 (build-system python-build-system)
2388 (inputs
2389 `(("python-setuptools" ,python-setuptools)))
2390 (arguments `(#:tests? #f)) ; no tests
2391 (home-page "http://python-requests.org/")
2392 (synopsis "Python CA certificate bundle")
2393 (description
2394 "Certifi is a Python library that contains a CA certificate bundle, which
2395is used by the Requests library to verify HTTPS requests.")
3f641af0 2396 (license license:asl2.0)))
3a1f9a68
DT
2397
2398(define-public python2-certifi
2399 (package-with-python2 python-certifi))
e6cfbd36 2400
12c270dd
RW
2401(define-public python-click
2402 (package
2403 (name "python-click")
43accb58 2404 (version "6.6")
12c270dd
RW
2405 (source
2406 (origin
2407 (method url-fetch)
375f224b 2408 (uri (pypi-uri "click" version))
12c270dd 2409 (sha256
43accb58
LF
2410 (base32
2411 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2412 (build-system python-build-system)
e2ab5a09
BW
2413 (arguments
2414 `(#:phases
2415 (modify-phases %standard-phases
2416 (add-after 'unpack 'fix-paths
2417 (lambda* (#:key inputs #:allow-other-keys)
2418 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2419 "cross-libc" "libc"))))
2420 (substitute* "click/_unicodefun.py"
2421 (("'locale'")
2422 (string-append "'" glibc "/bin/locale'"))))
2423 #t)))))
12c270dd
RW
2424 (native-inputs
2425 `(("python-setuptools" ,python-setuptools)))
2426 (home-page "http://click.pocoo.org")
2427 (synopsis "Command line library for Python")
2428 (description
2429 "Click is a Python package for creating command line interfaces in a
2430composable way with as little code as necessary. Its name stands for
2431\"Command Line Interface Creation Kit\". It's highly configurable but comes
2432with sensible defaults out of the box.")
3f641af0 2433 (license license:bsd-3)))
12c270dd
RW
2434
2435(define-public python2-click
2436 (package-with-python2 python-click))
2437
addc808d
EF
2438(define-public python-wheel
2439 (package
2440 (name "python-wheel")
40981b5c 2441 (version "0.29.0")
e1ba0749
EF
2442 (source
2443 (origin
2444 (method url-fetch)
2445 (uri (pypi-uri "wheel" version))
2446 (sha256
2447 (base32
40981b5c 2448 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2449 (build-system python-build-system)
2450 (native-inputs
2451 `(("python-setuptools" ,python-setuptools)
2452 ("python-jsonschema" ,python-jsonschema)
2453 ("python-pytest-cov" ,python-pytest-cov)))
2454 (home-page "https://bitbucket.org/pypa/wheel/")
2455 (synopsis "Format for built Python packages")
2456 (description
2457 "A wheel is a ZIP-format archive with a specially formatted filename and
2458the @code{.whl} extension. It is designed to contain all the files for a PEP
2459376 compatible install in a way that is very close to the on-disk format. Many
2460packages will be properly installed with only the @code{Unpack} step and the
2461unpacked archive preserves enough information to @code{Spread} (copy data and
2462scripts to their final locations) at any later time. Wheel files can be
2463installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2464 (license license:expat)
2465 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2466
2467(define-public python2-wheel
8ad4ae20
LF
2468 (let ((wheel (package-with-python2
2469 (strip-python2-variant python-wheel))))
264ae686 2470 (package (inherit wheel)
8ad4ae20
LF
2471 (native-inputs `(("python2-functools32" ,python2-functools32)
2472 ,@(package-native-inputs wheel))))))
2473
addc808d 2474
ae641128 2475(define-public python-requests
e6cfbd36 2476 (package
ae641128 2477 (name "python-requests")
74a066f9 2478 (version "2.9.1")
e6cfbd36
DT
2479 (source (origin
2480 (method url-fetch)
5d691657 2481 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2482 (sha256
2483 (base32
74a066f9 2484 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2485 (build-system python-build-system)
5d691657 2486 (native-inputs
6a308947
EF
2487 `(("python-setuptools" ,python-setuptools)
2488 ("python-py" ,python-py)
5d691657
EF
2489 ("python-pytest" ,python-pytest)
2490 ("python-pytest-cov" ,python-pytest-cov)
2491 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2492 (home-page "http://python-requests.org/")
2493 (synopsis "Python HTTP library")
2494 (description
2495 "Requests is a Python HTTP client library. It aims to be easier to use
2496than Python’s urllib2 library.")
3f641af0 2497 (license license:asl2.0)))
864b5211 2498
e9005180
DT
2499;; Some software requires an older version of Requests, notably Docker
2500;; Compose.
2501(define-public python-requests-2.7
2502 (package (inherit python-requests)
2503 (version "2.7.0")
2504 (source (origin
2505 (method url-fetch)
2506 (uri (pypi-uri "requests" version))
2507 (sha256
2508 (base32
2509 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2510
ae641128 2511(define-public python2-requests
8ad4ae20 2512 (package-with-python2 python-requests))
ae641128 2513
ea521b42
DT
2514(define-public python-vcversioner
2515 (package
2516 (name "python-vcversioner")
538fe019 2517 (version "2.16.0.0")
ea521b42
DT
2518 (source
2519 (origin
2520 (method url-fetch)
2521 (uri (pypi-uri "vcversioner" version))
2522 (sha256
2523 (base32
538fe019 2524 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2525 (build-system python-build-system)
ea521b42
DT
2526 (synopsis "Python library for version number discovery")
2527 (description "Vcversioner is a Python library that inspects tagging
2528information in a variety of version control systems in order to discover
2529version numbers.")
2530 (home-page "https://github.com/habnabit/vcversioner")
538fe019
EF
2531 (license license:isc)
2532 (properties `((python2-variant . ,(delay python2-vcversioner))))))
ea521b42
DT
2533
2534(define-public python2-vcversioner
538fe019
EF
2535 (let ((vcversioner (package-with-python2
2536 (strip-python2-variant python-vcversioner))))
2537 (package (inherit vcversioner)
2538 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2539 ,@(package-native-inputs vcversioner))))))
ae641128 2540
864b5211
DT
2541(define-public python-jsonschema
2542 (package
2543 (name "python-jsonschema")
b3667afb 2544 (version "2.5.1")
864b5211
DT
2545 (source (origin
2546 (method url-fetch)
2547 (uri
2548 (string-append
2549 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2550 version ".tar.gz"))
2551 (sha256
2552 (base32
b3667afb 2553 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2554 (build-system python-build-system)
8bcd6b91
EF
2555 (arguments
2556 '(#:phases
2557 (modify-phases %standard-phases
2558 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2559 (native-inputs
8bcd6b91
EF
2560 `(("python-nose" ,python-nose)
2561 ("python-vcversioner" ,python-vcversioner)))
2562 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2563 (synopsis "Implementation of JSON Schema for Python")
2564 (description
2565 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2566 (license license:expat)
2567 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2568
2569(define-public python2-jsonschema
a14600ec
LF
2570 (let ((jsonschema (package-with-python2
2571 (strip-python2-variant python-jsonschema))))
264ae686 2572 (package (inherit jsonschema)
eaba9d66 2573 (native-inputs
8bcd6b91
EF
2574 `(("python2-mock" ,python2-mock)
2575 ("python2-setuptools" ,python2-setuptools)
eaba9d66
MB
2576 ,@(package-native-inputs jsonschema)))
2577 (propagated-inputs
2578 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2579
2580(define-public python-unidecode
2581 (package
2582 (name "python-unidecode")
8925d4f3 2583 (version "0.04.18")
850189b8
DT
2584 (source (origin
2585 (method url-fetch)
8925d4f3 2586 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2587 (sha256
2588 (base32
8925d4f3 2589 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2590 (build-system python-build-system)
2591 (inputs
2592 `(("python-setuptools" ,python-setuptools)))
2593 (home-page "https://pypi.python.org/pypi/Unidecode")
2594 (synopsis "ASCII transliterations of Unicode text")
2595 (description
2596 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2597useful when integrating with legacy code that doesn't support Unicode, or for
2598ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2599machine identifiers from human-readable Unicode strings that should still be
2600somewhat intelligeble.")
3f641af0 2601 (license license:gpl2+)))
850189b8
DT
2602
2603(define-public python2-unidecode
2604 (package-with-python2 python-unidecode))
6d45fef4
DT
2605
2606(define-public python-pyjwt
2607 (package
2608 (name "python-pyjwt")
eb31d4b4 2609 (version "1.4.0")
6d45fef4
DT
2610 (source
2611 (origin
2612 (method url-fetch)
eb31d4b4 2613 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2614 (sha256
2615 (base32
eb31d4b4 2616 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2617 (build-system python-build-system)
eb31d4b4
EF
2618 (native-inputs
2619 `(("python-setuptools" ,python-setuptools)
2620 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2621 (arguments
2622 '(#:tests? #f)) ; test suite doesn't work
2623 (home-page "http://github.com/progrium/pyjwt")
2624 (synopsis "JSON Web Token implementation in Python")
2625 (description
2626 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2627 (license license:expat)))
6d45fef4
DT
2628
2629(define-public python2-pyjwt
2630 (package-with-python2 python-pyjwt))
2631
2cec1f6f
DT
2632(define-public python-oauthlib
2633 (package
2634 (name "python-oauthlib")
bde2171d 2635 (version "1.0.3")
2cec1f6f
DT
2636 (source (origin
2637 (method url-fetch)
bde2171d 2638 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2639 (sha256
2640 (base32
bde2171d 2641 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2642 (build-system python-build-system)
bde2171d 2643 (native-inputs
59f151ec 2644 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2645 ("python-nose" ,python-nose)
2646 ("python-mock" ,python-mock)))
bde2171d
EF
2647 (inputs
2648 `(("python-blinker" ,python-blinker)
2649 ("python-cryptography" ,python-cryptography)
2650 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2651 (home-page "https://github.com/idan/oauthlib")
2652 (synopsis "OAuth implementation for Python")
2653 (description
2654 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2655OAuth request-signing logic.")
3f641af0 2656 (license license:bsd-3)
59f151ec 2657 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2658
2659(define-public python2-oauthlib
59f151ec 2660 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2661 (package
2662 (inherit base)
59f151ec
EF
2663 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2664 ("python2-unittest2" ,python2-unittest2)
2665 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2666
2667(define-public python-itsdangerous
2668 (package
2669 (name "python-itsdangerous")
2670 (version "0.24")
2671 (source
2672 (origin
2673 (method url-fetch)
2674 (uri (string-append
2675 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2676 version ".tar.gz"))
2677 (sha256
2678 (base32
2679 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2680 (build-system python-build-system)
ec5dbb5c
DT
2681 (home-page "http://github.com/mitsuhiko/itsdangerous")
2682 (synopsis "Python library for passing data to/from untrusted environments")
2683 (description
2684 "Itsdangerous provides various helpers to pass trusted data to untrusted
2685environments and back.")
3f641af0 2686 (license license:bsd-3)
194d0d98 2687 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
ec5dbb5c
DT
2688
2689(define-public python2-itsdangerous
194d0d98
EF
2690 (let ((base (package-with-python2
2691 (strip-python2-variant python-itsdangerous))))
2692 (package
2693 (inherit base)
2694 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2695 ,@(package-native-inputs base))))))
5731cae3 2696
8d12be1e
RW
2697(define-public python-pyyaml
2698 (package
2699 (name "python-pyyaml")
2700 (version "3.11")
2701 (source
2702 (origin
2703 (method url-fetch)
2704 (uri (string-append
2705 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2706 version ".tar.gz"))
2707 (sha256
2708 (base32
2709 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2710 (build-system python-build-system)
2711 (inputs
2712 `(("libyaml" ,libyaml)))
2713 (native-inputs
2714 `(("python-setuptools" ,python-setuptools)))
2715 (home-page "http://pyyaml.org/wiki/PyYAML")
2716 (synopsis "YAML parser and emitter for Python")
2717 (description
2718 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2719complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2720API, and sensible error messages. PyYAML supports standard YAML tags and
2721provides Python-specific tags that allow to represent an arbitrary Python
2722object.")
2723 (license license:expat)))
2724
2725(define-public python2-pyyaml
2726 (package-with-python2 python-pyyaml))
2727
5731cae3
DT
2728(define-public python-virtualenv
2729 (package
2730 (name "python-virtualenv")
58d04dba 2731 (version "15.0.3")
5731cae3
DT
2732 (source
2733 (origin
2734 (method url-fetch)
17804240 2735 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2736 (sha256
2737 (base32
58d04dba 2738 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2739 (build-system python-build-system)
17804240
EF
2740 (arguments
2741 `(#:phases
2742 (modify-phases %standard-phases
58d04dba
RW
2743 (replace 'check
2744 (lambda _
2745 ;; Disable failing test. See upstream bug report
2746 ;; https://github.com/pypa/virtualenv/issues/957
2747 (substitute* "tests/test_virtualenv.py"
2748 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2749 (zero? (system* "py.test")))))))
5731cae3
DT
2750 (inputs
2751 `(("python-setuptools" ,python-setuptools)
2752 ("python-mock" ,python-mock)
17804240 2753 ("python-pytest" ,python-pytest)))
5731cae3
DT
2754 (home-page "https://virtualenv.pypa.io/")
2755 (synopsis "Virtual Python environment builder")
2756 (description
2757 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2758 (license license:expat)))
5731cae3
DT
2759
2760(define-public python2-virtualenv
2761 (package-with-python2 python-virtualenv))
8176d4d5
DT
2762
2763(define-public python-markupsafe
2764 (package
2765 (name "python-markupsafe")
2766 (version "0.23")
2767 (source
2768 (origin
2769 (method url-fetch)
2770 (uri (string-append
2771 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2772 version ".tar.gz"))
2773 (sha256
2774 (base32
2775 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2776 (build-system python-build-system)
2777 (inputs
2778 `(("python-setuptools" ,python-setuptools)))
2779 (home-page "http://github.com/mitsuhiko/markupsafe")
2780 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2781 (description
2782 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2783for Python.")
3f641af0 2784 (license license:bsd-3)))
8176d4d5
DT
2785
2786(define-public python2-markupsafe
2787 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2788
2789(define-public python-jinja2
2790 (package
2791 (name "python-jinja2")
e98149b3 2792 (version "2.8")
fe34f0d1
DT
2793 (source
2794 (origin
2795 (method url-fetch)
e98149b3 2796 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2797 (sha256
2798 (base32
e98149b3 2799 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2800 (build-system python-build-system)
2801 (inputs
2802 `(("python-setuptools" ,python-setuptools)
2803 ("python-markupsafe" ,python-markupsafe)))
2804 (home-page "http://jinja.pocoo.org/")
2805 (synopsis "Python template engine")
2806 (description
2807 "Jinja2 is a small but fast and easy to use stand-alone template engine
2808written in pure Python.")
3f641af0 2809 (license license:bsd-3)))
fe34f0d1
DT
2810
2811(define-public python2-jinja2
2812 (package-with-python2 python-jinja2))
3580ab8b 2813
f7d17ac7
EE
2814(define-public python-pystache
2815 (package
2816 (name "python-pystache")
2817 (version "0.5.4")
2818 (source (origin
2819 (method url-fetch)
2820 (uri (pypi-uri "pystache" version))
2821 (sha256
2822 (base32
2823 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2824 (build-system python-build-system)
2825 (native-inputs
2826 `(("python-setuptools" ,python-setuptools)))
2827 (home-page "http://defunkt.io/pystache/")
2828 (synopsis "Python logic-less template engine")
2829 (description
2830 "Pystache is a Python implementation of the framework agnostic,
2831logic-free templating system Mustache.")
2832 (license license:expat)))
2833
2834(define-public python2-pystache
2835 (package-with-python2 python-pystache))
2836
1285119b
RW
2837(define-public python-joblib
2838 (package
2839 (name "python-joblib")
f34ef331 2840 (version "0.10.3")
1285119b
RW
2841 (source (origin
2842 (method url-fetch)
f34ef331 2843 (uri (pypi-uri "joblib" version))
1285119b
RW
2844 (sha256
2845 (base32
f34ef331 2846 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
1285119b 2847 (build-system python-build-system)
a8dd960a
RW
2848 (arguments
2849 `(#:phases
2850 (modify-phases %standard-phases
2851 (add-before 'check 'disable-failing-tests
2852 (lambda _
2853 ;; This numpydoc tests fails for unknown reasons
2854 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2855 ;; This numpydoc test depends on matplotlib, which is not a
2856 ;; required input.
2857 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2858 ;; These tests fail to execute sys.executable
2859 (substitute* "joblib/test/test_parallel.py"
2860 (("import nose" line)
2861 (string-append "from nose.plugins.skip import SkipTest\n" line))
2862 (("def test_nested_parallel_warnings" line)
2863 (string-append "@SkipTest\n" line))
2864 (("def test_parallel_with_interactively_defined_functions" line)
2865 (string-append "@SkipTest\n" line)))
2866 #t)))))
1285119b
RW
2867 (native-inputs
2868 `(("python-setuptools" ,python-setuptools)
f34ef331
RW
2869 ("python-nose" ,python-nose)
2870 ("python-sphinx" ,python-sphinx)
2871 ("python-docutils" ,python-docutils)
2872 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2873 (home-page "http://pythonhosted.org/joblib/")
2874 (synopsis "Using Python functions as pipeline jobs")
2875 (description
2876 "Joblib is a set of tools to provide lightweight pipelining in Python.
2877In particular, joblib offers: transparent disk-caching of the output values
2878and lazy re-evaluation (memoize pattern), easy simple parallel computing
2879logging and tracing of the execution.")
3f641af0 2880 (license license:bsd-3)))
1285119b
RW
2881
2882(define-public python2-joblib
2883 (package-with-python2 python-joblib))
2884
3580ab8b
DT
2885(define-public python-docutils
2886 (package
2887 (name "python-docutils")
2888 (version "0.12")
2889 (source
2890 (origin
2891 (method url-fetch)
2892 (uri (string-append
2893 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2894 version ".tar.gz"))
2895 (sha256
2896 (base32
2897 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2898 (build-system python-build-system)
2899 (inputs
2900 `(("python-setuptools" ,python-setuptools)))
2901 (arguments
2902 '(#:tests? #f)) ; no setup.py test command
2903 (home-page "http://docutils.sourceforge.net/")
2904 (synopsis "Python Documentation Utilities")
2905 (description
2906 "Docutils is a modular system for processing documentation into useful
2907formats, such as HTML, XML, and LaTeX. For input Docutils supports
2908reStructuredText.")
2909 ;; Most of the source code is public domain, but some source files are
2910 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2911 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2912
2913(define-public python2-docutils
2914 (package-with-python2 python-docutils))
fb35b7c0
DT
2915
2916(define-public python-pygments
2917 (package
2918 (name "python-pygments")
9f442285 2919 (version "2.0.2")
fb35b7c0
DT
2920 (source
2921 (origin
2922 (method url-fetch)
9f442285 2923 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2924 (sha256
2925 (base32
9f442285 2926 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2927 (build-system python-build-system)
2928 (inputs
2929 `(("python-setuptools" ,python-setuptools)))
2930 (home-page "http://pygments.org/")
2931 (synopsis "Syntax highlighting")
2932 (description
2933 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2934 (license license:bsd-2)))
fb35b7c0
DT
2935
2936(define-public python2-pygments
2937 (package-with-python2 python-pygments))
9dd6078d
DT
2938
2939(define-public python-sphinx
2940 (package
2941 (name "python-sphinx")
2942 (version "1.2.3")
2943 (source
2944 (origin
2945 (method url-fetch)
2946 (uri (string-append
2947 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2948 version ".tar.gz"))
2949 (sha256
2950 (base32
2951 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2952 (build-system python-build-system)
2953 (inputs
2954 `(("python-setuptools" ,python-setuptools)
2955 ("python-jinja2" ,python-jinja2)
2956 ("python-docutils" ,python-docutils)
2957 ("python-pygments" ,python-pygments)))
2958 (home-page "http://sphinx-doc.org/")
2959 (synopsis "Python documentation generator")
2960 (description "Sphinx is a tool that makes it easy to create documentation
2961for Python projects or other documents consisting of multiple reStructuredText
2962sources.")
3f641af0 2963 (license license:bsd-3)))
9dd6078d
DT
2964
2965(define-public python2-sphinx
2966 (package-with-python2 python-sphinx))
6888830b 2967
ad320b20
RW
2968(define-public python-sphinx-rtd-theme
2969 (package
2970 (name "python-sphinx-rtd-theme")
2971 (version "0.1.6")
2972 (source
2973 (origin
2974 (method url-fetch)
2975 (uri (string-append "https://pypi.python.org/packages/source/s/"
2976 "sphinx_rtd_theme/sphinx_rtd_theme-"
2977 version ".tar.gz"))
2978 (sha256
2979 (base32
2980 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2981 (build-system python-build-system)
2982 (arguments
2983 `(;; With standard flags, the install phase attempts to create a zip'd
2984 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2985 ;; before 1980'
2986 #:configure-flags '("--single-version-externally-managed"
2987 "--record=sphinx-rtd-theme.txt")))
2988 (native-inputs
2989 `(("python-setuptools" ,python-setuptools)))
2990 (inputs
2991 `(("python-docutils" ,python-docutils)
2992 ("python-sphinx" ,python-sphinx)))
2993 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2994 (synopsis "ReadTheDocs.org theme for Sphinx")
2995 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2996 (license license:expat)))
ad320b20
RW
2997
2998(define-public python2-sphinx-rtd-theme
2999 (package-with-python2 python-sphinx-rtd-theme))
3000
f4de5b3b
CAW
3001(define-public python-feedgenerator
3002 (package
3003 (name "python-feedgenerator")
f0412aa2 3004 (version "1.8")
f4de5b3b 3005 (source
f4de5b3b 3006 (origin
f0412aa2
EF
3007 (method url-fetch)
3008 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3009 (sha256
3010 (base32
f0412aa2 3011 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 3012 (build-system python-build-system)
f0412aa2 3013 (native-inputs
f4de5b3b
CAW
3014 `(("python-setuptools" ,python-setuptools)
3015 ("python-pytz" ,python-pytz)
3016 ("python-six" ,python-six)))
f0412aa2 3017 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3018 (synopsis
3019 "Standalone version of Django's Atom/RSS feed generator")
3020 (description
3021 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3022which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3023 (license license:bsd-3)))
f4de5b3b
CAW
3024
3025(define-public python2-feedgenerator
3026 (package-with-python2 python-feedgenerator))
3027
59ad30e3
CAW
3028(define-public python-blinker
3029 (package
3030 (name "python-blinker")
7fb9ff4d 3031 (version "1.4")
59ad30e3
CAW
3032 (source
3033 (origin
3034 (method url-fetch)
7fb9ff4d 3035 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3036 (sha256
3037 (base32
7fb9ff4d 3038 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
3039 (build-system python-build-system)
3040 (native-inputs
3041 `(("python-setuptools" ,python-setuptools)))
3042 ;; No "test" command supplied to setuptools, so unless there's another way
3043 ;; to run tests, we're skipping them!
3044 (arguments '(#:tests? #f))
3045 (home-page "http://pythonhosted.org/blinker/")
3046 (synopsis "Fast, simple object-to-object and broadcast signaling")
3047 (description
3048 "Blinker provides a fast dispatching system that allows any number of
3049interested parties to subscribe to events, or \"signals\".")
3050 (license license:expat)))
3051
3052(define-public python2-blinker
3053 (package-with-python2 python-blinker))
3054
b8050e71
CAW
3055(define-public pelican
3056 (package
3057 (name "pelican")
11f97c27 3058 (version "3.6.3")
b8050e71
CAW
3059 (source
3060 (origin
3061 (method url-fetch)
11f97c27 3062 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3063 (sha256
3064 (base32
11f97c27 3065 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3066 (build-system python-build-system)
d9f2dece 3067 (inputs
b8050e71
CAW
3068 `(("python-feedgenerator" ,python-feedgenerator)
3069 ("python-jinja2" ,python-jinja2)
3070 ("python-pygments" ,python-pygments)
3071 ("python-docutils" ,python-docutils)
3072 ("python-pytz" ,python-pytz)
3073 ("python-blinker" ,python-blinker)
3074 ("python-unidecode" ,python-unidecode)
3075 ("python-six" ,python-six)
3076 ("python-dateutil-2" ,python-dateutil-2)))
3077 (home-page "http://getpelican.com/")
3078 (arguments
3079 `(;; XXX Requires a lot more packages to do unit tests :P
3080 #:tests? #f
3081 #:phases (modify-phases %standard-phases
3082 (add-before
3083 'install 'adjust-requires
3084 ;; Since feedgenerator is installed from git, it doesn't
3085 ;; conform to the version requirements.
3086 ;;
3087 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3088 ;; version requirement so setuptools doesn't get confused.
3089 (lambda _
3090 (substitute* "setup.py"
3091 (("['\"]feedgenerator.*?['\"]")
3092 "'feedgenerator'")))))))
3093 (synopsis "Python-based static site publishing system")
3094 (description
3095 "Pelican is a tool to generate a static blog from reStructuredText,
3096Markdown input files, and more. Pelican uses Jinja2 for templating
3097and is very extensible.")
3f641af0 3098 (license license:agpl3+)))
b8050e71 3099
240ca4aa
RW
3100(define-public python-scikit-learn
3101 (package
3102 (name "python-scikit-learn")
be0a4c26 3103 (version "0.16.1")
240ca4aa
RW
3104 (source
3105 (origin
3106 (method url-fetch)
3107 (uri (string-append
3108 "https://github.com/scikit-learn/scikit-learn/archive/"
3109 version ".tar.gz"))
7e21b9fb 3110 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3111 (sha256
3112 (base32
be0a4c26 3113 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
3114 (build-system python-build-system)
3115 (arguments
3116 `(#:phases
3117 (alist-cons-before
2f6b3d2e
RW
3118 'check 'set-HOME
3119 ;; some tests require access to "$HOME"
3120 (lambda _ (setenv "HOME" "/tmp"))
3121 ;; Tests can only be run after the library has been installed and not
3122 ;; within the source directory.
3123 (alist-cons-after
3124 'install 'check
3125 (lambda _
3126 (with-directory-excursion "/tmp"
3127 ;; With Python 3 one test of 3334 fails
3128 ;; (sklearn.tests.test_common.test_transformers); see
3129 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3130 (system* "nosetests" "-v" "sklearn")))
3131 (alist-delete 'check %standard-phases)))))
240ca4aa 3132 (inputs
2f6b3d2e 3133 `(("openblas" ,openblas)
240ca4aa
RW
3134 ("python-nose" ,python-nose)))
3135 (propagated-inputs
3136 `(("python-numpy" ,python-numpy)
3137 ("python-scipy" ,python-scipy)))
3138 (home-page "http://scikit-learn.org/")
3139 (synopsis "Machine Learning in Python")
3140 (description
3141 "Scikit-learn provides simple and efficient tools for data
3142mining and data analysis.")
25a2f81f
EF
3143 (license license:bsd-3)
3144 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
240ca4aa
RW
3145
3146(define-public python2-scikit-learn
25a2f81f 3147 (package-with-python2 (strip-python2-variant python-scikit-learn)))
240ca4aa 3148
12f8f9bb
RW
3149(define-public python-scikit-image
3150 (package
3151 (name "python-scikit-image")
3152 (version "0.11.3")
3153 (source
3154 (origin
3155 (method url-fetch)
3156 (uri (string-append
3157 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3158 version ".tar.gz"))
3159 (sha256
3160 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3161 (build-system python-build-system)
3162 (propagated-inputs
3163 `(("python-matplotlib" ,python-matplotlib)
3164 ("python-networkx" ,python-networkx)
3165 ("python-numpy" ,python-numpy)
3166 ("python-scipy" ,python-scipy)
3167 ("python-six" ,python-six)
3168 ("python-pillow" ,python-pillow)))
3169 (native-inputs
3170 `(("python-cython" ,python-cython)
3171 ("python-setuptools" ,python-setuptools)))
3172 (home-page "http://scikit-image.org/")
3173 (synopsis "Image processing in Python")
3174 (description
e881752c 3175 "Scikit-image is a collection of algorithms for image processing.")
2b031d3f
EF
3176 (license license:bsd-3)
3177 (properties `((python2-variant . ,(delay python2-scikit-image))))))
12f8f9bb
RW
3178
3179(define-public python2-scikit-image
2b031d3f
EF
3180 (let ((scikit-image (package-with-python2
3181 (strip-python2-variant python-scikit-image))))
12f8f9bb
RW
3182 (package (inherit scikit-image)
3183 (native-inputs
3184 `(("python2-mock" ,python2-mock)
3185 ,@(package-native-inputs scikit-image)))
3186 (propagated-inputs
3187 `(("python2-pytz" ,python2-pytz)
2b031d3f 3188 ,@(package-propagated-inputs scikit-image))))))
12f8f9bb 3189
5394a6a6
RW
3190(define-public python-redis
3191 (package
3192 (name "python-redis")
3193 (version "2.10.3")
3194 (source
3195 (origin
3196 (method url-fetch)
3197 (uri (string-append
3198 "https://pypi.python.org/packages/source/r/redis/redis-"
3199 version ".tar.gz"))
3200 (sha256
3201 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3202 (build-system python-build-system)
3203 ;; Tests require a running Redis server
3204 (arguments '(#:tests? #f))
3205 (native-inputs
3206 `(("python-setuptools" ,python-setuptools)
3207 ("python-pytest" ,python-pytest)))
3208 (home-page "https://github.com/andymccurdy/redis-py")
3209 (synopsis "Redis Python client")
3210 (description
3211 "This package provides a Python interface to the Redis key-value store.")
3212 (license license:expat)))
3213
3214(define-public python2-redis
3215 (package-with-python2 python-redis))
3216
748cef5b
RW
3217(define-public python-rq
3218 (package
3219 (name "python-rq")
3220 (version "0.5.2")
3221 (source
3222 (origin
3223 (method url-fetch)
3224 (uri (string-append
3225 "https://pypi.python.org/packages/source/r/rq/rq-"
3226 version ".tar.gz"))
3227 (sha256
3228 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3229 (build-system python-build-system)
3230 (propagated-inputs
3231 `(("python-click" ,python-click)
3232 ("python-redis" ,python-redis)))
3233 (native-inputs
3234 `(("python-setuptools" ,python-setuptools)))
3235 (home-page "http://python-rq.org/")
3236 (synopsis "Simple job queues for Python")
3237 (description
3238 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3239processing them in the background with workers. It is backed by Redis and it
3240is designed to have a low barrier to entry.")
3f641af0 3241 (license license:bsd-2)))
748cef5b
RW
3242
3243(define-public python2-rq
3244 (package-with-python2 python-rq))
3245
6888830b
FB
3246(define-public python-cython
3247 (package
3248 (name "python-cython")
dd22efef 3249 (version "0.24.1")
6888830b
FB
3250 (source
3251 (origin
3252 (method url-fetch)
56918e26 3253 (uri (pypi-uri "Cython" version))
6888830b
FB
3254 (sha256
3255 (base32
dd22efef 3256 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3257 (build-system python-build-system)
3258 ;; we need the full python package and not just the python-wrapper
3259 ;; because we need libpython3.3m.so
3260 (inputs
3261 `(("python" ,python)))
3262 (arguments
3263 `(#:phases
b92f651b
EF
3264 (modify-phases %standard-phases
3265 (add-before 'check 'set-HOME
3266 ;; some tests require access to "$HOME/.cython"
3267 (lambda _ (setenv "HOME" "/tmp")))
3268 (replace 'check
3269 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3270 (home-page "http://cython.org/")
3271 (synopsis "C extensions for Python")
3272 (description "Cython is an optimising static compiler for both the Python
3273programming language and the extended Cython programming language. It makes
3274writing C extensions for Python as easy as Python itself.")
3f641af0 3275 (license license:asl2.0)
48b311b1 3276 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3277
3278(define-public python2-cython
48b311b1
LC
3279 (package (inherit (package-with-python2
3280 (strip-python2-variant python-cython)))
6888830b
FB
3281 (name "python2-cython")
3282 (inputs
3283 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3284
ee5fb7ee
AV
3285;; The RPython toolchain currently does not support Python 3.
3286(define-public python2-rpython
3287 (package
3288 (name "python2-rpython")
3289 (version "0.1.4")
3290 (source
3291 (origin
3292 (method url-fetch)
3293 (uri (pypi-uri "rpython" version))
3294 (sha256
3295 (base32
3296 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3297 (build-system python-build-system)
3298 (arguments `(#:python ,python-2))
3299 (native-inputs
3300 `(("python2-pytest" ,python2-pytest) ; needed for running tests
3301 ("python2-setuptools" ,python2-setuptools)))
3302 (home-page "https://rpython.readthedocs.org")
3303 (synopsis "Framework for implementing interpreters and virtual machines")
3304 (description "RPython is a translation and support framework for
3305producing implementations of dynamic languages, emphasizing a clean separation
3306between language specification and implementation aspects.")
3307 (license license:expat)))
3308
0da98533
FB
3309;; This version of numpy is missing the documentation and is only used to
3310;; build matplotlib which is required to build numpy's documentation.
3311(define python-numpy-bootstrap
3312 (package
3313 (name "python-numpy-bootstrap")
ef9b4c04 3314 (version "1.10.4")
0da98533
FB
3315 (source
3316 (origin
3317 (method url-fetch)
de67e922 3318 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3319 "/numpy-" version ".tar.gz"))
3320 (sha256
3321 (base32
ef9b4c04 3322 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3323 (build-system python-build-system)
3324 (inputs
3325 `(("python-nose" ,python-nose)
cba256f8
RW
3326 ("openblas" ,openblas)
3327 ("lapack" ,lapack)))
0da98533 3328 (native-inputs
19afbea1 3329 `(("gfortran" ,gfortran)))
0da98533
FB
3330 (arguments
3331 `(#:phases
3332 (alist-cons-before
3333 'build 'set-environment-variables
3334 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3335 (call-with-output-file "site.cfg"
3336 (lambda (port)
cba256f8
RW
3337 (format port
3338 "[openblas]
dbdfe515
RW
3339libraries = openblas
3340library_dirs = ~a/lib
3341include_dirs = ~a/include
cba256f8
RW
3342
3343[lapack]
3344lapack_libs = lapack
3345library_dirs = ~a/lib
3346include_dirs = ~a/include
3347"
3348 (assoc-ref inputs "openblas")
3349 (assoc-ref inputs "openblas")
3350 (assoc-ref inputs "lapack")
3351 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3352 ;; Use "gcc" executable, not "cc".
3353 (substitute* "numpy/distutils/system_info.py"
3354 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3355 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3356 #t)
6a843168
FB
3357 ;; Tests can only be run after the library has been installed and not
3358 ;; within the source directory.
3359 (alist-cons-after
3360 'install 'check
89b5c60e 3361 (lambda _
6a843168 3362 (with-directory-excursion "/tmp"
89b5c60e 3363 (zero? (system* "python" "-c"
6a843168 3364 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3365 (alist-delete
3366 'check
6a843168 3367 %standard-phases)))))
0da98533
FB
3368 (home-page "http://www.numpy.org/")
3369 (synopsis "Fundamental package for scientific computing with Python")
3370 (description "NumPy is the fundamental package for scientific computing
e881752c 3371with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3372object, sophisticated (broadcasting) functions, tools for integrating C/C++
3373and Fortran code, useful linear algebra, Fourier transform, and random number
3374capabilities.")
3f641af0 3375 (license license:bsd-3)))
0da98533
FB
3376
3377(define python2-numpy-bootstrap
3378 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3379
3a1bfe18
RW
3380(define-public python2-fastlmm
3381 (package
3382 (name "python2-fastlmm")
b074e7d4 3383 (version "0.2.21")
3a1bfe18
RW
3384 (source
3385 (origin
3386 (method url-fetch)
b074e7d4 3387 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3388 (sha256
3389 (base32
b074e7d4 3390 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3391 (build-system python-build-system)
3392 (arguments
3393 `(#:python ,python-2)) ; only Python 2.7 is supported
3394 (propagated-inputs
3395 `(("python2-numpy" ,python2-numpy)
3396 ("python2-scipy" ,python2-scipy)
3397 ("python2-matplotlib" ,python2-matplotlib)
3398 ("python2-pandas" ,python2-pandas)
3399 ("python2-scikit-learn" ,python2-scikit-learn)
3400 ("python2-cython" ,python2-cython)
3401 ("python2-pysnptools" ,python2-pysnptools)))
3402 (native-inputs
3403 `(("unzip" ,unzip)
3404 ("python2-mock" ,python2-mock)
3405 ("python2-setuptools" ,python2-setuptools)))
3406 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3407 (synopsis "Perform genome-wide association studies on large data sets")
3408 (description
3409 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3410Models, is a program for performing both single-SNP and SNP-set genome-wide
3411association studies (GWAS) on extremely large data sets.")
3f641af0 3412 (license license:asl2.0)))
3a1bfe18 3413
2ee8869a
FB
3414(define-public python-numpy
3415 (package (inherit python-numpy-bootstrap)
3416 (name "python-numpy")
3417 (outputs '("out" "doc"))
89b5c60e 3418 (inputs
2ee8869a
FB
3419 `(("which" ,which)
3420 ("python-setuptools" ,python-setuptools)
3421 ("python-matplotlib" ,python-matplotlib)
3422 ("python-sphinx" ,python-sphinx)
3423 ("python-pyparsing" ,python-pyparsing)
3424 ("python-numpydoc" ,python-numpydoc)
3425 ,@(package-inputs python-numpy-bootstrap)))
3426 (native-inputs
3427 `(("pkg-config" ,pkg-config)
3428 ("texlive" ,texlive)
3429 ("texinfo" ,texinfo)
3430 ("perl" ,perl)
3431 ,@(package-native-inputs python-numpy-bootstrap)))
3432 (arguments
89b5c60e 3433 `(,@(substitute-keyword-arguments
2ee8869a
FB
3434 (package-arguments python-numpy-bootstrap)
3435 ((#:phases phases)
3436 `(alist-cons-after
3437 'install 'install-doc
3438 (lambda* (#:key outputs #:allow-other-keys)
3439 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3440 (doc (string-append
3441 data "/doc/" ,name "-"
2ee8869a
FB
3442 ,(package-version python-numpy-bootstrap)))
3443 (info (string-append data "/info"))
3444 (html (string-append doc "/html"))
3445 (pyver ,(string-append "PYVER=")))
3446 (with-directory-excursion "doc"
3447 (mkdir-p html)
3448 (system* "make" "html" pyver)
3449 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3450 (system* "make" "-C" "build/latex"
2ee8869a
FB
3451 "all-pdf" "PAPER=a4" pyver)
3452 ;; FIXME: Generation of the info file fails.
3453 ;; (system* "make" "info" pyver)
3454 ;; (mkdir-p info)
3455 ;; (copy-file "build/texinfo/numpy.info"
3456 ;; (string-append info "/numpy.info"))
3457 (for-each (lambda (file)
3458 (copy-file (string-append "build/latex" file)
3459 (string-append doc file)))
3460 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3461 (with-directory-excursion "build/html"
3462 (for-each (lambda (file)
3463 (let* ((dir (dirname file))
3464 (tgt-dir (string-append html "/" dir)))
3465 (unless (equal? "." dir)
3466 (mkdir-p tgt-dir))
96c46210 3467 (install-file file html)))
2ee8869a
FB
3468 (find-files "." ".*"))))))
3469 ,phases)))))))
3470
764c077b 3471(define-public python2-numpy
57b7b8cd 3472 (package-with-python2 python-numpy))
2ee8869a 3473
15bfe6d6
FB
3474(define-public python-pyparsing
3475 (package
3476 (name "python-pyparsing")
e0669289 3477 (version "2.0.3")
15bfe6d6
FB
3478 (source
3479 (origin
3480 (method url-fetch)
de67e922
LF
3481 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3482 "/pyparsing-" version
15bfe6d6
FB
3483 "/pyparsing-" version ".tar.gz"))
3484 (sha256
3485 (base32
e0669289 3486 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3487 (build-system python-build-system)
3488 (outputs '("out" "doc"))
3489 (arguments
3490 `(#:tests? #f ; no test target
3491 #:modules ((guix build python-build-system)
3492 (guix build utils))
3493 #:phases
3494 (alist-cons-after
3495 'install 'install-doc
3496 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3497 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3498 "/share/doc/" ,name "-" ,version))
3499 (html-doc (string-append doc "/html"))
3500 (examples (string-append doc "/examples")))
3501 (mkdir-p html-doc)
3502 (mkdir-p examples)
89b5c60e 3503 (for-each
15bfe6d6 3504 (lambda (dir tgt)
89b5c60e 3505 (map (lambda (file)
96c46210 3506 (install-file file tgt))
15bfe6d6
FB
3507 (find-files dir ".*")))
3508 (list "docs" "htmldoc" "examples")
3509 (list doc html-doc examples))))
3510 %standard-phases)))
3511 (home-page "http://pyparsing.wikispaces.com")
3512 (synopsis "Python parsing class library")
3513 (description
3514 "The pyparsing module is an alternative approach to creating and
3515executing simple grammars, vs. the traditional lex/yacc approach, or the use
3516of regular expressions. The pyparsing module provides a library of classes
3517that client code uses to construct the grammar directly in Python code.")
bd3fa666 3518 (license license:expat)))
15bfe6d6
FB
3519
3520(define-public python2-pyparsing
3521 (package-with-python2 python-pyparsing))
3522
ec00de35
FB
3523(define-public python-numpydoc
3524 (package
3525 (name "python-numpydoc")
3526 (version "0.5")
3527 (source
3528 (origin
3529 (method url-fetch)
89b5c60e 3530 (uri (string-append
ec00de35
FB
3531 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3532 version ".tar.gz"))
3533 (sha256
3534 (base32
5e4d8f67
AE
3535 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3536 (modules '((guix build utils)))
3537 (snippet
3538 '(begin
3539 ;; Drop a test requiring matplotlib, which we cannot add as an
3540 ;; input since it would create a circular dependency: Extend the
3541 ;; test for Python 3, where it is already dropped, to Python 2.
3542 (substitute* "numpydoc/tests/test_plot_directive.py"
3543 (("3") "2"))))))
ec00de35
FB
3544 (build-system python-build-system)
3545 (inputs
3546 `(("python-setuptools" ,python-setuptools)
3547 ("python-docutils" ,python-docutils)
3548 ("python-sphinx" ,python-sphinx)
3549 ("python-nose" ,python-nose)))
3550 (home-page "https://pypi.python.org/pypi/numpydoc")
3551 (synopsis
3552 "Numpy's Sphinx extensions")
3553 (description
3554 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3555 (license license:bsd-2)))
ec00de35
FB
3556
3557(define-public python2-numpydoc
5e4d8f67 3558 (package-with-python2 python-numpydoc))
1c65314c 3559
1e656049
RW
3560(define-public python-numexpr
3561 (package
3562 (name "python-numexpr")
26112c0a 3563 (version "2.6.0")
1e656049
RW
3564 (source
3565 (origin
3566 (method url-fetch)
26112c0a 3567 (uri (pypi-uri "numexpr" version))
1e656049
RW
3568 (sha256
3569 (base32
26112c0a 3570 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3571 (build-system python-build-system)
3572 (arguments `(#:tests? #f)) ; no tests included
3573 (propagated-inputs
3574 `(("python-numpy" ,python-numpy)))
3575 (home-page "https://github.com/pydata/numexpr")
3576 (synopsis "Fast numerical expression evaluator for NumPy")
3577 (description
3578 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3579expressions that operate on arrays are accelerated and use less memory than
3580doing the same calculation in Python. In addition, its multi-threaded
3581capabilities can make use of all your cores, which may accelerate
3582computations, most specially if they are not memory-bounded (e.g. those using
3583transcendental functions).")
fc1a170e
EF
3584 (license license:expat)
3585 (properties `((python2-variant . ,(delay python2-numexpr))))))
1e656049
RW
3586
3587(define-public python2-numexpr
fc1a170e 3588 (package-with-python2 (strip-python2-variant python-numexpr)))
1e656049 3589
1c65314c
FB
3590(define-public python-matplotlib
3591 (package
3592 (name "python-matplotlib")
1bbc659f 3593 (version "1.4.3")
1c65314c
FB
3594 (source
3595 (origin
3596 (method url-fetch)
de67e922
LF
3597 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3598 "/matplotlib-" version
1c65314c
FB
3599 "/matplotlib-" version ".tar.gz"))
3600 (sha256
3601 (base32
1bbc659f 3602 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3603 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3604 (build-system python-build-system)
3605 (outputs '("out" "doc"))
25f9a068
FB
3606 (propagated-inputs ; the following packages are all needed at run time
3607 `(("python-pyparsing" ,python-pyparsing)
3608 ("python-pygobject" ,python-pygobject)
3609 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3610 ("python-tkinter" ,python "tk")
25f9a068
FB
3611 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3612 ;; from 'gtk+') provides the required 'typelib' files used by
3613 ;; 'gobject-introspection'. The location of these files is set with the
3614 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3615 ;; is done automatically by a 'native-search-path' procedure. However,
3616 ;; at run-time the user must set this variable as follows:
3617 ;;
3618 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3619 ("gtk+" ,gtk+)
3620 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3621 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3622 ;; object. For this reason we need to import both libraries.
3623 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3624 ("python-pycairo" ,python-pycairo)
3625 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3626 (inputs
3627 `(("python-setuptools" ,python-setuptools)
3628 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3629 ("python-six" ,python-six)
3630 ("python-pytz" ,python-pytz)
3631 ("python-numpy" ,python-numpy-bootstrap)
3632 ("python-sphinx" ,python-sphinx)
3633 ("python-numpydoc" ,python-numpydoc)
3634 ("python-nose" ,python-nose)
3635 ("python-mock" ,python-mock)
3636 ("libpng" ,libpng)
3637 ("imagemagick" ,imagemagick)
3638 ("freetype" ,freetype)
25f9a068
FB
3639 ("cairo" ,cairo)
3640 ("glib" ,glib)
4e7a137a 3641 ("python-pillow" ,python-pillow)
1c65314c 3642 ;; FIXME: Add backends when available.
1c65314c
FB
3643 ;("python-wxpython" ,python-wxpython)
3644 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3645 ("tcl" ,tcl)
3646 ("tk" ,tk)))
1c65314c
FB
3647 (native-inputs
3648 `(("pkg-config" ,pkg-config)
3649 ("texlive" ,texlive)
3650 ("texinfo" ,texinfo)))
3651 (arguments
3652 `(#:phases
25f9a068
FB
3653 (alist-cons-before
3654 'build 'configure-environment
3655 (lambda* (#:key outputs inputs #:allow-other-keys)
3656 (let ((cairo (assoc-ref inputs "cairo"))
3657 (gtk+ (assoc-ref inputs "gtk+")))
3658 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3659 ;; has not effect.
25f9a068
FB
3660 (setenv "LD_LIBRARY_PATH"
3661 (string-append cairo "/lib:" gtk+ "/lib"))
3662 (setenv "HOME" (getcwd))
3663 (call-with-output-file "setup.cfg"
3664 (lambda (port)
1bbc659f
FB
3665 (format port "[directories]~%
3666basedirlist = ~a,~a~%
57b7b8cd 3667 [rc_options]~%
1bbc659f
FB
3668backend = TkAgg~%"
3669 (assoc-ref inputs "tcl")
3670 (assoc-ref inputs "tk"))))))
25f9a068
FB
3671 (alist-cons-after
3672 'install 'install-doc
3673 (lambda* (#:key outputs #:allow-other-keys)
3674 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3675 (doc (string-append data "/doc/" ,name "-" ,version))
3676 (info (string-append data "/info"))
3677 (html (string-append doc "/html")))
3678 (with-directory-excursion "doc"
25f9a068
FB
3679 ;; Produce pdf in 'A4' format.
3680 (substitute* (find-files "." "conf\\.py")
3681 (("latex_paper_size = 'letter'")
3682 "latex_paper_size = 'a4'"))
3683 (mkdir-p html)
3684 (mkdir-p info)
3685 ;; The doc recommends to run the 'html' target twice.
3686 (system* "python" "make.py" "html")
3687 (system* "python" "make.py" "html")
18b31516 3688 (copy-recursively "build/html" html)
25f9a068
FB
3689 (system* "python" "make.py" "latex")
3690 (system* "python" "make.py" "texinfo")
18b31516
FB
3691 (symlink (string-append html "/_images")
3692 (string-append info "/matplotlib-figures"))
3693 (with-directory-excursion "build/texinfo"
3694 (substitute* "matplotlib.texi"
3695 (("@image\\{([^,]*)" all file)
3696 (string-append "@image{matplotlib-figures/" file)))
3697 (symlink (string-append html "/_images")
3698 "./matplotlib-figures")
3699 (system* "makeinfo" "--no-split"
3700 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3701 (copy-file "build/texinfo/matplotlib.info"
3702 (string-append info "/matplotlib.info"))
3703 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3704 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3705 %standard-phases))))
1c65314c
FB
3706 (home-page "http://matplotlib.org")
3707 (synopsis "2D plotting library for Python")
3708 (description
3709 "Matplotlib is a Python 2D plotting library which produces publication
3710quality figures in a variety of hardcopy formats and interactive environments
3711across platforms. Matplotlib can be used in Python scripts, the python and
3712ipython shell, web application servers, and six graphical user interface
3713toolkits.")
3f641af0 3714 (license license:psfl)
57b7b8cd 3715 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3716
764c077b 3717(define-public python2-matplotlib
57b7b8cd
LC
3718 (let ((matplotlib (package-with-python2
3719 (strip-python2-variant python-matplotlib))))
764c077b 3720 (package (inherit matplotlib)
88c26834
AE
3721 ;; Make sure to use special packages for Python 2 instead
3722 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3723 (propagated-inputs
7ca0dbc3 3724 `(("python2-pycairo" ,python2-pycairo)
764c077b 3725 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3726 ("python2-tkinter" ,python-2 "tk")
3727 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3728 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3729
0dde6232
RW
3730(define-public python2-pysnptools
3731 (package
3732 (name "python2-pysnptools")
a800018e 3733 (version "0.3.9")
0dde6232
RW
3734 (source
3735 (origin
3736 (method url-fetch)
3f2e9675 3737 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3738 (sha256
3739 (base32
a800018e 3740 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3741 (build-system python-build-system)
3742 (arguments
3743 `(#:python ,python-2)) ; only Python 2.7 is supported
3744 (propagated-inputs
3745 `(("python2-numpy" ,python2-numpy)
3746 ("python2-scipy" ,python2-scipy)
a800018e 3747 ("python2-pytz" ,python2-pytz)
0dde6232 3748 ("python2-cython" ,python2-cython)))
a800018e
EF
3749 (inputs
3750 `(("python2-dateutil-2" ,python2-dateutil-2)
3751 ("python2-pandas" ,python2-pandas)
3752 ("python2-six" ,python2-six)))
0dde6232
RW
3753 (native-inputs
3754 `(("unzip" ,unzip)
3755 ("python2-setuptools" ,python2-setuptools)))
3756 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3757 (synopsis "Library for reading and manipulating genetic data")
3758 (description
3759 "PySnpTools is a library for reading and manipulating genetic data. It
3760can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3761those files. It can also efficiently manipulate ranges of integers using set
3762operators such as union, intersection, and difference.")
3f641af0 3763 (license license:asl2.0)))
0dde6232 3764
c9b1b4f9
RW
3765(define-public python-rpy2
3766 (package
3767 (name "python-rpy2")
ec3bcbc7 3768 (version "2.7.6")
c9b1b4f9
RW
3769 (source
3770 (origin
3771 (method url-fetch)
ec3bcbc7 3772 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3773 (sha256
3774 (base32
ec3bcbc7 3775 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3776 (build-system python-build-system)
3777 (inputs
3778 `(("python-six" ,python-six)
3779 ("readline" ,readline)
3780 ("icu4c" ,icu4c)
3781 ("pcre" ,pcre)
3782 ("r" ,r)))
3783 (native-inputs
5ff6575b
RW
3784 `(("python-setuptools" ,python-setuptools)
3785 ("zlib" ,zlib)))
c9b1b4f9
RW
3786 (home-page "http://rpy.sourceforge.net/")
3787 (synopsis "Python interface to the R language")
3788 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3789low-level interface to R from Python, a proposed high-level interface,
3790including wrappers to graphical libraries, as well as R-like structures and
3791functions.")
3f641af0 3792 (license license:gpl3+)))
c9b1b4f9
RW
3793
3794(define-public python2-rpy2
3795 (let ((rpy2 (package-with-python2 python-rpy2)))
3796 (package (inherit rpy2)
3797 (native-inputs
3798 `(("python2-singledispatch" ,python2-singledispatch)
3799 ,@(package-native-inputs rpy2))))))
3800
bb986599
FB
3801(define-public python-scipy
3802 (package
3803 (name "python-scipy")
ba8a0824 3804 (version "0.16.0")
bb986599
FB
3805 (source
3806 (origin
3807 (method url-fetch)
de67e922
LF
3808; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3809 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3810 "/scipy-" version ".tar.xz"))
bb986599
FB
3811 (sha256
3812 (base32
ba8a0824 3813 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3814 (build-system python-build-system)
dd86c0d1 3815 (propagated-inputs
bb986599
FB
3816 `(("python-numpy" ,python-numpy)
3817 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3818 ("python-pyparsing" ,python-pyparsing)))
3819 (inputs
3820 `(("lapack" ,lapack)
719b01c1 3821 ("openblas" ,openblas)))
bb986599 3822 (native-inputs
dd86c0d1
RW
3823 `(("python-nose" ,python-nose)
3824 ("python-sphinx" ,python-sphinx)
5248d49e 3825 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3826 ("gfortran" ,gfortran)
bb986599
FB
3827 ("texlive" ,texlive)
3828 ("perl" ,perl)))
3829 (outputs '("out" "doc"))
3830 (arguments
3831 `(#:phases
3832 (alist-cons-before
719b01c1 3833 'build 'configure-openblas
bb986599 3834 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3835 (call-with-output-file "site.cfg"
3836 (lambda (port)
3837 (format port
3838 "[blas]
3839libraries = openblas
3840library_dirs = ~a/lib
3841include_dirs = ~a/include
3842[atlas]
3843library_dirs = ~a/lib
3844atlas_libs = openblas
3845"
3846 (assoc-ref inputs "openblas")
3847 (assoc-ref inputs "openblas")
3848 (assoc-ref inputs "openblas"))))
3849 #t)
bb986599
FB
3850 (alist-cons-after
3851 'install 'install-doc
3852 (lambda* (#:key outputs #:allow-other-keys)
3853 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3854 (doc (string-append data "/doc/" ,name "-" ,version))
3855 (html (string-append doc "/html"))
3856 (pyver ,(string-append "PYVER=")))
3857 (with-directory-excursion "doc"
bb986599
FB
3858 ;; Fix generation of images for mathematical expressions.
3859 (substitute* (find-files "source" "conf\\.py")
3860 (("pngmath_use_preview = True")
3861 "pngmath_use_preview = False"))
3862 (mkdir-p html)
3863 (system* "make" "html" pyver)
3864 (system* "make" "latex" "PAPER=a4" pyver)
3865 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3866 (copy-file "build/latex/scipy-ref.pdf"
3867 (string-append doc "/scipy-ref.pdf"))
3868 (with-directory-excursion "build/html"
3869 (for-each (lambda (file)
3870 (let* ((dir (dirname file))
3871 (tgt-dir (string-append html "/" dir)))
96c46210 3872 (install-file file html)))
bb986599
FB
3873 (find-files "." ".*"))))))
3874 ;; Tests can only be run after the library has been installed and not
3875 ;; within the source directory.
3876 (alist-cons-after
3877 'install 'check
89b5c60e 3878 (lambda _
bb986599
FB
3879 (with-directory-excursion "/tmp"
3880 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3881 (alist-delete
3882 'check
4f9ff21e
RW
3883 (alist-cons-after
3884 'unpack 'fix-tests
3885 (lambda _
3886 (substitute* "scipy/integrate/tests/test_quadpack.py"
3887 (("libm.so") "libm.so.6"))
3888 #t)
3889 %standard-phases)))))))
bb986599
FB
3890 (home-page "http://www.scipy.org/")
3891 (synopsis "The Scipy library provides efficient numerical routines")
3892 (description "The SciPy library is one of the core packages that make up
3893the SciPy stack. It provides many user-friendly and efficient numerical
3894routines such as routines for numerical integration and optimization.")
3f641af0 3895 (license license:bsd-3)))
bb986599 3896
764c077b 3897(define-public python2-scipy
57b7b8cd 3898 (package-with-python2 python-scipy))
bb986599 3899
73acc193 3900(define-public python-socksipy-branch
3901 (package
3902 (name "python-socksipy-branch")
3903 (version "1.01")
3904 (source
3905 (origin
3906 (method url-fetch)
3907 (uri (pypi-uri "SocksiPy-branch" version))
3908 (sha256
3909 (base32
3910 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3911 (build-system python-build-system)
3912 (arguments
3913 `(#:tests? #f)) ; There are no tests
3914 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3915 (synopsis "Python SOCKS module")
3916 (description
3917 "SocksiPy - A Python SOCKS client module. It provides a
3918socket-like interface that supports connections to any TCP
3919service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3920The original version was developed by Dan Haim, this is a
3921branch created by Mario Vilas to address some open issues,
3922as the original project seems to have been abandoned circa 2007.")
3923 (license license:bsd-3)))
3924
3925(define-public python2-socksipy-branch
3926 (package-with-python2 python-socksipy-branch))
3927
94914805
EB
3928(define-public python-sqlalchemy
3929 (package
3930 (name "python-sqlalchemy")
a4ba286b 3931 (version "1.0.12")
94914805
EB
3932 (source
3933 (origin
3934 (method url-fetch)
3935 (uri (string-append "https://pypi.python.org/packages/source/S/"
3936 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3937 (sha256
3938 (base32
a4ba286b 3939 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3940 (build-system python-build-system)
3941 (native-inputs
3942 `(("python-cython" ,python-cython) ;for c extensions
3943 ("python-pytest" ,python-pytest)
3944 ("python-mock" ,python-mock))) ;for tests
3945 (arguments
3946 `(#:phases (alist-replace
3947 'check
3948 (lambda _ (zero? (system* "py.test")))
3949 %standard-phases)))
3950 (home-page "http://www.sqlalchemy.org")
3951 (synopsis "Database abstraction library")
3952 (description
3953 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3954gives application developers the full power and flexibility of SQL. It
3955provides a full suite of well known enterprise-level persistence patterns,
3956designed for efficient and high-performing database access, adapted into a
3957simple and Pythonic domain language.")
3f641af0 3958 (license license:x11)))
94914805
EB
3959
3960(define-public python2-sqlalchemy
3961 (package-with-python2 python-sqlalchemy))
c937562e 3962
4a093330
DM
3963(define-public python-pycodestyle
3964 (package
3965 (name "python-pycodestyle")
3966 (version "2.0.0")
3967 (source
3968 (origin
3969 (method url-fetch)
3970 (uri (pypi-uri "pycodestyle" version))
3971 (sha256
3972 (base32
3973 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3974 (build-system python-build-system)
3975 (home-page "https://pycodestyle.readthedocs.io/")
3976 (synopsis "Python style guide checker")
3977 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3978Python code against some of the style conventions in
3979@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3980 (license license:expat)
3981 (properties `((python2-variant . ,(delay python2-pycodestyle))))))
3982
3983(define-public python2-pycodestyle
3984 (let ((base (package-with-python2 (strip-python2-variant
3985 python-pycodestyle))))
3986 (package (inherit base)
3987 (native-inputs
3988 `(("python2-setuptools" ,python2-setuptools)
3989 ,@(package-native-inputs base))))))
b91912c4
DM
3990
3991(define-public python-orderedmultidict
3992 (package
3993 (name "python-orderedmultidict")
3994 (version "0.7.10")
3995 (source
3996 (origin
3997 (method url-fetch)
3998 (uri (pypi-uri "orderedmultidict" version))
3999 (sha256
4000 (base32
4001 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
4002 (build-system python-build-system)
4003 (arguments
4004 `(#:phases
4005 (modify-phases %standard-phases
4006 (add-after 'unpack 'fix-tests
4007 (lambda _
4008 ;; The package uses nosetest for running the tests.
4009 ;; Adding this initfile allows to run the test suite
4010 ;; without requiring nosetest.
4011 (zero? (system* "touch" "tests/__init__.py")))))))
4012 (propagated-inputs
4013 `(("python-six" ,python-six)))
4014 (native-inputs
4015 `(("python-pycodestyle" ,python-pycodestyle)))
4016 (home-page "https://github.com/gruns/orderedmultidict")
4017 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4018 (description "This package contains a library for ordered multivalue
4019dictionaries. A multivalue dictionary is a dictionary that can store
4020multiple values for the same key. An ordered multivalue dictionary is a
4021multivalue dictionary that retains the order of insertions and deletions.")
4022 (license license:unlicense)
4023 (properties `((python2-variant . ,(delay python2-orderedmultidict))))))
4024
4025(define-public python2-orderedmultidict
4026 (let ((base (package-with-python2 (strip-python2-variant
4027 python-orderedmultidict))))
4028 (package (inherit base)
4029 (native-inputs
4030 `(("python2-setuptools" ,python2-setuptools)
4031 ,@(package-native-inputs base))))))
9dede065
DM
4032
4033(define-public python-furl
4034 (package
4035 (name "python-furl")
4036 (version "0.5.6")
4037 (source
4038 (origin
4039 (method url-fetch)
4040 (uri (pypi-uri "furl" version))
4041 (sha256
4042 (base32
4043 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4044 (build-system python-build-system)
4045 (propagated-inputs
4046 `(("python-six" ,python-six)
4047 ("python-orderedmultidict" ,python-orderedmultidict)))
4048 (native-inputs
4049 `(("python-pycodestyle" ,python-pycodestyle)))
4050 (home-page "https://github.com/gruns/furl")
4051 (synopsis "URL manipulation in Python")
4052 (description "Furl provides an easy-to-use alternative to the
4053@code{urllib} and @code{urlparse} modules for manipulating URLs.")
4054 (license license:unlicense)
4055 (properties `((python2-variant . ,(delay python2-furl))))))
4056
4057(define-public python2-furl
4058 (let ((base (package-with-python2 (strip-python2-variant
4059 python-furl))))
4060 (package (inherit base)
4061 (native-inputs
4062 `(("python2-setuptools" ,python2-setuptools)
4063 ,@(package-native-inputs base))))))
462bf271
DM
4064
4065(define-public python-flask-babel
4066 (package
4067 (name "python-flask-babel")
4068 (version "0.11.1")
4069 (source
4070 (origin
4071 (method url-fetch)
4072 (uri (pypi-uri "Flask-Babel" version))
4073 (sha256
4074 (base32
4075 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4076 (build-system python-build-system)
4077 (propagated-inputs
4078 `(("python-flask" ,python-flask)
4079 ("python-babel" ,python-babel)
4080 ("python-jinja2" ,python-jinja2)
4081 ("python-pytz" ,python-pytz)))
4082 (home-page "https://github.com/python-babel/flask-babel")
4083 (synopsis "Add i18n/l10n support to Flask applications")
4084 (description "This package implements internationalization and localization
4085support for Flask. This is based on the Python babel module as well as pytz -
4086both of which are installed automatically if you install this library.")
4087 (license license:bsd-3)
4088 (properties `((python2-variant . ,(delay python2-flask-babel))))))
4089
4090(define-public python2-flask-babel
4091 (let ((base (package-with-python2 (strip-python2-variant
4092 python-flask-babel))))
4093 (package (inherit base)
4094 (native-inputs
4095 `(("python2-setuptools" ,python2-setuptools)
4096 ,@(package-native-inputs base))))))
4a093330 4097
de2966cf
EF
4098(define-public python-sqlalchemy-utils
4099 (package
4100 (name "python-sqlalchemy-utils")
4101 (version "0.32.9")
4102 (source
4103 (origin
4104 (method url-fetch)
4105 (uri (pypi-uri "SQLAlchemy-Utils" version))
4106 (sha256
4107 (base32
4108 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
4109 (build-system python-build-system)
c22b4f87 4110 (propagated-inputs
de2966cf
EF
4111 `(("python-six" ,python-six)
4112 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
4113 (native-inputs
4114 `(("python-pytest" ,python-pytest)))
de2966cf
EF
4115 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4116 (synopsis "Various utility functions for SQLAlchemy")
4117 (description
4118 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4119for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4120
4121You might also want to install the following optional dependencies:
4122@enumerate
4123@item @code{python-passlib}
4124@item @code{python-babel}
4125@item @code{python-cryptography}
4126@item @code{python-pytz}
4127@item @code{python-psycopg2}
4128@item @code{python-furl}
4129@item @code{python-flask-babel}
4130@end enumerate
4131")
de2966cf
EF
4132 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
4133 (license license:bsd-3)))
4134
4135(define-public python2-sqlalchemy-utils
4136 (let ((base (package-with-python2
4137 (strip-python2-variant python-sqlalchemy-utils))))
4138 (package (inherit base)
4139 (native-inputs
4140 `(("python2-setuptools" ,python2-setuptools)
4141 ,@(package-native-inputs base))))))
4142
af5a4602
CAW
4143(define-public python-alembic
4144 (package
4145 (name "python-alembic")
bb484529 4146 (version "0.8.7")
af5a4602
CAW
4147 (source
4148 (origin
4149 (method url-fetch)
4150 (uri (pypi-uri "alembic" version))
4151 (sha256
4152 (base32
bb484529 4153 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4154 (build-system python-build-system)
4155 (native-inputs
4156 `(("python-mock" ,python-mock)
4157 ("python-pytest-cov" ,python-pytest-cov)))
4158 (propagated-inputs
4159 `(("python-sqlalchemy" ,python-sqlalchemy)
4160 ("python-mako" ,python-mako)
4161 ("python-editor" ,python-editor)))
4162 (home-page "http://bitbucket.org/zzzeek/alembic")
4163 (synopsis
4164 "Database migration tool for SQLAlchemy")
4165 (description
4166 "Alembic is a lightweight database migration tool for usage with the
4167SQLAlchemy Database Toolkit for Python.")
4168 (license license:expat)
4169 (properties `((python2-variant . ,(delay python2-alembic))))))
4170
4171(define-public python2-alembic
4172 (let ((alembic (package-with-python2
4173 (strip-python2-variant python-alembic))))
4174 (package
4175 (inherit alembic)
4176 (native-inputs `(("python2-setuptools" ,python2-setuptools)
4177 ,@(package-native-inputs alembic))))))
4178
1671c07c
EB
4179(define-public python-distutils-extra
4180 (package
4181 (name "python-distutils-extra")
4182 (version "2.38")
4183 (source
4184 (origin
4185 (method url-fetch)
4186 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4187 version "/+download/python-distutils-extra-"
4188 version ".tar.gz"))
4189 (sha256
4190 (base32
4191 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4192 (build-system python-build-system)
4193 (native-inputs
4194 `(("python-setuptools" ,python-setuptools)))
4195 (home-page "https://launchpad.net/python-distutils-extra/")
4196 (synopsis "Enhancements to Python's distutils")
4197 (description
4198 "The python-distutils-extra module enables you to easily integrate
4199gettext support, themed icons, and scrollkeeper-based documentation into
4200Python's distutils.")
3f641af0 4201 (license license:gpl2)))
1671c07c
EB
4202
4203(define-public python2-distutils-extra
4204 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4205
4206(define-public python2-elib.intl
4207 (package
4208 (name "python2-elib.intl")
4209 (version "0.0.3")
4210 (source
4211 (origin
4212 ;; This project doesn't tag releases or publish tarballs, so we take
4213 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4214 (method git-fetch)
4215 (uri (git-reference
4216 (url "https://github.com/dieterv/elib.intl.git")
4217 (commit "d09997cfef")))
4218 (sha256
4219 (base32
4220 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4221 (build-system python-build-system)
4222 (native-inputs
4223 `(("python2-setuptools" ,python2-setuptools)))
4224 (arguments
4225 ;; incompatible with Python 3 (exception syntax)
4226 `(#:python ,python-2
4227 #:tests? #f
4228 ;; With standard flags, the install phase attempts to create a zip'd
4229 ;; egg file, and fails with an error: 'ZIP does not support timestamps
4230 ;; before 1980'
4231 #:configure-flags '("--single-version-externally-managed"
4232 "--record=elib.txt")))
4233 (home-page "https://github.com/dieterv/elib.intl")
4234 (synopsis "Enhanced internationalization for Python")
4235 (description
4236 "The elib.intl module provides enhanced internationalization (I18N)
4237services for your Python modules and applications.")
3f641af0 4238 (license license:lgpl3+)))
ea5456c8 4239
c937562e
EB
4240(define-public python-pillow
4241 (package
4242 (name "python-pillow")
aba5182c 4243 (version "3.3.3")
c937562e
EB
4244 (source
4245 (origin
4246 (method url-fetch)
f1d9231d 4247 (uri (pypi-uri "Pillow" version))
c937562e
EB
4248 (sha256
4249 (base32
aba5182c 4250 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4251 (build-system python-build-system)
4252 (native-inputs
4253 `(("python-setuptools" ,python-setuptools)
4254 ("python-nose" ,python-nose)))
4255 (inputs
5ff408d9
SB
4256 `(("freetype" ,freetype)
4257 ("lcms" ,lcms)
c937562e
EB
4258 ("zlib" ,zlib)
4259 ("libjpeg" ,libjpeg)
4260 ("openjpeg" ,openjpeg)
5ff408d9
SB
4261 ("libtiff" ,libtiff)
4262 ("libwebp" ,libwebp)))
c937562e
EB
4263 (propagated-inputs
4264 `(;; Used at runtime for pkg_resources
4265 ("python-setuptools" ,python-setuptools)))
4266 (arguments
e5358a6b
LC
4267 `(#:phases (modify-phases %standard-phases
4268 (add-before
4269 'install 'disable-egg-compression
4270 (lambda _
4271 ;; Leave the .egg uncompressed since compressing it would
4272 ;; prevent the GC from identifying run-time dependencies.
4273 ;; See <http://bugs.gnu.org/20765>.
4274 (let ((port (open-file "setup.cfg" "a")))
4275 (display "\n[easy_install]\nzip_ok = 0\n"
4276 port)
4277 (close-port port)
4278 #t)))
4279 (add-after
4280 'install 'check-installed
4281 (lambda _
4282 (begin
4283 (setenv "HOME" (getcwd))
4284 (and (zero? (system* "python" "selftest.py"
4285 "--installed"))
4286 (zero? (system* "python" "test-installed.py"))))))
4287 (delete 'check))))
c937562e
EB
4288 (home-page "https://pypi.python.org/pypi/Pillow")
4289 (synopsis "Fork of the Python Imaging Library")
4290 (description
4291 "The Python Imaging Library adds image processing capabilities to your
4292Python interpreter. This library provides extensive file format support, an
4293efficient internal representation, and fairly powerful image processing
4294capabilities. The core image library is designed for fast access to data
4295stored in a few basic pixel formats. It should provide a solid foundation for
4296a general image processing tool.")
3f641af0 4297 (license (license:x11-style
c937562e
EB
4298 "http://www.pythonware.com/products/pil/license.htm"
4299 "The PIL Software License"))))
4300
4301(define-public python2-pillow
4302 (package-with-python2 python-pillow))
bb986599 4303
a415f036
FB
4304(define-public python-pycparser
4305 (package
4306 (name "python-pycparser")
38eb6919 4307 (version "2.14")
a415f036
FB
4308 (source
4309 (origin
4310 (method url-fetch)
38eb6919 4311 (uri (pypi-uri "pycparser" version))
a415f036
FB
4312 (sha256
4313 (base32
38eb6919 4314 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4315 (outputs '("out" "doc"))
4316 (build-system python-build-system)
4317 (native-inputs
4318 `(("pkg-config" ,pkg-config)
4319 ("python-setuptools" ,python-setuptools)))
4320 (arguments
89b5c60e 4321 `(#:phases
a415f036
FB
4322 (alist-replace
4323 'check
4324 (lambda _
4325 (with-directory-excursion "tests"
4326 (zero? (system* "python" "all_tests.py"))))
4327 (alist-cons-after
4328 'install 'install-doc
4329 (lambda* (#:key outputs #:allow-other-keys)
4330 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4331 (doc (string-append data "/doc/" ,name "-" ,version))
4332 (examples (string-append doc "/examples")))
4333 (mkdir-p examples)
4334 (for-each (lambda (file)
4335 (copy-file (string-append "." file)
4336 (string-append doc file)))
4337 '("/README.rst" "/CHANGES" "/LICENSE"))
4338 (copy-recursively "examples" examples)))
4339 %standard-phases))))
4340 (home-page "https://github.com/eliben/pycparser")
4341 (synopsis "C parser in Python")
4342 (description
4343 "Pycparser is a complete parser of the C language, written in pure Python
4344using the PLY parsing library. It parses C code into an AST and can serve as
4345a front-end for C compilers or analysis tools.")
3f641af0 4346 (license license:bsd-3)))
a415f036
FB
4347
4348(define-public python2-pycparser
4349 (package-with-python2 python-pycparser))
57c3f716
FB
4350
4351(define-public python-cffi
4352 (package
4353 (name "python-cffi")
2d3a437c 4354 (version "1.4.2")
57c3f716
FB
4355 (source
4356 (origin
4357 (method url-fetch)
2d3a437c 4358 (uri (pypi-uri "cffi" version))
89b5c60e 4359 (sha256
2d3a437c 4360 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4361 (build-system python-build-system)
4362 (outputs '("out" "doc"))
4363 (inputs
4364 `(("libffi" ,libffi)))
4365 (propagated-inputs ; required at run-time
4366 `(("python-pycparser" ,python-pycparser)))
4367 (native-inputs
4368 `(("pkg-config" ,pkg-config)
4369 ("python-sphinx" ,python-sphinx)
4179f952 4370 ("python-pytest" ,python-pytest)
57c3f716
FB
4371 ("python-setuptools" ,python-setuptools)))
4372 (arguments
4179f952 4373 `(#:phases
57c3f716
FB
4374 (alist-cons-after
4375 'install 'install-doc
4376 (lambda* (#:key outputs #:allow-other-keys)
4377 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4378 (doc (string-append data "/doc/" ,name "-" ,version))
4379 (html (string-append doc "/html")))
4380 (with-directory-excursion "doc"
4381 (system* "make" "html")
4382 (mkdir-p html)
4383 (copy-recursively "build/html" html))
4384 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4385 %standard-phases)))
4386 (home-page "http://cffi.readthedocs.org")
4387 (synopsis "Foreign function interface for Python")
4388 (description
4389 "Foreign Function Interface for Python calling C code.")
bd3fa666 4390 (license license:expat)))
57c3f716
FB
4391
4392(define-public python2-cffi
4393 (package-with-python2 python-cffi))
6fa14469
FB
4394
4395(define-public python-xcffib
4396 (package
4397 (name "python-xcffib")
4398 (version "0.1.9")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (string-append "https://pypi.python.org/packages/source/x/"
4403 "xcffib/xcffib-" version ".tar.gz"))
4404 (sha256
4405 (base32
4406 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4407 (build-system python-build-system)
4408 (inputs
4409 `(("libxcb" ,libxcb)
4410 ("python-six" ,python-six)))
4411 (native-inputs
4412 `(("python-setuptools" ,python-setuptools)))
4413 (propagated-inputs
4414 `(("python-cffi" ,python-cffi))) ; used at run time
4415 (arguments
89b5c60e 4416 `(#:phases
6fa14469
FB
4417 (alist-cons-after
4418 'install 'install-doc
4419 (lambda* (#:key outputs #:allow-other-keys)
4420 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4421 "/doc/" ,name "-" ,version)))
4422 (mkdir-p doc)
4423 (copy-file "README.md"
4424 (string-append doc "/README.md"))))
4425 %standard-phases)))
4426 (home-page "https://github.com/tych0/xcffib")
4427 (synopsis "XCB Python bindings")
4428 (description
4429 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4430support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4431 (license license:expat)))
6fa14469
FB
4432
4433(define-public python2-xcffib
4434 (package-with-python2 python-xcffib))
4435
9e099723
FB
4436(define-public python-cairocffi
4437 (package
4438 (name "python-cairocffi")
4439 (version "0.6")
4440 (source
4441 (origin
4442 (method url-fetch)
4443 ;; The archive on pypi is missing the 'utils' directory!
4444 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4445 version ".tar.gz"))
f586c877 4446 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4447 (sha256
4448 (base32
4449 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4450 (build-system python-build-system)
4451 (outputs '("out" "doc"))
4452 (inputs
4453 `(("gdk-pixbuf" ,gdk-pixbuf)
4454 ("cairo" ,cairo)))
4455 (native-inputs
4456 `(("pkg-config" ,pkg-config)
4457 ("python-sphinx" ,python-sphinx)
4458 ("python-docutils" ,python-docutils)
4459 ("python-setuptools" ,python-setuptools)))
4460 (propagated-inputs
4461 `(("python-xcffib" ,python-xcffib))) ; used at run time
4462 (arguments
89b5c60e 4463 `(#:phases
9e099723
FB
4464 (alist-cons-after
4465 'install 'install-doc
4466 (lambda* (#:key inputs outputs #:allow-other-keys)
4467 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4468 (doc (string-append data "/doc/" ,name "-" ,version))
4469 (html (string-append doc "/html")))
89b5c60e 4470 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4471 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4472 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4473 (setenv "LANG" "en_US.UTF-8")
4474 (mkdir-p html)
4475 (for-each (lambda (file)
4476 (copy-file (string-append "." file)
4477 (string-append doc file)))
4478 '("/README.rst" "/CHANGES" "/LICENSE"))
4479 (system* "python" "setup.py" "build_sphinx")
4480 (copy-recursively "docs/_build/html" html)))
4481 %standard-phases)))
4482 (home-page "https://github.com/SimonSapin/cairocffi")
4483 (synopsis "Python bindings and object-oriented API for Cairo")
4484 (description
4485 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4486Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4487graphics library with support for multiple backends including image buffers,
4488PNG, PostScript, PDF, and SVG file output.")
3f641af0 4489 (license license:bsd-3)))
9e099723
FB
4490
4491(define-public python2-cairocffi
4492 (package-with-python2 python-cairocffi))
4493
3cff95cb
RW
4494(define-public python-decorator
4495 (package
4496 (name "python-decorator")
eb6e2e81 4497 (version "4.0.9")
3cff95cb
RW
4498 (source
4499 (origin
4500 (method url-fetch)
e21338be 4501 (uri (pypi-uri "decorator" version))
3cff95cb 4502 (sha256
eb6e2e81 4503 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4504 (build-system python-build-system)
4505 (arguments '(#:tests? #f)) ; no test target
4506 (native-inputs
4507 `(("python-setuptools" ,python-setuptools)))
eb6e2e81 4508 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4509 (synopsis "Python module to simplify usage of decorators")
4510 (description
4511 "The aim of the decorator module is to simplify the usage of decorators
4512for the average programmer, and to popularize decorators usage giving examples
4513of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4514etc. The core of this module is a decorator factory.")
4515 (license license:expat)))
4516
4517(define-public python2-decorator
4518 (package-with-python2 python-decorator))
4519
2c0499ad
RW
4520(define-public python-drmaa
4521 (package
4522 (name "python-drmaa")
4523 (version "0.7.6")
4524 (source
4525 (origin
4526 (method url-fetch)
4527 (uri (string-append
4528 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4529 version ".tar.gz"))
4530 (sha256
4531 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4532 (build-system python-build-system)
4533 ;; The test suite requires libdrmaa which is provided by the cluster
4534 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4535 ;; should be set to the path of the libdrmaa library.
4536 (arguments '(#:tests? #f))
4537 (native-inputs
4538 `(("python-nose" ,python-nose)
4539 ("python-setuptools" ,python-setuptools)))
4540 (home-page "https://pypi.python.org/pypi/drmaa")
4541 (synopsis "Python bindings for the DRMAA library")
4542 (description
4543 "A Python package for Distributed Resource Management (DRM) job
4544submission and control. This package is an implementation of the DRMAA 1.0
4545Python language binding specification.")
3f641af0 4546 (license license:bsd-3)))
2c0499ad
RW
4547
4548(define-public python2-drmaa
4549 (package-with-python2 python-drmaa))
4550
d05c6da0
RW
4551(define-public python-gridmap
4552 (package
4553 (name "python-gridmap")
4554 (version "0.13.0")
4555 (source
4556 (origin
4557 (method url-fetch)
4558 (uri (string-append
4559 "https://github.com/pygridtools/gridmap/archive/v"
4560 version ".tar.gz"))
4561 (file-name (string-append name "-" version ".tar.gz"))
4562 (sha256
4563 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4564 (build-system python-build-system)
4565 (inputs
4566 `(("python-psutil" ,python-psutil)
4567 ("python-drmaa" ,python-drmaa)
4568 ("python-pyzmq" ,python-pyzmq)))
4569 (native-inputs
4570 `(("python-setuptools" ,python-setuptools)))
4571 (home-page "https://github.com/pygridtools/gridmap")
4572 (synopsis "Create jobs on a cluster directly from Python")
4573 (description
4574 "Gridmap is a Python package to allow you to easily create jobs on the
4575cluster directly from Python. You can directly map Python functions onto the
4576cluster without needing to write any wrapper code yourself.")
3f641af0 4577 (license license:gpl3+)))
d05c6da0
RW
4578
4579(define-public python2-gridmap
4580 (package-with-python2 python-gridmap))
4581
cb6d5c54
RW
4582(define-public python-pexpect
4583 (package
4584 (name "python-pexpect")
4585 (version "3.3")
4586 (source
4587 (origin
4588 (method url-fetch)
4589 (uri (string-append "https://pypi.python.org/packages/source/p/"
4590 "pexpect/pexpect-" version ".tar.gz"))
4591 (sha256
4592 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4593 (build-system python-build-system)
4594 (arguments
4595 `(#:phases
4596 (modify-phases %standard-phases
4597 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4598 (native-inputs
4599 `(("python-nose" ,python-nose)))
4600 (home-page "http://pexpect.readthedocs.org/")
4601 (synopsis "Controlling interactive console applications")
4602 (description
4603 "Pexpect is a pure Python module for spawning child applications;
4604controlling them; and responding to expected patterns in their output.
4605Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4606child application and control it as if a human were typing commands.")
3f641af0 4607 (license license:isc)))
cb6d5c54
RW
4608
4609(define-public python2-pexpect
4610 (package-with-python2 python-pexpect))
4611
229ad120
RW
4612(define-public python-setuptools-scm
4613 (package
4614 (name "python-setuptools-scm")
42d6d0d0 4615 (version "1.11.1")
229ad120
RW
4616 (source (origin
4617 (method url-fetch)
383af6b0 4618 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4619 (sha256
4620 (base32
42d6d0d0 4621 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120 4622 (build-system python-build-system)
383af6b0 4623 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4624 (home-page "https://github.com/pypa/setuptools_scm/")
4625 (synopsis "Manage Python package versions in SCM metadata")
4626 (description
383af6b0 4627 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4628@dfn{software configuration management} (SCM) metadata instead of declaring
4629them as the version argument or in a SCM managed file.")
4630 (license license:expat)))
4631
4632(define-public python2-setuptools-scm
4633 (package-with-python2 python-setuptools-scm))
4634
b74270ee
RW
4635(define-public python-pathpy
4636 (package
4637 (name "python-pathpy")
4638 (version "8.1.1")
4639 (source
4640 (origin
4641 (method url-fetch)
4642 (uri (string-append "https://pypi.python.org/packages/source/p/"
4643 "path.py/path.py-" version ".tar.gz"))
4644 (sha256
4645 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4646 (build-system python-build-system)
4647 (propagated-inputs
4648 `(("python-appdirs" ,python-appdirs)))
4649 (native-inputs
553b709b
EF
4650 `(("python-setuptools" ,python-setuptools)
4651 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4652 ("python-pytest" ,python-pytest)
4653 ("python-pytest-runner" ,python-pytest-runner)))
4654 (home-page "http://github.com/jaraco/path.py")
4655 (synopsis "Python module wrapper for built-in os.path")
4656 (description
4657 "@code{path.py} implements path objects as first-class entities, allowing
4658common operations on files to be invoked on those path objects directly.")
4659 (license license:expat)))
4660
4661(define-public python2-pathpy
4662 (package-with-python2 python-pathpy))
4663
0d34e01b
RW
4664(define-public python-pickleshare
4665 (package
4666 (name "python-pickleshare")
4667 (version "0.5")
4668 (source
4669 (origin
4670 (method url-fetch)
4671 (uri (string-append "https://pypi.python.org/packages/source/p/"
4672 "pickleshare/pickleshare-" version ".tar.gz"))
4673 (sha256
4674 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4675 (build-system python-build-system)
4676 (propagated-inputs
4677 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4678 (native-inputs
4679 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4680 (home-page "https://github.com/vivainio/pickleshare")
4681 (synopsis "Tiny key value database with concurrency support")
4682 (description
4683 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4684Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4685shelve, many processes can access the database simultaneously. Changing a
4686value in database is immediately visible to other processes accessing the same
4687database. Concurrency is possible because the values are stored in separate
4688files. Hence the “database” is a directory where all files are governed by
4689PickleShare.")
4690 (license license:expat)))
4691
4692(define-public python2-pickleshare
4693 (package-with-python2 python-pickleshare))
4694
cd6e5189
RW
4695(define-public python-simplegeneric
4696 (package
4697 (name "python-simplegeneric")
4698 (version "0.8.1")
4699 (source
4700 (origin
4701 (method url-fetch)
4702 (uri (string-append "https://pypi.python.org/packages/source/s/"
4703 "simplegeneric/simplegeneric-" version ".zip"))
4704 (sha256
4705 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4706 (build-system python-build-system)
4707 (native-inputs
69b96e5e
RW
4708 `(("python-setuptools" ,python-setuptools)
4709 ("unzip" ,unzip)))
cd6e5189
RW
4710 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4711 (synopsis "Python module for simple generic functions")
4712 (description
4713 "The simplegeneric module lets you define simple single-dispatch generic
4714functions, akin to Python’s built-in generic functions like @code{len()},
4715@code{iter()} and so on. However, instead of using specially-named methods,
4716these generic functions use simple lookup tables, akin to those used by
4717e.g. @code{pickle.dump()} and other generic functions found in the Python
4718standard library.")
3f641af0 4719 (license license:zpl2.1)))
cd6e5189
RW
4720
4721(define-public python2-simplegeneric
4722 (package-with-python2 python-simplegeneric))
4723
ddc7d8ed
RW
4724(define-public python-ipython-genutils
4725 (package
4726 (name "python-ipython-genutils")
4727 (version "0.1.0")
4728 (source
4729 (origin
4730 (method url-fetch)
4731 (uri (string-append "https://pypi.python.org/packages/source/i/"
4732 "ipython_genutils/ipython_genutils-"
4733 version ".tar.gz"))
4734 (sha256
4735 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4736 (build-system python-build-system)
4737 (arguments `(#:tests? #f)) ; no tests
4738 (home-page "http://ipython.org")
4739 (synopsis "Vestigial utilities from IPython")
4740 (description
4741 "This package provides retired utilities from IPython.")
3f641af0 4742 (license license:bsd-3)))
ddc7d8ed
RW
4743
4744(define-public python2-ipython-genutils
4745 (package-with-python2 python-ipython-genutils))
4746
2b10eb48
RW
4747(define-public python-traitlets
4748 (package
4749 (name "python-traitlets")
a5ba1481 4750 (version "4.2.0")
2b10eb48
RW
4751 (source
4752 (origin
4753 (method url-fetch)
cc0c4fde 4754 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4755 (sha256
4756 (base32
a5ba1481 4757 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4758 (build-system python-build-system)
4759 (arguments
4760 `(#:phases
4761 (modify-phases %standard-phases
4762 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4763 (propagated-inputs
4764 `(("python-ipython-genutils" ,python-ipython-genutils)
4765 ("python-decorator" ,python-decorator)))
4766 (native-inputs
cc0c4fde
EF
4767 `(("python-mock" ,python-mock)
4768 ("python-nose" ,python-nose)))
2b10eb48
RW
4769 (home-page "http://ipython.org")
4770 (synopsis "Configuration system for Python applications")
4771 (description
4772 "Traitlets is a framework that lets Python classes have attributes with
4773type checking, dynamically calculated default values, and ‘on change’
4774callbacks. The package also includes a mechanism to use traitlets for
4775configuration, loading values from files or from command line arguments. This
4776is a distinct layer on top of traitlets, so you can use traitlets in your code
4777without using the configuration machinery.")
3f641af0 4778 (license license:bsd-3)))
2b10eb48
RW
4779
4780(define-public python2-traitlets
4781 (package-with-python2 python-traitlets))
4782
4263b06f
RW
4783(define-public python-jupyter-core
4784 (package
4785 (name "python-jupyter-core")
4786 (version "4.2.0")
4787 (source
4788 (origin
4789 (method url-fetch)
4790 (uri (string-append (pypi-uri "jupyter_core" version)))
4791 (sha256
4792 (base32
4793 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4794 (build-system python-build-system)
4795 ;; FIXME: not sure how to run the tests
4796 (arguments `(#:tests? #f))
4797 (propagated-inputs
4798 `(("python-traitlets" ,python-traitlets)))
4799 (home-page "http://jupyter.org/")
4800 (synopsis "Jupyter base package")
4801 (description
4802 "Jupyter core is the base package on which Jupyter projects rely.")
4803 (license license:bsd-3)))
4804
4805(define-public python2-jupyter-core
4806 (package-with-python2 python-jupyter-core))
4807
9ff01f2d
RW
4808(define-public python-jupyter-client
4809 (package
4810 (name "python-jupyter-client")
4811 (version "4.4.0")
4812 (source
4813 (origin
4814 (method url-fetch)
4815 (uri (pypi-uri "jupyter_client" version))
4816 (sha256
4817 (base32
4818 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4819 (build-system python-build-system)
4820 ;; Tests fail because of missing native python kernel which I assume is
4821 ;; provided by the ipython package, which we cannot use because it would
4822 ;; cause a dependency cycle.
4823 (arguments `(#:tests? #f))
4824 (propagated-inputs
4825 `(("python-pyzmq" ,python-pyzmq)
4826 ("python-traitlets" ,python-traitlets)
4827 ("python-jupyter-core" ,python-jupyter-core)))
4828 (home-page "http://jupyter.org/")
4829 (synopsis "Jupyter protocol implementation and client libraries")
4830 (description
4831 "The @code{jupyter_client} package contains the reference implementation
4832of the Jupyter protocol. It also provides client and kernel management APIs
4833for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4834installing @code{kernelspec}s for use with Jupyter frontends.")
4835 (license license:bsd-3)))
4836
4837(define-public python2-jupyter-client
4838 (package-with-python2 python-jupyter-client))
4839
ab526102
RW
4840(define-public python-ipykernel
4841 (package
4842 (name "python-ipykernel")
4843 (version "4.5.0")
4844 (source
4845 (origin
4846 (method url-fetch)
4847 (uri (pypi-uri "ipykernel" version))
4848 (sha256
4849 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4850 (build-system python-build-system)
4851 ;; The tests load a submodule of IPython. However, IPython itself depends
4852 ;; on ipykernel.
4853 (arguments `(#:tests? #f))
4854 (propagated-inputs
4855 ;; imported at runtime during connect
4856 `(("python-jupyter-client" ,python-jupyter-client)))
4857 (home-page "http://ipython.org")
4858 (synopsis "IPython Kernel for Jupyter")
4859 (description
4860 "This package provides the IPython kernel for Jupyter.")
4861 (license license:bsd-3)))
4862
4863(define-public python2-ipykernel
4864 (package-with-python2 python-ipykernel))
4865
5ff6effc
RW
4866(define-public python-testpath
4867 (package
4868 (name "python-testpath")
4869 (version "0.2")
4870 (source
4871 (origin
4872 (method url-fetch)
4873 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4874 version ".tar.gz"))
4875 (file-name (string-append name "-" version ".tar.gz"))
4876 (sha256
4877 (base32
4878 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4879 (build-system python-build-system)
4880 (arguments
4881 `(#:tests? #f ; this package does not even have a setup.py
4882 #:phases
4883 (modify-phases %standard-phases
4884 (delete 'install)
4885 (replace 'build
4886 (lambda* (#:key inputs outputs #:allow-other-keys)
4887 (let ((dir (string-append
4888 (assoc-ref outputs "out")
4889 "/lib/python"
4890 (string-take (string-take-right
4891 (assoc-ref inputs "python") 5) 3)
4892 "/site-packages/testpath")))
4893 (mkdir-p dir)
4894 (copy-recursively "testpath" dir))
4895 #t)))))
4896 (home-page "https://github.com/takluyver/testpath")
4897 (synopsis "Test utilities for code working with files and commands")
4898 (description
4899 "Testpath is a collection of utilities for Python code working with files
4900and commands. It contains functions to check things on the filesystem, and
4901tools for mocking system commands and recording calls to those.")
4902 (license license:expat)))
4903
4904(define-public python2-testpath
4905 (package-with-python2 python-testpath))
4906
ae1ab9fe
FB
4907(define-public python-ipython
4908 (package
4909 (name "python-ipython")
accd5f99 4910 (version "4.0.0")
ae1ab9fe
FB
4911 (source
4912 (origin
fceac880 4913 (method url-fetch)
accd5f99 4914 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4915 (sha256
accd5f99 4916 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
ae1ab9fe
FB
4917 (build-system python-build-system)
4918 (outputs '("out" "doc"))
3a0b1b9a
FB
4919 (propagated-inputs
4920 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4921 ("python-terminado" ,python-terminado)
ae1ab9fe 4922 ("python-matplotlib" ,python-matplotlib)
5d26e542 4923 ("python-numpy" ,python-numpy)
ae1ab9fe 4924 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4925 ("python-jinja2" ,python-jinja2)
4926 ("python-mistune" ,python-mistune)
accd5f99
RW
4927 ("python-pexpect" ,python-pexpect)
4928 ("python-pickleshare" ,python-pickleshare)
4929 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4930 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4931 ("python-traitlets" ,python-traitlets)
4932 ("python-ipykernel" ,python-ipykernel)
4933 ("python-pygments" ,python-pygments)))
4934 (inputs
4935 `(("readline" ,readline)
4936 ("which" ,which)))
ae1ab9fe
FB
4937 (native-inputs
4938 `(("pkg-config" ,pkg-config)
accd5f99
RW
4939 ("python-requests" ,python-requests) ;; for tests
4940 ("python-testpath" ,python-testpath)
4941 ("python-nose" ,python-nose)
ae1ab9fe
FB
4942 ("python-sphinx" ,python-sphinx)
4943 ("texlive" ,texlive)
4944 ("texinfo" ,texinfo)
4945 ("python-setuptools" ,python-setuptools)))
4946 (arguments
89b5c60e 4947 `(#:phases
3a0b1b9a
FB
4948 (modify-phases %standard-phases
4949 (add-after
4950 'install 'install-doc
4951 (lambda* (#:key inputs outputs #:allow-other-keys)
4952 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4953 (doc (string-append data "/doc/" ,name "-" ,version))
4954 (html (string-append doc "/html"))
4955 (man1 (string-append data "/man/man1"))
4956 (info (string-append data "/info"))
4957 (examples (string-append doc "/examples")))
afd3d931 4958 (setenv "LANG" "en_US.utf8")
3a0b1b9a 4959 (with-directory-excursion "docs"
accd5f99
RW
4960 ;; FIXME: pdf fails to build
4961 ;;(system* "make" "pdf" "PAPER=a4")
4962 (system* "make" "html")
3a0b1b9a
FB
4963 (system* "make" "info"))
4964 (copy-recursively "docs/man" man1)
4965 (copy-recursively "examples" examples)
accd5f99 4966 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4967 ;; (copy-file "docs/build/latex/ipython.pdf"
4968 ;; (string-append doc "/ipython.pdf"))
4969 (mkdir-p info)
4970 (copy-file "docs/build/texinfo/ipython.info"
4971 (string-append info "/ipython.info"))
4972 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4973 ;; Tests can only be run after the library has been installed and not
4974 ;; within the source directory.
4975 (delete 'check)
4976 (add-after
4977 'install 'check
4978 (lambda* (#:key outputs tests? #:allow-other-keys)
4979 (if tests?
4980 (with-directory-excursion "/tmp"
4981 (setenv "HOME" "/tmp/") ;; required by a test
4982 (zero? (system* (string-append (assoc-ref outputs "out")
4983 "/bin/iptest"))))
4984 #t)))
4985 (add-before
4986 'install 'fix-tests
4987 (lambda* (#:key inputs #:allow-other-keys)
4988 (substitute* "./IPython/utils/_process_posix.py"
4989 (("/usr/bin/env', 'which") (which "which")))
4990 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4991 (("#!/usr/bin/env python")
4992 (string-append "#!" (which "python"))))
4993 ;; Disable 1 failing test
4994 (substitute* "./IPython/core/tests/test_magic.py"
4995 (("def test_dirops\\(\\):" all)
4996 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4997 (home-page "http://ipython.org")
4998 (synopsis "IPython is a tool for interactive computing in Python")
4999 (description
5000 "IPython provides a rich architecture for interactive computing with:
5001Powerful interactive shells, a browser-based notebook, support for interactive
5002data visualization, embeddable interpreters and tools for parallel
5003computing.")
135ba811
EF
5004 (license license:bsd-3)
5005 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5006
5007(define-public python2-ipython
135ba811 5008 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5009 (package
5010 (inherit ipython)
5011 ;; FIXME: some tests are failing
5012 (arguments
5013 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 5014 ;; FIXME: add pyreadline once available.
89b5c60e 5015 (inputs
135ba811
EF
5016 `(("python2-mock" ,python2-mock)
5017 ,@(package-inputs ipython))))))
03411993
AE
5018
5019(define-public python-isodate
5020 (package
5021 (name "python-isodate")
b6785c2e 5022 (version "0.5.4")
03411993
AE
5023 (source
5024 (origin
5025 (method url-fetch)
b6785c2e 5026 (uri (pypi-uri "isodate" version))
03411993
AE
5027 (sha256
5028 (base32
b6785c2e 5029 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993
AE
5030 (build-system python-build-system)
5031 (inputs
5032 `(("python-setuptools" ,python-setuptools)))
5033 (home-page
5034 "http://cheeseshop.python.org/pypi/isodate")
5035 (synopsis
5036 "Python date parser and formatter")
5037 (description
5038 "Python-isodate is a python module for parsing and formatting
5039ISO 8601 dates, time and duration.")
3f641af0 5040 (license license:bsd-3)))
03411993
AE
5041
5042(define-public python2-isodate
5043 (package-with-python2 python-isodate))
673ab897
AE
5044
5045(define-public python-html5lib
5046 (package
5047 (name "python-html5lib")
fee04c19 5048 (version "1.0b8")
673ab897
AE
5049 (source
5050 (origin
5051 (method url-fetch)
fee04c19 5052 (uri (pypi-uri "html5lib" version))
673ab897
AE
5053 (sha256
5054 (base32
fee04c19 5055 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 5056 (build-system python-build-system)
3dd75476
AE
5057 (propagated-inputs
5058 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
5059 (inputs
5060 `(("python-setuptools" ,python-setuptools)))
5061 (arguments
5062 `(#:test-target "check"))
5063 (home-page
5064 "https://github.com/html5lib/html5lib-python")
5065 (synopsis
5066 "Python HTML parser based on the WHATWG HTML specifcation")
5067 (description
5068 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5069and written in Python.")
bd3fa666 5070 (license license:expat)))
673ab897
AE
5071
5072(define-public python2-html5lib
5073 (package-with-python2 python-html5lib))
e99f4211 5074
8ee62c97
RW
5075;; Needed for python-bleach, a dependency of python-notebook
5076(define-public python-html5lib-0.9
5077 (package
5078 (inherit python-html5lib)
5079 (version "0.999")
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (pypi-uri "html5lib" version))
5084 (sha256
5085 (base32
5086 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5087
5088(define-public python2-html5lib-0.9
5089 (package-with-python2 python-html5lib-0.9))
5090
e99f4211
MW
5091(define-public python-urwid
5092 (package
5093 (name "python-urwid")
51ff41f6 5094 (version "1.3.1")
e99f4211
MW
5095 (source
5096 (origin
5097 (method url-fetch)
b97c1bfd 5098 (uri (pypi-uri "urwid" version))
e99f4211
MW
5099 (sha256
5100 (base32
51ff41f6 5101 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5102 (build-system python-build-system)
b97c1bfd
LF
5103 (arguments
5104 `(#:phases
5105 (modify-phases %standard-phases
5106 ;; Disable failing test. Bug filed upstream:
5107 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5108 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5109 (add-after 'unpack 'disable-failing-test
5110 (lambda _
5111 (substitute* "urwid/tests/test_event_loops.py"
5112 (("test_remove_watch_file")
5113 "disable_remove_watch_file")))))))
e99f4211
MW
5114 (native-inputs `(("python-setuptools" ,python-setuptools)))
5115 (home-page "http://urwid.org")
5116 (synopsis "Console user interface library for Python")
5117 (description
5118 "Urwid is a curses-based UI/widget library for Python. It includes many
5119features useful for text console applications.")
3f641af0 5120 (license license:lgpl2.1+)))
e99f4211
MW
5121
5122(define-public python2-urwid
5123 (package-with-python2 python-urwid))
d95a56c6 5124
47d0b292
TS
5125(define-public python-urwidtrees
5126 (package
5127 (name "python-urwidtrees")
37ec4623 5128 (version "1.0.2")
47d0b292
TS
5129 (source
5130 (origin
5131 (method url-fetch)
37ec4623
TS
5132 ;; package author intends on distributing via github rather than pypi:
5133 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5134 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5135 version ".tar.gz"))
5136 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5137 (sha256
5138 (base32
37ec4623 5139 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5140 (build-system python-build-system)
5141 (arguments
5142 '(#:tests? #f)) ; no tests
5143 (inputs `(("python-urwid" ,python-urwid)))
5144 (home-page "https://github.com/pazz/urwidtrees")
5145 (synopsis "Tree widgets for urwid")
5146 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5147toolkit. Use it to build trees of widgets.")
3f641af0 5148 (license license:gpl3+)))
47d0b292
TS
5149
5150(define-public python2-urwidtrees
5151 (package-with-python2 python-urwidtrees))
5152
d95a56c6
PAR
5153(define-public python-dbus
5154 (package
5155 (name "python-dbus")
5156 (version "1.2.0")
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (string-append
5cc3096c 5161 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5162 version ".tar.gz"))
5163 (sha256
5164 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5165 (build-system gnu-build-system)
6717c879
SB
5166 (arguments
5167 '(#:phases
5168 (modify-phases %standard-phases
5169 (add-before
5170 'check 'pre-check
5171 (lambda _
5172 ;; XXX: For the missing '/etc/machine-id'.
5173 (substitute* "test/run-test.sh"
5174 (("DBUS_FATAL_WARNINGS=1")
5175 "DBUS_FATAL_WARNINGS=0"))
5176 #t)))))
d95a56c6
PAR
5177 (native-inputs
5178 `(("pkg-config" ,pkg-config)))
5179 (inputs
5180 `(("python" ,python)
2e88d113 5181 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5182 (synopsis "Python bindings for D-bus")
5183 (description "python-dbus provides bindings for libdbus, the reference
5184implementation of D-Bus.")
5185 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5186 (license license:expat)))
b52af02b
MW
5187
5188(define-public python2-dbus
5189 (package (inherit python-dbus)
5190 (name "python2-dbus")
5191 (inputs `(("python" ,python-2)
5192 ,@(alist-delete "python"
5193 (package-inputs python-dbus)
5194 equal?)))
5195 ;; FIXME: on Python 2, the test_utf8 fails with:
5196 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5197 (arguments `(#:tests? #f))))
a6ac8332
AE
5198
5199(define-public python-apsw
5200 (package
5201 (name "python-apsw")
917708c2 5202 (version "3.9.2-r1")
a6ac8332
AE
5203 (source
5204 (origin
5205 (method url-fetch)
917708c2 5206 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5207 (sha256
5208 (base32
917708c2 5209 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5210 (build-system python-build-system)
5211 (inputs
5212 `(("python-setuptools" ,python-setuptools)
5213 ("sqlite" ,sqlite)))
5214 (arguments
5215 `(#:phases
5216 ;; swap check and install phases
5217 (alist-cons-after
5218 'install 'check
5219 (assoc-ref %standard-phases 'check)
5220 (alist-delete
5221 'check
5222 %standard-phases))))
5223 (home-page "https://github.com/rogerbinns/apsw/")
5224 (synopsis "Another Python SQLite Wrapper")
5225 (description "APSW is a Python wrapper for the SQLite
5226embedded relational database engine. In contrast to other wrappers such as
5227pysqlite it focuses on being a minimal layer over SQLite attempting just to
5228translate the complete SQLite API into Python.")
abde5f37 5229 (license license:zlib)))
a6ac8332
AE
5230
5231(define-public python2-apsw
5232 (package-with-python2 python-apsw))
26b307e2
AE
5233
5234(define-public python-lxml
5235 (package
5236 (name "python-lxml")
d58a3203 5237 (version "3.6.0")
26b307e2
AE
5238 (source
5239 (origin
5240 (method url-fetch)
97bbc480 5241 (uri (pypi-uri "lxml" version))
26b307e2 5242 (sha256
d58a3203
EF
5243 (base32
5244 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5245 (build-system python-build-system)
5246 (inputs
5247 `(("libxml2" ,libxml2)
5248 ("libxslt" ,libxslt)
5249 ("python-setuptools" ,python-setuptools)))
5250 (home-page "http://lxml.de/")
5251 (synopsis
5252 "Python XML processing library")
5253 (description
5254 "The lxml XML toolkit is a Pythonic binding for the C libraries
5255libxml2 and libxslt.")
3f641af0 5256 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5257
5258(define-public python2-lxml
5259 (package-with-python2 python-lxml))
4ed20663 5260
b32a1e47
CAW
5261;; beautifulsoup4 has a totally different namespace than 3.x,
5262;; and pypi seems to put it under its own name, so I guess we should too
5263(define-public python-beautifulsoup4
5264 (package
5265 (name "python-beautifulsoup4")
67fd4a12 5266 (version "4.5.1")
b32a1e47
CAW
5267 (source
5268 (origin
5269 (method url-fetch)
5270 (uri (pypi-uri "beautifulsoup4" version))
5271 (sha256
5272 (base32
67fd4a12 5273 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5274 (build-system python-build-system)
5f37f0b6
LF
5275 (arguments
5276 `(#:phases
5277 (modify-phases %standard-phases
5278 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5279 ;; must use this conversion script when building with Python 3. The
5280 ;; conversion script also runs the tests.
5281 ;; For more information, see the file 'convert-py3k' in the source
5282 ;; distribution.
5283 (replace 'check
5284 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5285 (home-page
5286 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5287 (synopsis
5288 "Python screen-scraping library")
5289 (description
5290 "Beautiful Soup is a Python library designed for rapidly setting up
5291screen-scraping projects. It offers Pythonic idioms for navigating,
5292searching, and modifying a parse tree, providing a toolkit for
5293dissecting a document and extracting what you need. It automatically
5294converts incoming documents to Unicode and outgoing documents to UTF-8.")
5295 (license license:expat)
5296 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5297
5298(define-public python2-beautifulsoup4
5299 (package
5300 (inherit (package-with-python2
5301 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6
LF
5302 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
5303 (arguments `(#:python ,python-2))))
b32a1e47 5304
092e86f5
AE
5305(define-public python2-cssutils
5306 (package
5307 (name "python2-cssutils")
58d1d816 5308 (version "1.0.1")
092e86f5
AE
5309 (source
5310 (origin
5311 (method url-fetch)
58d1d816 5312 (uri (pypi-uri "cssutils" version))
092e86f5 5313 (sha256
58d1d816
EF
5314 (base32
5315 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5316 (build-system python-build-system)
5317 (native-inputs
5318 `(("python2-mock" ,python2-mock) ; for the tests
5319 ("unzip" ,unzip))) ; for unpacking the source
5320 (inputs
5321 `(("python2-setuptools" ,python2-setuptools)))
5322 (arguments
5323 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5324 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5325 ))
092e86f5
AE
5326 (home-page "http://cthedot.de/cssutils/")
5327 (synopsis
5328 "CSS Cascading Style Sheets library for Python")
5329 (description
5330 "Cssutils is a Python package for parsing and building CSS
5331Cascading Style Sheets. Currently it provides a DOM only and no rendering
5332options.")
3f641af0 5333 (license license:lgpl3+)))
880ff77c
AE
5334
5335(define-public python-cssselect
5336 (package
5337 (name "python-cssselect")
d5ccd9ab 5338 (version "0.9.2")
880ff77c
AE
5339 (source
5340 (origin
5341 (method url-fetch)
d5ccd9ab 5342 (uri (pypi-uri "cssselect" version))
880ff77c 5343 (sha256
d5ccd9ab
EF
5344 (base32
5345 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c
AE
5346 (build-system python-build-system)
5347 (inputs
5348 `(("python-setuptools" ,python-setuptools)))
5349 (arguments
5350 ;; tests fail with message
5351 ;; AttributeError: 'module' object has no attribute 'tests'
5352 `(#:tests? #f))
5353 (home-page
5354 "https://pythonhosted.org/cssselect/")
5355 (synopsis
5356 "CSS3 selector parser and translator to XPath 1.0")
5357 (description
5358 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5359them to XPath 1.0 expressions. Such expressions can be used in lxml or
5360another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5361 (license license:bsd-3)))
880ff77c
AE
5362
5363(define-public python2-cssselect
5364 (package-with-python2 python-cssselect))
60357f99
AE
5365
5366(define-public python-netifaces
5367 (package
5368 (name "python-netifaces")
5369 (version "0.10.4")
5370 (source
5371 (origin
5372 (method url-fetch)
5373 (uri (string-append
5374 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5375 version
5376 ".tar.gz"))
5377 (sha256
5378 (base32
5379 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5380 (build-system python-build-system)
5381 (inputs
5382 `(("python-setuptools" ,python-setuptools)))
5383 (home-page
5384 "https://bitbucket.org/al45tair/netifaces")
5385 (synopsis
5386 "Python module for portable network interface information")
5387 (description
5388 "Netifaces is a Python module providing information on network
5389interfaces in an easy and portable manner.")
5390 (license license:expat)))
5391
5392(define-public python2-netifaces
5393 (package-with-python2 python-netifaces))
92cb152b 5394
32f77c04
RW
5395(define-public python-networkx
5396 (package
5397 (name "python-networkx")
a4d9609c 5398 (version "1.11")
32f77c04
RW
5399 (source
5400 (origin
5401 (method url-fetch)
a4d9609c 5402 (uri (pypi-uri "networkx" version))
32f77c04 5403 (sha256
a4d9609c 5404 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5405 (build-system python-build-system)
5406 ;; python-decorator is needed at runtime
5407 (propagated-inputs
5408 `(("python-decorator" ,python-decorator)))
5409 (native-inputs
5410 `(("python-setuptools" ,python-setuptools)
5411 ("python-nose" ,python-nose)))
5412 (home-page "http://networkx.github.io/")
5413 (synopsis "Python module for creating and manipulating graphs and networks")
5414 (description
5415 "NetworkX is a Python package for the creation, manipulation, and study
5416of the structure, dynamics, and functions of complex networks.")
3f641af0 5417 (license license:bsd-3)))
32f77c04
RW
5418
5419(define-public python2-networkx
5420 (package-with-python2 python-networkx))
5421
92cb152b
RW
5422(define-public snakemake
5423 (package
5424 (name "snakemake")
5425 (version "3.2.1")
5426 (source
5427 (origin
5428 (method url-fetch)
5429 (uri (string-append
5430 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5431 version ".tar.gz"))
5432 (sha256
5433 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5434 (build-system python-build-system)
5435 (inputs `(("python-setuptools" ,python-setuptools)))
5436 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5437 (synopsis "Python-based execution environment for make-like workflows")
5438 (description
5439 "Snakemake aims to reduce the complexity of creating workflows by
5440providing a clean and modern domain specific specification language (DSL) in
5441Python style, together with a fast and comfortable execution environment.")
5442 (license license:expat)))
a1920bc9 5443
35de1fbd
RW
5444(define-public python-seaborn
5445 (package
5446 (name "python-seaborn")
fc899d4f 5447 (version "0.7.0")
35de1fbd
RW
5448 (source
5449 (origin
5450 (method url-fetch)
fc899d4f 5451 (uri (pypi-uri "seaborn" version))
35de1fbd 5452 (sha256
fc899d4f 5453 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5454 (build-system python-build-system)
5455 (propagated-inputs
5456 `(("python-pandas" ,python-pandas)
5457 ("python-matplotlib" ,python-matplotlib)
5458 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5459 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5460 (synopsis "Statistical data visualization")
5461 (description
5462 "Seaborn is a library for making attractive and informative statistical
5463graphics in Python. It is built on top of matplotlib and tightly integrated
5464with the PyData stack, including support for numpy and pandas data structures
5465and statistical routines from scipy and statsmodels.")
3f641af0 5466 (license license:bsd-3)
fc899d4f 5467 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5468
5469(define-public python2-seaborn
fc899d4f
EF
5470 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5471 (package
5472 (inherit base)
5473 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5474 ,@(package-propagated-inputs base)))
5475 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5476 ,@(package-native-inputs base))))))
35de1fbd 5477
90fc547f
RW
5478(define-public python-sympy
5479 (package
5480 (name "python-sympy")
5481 (version "0.7.6")
5482 (source
5483 (origin
5484 (method url-fetch)
5485 (uri (string-append
5486 "https://github.com/sympy/sympy/releases/download/sympy-"
5487 version "/sympy-" version ".tar.gz"))
5488 (sha256
5489 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5490 (build-system python-build-system)
5491 (native-inputs
5492 `(("python-setuptools" ,python-setuptools)))
5493 (home-page "http://www.sympy.org/")
5494 (synopsis "Python library for symbolic mathematics")
5495 (description
5496 "SymPy is a Python library for symbolic mathematics. It aims to become a
5497full-featured computer algebra system (CAS) while keeping the code as simple
5498as possible in order to be comprehensible and easily extensible.")
3f641af0 5499 (license license:bsd-3)))
90fc547f
RW
5500
5501(define-public python2-sympy
5502 (package-with-python2 python-sympy))
5503
e8c9b010
SR
5504(define-public python-q
5505 (package
5506 (name "python-q")
5507 (version "2.6")
5508 (source
5509 (origin
5510 (method url-fetch)
5511 (uri (pypi-uri "q" version))
5512 (sha256
5513 (base32
5514 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5515 (build-system python-build-system)
5516 (home-page "https://github.com/zestyping/q")
5517 (synopsis "Quick-and-dirty debugging output for tired programmers")
5518 (description
5519 "q is a Python module for \"print\" style of debugging Python code. It
5520provides convenient short API for print out of values, tracebacks, and
5521falling into the Python interpreter.")
5522 (license license:asl2.0)
5523 (properties `((python2-variant . ,(delay python2-q))))))
5524
5525(define-public python2-q
5526 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5527 (package
5528 (inherit base)
5529 (native-inputs
5530 `(("python2-setuptools" ,python2-setuptools)
5531 ,@(package-native-inputs base))))))
5532
a1920bc9
FB
5533(define-public python-testlib
5534 (package
5535 (name "python-testlib")
5536 (version "0.6.5")
5537 (source
5538 (origin
5539 (method url-fetch)
5540 (uri (string-append
5541 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5542 version ".zip"))
5543 (sha256
5544 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5545 (build-system python-build-system)
5546 (inputs
5547 `(("python-setuptools" ,python-setuptools)))
5548 (native-inputs
5549 `(("unzip" ,unzip)))
5550 (arguments
5551 `(#:phases
5552 (alist-replace
5553 'unpack
5554 (lambda* (#:key inputs outputs #:allow-other-keys)
5555 (let ((unzip (string-append (assoc-ref inputs "unzip")
5556 "/bin/unzip"))
5557 (source (assoc-ref inputs "source")))
5558 (and (zero? (system* unzip source))
5559 (chdir (string-append "testlib-" ,version)))))
5560 %standard-phases)))
5561 (synopsis "Python micro test suite harness")
5562 (description "A micro unittest suite harness for Python.")
5563 (home-page "https://github.com/trentm/testlib")
1cb9c006 5564 (license license:expat)))
a1920bc9
FB
5565
5566(define-public python2-testlib
5567 (package-with-python2 python-testlib))
db62afa5
LC
5568
5569(define-public python2-xlib
5570 (package
5571 (name "python2-xlib")
5572 (version "0.14")
5573 (source (origin
5574 (method url-fetch)
de67e922
LF
5575 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5576 "/" version "/"
db62afa5
LC
5577 "python-xlib-" version ".tar.gz"))
5578 (sha256
5579 (base32
5580 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5581 (build-system python-build-system)
5582 (arguments
5583 `(#:python ,python-2 ;Python 2 only
5584 #:tests? #f)) ;no tests
5585 (inputs
5586 `(("python-setuptools" ,python-setuptools)))
5587 (home-page "http://python-xlib.sourceforge.net/")
5588 (synopsis "Python X11 client library")
5589 (description
5590 "The Python X Library is intended to be a fully functional X client
5591library for Python programs. It is useful to implement low-level X clients.
5592It is written entirely in Python.")
3f641af0 5593 (license license:gpl2+)))
0234ca06
DT
5594
5595(define-public python-singledispatch
5596 (package
5597 (name "python-singledispatch")
5598 (version "3.4.0.3")
5599 (source
5600 (origin
5601 (method url-fetch)
bdb67d84 5602 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5603 (sha256
5604 (base32
5605 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5606 (build-system python-build-system)
5607 (native-inputs
5608 `(("python-setuptools" ,python-setuptools)))
bdb67d84 5609 (inputs
0234ca06
DT
5610 `(("python-six" ,python-six)))
5611 (home-page
5612 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5613 (synopsis "Backport of singledispatch feature from Python 3.4")
5614 (description
5615 "This library brings functools.singledispatch from Python 3.4 to Python
56162.6-3.3.")
5617 (license license:expat)))
5618
5619(define-public python2-singledispatch
5620 (package-with-python2 python-singledispatch))
feaae484 5621
310d218f
RW
5622(define-public python-tornado
5623 (package
5624 (name "python-tornado")
a724924b 5625 (version "4.3")
310d218f
RW
5626 (source
5627 (origin
5628 (method url-fetch)
a724924b 5629 (uri (pypi-uri "tornado" version))
310d218f 5630 (sha256
a724924b 5631 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5632 (build-system python-build-system)
310d218f 5633 (native-inputs
b455439b
EF
5634 `(("python-certifi" ,python-certifi)))
5635 (inputs
5636 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5637 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5638 (synopsis "Python web framework and asynchronous networking library")
5639 (description
5640 "Tornado is a Python web framework and asynchronous networking library,
5641originally developed at FriendFeed. By using non-blocking network I/O,
5642Tornado can scale to tens of thousands of open connections, making it ideal
5643for long polling, WebSockets, and other applications that require a long-lived
5644connection to each user.")
3f641af0 5645 (license license:asl2.0)
b455439b 5646 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5647
5648(define-public python2-tornado
b455439b 5649 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f
RW
5650 (package (inherit tornado)
5651 (inputs
5652 `(("python2-backport-ssl-match-hostname"
5653 ,python2-backport-ssl-match-hostname)
b455439b
EF
5654 ("python2-singledispatch" ,python2-singledispatch)
5655 ,@(package-inputs tornado)))
5656 (native-inputs
5657 `(("python2-setuptools" ,python2-setuptools)
5658 ,@(package-native-inputs tornado))))))
310d218f 5659
6b59fc10
EF
5660;; the python- version can be removed with python-3.5
5661(define-public python-backports-abc
5662 (package
5663 (name "python-backports-abc")
5664 (version "0.4")
5665 (source
5666 (origin
5667 (method url-fetch)
5668 (uri (pypi-uri "backports_abc" version))
5669 (sha256
5670 (base32
5671 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5672 (build-system python-build-system)
5673 (inputs
5674 `(("python-setuptools" ,python-setuptools)))
5675 (home-page "https://github.com/cython/backports_abc")
66e07664 5676 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5677 (description
5678 "Python-backports-abc provides a backport of additions to the
5679'collections.abc' module in Python-3.5.")
3f641af0 5680 (license license:psfl)))
6b59fc10
EF
5681
5682(define-public python2-backports-abc
5683 (package-with-python2 python-backports-abc))
5684
feaae484
SB
5685(define-public python-waf
5686 (package
5687 (name "python-waf")
7dd55dfe 5688 (version "1.9.5")
feaae484
SB
5689 (source (origin
5690 (method url-fetch)
bae67829 5691 (uri (string-append "https://waf.io/"
feaae484
SB
5692 "waf-" version ".tar.bz2"))
5693 (sha256
5694 (base32
7dd55dfe 5695 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5696 (build-system python-build-system)
5697 (arguments
5698 '(#:phases
5699 (modify-phases %standard-phases
5700 (replace 'build
7dd55dfe
EF
5701 (lambda _
5702 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5703 (replace 'check
7dd55dfe
EF
5704 (lambda _
5705 (zero? (system* "python" "waf" "--version"))))
feaae484 5706 (replace 'install
7dd55dfe
EF
5707 (lambda _
5708 (copy-file "waf" %output))))))
5709 (home-page "http://waf.io/")
feaae484
SB
5710 (synopsis "Python-based build system")
5711 (description
5712 "Waf is a Python-based framework for configuring, compiling and installing
5713applications.")
3f641af0 5714 (license license:bsd-3)))
feaae484
SB
5715
5716(define-public python2-waf
5717 (package-with-python2 python-waf))
45203542
RW
5718
5719(define-public python-pyzmq
5720 (package
5721 (name "python-pyzmq")
3655ee76 5722 (version "15.1.0")
45203542
RW
5723 (source
5724 (origin
5725 (method url-fetch)
3655ee76 5726 (uri (pypi-uri "pyzmq" version))
45203542 5727 (sha256
3655ee76 5728 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5729 (build-system python-build-system)
5730 (arguments
5731 `(#:configure-flags
5732 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5733 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5734 ;; --inplace' for 'python setup.py test' to work.
5735 #:tests? #f))
5736 (inputs
5737 `(("zeromq" ,zeromq)))
5738 (native-inputs
5739 `(("pkg-config" ,pkg-config)
5740 ("python-nose" ,python-nose)
5741 ("python-setuptools" ,python-setuptools)))
5742 (home-page "http://github.com/zeromq/pyzmq")
5743 (synopsis "Python bindings for 0MQ")
5744 (description
5745 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5746 (license license:bsd-4)))
45203542
RW
5747
5748(define-public python2-pyzmq
5749 (package-with-python2 python-pyzmq))
d889e6c4
CR
5750
5751(define-public python-pep8
5752 (package
5753 (name "python-pep8")
db251311 5754 (version "1.7.0")
d889e6c4
CR
5755 (source
5756 (origin
5757 (method url-fetch)
db251311 5758 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5759 (sha256
5760 (base32
db251311 5761 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4
CR
5762 (build-system python-build-system)
5763 (inputs
5764 `(("python-setuptools" ,python-setuptools)))
5765 (home-page "http://pep8.readthedocs.org/")
5766 (synopsis "Python style guide checker")
5767 (description
5768 "This tools checks Python code against some of the style conventions in
5769PEP 8.")
5770 (license license:expat)))
5771
5772(define-public python2-pep8
5773 (package-with-python2 python-pep8))
e31d7f44
CR
5774
5775(define-public python-pyflakes
5776 (package
5777 (name "python-pyflakes")
2abc3972 5778 (version "1.0.0")
e31d7f44
CR
5779 (source
5780 (origin
5781 (method url-fetch)
2abc3972 5782 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5783 (sha256
5784 (base32
2abc3972 5785 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5786 (build-system python-build-system)
5787 (inputs
5788 `(("python-setuptools" ,python-setuptools)))
5789 (home-page
5790 "https://github.com/pyflakes/pyflakes")
5791 (synopsis "Passive checker of Python programs")
5792 (description
5793 "Pyflakes statically checks Python source code for common errors.")
5794 (license license:expat)))
a59e017c 5795
7261d9eb
CR
5796(define-public python2-pyflakes
5797 (package-with-python2 python-pyflakes))
5798
a59e017c
CR
5799(define-public python-mccabe
5800 (package
5801 (name "python-mccabe")
c6ebd40d 5802 (version "0.4.0")
a59e017c
CR
5803 (source
5804 (origin
5805 (method url-fetch)
c6ebd40d 5806 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5807 (sha256
5808 (base32
c6ebd40d 5809 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c
CR
5810 (build-system python-build-system)
5811 (inputs
c6ebd40d
EF
5812 `(("python-pytest" ,python-pytest)
5813 ("python-pytest-runner" ,python-pytest-runner)
5814 ("python-setuptools" ,python-setuptools)))
a59e017c
CR
5815 (home-page "https://github.com/flintwork/mccabe")
5816 (synopsis "McCabe checker, plugin for flake8")
5817 (description
5818 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5819complexity of Python source code.")
7362371d 5820 (license license:expat)))
a59e017c
CR
5821
5822(define-public python2-mccabe
5823 (package-with-python2 python-mccabe))
e8df8f47 5824
7477fbb1
CR
5825(define-public python-mccabe-0.2.1
5826 (package (inherit python-mccabe)
5827 (version "0.2.1")
5828 (source
5829 (origin
5830 (method url-fetch)
5831 (uri (pypi-uri "mccabe" version))
5832 (sha256
5833 (base32
c6ebd40d 5834 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
b3546174 5835 (inputs `(("python-setuptools" ,python-setuptools)))))
7477fbb1
CR
5836
5837(define-public python2-mccabe-0.2.1
5838 (package-with-python2 python-mccabe-0.2.1))
5839
e8df8f47
CR
5840;; Flake8 2.4.1 requires an older version of pep8.
5841;; This should be removed ASAP.
5842(define-public python-pep8-1.5.7
5843 (package (inherit python-pep8)
5844 (version "1.5.7")
5845 (source
5846 (origin
5847 (method url-fetch)
5848 (uri (string-append
5849 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5850 version
5851 ".tar.gz"))
5852 (sha256
5853 (base32
5854 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5855
5856(define-public python2-pep8-1.5.7
5857 (package-with-python2 python-pep8-1.5.7))
5858
5859;; Flake8 2.4.1 requires an older version of pyflakes.
5860;; This should be removed ASAP.
5861(define-public python-pyflakes-0.8.1
5862 (package (inherit python-pyflakes)
5863 (version "0.8.1")
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (string-append
5868 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5869 version
5870 ".tar.gz"))
5871 (sha256
5872 (base32
5873 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5874
5875(define-public python2-pyflakes-0.8.1
7261d9eb 5876 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5877
5878(define-public python-flake8
5879 (package
5880 (name "python-flake8")
43789136 5881 (version "2.5.4")
e8df8f47
CR
5882 (source
5883 (origin
5884 (method url-fetch)
1b995533 5885 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5886 (sha256
5887 (base32
43789136 5888 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47
CR
5889 (build-system python-build-system)
5890 (inputs
5891 `(("python-setuptools" ,python-setuptools)
43789136
EF
5892 ("python-pep8" ,python-pep8)
5893 ("python-pyflakes" ,python-pyflakes)
e8df8f47
CR
5894 ("python-mccabe" ,python-mccabe)
5895 ("python-mock" ,python-mock)
5896 ("python-nose" ,python-nose)))
5897 (home-page "https://gitlab.com/pycqa/flake8")
5898 (synopsis
5899 "The modular source code checker: pep8, pyflakes and co")
5900 (description
5901 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5902 (license license:expat)))
5903
5904(define-public python2-flake8
5905 (package-with-python2 python-flake8))
61b9ac53 5906
abf21efc
CR
5907;; This will only be needed by the python-hacking package and will not be
5908;; necessary once python-hacking > 0.10.2 is released.
5909(define-public python-flake8-2.2.4
5910 (package (inherit python-flake8)
5911 (inputs
5912 `(("python-setuptools" ,python-setuptools)
5913 ("python-pep8" ,python-pep8-1.5.7)
5914 ("python-pyflakes" ,python-pyflakes-0.8.1)
5915 ("python-mccabe" ,python-mccabe-0.2.1)
5916 ("python-mock" ,python-mock)
5917 ("python-nose" ,python-nose)))
5918 (version "2.2.4")
5919 (source
5920 (origin
5921 (method url-fetch)
5922 (uri (pypi-uri "flake8" version))
5923 (sha256
5924 (base32
5925 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5926
5927(define-public python2-flake8-2.2.4
5928 (package-with-python2 python-flake8-2.2.4))
5929
61b9ac53
FB
5930(define-public python-mistune
5931 (package
5932 (name "python-mistune")
5933 (version "0.7")
5934 (source
5935 (origin
5936 (method url-fetch)
5937 (uri (string-append
5938 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5939 version
5940 ".tar.gz"))
5941 (sha256
5942 (base32
5943 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5944 (build-system python-build-system)
5945 (inputs
5946 `(("python-setuptools" ,python-setuptools)
5947 ("python-nose" ,python-nose)
5948 ("python-cython" ,python-cython)))
5949 (home-page "https://github.com/lepture/mistune")
5950 (synopsis "Markdown parser in pure Python")
5951 (description "This package provides a fast markdown parser in pure
5952Python.")
3f641af0 5953 (license license:bsd-3)))
61b9ac53
FB
5954
5955(define-public python2-mistune
5956 (package-with-python2 python-mistune))
6d992d07 5957
b9893908
EE
5958(define-public python-markdown
5959 (package
5960 (name "python-markdown")
5961 (version "2.6.5")
5962 (source
5963 (origin
5964 (method url-fetch)
5965 (uri (pypi-uri "Markdown" version))
5966 (sha256
5967 (base32
5968 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5969 (build-system python-build-system)
5970 (arguments
5971 `(#:phases
5972 (modify-phases %standard-phases
5973 (replace 'check
5974 (lambda _
5975 (zero? (system* "python" "run-tests.py")))))))
5976 (native-inputs
5977 `(("python-nose" ,python-nose)
5978 ("python-pyyaml" ,python-pyyaml)))
5979 (home-page "https://pythonhosted.org/Markdown/")
5980 (synopsis "Python implementation of Markdown")
5981 (description
5982 "This package provides a Python implementation of John Gruber's
5983Markdown. The library features international input, various Markdown
5984extensions, and several HTML output formats. A command line wrapper
5985markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5986 (license license:bsd-3)))
b9893908
EE
5987
5988(define-public python2-markdown
5989 (package-with-python2 python-markdown))
5990
6d992d07
FB
5991(define-public python-ptyprocess
5992 (package
5993 (name "python-ptyprocess")
5994 (version "0.5")
5995 (source
5996 (origin
5997 (method url-fetch)
5998 (uri (string-append
5999 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6000 version ".tar.gz"))
6001 (sha256
6002 (base32
6003 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6004 (build-system python-build-system)
6005 (inputs
6006 `(("python-setuptools" ,python-setuptools)
6007 ("python-nose" ,python-nose)))
6008 (arguments
6009 `(#:phases
6010 (modify-phases %standard-phases
6011 (replace 'check
6012 (lambda _
6013 (zero? (system* "nosetests")))))))
6014 (home-page "https://github.com/pexpect/ptyprocess")
6015 (synopsis "Run a subprocess in a pseudo terminal")
6016 (description
6017 "This package provides a Python library used to launch a subprocess in a
6018pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6019 (license license:isc)))
6d992d07
FB
6020
6021(define-public python2-ptyprocess
6022 (package-with-python2 python-ptyprocess))
4aadb1df
FB
6023
6024(define-public python-terminado
6025 (package
6026 (name "python-terminado")
783fb0a3 6027 (version "0.6")
4aadb1df
FB
6028 (source
6029 (origin
6030 (method url-fetch)
783fb0a3 6031 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6032 (sha256
6033 (base32
783fb0a3 6034 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6035 (build-system python-build-system)
6036 (propagated-inputs
6037 `(("python-tornado" ,python-tornado)
6038 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6039 (native-inputs
6040 `(("python-nose" ,python-nose)))
4aadb1df
FB
6041 (arguments
6042 `(#:phases
6043 (modify-phases %standard-phases
6044 (replace 'check
6045 (lambda _
6046 (zero? (system* "nosetests")))))))
6047 (home-page "https://github.com/takluyver/terminado")
6048 (synopsis "Terminals served to term.js using Tornado websockets")
6049 (description "This package provides a Tornado websocket backend for the
6050term.js Javascript terminal emulator library.")
3f641af0 6051 (license license:bsd-2)
783fb0a3 6052 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6053
6054(define-public python2-terminado
783fb0a3 6055 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6056 (package (inherit terminado)
783fb0a3
EF
6057 (propagated-inputs
6058 `(("python2-backport-ssl-match-hostname"
6059 ,python2-backport-ssl-match-hostname)
6060 ,@(package-propagated-inputs terminado)))
6061 (native-inputs
6062 `(("python2-setuptools" ,python2-setuptools)
6063 ,@(package-native-inputs terminado))))))
5faa5ce4 6064
d582eaac
SB
6065(define-public python-fonttools
6066 (package
6067 (name "python-fonttools")
6068 (version "2.5")
6069 (source (origin
6070 (method url-fetch)
6071 (uri (string-append
6072 "https://pypi.python.org/packages/source/F/FontTools/"
6073 "fonttools-" version ".tar.gz"))
6074 (sha256
6075 (base32
6076 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6077 (build-system python-build-system)
6078 (arguments '(#:test-target "check"))
6079 (propagated-inputs
6080 ;; XXX: module not found if setuptools is not available.
6081 `(("python-setuptools" ,python-setuptools)))
6082 (home-page "http://github.com/behdad/fonttools")
6083 (synopsis "Tools to manipulate font files")
6084 (description
6085 "FontTools/TTX is a library to manipulate font files from Python. It
6086supports reading and writinfg of TrueType/OpenType fonts, reading and writing
6087of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6088also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6089from an XML-based format.")
3f641af0
DC
6090 (license (license:non-copyleft
6091 "file://LICENSE.txt"
6092 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6093
6094(define-public python2-fonttools
6095 (package-with-python2 python-fonttools))
75710da6 6096
5faa5ce4
RW
6097(define-public python-ly
6098 (package
6099 (name "python-ly")
5135354f 6100 (version "0.9.4")
5faa5ce4
RW
6101 (source
6102 (origin
6103 (method url-fetch)
5135354f
RW
6104 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6105 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6106 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6107 (sha256
6108 (base32
5135354f 6109 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4
RW
6110 (build-system python-build-system)
6111 (native-inputs
6112 `(("python-setuptools" ,python-setuptools)))
6113 (synopsis "Tool and library for manipulating LilyPond files")
6114 (description "This package provides a Python library to parse, manipulate
6115or create documents in LilyPond format. A command line program ly is also
6116provided that can be used to do various manipulations with LilyPond files.")
6117 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6118 (license license:gpl2+)))
7e7b27d9
CR
6119
6120(define-public python-appdirs
6121 (package
6122 (name "python-appdirs")
6123 (version "1.4.0")
6124 (source
6125 (origin
6126 (method url-fetch)
6127 (uri (string-append
6128 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6129 version
6130 ".tar.gz"))
6131 (sha256
6132 (base32
6133 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6134 (build-system python-build-system)
6135 (inputs
6136 `(("python-setuptools" ,python-setuptools)))
6137 (home-page "http://github.com/ActiveState/appdirs")
6138 (synopsis
6139 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6140 (description
6141 "This module provides a portable way of finding out where user data
6142should be stored on various operating systems.")
6143 (license license:expat)))
6144
6145(define-public python2-appdirs
6146 (package-with-python2 python-appdirs))
89b2e0b0
LF
6147
6148(define-public python-llfuse
6149 (package
6150 (name "python-llfuse")
e36ace36 6151 (version "1.1.1")
89b2e0b0
LF
6152 (source (origin
6153 (method url-fetch)
6154 (uri (string-append
6155 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6156 "llfuse-" version ".tar.bz2"))
6157 (sha256
6158 (base32
e36ace36 6159 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6160 (build-system python-build-system)
6161 (inputs
6162 `(("fuse" ,fuse)
6163 ("attr" ,attr)))
6164 (native-inputs
6165 `(("pkg-config" ,pkg-config)
6166 ("python-setuptools" ,python-setuptools)))
6167 (synopsis "Python bindings for FUSE")
6168 (description
6169 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6170 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6171 (license license:lgpl2.0+)
cd0569c4 6172 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6173
6174(define-public python2-llfuse
cd0569c4
LF
6175 (package (inherit (package-with-python2
6176 (strip-python2-variant python-llfuse)))
6177 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6178
6179;; For attic-0.16
6180(define-public python-llfuse-0.41
6181 (package (inherit python-llfuse)
229b3661 6182 (version "0.41.1")
cd0569c4
LF
6183 (source (origin
6184 (method url-fetch)
6185 (uri (string-append
6186 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6187 "llfuse-" version ".tar.bz2"))
6188 (sha256
6189 (base32
229b3661 6190 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6191 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6192 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6193 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6194
6195(define-public python-msgpack
6196 (package
6197 (name "python-msgpack")
aed625bd 6198 (version "0.4.8")
641c9871
LF
6199 (source (origin
6200 (method url-fetch)
ae831df4 6201 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6202 (sha256
6203 (base32
aed625bd 6204 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6205 (build-system python-build-system)
641c9871
LF
6206 (synopsis "MessagePack (de)serializer")
6207 (description "MessagePack is a fast, compact binary serialization format,
6208suitable for similar data to JSON. This package provides CPython bindings for
6209reading and writing MessagePack data.")
6210 (home-page "https://pypi.python.org/pypi/msgpack-python/")
3f641af0 6211 (license license:asl2.0)
bd74be7b
LF
6212 (properties `((python2-variant . ,(delay python2-msgpack))))))
6213
6214(define-public python2-msgpack
6215 (package (inherit (package-with-python2
6216 (strip-python2-variant python-msgpack)))
6217 (native-inputs
6218 `(("python2-setuptools" ,python2-setuptools)))))
641c9871 6219
6e5e39f4
CR
6220(define-public python-netaddr
6221 (package
6222 (name "python-netaddr")
6223 (version "0.7.18")
6224 (source
6225 (origin
6226 (method url-fetch)
6227 (uri (string-append
6228 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6229 version
6230 ".tar.gz"))
6231 (sha256
6232 (base32
6233 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6234 (build-system python-build-system)
6235 (arguments `(#:tests? #f)) ;; No tests.
6236 (inputs
6237 `(("python-setuptools" ,python-setuptools)))
6238 (home-page "https://github.com/drkjam/netaddr/")
6239 (synopsis "Pythonic manipulation of network addresses")
6240 (description
6241 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6242and MAC network addresses.")
3f641af0 6243 (license license:bsd-3)))
6e5e39f4
CR
6244
6245(define-public python2-netaddr
6246 (package-with-python2 python-netaddr))
8c692a52
CR
6247
6248(define-public python-wrapt
6249 (package
6250 (name "python-wrapt")
6251 (version "1.10.5")
6252 (source
6253 (origin
6254 (method url-fetch)
6255 (uri (string-append
6256 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6257 version
6258 ".tar.gz"))
6259 (sha256
6260 (base32
6261 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6262 (build-system python-build-system)
6263 (arguments
6264 ;; Tests are not included in the tarball, they are only available in the
6265 ;; git repository.
6266 `(#:tests? #f))
6267 (inputs
6268 `(("python-setuptools" ,python-setuptools)))
6269 (home-page "https://github.com/GrahamDumpleton/wrapt")
6270 (synopsis "Module for decorators, wrappers and monkey patching")
6271 (description
6272 "The aim of the wrapt module is to provide a transparent object proxy for
6273 Python, which can be used as the basis for the construction of function
6274 wrappers and decorator functions.")
3f641af0 6275 (license license:bsd-2)))
8c692a52
CR
6276
6277(define-public python2-wrapt
6278 (package-with-python2 python-wrapt))
b85c85be
CR
6279
6280(define-public python-iso8601
6281 (package
6282 (name "python-iso8601")
fe84bc9a 6283 (version "0.1.11")
b85c85be
CR
6284 (source
6285 (origin
6286 (method url-fetch)
fe84bc9a 6287 (uri (pypi-uri "iso8601" version))
b85c85be 6288 (sha256
fe84bc9a
EF
6289 (base32
6290 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be
CR
6291 (build-system python-build-system)
6292 (inputs
6293 `(("python-setuptools" ,python-setuptools)))
6294 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6295 (synopsis "Module to parse ISO 8601 dates")
6296 (description
6297 "This module parses the most common forms of ISO 8601 date strings (e.g.
6298@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6299 (license license:expat)))
6300
6301(define-public python2-iso8601
6302 (package-with-python2 python-iso8601))
5e412b63
CR
6303
6304(define-public python-monotonic
6305 (package
6306 (name "python-monotonic")
6307 (version "0.3")
6308 (source
6309 (origin
6310 (method url-fetch)
6311 (uri (string-append
6312 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6313 version
6314 ".tar.gz"))
6315 (sha256
6316 (base32
6317 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6318 (build-system python-build-system)
6319 (inputs
6320 `(("python-setuptools" ,python-setuptools)))
6321 (home-page "https://github.com/atdt/monotonic")
6322 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6323 (description
6324 "This module provides a monotonic() function which returns the value (in
6325fractional seconds) of a clock which never goes backwards.")
3f641af0 6326 (license license:asl2.0)))
5e412b63
CR
6327
6328(define-public python2-monotonic
6329 (package-with-python2 python-monotonic))
de34afac
CR
6330
6331(define-public python-webob
6332 (package
6333 (name "python-webob")
b8834c21 6334 (version "1.5.1")
de34afac
CR
6335 (source
6336 (origin
6337 (method url-fetch)
b8834c21 6338 (uri (pypi-uri "WebOb" version))
de34afac
CR
6339 (sha256
6340 (base32
b8834c21 6341 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
6342 (build-system python-build-system)
6343 (inputs
6344 `(("python-nose" ,python-nose)
6345 ("python-setuptools" ,python-setuptools)))
6346 (home-page "http://webob.org/")
6347 (synopsis "WSGI request and response object")
6348 (description
6349 "WebOb provides wrappers around the WSGI request environment, and an
6350object to help create WSGI responses.")
6351 (license license:expat)))
6352
6353(define-public python2-webob
6354 (package-with-python2 python-webob))
350ba0a3 6355
02a8a187
BW
6356(define-public python-xlrd
6357 (package
6358 (name "python-xlrd")
c2ad4d70 6359 (version "1.0.0")
02a8a187
BW
6360 (source (origin
6361 (method url-fetch)
e775f48e 6362 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6363 (sha256
6364 (base32
c2ad4d70 6365 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6366 (build-system python-build-system)
6367 (arguments
6368 `(#:phases
6369 (modify-phases %standard-phases
c2ad4d70 6370 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6371 ;; run tests instead for now.
6372 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6373 (native-inputs `(("python-nose" ,python-nose)
6374 ("python-setuptools" ,python-setuptools)))
6375 (home-page "http://www.python-excel.org/")
6376 (synopsis "Library for extracting data from Excel files")
6377 (description "This packages provides a library to extract data from
c598e35c 6378spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6379@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6380Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6381 (license license:bsd-3)))
02a8a187
BW
6382
6383(define-public python2-xlrd
6384 (package-with-python2 python-xlrd))
6385
350ba0a3
CR
6386(define-public python-prettytable
6387 (package
6388 (name "python-prettytable")
6389 (version "0.7.2")
6390 (source
6391 (origin
6392 (method url-fetch)
6393 (uri (string-append
6394 "https://pypi.python.org/packages/source/P/PrettyTable/"
6395 "prettytable-" version ".tar.bz2"))
6396 (sha256
6397 (base32
6398 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6399 (build-system python-build-system)
6400 (inputs
6401 `(("python-setuptools" ,python-setuptools)))
6402 (home-page "http://code.google.com/p/prettytable/")
6403 (synopsis "Display tabular data in an ASCII table format")
6404 (description
6405 "A library designed to represent tabular data in visually appealing ASCII
6406tables. PrettyTable allows for selection of which columns are to be printed,
6407independent alignment of columns (left or right justified or centred) and
6408printing of sub-tables by specifying a row range.")
3f641af0 6409 (license license:bsd-3)))
350ba0a3
CR
6410
6411(define-public python2-prettytable
6412 (package-with-python2 python-prettytable))
7a8ac75a 6413
9f8ee3fe
RW
6414(define-public python-tables
6415 (package
6416 (name "python-tables")
6417 (version "3.2.2")
6418 (source
6419 (origin
6420 (method url-fetch)
6421 (uri (pypi-uri "tables" version))
6422 (sha256
6423 (base32
6424 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6425 (build-system python-build-system)
6426 (arguments
6427 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6428 ;; or "check", so we must override the build and check phases.
6429 #:phases
6430 (modify-phases %standard-phases
6431 (add-after 'unpack 'use-gcc
6432 (lambda _
6433 (substitute* "setup.py"
6434 (("compiler = new_compiler\\(\\)" line)
6435 (string-append line
6436 "\ncompiler.set_executables(compiler='gcc',"
6437 "compiler_so='gcc',"
6438 "linker_exe='gcc',"
6439 "linker_so='gcc -shared')")))
6440 #t))
6441 (replace 'build
6442 (lambda* (#:key inputs #:allow-other-keys)
6443 (zero? (system* "python" "setup.py" "build"
6444 (string-append "--hdf5="
6445 (assoc-ref inputs "hdf5"))))))
6446 (replace 'check
6447 (lambda* (#:key inputs #:allow-other-keys)
6448 (zero? (system* "python" "setup.py" "check"
6449 (string-append "--hdf5="
6450 (assoc-ref inputs "hdf5")))))))))
6451 (propagated-inputs
6452 `(("python-numexpr" ,python-numexpr)
6453 ("python-numpy" ,python-numpy)))
6454 (native-inputs
6455 `(("python-setuptools" ,python-setuptools)
6456 ("python-cython" ,python-cython)
6457 ("pkg-config" ,pkg-config)))
6458 (inputs
6459 `(("hdf5" ,hdf5)
6460 ("bzip2" ,bzip2)
6461 ("zlib" ,zlib)))
6462 (home-page "http://www.pytables.org/")
6463 (synopsis "Hierarchical datasets for Python")
6464 (description "PyTables is a package for managing hierarchical datasets and
6465designed to efficently cope with extremely large amounts of data.")
3f641af0 6466 (license license:bsd-3)))
9f8ee3fe
RW
6467
6468(define-public python2-tables
6469 (package-with-python2 python-tables))
6470
7a8ac75a
RW
6471(define-public python-pyasn1
6472 (package
6473 (name "python-pyasn1")
caa0edb3 6474 (version "0.1.9")
7a8ac75a
RW
6475 (source
6476 (origin
6477 (method url-fetch)
caa0edb3 6478 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6479 (sha256
6480 (base32
caa0edb3 6481 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6482 (build-system python-build-system)
6483 (home-page "http://pyasn1.sourceforge.net/")
6484 (synopsis "ASN.1 types and codecs")
6485 (description
6486 "This is an implementation of ASN.1 types and codecs in Python. It is
6487suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6488 (license license:bsd-2)))
7a8ac75a
RW
6489
6490(define-public python2-pyasn1
6491 (package-with-python2 python-pyasn1))
9a49a535 6492
5988c299
EF
6493(define-public python-pyasn1-modules
6494 (package
6495 (name "python-pyasn1-modules")
6496 (version "0.0.8")
6497 (source
6498 (origin
6499 (method url-fetch)
6500 (uri (pypi-uri "pyasn1-modules" version))
6501 (sha256
6502 (base32
6503 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6504 (build-system python-build-system)
6505 (native-inputs
6506 `(("python-setuptools" ,python-setuptools)))
6507 (propagated-inputs
6508 `(("python-pyasn1" ,python-pyasn1)))
6509 (home-page "http://sourceforge.net/projects/pyasn1/")
6510 (synopsis "ASN.1 codec implementations")
6511 (description
6512 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6513implementations of ASN.1-based codecs and protocols.")
3f641af0 6514 (license license:bsd-3)))
5988c299
EF
6515
6516(define-public python2-pyasn1-modules
6517 (package-with-python2 python-pyasn1-modules))
6518
520af157 6519(define-public python-ipaddress
9a49a535 6520 (package
520af157
DC
6521 (name "python-ipaddress")
6522 (version "1.0.16")
6523 (source (origin
6524 (method url-fetch)
6525 (uri (pypi-uri "ipaddress" version))
6526 (sha256
6527 (base32
6528 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6529 (build-system python-build-system)
9a49a535
RW
6530 (home-page "https://github.com/phihag/ipaddress")
6531 (synopsis "IP address manipulation library")
6532 (description
520af157
DC
6533 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6534 in Python. This library is used to create, poke at, and manipulate IPv4 and
6535 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6536 module to older versions of Python.")
6537 (license license:psfl)
6538 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6539
6540(define-public python2-ipaddress
6541 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6542 (package (inherit base)
6543 (native-inputs
6544 `(("python2-setuptools" ,python2-setuptools)
6545 ,@(package-native-inputs base))))))
3f00e078 6546
4a238186
HG
6547(define-public python2-ipaddr
6548 (package
6549 (name "python2-ipaddr")
6550 (version "2.1.11")
6551 (source
6552 (origin
6553 (method url-fetch)
6554 (uri (pypi-uri "ipaddr" version))
6555 (sha256
6556 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6557 (build-system python-build-system)
6558 (arguments
6559 `(#:python ,python-2 ;version 2 only
6560 #:phases
6561 (modify-phases %standard-phases
6562 (replace 'check
6563 (lambda* _
6564 (zero? (system* "python" "ipaddr_test.py")))))))
6565 (home-page "https://github.com/google/ipaddr-py")
6566 (synopsis "IP address manipulation library")
6567 (description
6568 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6569IPv6 addresses and networks.
6570
6571For new implementations you may prefer to use the standard module
6572@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6573versions of Python.")
3f641af0 6574 (license license:asl2.0)))
4a238186 6575
3f00e078
RW
6576(define-public python-idna
6577 (package
6578 (name "python-idna")
6579 (version "2.0")
6580 (source
6581 (origin
6582 (method url-fetch)
6583 (uri (string-append "https://pypi.python.org/packages/source/i/"
6584 "idna/idna-" version ".tar.gz"))
6585 (sha256
6586 (base32
6587 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6588 (build-system python-build-system)
6589 (native-inputs
6590 `(("python-setuptools" ,python-setuptools)))
6591 (home-page "https://github.com/kjd/idna")
6592 (synopsis "Internationalized domain names in applications")
6593 (description
6594 "This is a library to support the Internationalised Domain Names in
6595Applications (IDNA) protocol as specified in RFC 5891. This version of the
6596protocol is often referred to as “IDNA2008” and can produce different results
6597from the earlier standard from 2003. The library is also intended to act as a
6598suitable drop-in replacement for the “encodings.idna” module that comes with
6599the Python standard library but currently only supports the older 2003
6600specification.")
3f641af0 6601 (license license:bsd-4)))
3f00e078
RW
6602
6603(define-public python2-idna
6604 (package-with-python2 python-idna))
36ebf972
RW
6605
6606(define-public python-pretend
6607 (package
6608 (name "python-pretend")
6609 (version "1.0.8")
6610 (source
6611 (origin
6612 (method url-fetch)
6613 (uri (string-append "https://pypi.python.org/packages/source/p/"
6614 "pretend/pretend-" version ".tar.gz"))
6615 (sha256
6616 (base32
6617 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6618 (build-system python-build-system)
6619 (native-inputs
6620 `(("python-setuptools" ,python-setuptools)))
6621 (home-page "https://github.com/alex/pretend")
6622 (synopsis "Library for stubbing in Python")
6623 (description
6624 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6625technique for writing tests. You may hear the term mixed up with mocks,
6626fakes, or doubles. Basically, a stub is an object that returns pre-canned
6627responses, rather than doing any computation.")
3f641af0 6628 (license license:bsd-3)))
36ebf972
RW
6629
6630(define-public python2-pretend
6631 (package-with-python2 python-pretend))
aa759a51
RW
6632
6633(define-public python-cryptography-vectors
6634 (package
6635 (name "python-cryptography-vectors")
912dcbad 6636 (version "1.5.3")
aa759a51
RW
6637 (source
6638 (origin
6639 (method url-fetch)
9c509ca9 6640 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6641 (sha256
6642 (base32
912dcbad 6643 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
aa759a51
RW
6644 (build-system python-build-system)
6645 (native-inputs
6646 `(("python-setuptools" ,python-setuptools)))
6647 (home-page "https://github.com/pyca/cryptography")
66e07664 6648 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6649 (description
6650 "This package contains test vectors for the cryptography package.")
6651 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6652 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6653
6654(define-public python2-cryptography-vectors
6655 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6656
6657(define-public python-cryptography
6658 (package
6659 (name "python-cryptography")
912dcbad 6660 (version "1.5.3")
88b47cb0
RW
6661 (source
6662 (origin
6663 (method url-fetch)
9c509ca9 6664 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6665 (sha256
6666 (base32
912dcbad 6667 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
88b47cb0 6668 (build-system python-build-system)
470613f9
LF
6669 (arguments
6670 `(#:phases
6671 (modify-phases %standard-phases
6672 (add-before 'check 'disable-failing-test
6673 (lambda _
6674 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6675 ;; versions of python-cryptography:
6676 ;; https://github.com/pyca/cryptography/issues/3196
6677 ;; TODO: Try re-enabling the test when upgrading
6678 ;; python-cryptography.
6679 (substitute* "tests/hazmat/backends/test_openssl.py"
6680 (("def test_numeric_string_x509_name_entry")
6681 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6682 #t)))))
88b47cb0
RW
6683 (inputs
6684 `(("openssl" ,openssl)))
6685 (propagated-inputs
6686 `(("python-cffi" ,python-cffi)
6687 ("python-six" ,python-six)
6688 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6689 ("python-idna" ,python-idna)
6690 ("python-iso8601" ,python-iso8601)))
6691 (native-inputs
6692 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6693 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
6694 ("python-setuptools" ,python-setuptools)
6695 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6696 ("python-pyasn1" ,python-pyasn1)
6697 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6698 ("python-pytz" ,python-pytz)
6699 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6700 (home-page "https://github.com/pyca/cryptography")
6701 (synopsis "Cryptographic recipes and primitives for Python")
6702 (description
6703 "cryptography is a package which provides cryptographic recipes and
6704primitives to Python developers. It aims to be the “cryptographic standard
6705library” for Python. The package includes both high level recipes, and low
6706level interfaces to common cryptographic algorithms such as symmetric ciphers,
6707message digests and key derivation functions.")
6708 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6709 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6710 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6711
6712(define-public python2-cryptography
519e2f4f
LF
6713 (let ((crypto (package-with-python2
6714 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6715 (package (inherit crypto)
6716 (propagated-inputs
6717 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6718 ("python2-backport-ssl-match-hostname"
6719 ,python2-backport-ssl-match-hostname)
68f1cdec 6720 ("python2-enum34" ,python2-enum34)
88b47cb0 6721 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6722
6723(define-public python-pyopenssl
6724 (package
6725 (name "python-pyopenssl")
61684de2 6726 (version "16.2.0")
5af999b8
RW
6727 (source
6728 (origin
6729 (method url-fetch)
eb68d268 6730 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6731 (sha256
6732 (base32
61684de2 6733 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6734 (build-system python-build-system)
5af999b8
RW
6735 (propagated-inputs
6736 `(("python-cryptography" ,python-cryptography)
6737 ("python-six" ,python-six)))
6738 (inputs
6739 `(("openssl" ,openssl)))
6740 (native-inputs
6741 `(("python-setuptools" ,python-setuptools)))
6742 (home-page "https://github.com/pyca/pyopenssl")
6743 (synopsis "Python wrapper module around the OpenSSL library")
6744 (description
6745 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6746library.")
3f641af0 6747 (license license:asl2.0)))
5af999b8
RW
6748
6749(define-public python2-pyopenssl
519e2f4f 6750 (package-with-python2 python-pyopenssl))
643725a1
CR
6751
6752(define-public python-pip
6753 (package
6754 (name "python-pip")
6fb54e3b 6755 (version "8.0.2")
643725a1
CR
6756 (source
6757 (origin
6758 (method url-fetch)
6fb54e3b 6759 (uri (pypi-uri "pip" version))
643725a1
CR
6760 (sha256
6761 (base32
6fb54e3b 6762 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6763 (build-system python-build-system)
6764 (inputs
6765 `(("python-setuptools" ,python-setuptools)
6766 ("python-virtualenv" ,python-virtualenv)
6767 ;; Tests
6768 ("python-mock" ,python-mock)
6769 ("python-pytest" ,python-pytest)
6770 ("python-scripttest" ,python-scripttest)))
6771 (home-page "https://pip.pypa.io/")
6772 (synopsis
6773 "Package manager for Python software")
6774 (description
6775 "Pip is a package manager for Python software, that finds packages on the
6776Python Package Index (PyPI).")
6777 (license license:expat)))
6778
6779(define-public python2-pip
6780 (package-with-python2 python-pip))
d8c4998f
LC
6781
6782(define-public python-tlsh
6783 (package
6784 (name "python-tlsh")
99b00dc7 6785 (version "3.4.4")
d8c4998f
LC
6786 (home-page "https://github.com/trendmicro/tlsh")
6787 (source (origin
99b00dc7
EF
6788 (method url-fetch)
6789 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6790 version ".tar.gz"))
d8c4998f
LC
6791 (sha256
6792 (base32
99b00dc7
EF
6793 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6794 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6795 (build-system cmake-build-system)
6796 (arguments
6797 '(#:out-of-source? #f
6798 #:phases (modify-phases %standard-phases
6799 (replace
6800 'install
6801 (lambda* (#:key outputs #:allow-other-keys)
6802 ;; Build and install the Python bindings. The underlying
6803 ;; C++ library is apparently not meant to be installed.
6804 (let ((out (assoc-ref outputs "out")))
6805 (with-directory-excursion "py_ext"
6806 (and (system* "python" "setup.py" "build")
6807 (system* "python" "setup.py" "install"
6808 (string-append "--prefix=" out))))))))))
6809 (inputs `(("python" ,python-wrapper))) ;for the bindings
6810 (synopsis "Fuzzy matching library for Python")
6811 (description
6812 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6813Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6814value which can be used for similarity comparisons. Similar objects have
6815similar hash values, which allows for the detection of similar objects by
6816comparing their hash values. The byte stream should have a sufficient amount
6817of complexity; for example, a byte stream of identical bytes will not generate
6818a hash value.")
3f641af0 6819 (license license:asl2.0)))
d8c4998f
LC
6820
6821(define-public python2-tlsh
6822 (package
6823 (inherit python-tlsh)
6824 (name "python2-tlsh")
6825 (inputs `(("python" ,python-2)))))
d96034ed 6826
67f66812
BW
6827(define-public python-termcolor
6828 (package
6829 (name "python-termcolor")
6830 (version "1.1.0")
6831 (source
6832 (origin
6833 (method url-fetch)
6834 (uri (pypi-uri "python-termcolor" version))
6835 (sha256
6836 (base32
6837 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6838 (build-system python-build-system)
6839 (arguments
6840 ;; There are no tests.
6841 `(#:tests? #f))
6842 (home-page "http://pypi.python.org/pypi/termcolor")
6843 (synopsis "ANSII Color formatting for terminal output")
6844 (description
6845 "This package provides ANSII Color formatting for output in terminals.")
6846 (license license:expat)))
6847
6848(define-public python2-termcolor
6849 (package-with-python2 python-termcolor))
6850
d96034ed
LC
6851(define-public python-libarchive-c
6852 (package
6853 (name "python-libarchive-c")
03fd001c 6854 (version "2.2")
d96034ed
LC
6855 (source (origin
6856 (method url-fetch)
03fd001c 6857 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6858 (sha256
6859 (base32
03fd001c 6860 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6861 (build-system python-build-system)
6862 (arguments
6863 '(#:phases (modify-phases %standard-phases
6864 (add-before
6865 'build 'reference-libarchive
6866 (lambda* (#:key inputs #:allow-other-keys)
6867 ;; Retain the absolute file name of libarchive.so.
6868 (let ((libarchive (assoc-ref inputs "libarchive")))
6869 (substitute* "libarchive/ffi.py"
6870 (("find_library\\('archive'\\)")
6871 (string-append "'" libarchive
6872 "/lib/libarchive.so'"))))
6873
6874 ;; Do not make a compressed egg (see
6875 ;; <http://bugs.gnu.org/20765>).
6876 (let ((port (open-file "setup.cfg" "a")))
6877 (display "\n[easy_install]\nzip_ok = 0\n"
6878 port)
6879 (close-port port)
6880 #t))))))
6881 (inputs
6882 `(("python-setuptools" ,python-setuptools)
6883 ("libarchive" ,libarchive)))
6884 (home-page "https://github.com/Changaco/python-libarchive-c")
6885 (synopsis "Python interface to libarchive")
6886 (description
6887 "This package provides Python bindings to libarchive, a C library to
6888access possibly compressed archives in many different formats. It uses
6889Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6890 (license license:lgpl2.0+)))
d96034ed
LC
6891
6892(define-public python2-libarchive-c
6893 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6894
6895(define-public python-file
6896 (package
6897 (inherit file)
6898 (name "python-file")
7ffa5d4a
LF
6899 (source (origin
6900 (inherit (package-source file))
6901 ;; This patch should not be applied to python2-file.
6902 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6903 (build-system python-build-system)
6904 (arguments
6905 '(#:tests? #f ;no tests
00bf74be 6906 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6907 #:phases (modify-phases %standard-phases
6908 (add-before 'build 'change-directory
6909 (lambda _
6910 (chdir "python")
6911 #t))
6912 (add-before 'build 'set-library-file-name
6913 (lambda* (#:key inputs #:allow-other-keys)
6914 (let ((file (assoc-ref inputs "file")))
6915 (substitute* "magic.py"
6916 (("find_library\\('magic'\\)")
6917 (string-append "'" file "/lib/libmagic.so'")))
6918 #t))))))
6919 (inputs `(("file" ,file)))
6920 (self-native-input? #f)
daeeea71
CM
6921 (synopsis "Python bindings to the libmagic file type guesser. Note that
6922this module and the python-magic module both provide a \"magic.py\" file;
6923these two modules, which are different and were developed separately, both
2f87a77f
LF
6924serve the same purpose: provide Python bindings for libmagic.")
6925 (properties `((python2-variant . ,(delay python2-file))))))
5e1c9367
LC
6926
6927(define-public python2-file
2f87a77f
LF
6928 (let ((base (package-with-python2 (strip-python2-variant python-file))))
6929 (package
6930 (inherit base)
7ffa5d4a 6931 (source (package-source file))
2f87a77f
LF
6932 (native-inputs
6933 `(("python2-setuptools" ,python2-setuptools)
6934 ,@(package-native-inputs base))))))
85d4aeac
LC
6935
6936(define-public python-debian
6937 (package
6938 (name "python-debian")
6939 (version "0.1.23")
6940 (source
6941 (origin
6942 (method url-fetch)
6943 (uri (string-append
6944 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6945 version ".tar.gz"))
6946 (sha256
6947 (base32
6948 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6949 (build-system python-build-system)
6950 (inputs
6951 `(("python-six" ,python-six)))
6952 (native-inputs
6953 `(("python-setuptools" ,python-setuptools)))
6954 (home-page "http://packages.debian.org/sid/python-debian")
6955 (synopsis "Debian package related modules")
6956 (description
5c7bdc9a
LC
6957 ;; XXX: Use @enumerate instead of @itemize to work around
6958 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6959 "This package provides Python modules that abstract many formats of
6960Debian-related files, such as:
6961
5c7bdc9a 6962@enumerate
85d4aeac
LC
6963@item Debtags information;
6964@item @file{debian/changelog} files;
6965@item packages files, pdiffs;
6966@item control files of single or multiple RFC822-style paragraphs---e.g.
6967 @file{debian/control}, @file{.changes}, @file{.dsc};
6968@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6969 contained files and meta-information.
5c7bdc9a 6970@end enumerate\n")
85d4aeac
LC
6971
6972 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6973 (license license:gpl3+)))
85d4aeac
LC
6974
6975(define-public python2-debian
6976 (package-with-python2 python-debian))
816a6538 6977
2d321bb2
RW
6978(define-public python-nbformat
6979 (package
6980 (name "python-nbformat")
6981 (version "4.1.0")
6982 (source
6983 (origin
6984 (method url-fetch)
6985 (uri (pypi-uri "nbformat" version))
6986 (sha256
6987 (base32
6988 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6989 (build-system python-build-system)
6990 (arguments `(#:tests? #f)) ; no test target
6991 (propagated-inputs
6992 `(("python-ipython-genutils" ,python-ipython-genutils)
6993 ("python-jsonschema" ,python-jsonschema)
6994 ("python-jupyter-core" ,python-jupyter-core)
6995 ("python-traitlets" ,python-traitlets)))
6996 (native-inputs
6997 `(("python-setuptools" ,python-setuptools)))
6998 (home-page "http://jupyter.org")
6999 (synopsis "Jupyter Notebook format")
7000 (description "This package provides the reference implementation of the
7001Jupyter Notebook format and Python APIs for working with notebooks.")
7002 (license license:bsd-3)))
7003
7004(define-public python2-nbformat
7005 (package-with-python2 python-nbformat))
7006
55436048
RW
7007(define-public python-bleach
7008 (package
7009 (name "python-bleach")
7010 (version "1.4.3")
7011 (source
7012 (origin
7013 (method url-fetch)
7014 (uri (pypi-uri "bleach" version))
7015 (sha256
7016 (base32
7017 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7018 (build-system python-build-system)
7019 (propagated-inputs
7020 `(("python-html5lib" ,python-html5lib-0.9)
7021 ("python-setuptools" ,python-setuptools)
7022 ("python-six" ,python-six)))
7023 (native-inputs
7024 `(("python-nose" ,python-nose)))
7025 (home-page "http://github.com/jsocol/bleach")
7026 (synopsis "Whitelist-based HTML-sanitizing tool")
7027 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7028 (license license:asl2.0)))
7029
7030(define-public python2-bleach
7031 (package-with-python2 python-bleach))
7032
60590a3a
RW
7033(define-public python-entrypoints
7034 (package
7035 (name "python-entrypoints")
7036 (version "0.2.2")
7037 (source
7038 (origin
7039 (method url-fetch)
7040 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7041 version ".tar.gz"))
7042 (file-name (string-append name "-" version ".tar.gz"))
7043 (sha256
7044 (base32
7045 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7046 (build-system python-build-system)
7047 ;; The package does not come with a setup.py file, so we have to generate
7048 ;; one ourselves.
7049 (arguments
7050 `(#:tests? #f
7051 #:phases
7052 (modify-phases %standard-phases
7053 (add-after 'unpack 'create-setup.py
7054 (lambda _
7055 (call-with-output-file "setup.py"
7056 (lambda (port)
7057 (format port "\
7058from setuptools import setup
7059setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7060" ,version))))))))
7061 (home-page "https://github.com/takluyver/entrypoints")
7062 (synopsis "Discover and load entry points from installed Python packages")
7063 (description "Entry points are a way for Python packages to advertise
7064objects with some common interface. The most common examples are
7065@code{console_scripts} entry points, which define shell commands by
7066identifying a Python function to run. The @code{entrypoints} module contains
7067functions to find and load entry points.")
7068 (license license:expat)))
7069
7070(define-public python2-entrypoints
7071 (package-with-python2 python-entrypoints))
7072
c60898a8
RW
7073(define-public python-nbconvert
7074 (package
7075 (name "python-nbconvert")
7076 (version "5.0.0b1")
7077 (source
7078 (origin
7079 (method url-fetch)
7080 (uri (pypi-uri "nbconvert" version))
7081 (sha256
7082 (base32
7083 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7084 (build-system python-build-system)
7085 ;; The "bdist_egg" target is disabled by default, causing the installation
7086 ;; to fail.
7087 (arguments `(#:configure-flags (list "bdist_egg")))
7088 (propagated-inputs
7089 `(("python-bleach" ,python-bleach)
7090 ("python-entrypoints" ,python-entrypoints)
7091 ("python-jinja2" ,python-jinja2)
7092 ("python-jupyter-core" ,python-jupyter-core)
7093 ("python-mistune" ,python-mistune)
7094 ("python-nbformat" ,python-nbformat)
7095 ("python-pygments" ,python-pygments)
7096 ("python-setuptools" ,python-setuptools)
7097 ("python-traitlets" ,python-traitlets)))
7098 (home-page "http://jupyter.org")
7099 (synopsis "Converting Jupyter Notebooks")
7100 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7101notebooks to various other formats via Jinja templates. It allows you to
7102convert an @code{.ipynb} notebook file into various static formats including:
7103
7104@enumerate
7105@item HTML
7106@item LaTeX
7107@item PDF
7108@item Reveal JS
7109@item Markdown (md)
7110@item ReStructured Text (rst)
7111@item executable script
7112@end enumerate\n")
7113 (license license:bsd-3)))
7114
7115(define-public python2-nbconvert
7116 (package-with-python2 python-nbconvert))
7117
a0d62280
RW
7118(define-public python-notebook
7119 (package
7120 (name "python-notebook")
7121 (version "4.2.3")
7122 (source (origin
7123 (method url-fetch)
7124 (uri (pypi-uri "notebook" version))
7125 (sha256
7126 (base32
7127 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7128 (build-system python-build-system)
7129 (arguments
7130 `(#:phases
7131 (modify-phases %standard-phases
7132 (replace 'check
7133 (lambda _
7134 ;; HOME must be set for tests
7135 (setenv "HOME" "/tmp")
7136 (zero? (system* "nosetests")))))))
7137 (propagated-inputs
7138 `(("python-jupyter-core" ,python-jupyter-core)
7139 ("python-nbformat" ,python-nbformat)
7140 ("python-nbconvert" ,python-nbconvert)
7141 ("python-ipython" ,python-ipython)))
7142 (native-inputs
7143 `(("python-nose" ,python-nose)
7144 ("python-sphinx" ,python-sphinx)
7145 ("python-requests" ,python-requests)))
7146 (home-page "http://jupyter.org/")
7147 (synopsis "Web-based notebook environment for interactive computing")
7148 (description
7149 "The Jupyter HTML notebook is a web-based notebook environment for
7150interactive computing.")
7151 (license license:bsd-3)))
7152
7153(define-public python2-notebook
7154 (package-with-python2 python-notebook))
7155
d55724ed
RW
7156(define-public python-widgetsnbextension
7157 (package
7158 (name "python-widgetsnbextension")
7159 (version "1.2.6")
7160 (source
7161 (origin
7162 (method url-fetch)
7163 (uri (pypi-uri "widgetsnbextension" version))
7164 (sha256
7165 (base32
7166 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7167 (build-system python-build-system)
7168 (propagated-inputs
7169 `(("python-notebook" ,python-notebook)))
7170 (native-inputs
7171 `(("python-nose" ,python-nose)
7172 ("python-setuptools" ,python-setuptools)))
7173 (home-page "http://ipython.org")
7174 (synopsis "IPython HTML widgets for Jupyter")
7175 (description "This package provides interactive HTML widgets for Jupyter
7176notebooks.")
7177 (license license:bsd-3)))
7178
7179(define-public python2-widgetsnbextension
7180 (package-with-python2 python-widgetsnbextension))
7181
4fe2e344
RW
7182(define-public python-ipywidgets
7183 (package
7184 (name "python-ipywidgets")
7185 (version "5.2.2")
7186 (source
7187 (origin
7188 (method url-fetch)
7189 (uri (pypi-uri "ipywidgets" version))
7190 (sha256
7191 (base32
7192 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7193 (build-system python-build-system)
7194 ;; FIXME: it's not clear how to run the tests.
7195 (arguments `(#:tests? #f))
7196 (propagated-inputs
7197 `(("python-ipykernel" ,python-ipykernel)
7198 ("python-ipython" ,python-ipython)
7199 ("python-setuptools" ,python-setuptools)
7200 ("python-traitlets" ,python-traitlets)
7201 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7202 (home-page "http://ipython.org")
7203 (synopsis "IPython HTML widgets for Jupyter")
7204 (description "Ipywidgets are interactive HTML widgets for Jupyter
7205notebooks and the IPython kernel. Notebooks come alive when interactive
7206widgets are used. Users gain control of their data and can visualize changes
7207in the data.")
7208 (license license:bsd-3)))
7209
7210(define-public python2-ipywidgets
7211 (package-with-python2 python-ipywidgets))
7212
8ceebf8f
RW
7213(define-public python-jupyter-console
7214 (package
7215 (name "python-jupyter-console")
7216 (version "5.0.0")
7217 (source
7218 (origin
7219 (method url-fetch)
7220 (uri (pypi-uri "jupyter_console" version))
7221 (sha256
7222 (base32
7223 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7224 (build-system python-build-system)
7225 ;; FIXME: it's not clear how to run the tests.
7226 (arguments `(#:tests? #f))
7227 (propagated-inputs
7228 `(("python-ipykernel" ,python-ipykernel)
7229 ("python-ipython" ,python-ipython)
7230 ("python-jupyter-client" ,python-jupyter-client)
7231 ("python-prompt-toolkit" ,python-prompt-toolkit)
7232 ("python-pygments" ,python-pygments)
7233 ("python-setuptools" ,python-setuptools)))
7234 (home-page "https://jupyter.org")
7235 (synopsis "Jupyter terminal console")
7236 (description "This package provides a terminal-based console frontend for
7237Jupyter kernels. It also allows for console-based interaction with non-Python
7238Jupyter kernels such as IJulia and IRKernel.")
7239 (license license:bsd-3)))
7240
7241(define-public python2-jupyter-console
7242 (package-with-python2 python-jupyter-console))
7243
c27ae827
RW
7244(define-public jupyter
7245 (package
7246 (name "jupyter")
7247 (version "1.0.0")
7248 (source
7249 (origin
7250 (method url-fetch)
7251 (uri (pypi-uri "jupyter" version))
7252 (sha256
7253 (base32
7254 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7255 (build-system python-build-system)
7256 ;; FIXME: it's not clear how to run the tests.
7257 (arguments `(#:tests? #f))
7258 (propagated-inputs
7259 `(("python-ipykernel" ,python-ipykernel)
7260 ("python-ipywidgets" ,python-ipywidgets)
7261 ("python-jupyter-console" ,python-jupyter-console)
7262 ("python-nbconvert" ,python-nbconvert)
7263 ("python-notebook" ,python-notebook)
7264 ("python-setuptools" ,python-setuptools)))
7265 (home-page "http://jupyter.org")
7266 (synopsis "Web application for interactive documents")
7267 (description
7268 "The Jupyter Notebook is a web application that allows you to create and
7269share documents that contain live code, equations, visualizations and
7270explanatory text. Uses include: data cleaning and transformation, numerical
7271simulation, statistical modeling, machine learning and much more.")
7272 (license license:bsd-3)))
7273
816a6538
LC
7274(define-public python-chardet
7275 (package
7276 (name "python-chardet")
7277 (version "2.3.0")
7278 (source
7279 (origin
7280 (method url-fetch)
7281 (uri (string-append
7282 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7283 version
7284 ".tar.gz"))
7285 (sha256
7286 (base32
7287 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7288 (build-system python-build-system)
7289 (native-inputs
7290 `(("python-setuptools" ,python-setuptools)))
7291 (home-page "https://github.com/chardet/chardet")
7292 (synopsis "Universal encoding detector for Python 2 and 3")
7293 (description
7294 "This package provides @code{chardet}, a Python module that can
7295automatically detect a wide range of file encodings.")
3f641af0 7296 (license license:lgpl2.1+)))
816a6538
LC
7297
7298(define-public python2-chardet
7299 (package-with-python2 python-chardet))
2fc5f186 7300
1872f1bb
KM
7301(define-public python-docopt
7302 (package
7303 (name "python-docopt")
7304 (version "0.6.2")
7305 (source
7306 (origin
7307 (method url-fetch)
7308 ;; The release on PyPI does not include tests.
7309 (uri (string-append
7310 "https://github.com/docopt/docopt/archive/"
7311 version ".tar.gz"))
7312 (file-name (string-append name "-" version ".tar.gz"))
7313 (sha256
7314 (base32
7315 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7316 (build-system python-build-system)
7317 (native-inputs
7318 `(("python-pytest" ,python-pytest)
7319 ("python-setuptools" ,python-setuptools)))
7320 (arguments
7321 `(#:phases (alist-replace
7322 'check
7323 (lambda _ (zero? (system* "py.test")))
7324 %standard-phases)))
7325 (home-page "http://docopt.org")
7326 (synopsis "Command-line interface description language for Python")
7327 (description "This library allows the user to define a command-line
7328interface from a program's help message rather than specifying it
7329programatically with command-line parsers like @code{getopt} and
7330@code{argparse}.")
7331 (license license:expat)))
7332
7333(define-public python2-docopt
7334 (package-with-python2 python-docopt))
7335
2fc5f186
LF
7336(define-public python-zope-event
7337 (package
7338 (name "python-zope-event")
7339 (version "4.1.0")
7340 (source
7341 (origin
7342 (method url-fetch)
7343 (uri (string-append "https://pypi.python.org/packages/source/z"
7344 "/zope.event/zope.event-" version ".tar.gz"))
7345 (sha256
7346 (base32
7347 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7348 (build-system python-build-system)
7349 (inputs
7350 `(("python-setuptools" ,python-setuptools)))
7351 (home-page "http://pypi.python.org/pypi/zope.event")
7352 (synopsis "Event publishing system for Python")
7353 (description "Zope.event provides an event publishing API, intended for
7354use by applications which are unaware of any subscribers to their events. It
7355is a simple event-dispatching system on which more sophisticated event
7356dispatching systems can be built.")
3f641af0 7357 (license license:zpl2.1)))
2fc5f186
LF
7358
7359(define-public python2-zope-event
7360 (package-with-python2 python-zope-event))
97abe268
LF
7361
7362(define-public python-zope-interface
7363 (package
7364 (name "python-zope-interface")
7365 (version "4.1.3")
7366 (source
7367 (origin
7368 (method url-fetch)
7369 (uri (string-append "https://pypi.python.org/packages/source/z"
7370 "/zope.interface/zope.interface-" version ".tar.gz"))
7371 (sha256
7372 (base32
7373 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7374 (build-system python-build-system)
7375 (propagated-inputs
7376 `(("python-zope-event" ,python-zope-event)))
7377 (home-page "https://github.com/zopefoundation/zope.interface")
7378 (synopsis "Python implementation of the \"design by contract\"
7379methodology")
7380 (description "Zope.interface provides an implementation of \"object
7381interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7382conforming to a given API or contract.")
3f641af0 7383 (license license:zpl2.1)))
97abe268
LF
7384
7385(define-public python2-zope-interface
7386 (package-with-python2 python-zope-interface))
81f2373c
LF
7387
7388(define-public python-zope-exceptions
7389 (package
7390 (name "python-zope-exceptions")
7391 (version "4.0.8")
7392 (source
7393 (origin
7394 (method url-fetch)
7395 (uri (string-append "https://pypi.python.org/packages/source/z"
7396 "/zope.exceptions/zope.exceptions-"
7397 version ".tar.gz"))
7398 (sha256
7399 (base32
7400 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7401 (build-system python-build-system)
7402 (arguments
7403 '(#:tests? #f)) ; circular dependency with zope.testrunner
7404 (propagated-inputs
7405 `(("python-zope-interface" ,python-zope-interface)))
7406 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7407 (synopsis "Zope exceptions")
7408 (description "Zope.exceptions provides general-purpose exception types
7409that have uses outside of the Zope framework.")
3f641af0 7410 (license license:zpl2.1)))
81f2373c
LF
7411
7412(define-public python2-zope-exceptions
7413 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7414
7415(define-public python-zope-testing
7416 (package
7417 (name "python-zope-testing")
7418 (version "4.5.0")
7419 (source
7420 (origin
7421 (method url-fetch)
7422 (uri (string-append "https://pypi.python.org/packages/source/z"
7423 "/zope.testing/zope.testing-" version ".tar.gz"))
7424 (sha256
7425 (base32
b02f7a21
HG
7426 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7427 (modules '((guix build utils)))
7428 (snippet
7429 '(begin
7430 ;; Remove pre-compiled .pyc files backup files from source.
7431 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7432 #t))))
900e3c0e
LF
7433 (build-system python-build-system)
7434 (native-inputs
7435 `(("python-zope-exceptions" ,python-zope-exceptions)))
7436 (propagated-inputs
7437 `(("python-zope-interface" ,python-zope-interface)))
7438 (home-page "http://pypi.python.org/pypi/zope.testing")
7439 (synopsis "Zope testing helpers")
7440 (description "Zope.testing provides a number of testing utilities for HTML
7441forms, HTTP servers, regular expressions, and more.")
3f641af0 7442 (license license:zpl2.1)))
900e3c0e
LF
7443
7444(define-public python2-zope-testing
7445 (package-with-python2 python-zope-testing))
01614c4f
LF
7446
7447(define-public python-zope-testrunner
7448 (package
7449 (name "python-zope-testrunner")
7450 (version "4.4.9")
7451 (source
7452 (origin
7453 (method url-fetch)
7454 (uri (string-append "https://pypi.python.org/packages/source/z"
7455 "/zope.testrunner/zope.testrunner-"
7456 version ".zip"))
7457 (sha256
7458 (base32
7459 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7460 (build-system python-build-system)
7461 (native-inputs
7462 `(("python-six" ,python-six)
7463 ("python-zope-exceptions" ,python-zope-exceptions)
7464 ("python-zope-testing" ,python-zope-testing)
7465 ("unzip" ,unzip)))
7466 (propagated-inputs
7467 `(("python-zope-interface" ,python-zope-interface)))
7468 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7469 (synopsis "Zope testrunner script")
7470 (description "Zope.testrunner provides a script for running Python
7471tests.")
3f641af0 7472 (license license:zpl2.1)))
01614c4f
LF
7473
7474(define-public python2-zope-testrunner
7475 (let ((base (package-with-python2 python-zope-testrunner)))
7476 (package
7477 (inherit base)
7478 (native-inputs
7479 (append (package-native-inputs base)
7480 `(("python2-subunit" ,python2-subunit)
7481 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7482
7483(define-public python-zope-i18nmessageid
7484 (package
7485 (name "python-zope-i18nmessageid")
7486 (version "4.0.3")
7487 (source
7488 (origin
7489 (method url-fetch)
7490 (uri (string-append
7491 "https://pypi.python.org/packages/source/z"
7492 "/zope.i18nmessageid/zope.i18nmessageid-"
7493 version ".tar.gz"))
7494 (sha256
7495 (base32
7496 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7497 (build-system python-build-system)
7498 (inputs
7499 `(("python-setuptools" ,python-setuptools)))
7500 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7501 (synopsis "Message identifiers for internationalization")
7502 (description "Zope.i18nmessageid provides facilities for declaring
7503internationalized messages within program source text.")
3f641af0 7504 (license license:zpl2.1)))
6a5c710c
LF
7505
7506(define-public python2-zope-i18nmessageid
7507 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7508
7509(define-public python-zope-schema
7510 (package
7511 (name "python-zope-schema")
7512 (version "4.4.2")
7513 (source
7514 (origin
7515 (method url-fetch)
7516 (uri (string-append "https://pypi.python.org/packages/source/z"
7517 "/zope.schema/zope.schema-" version ".tar.gz"))
7518 (sha256
7519 (base32
7520 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7521 (build-system python-build-system)
7522 (propagated-inputs
7523 `(("python-zope-event" ,python-zope-event)
7524 ("python-zope-interface" ,python-zope-interface)))
7525 (native-inputs
7526 `(("python-zope-testing" ,python-zope-testing)))
7527 (home-page "http://pypi.python.org/pypi/zope.schema")
7528 (synopsis "Zope data schemas")
7529 (description "Zope.scheme provides extensions to zope.interface for
7530defining data schemas.")
3f641af0 7531 (license license:zpl2.1)))
71fb09f3
LF
7532
7533(define-public python2-zope-schema
7534 (package-with-python2 python-zope-schema))
fbac9b17
LF
7535
7536(define-public python-zope-configuration
7537 (package
7538 (name "python-zope-configuration")
7539 (version "4.0.3")
7540 (source (origin
7541 (method url-fetch)
7542 (uri (string-append "https://pypi.python.org/packages/source/z"
7543 "/zope.configuration/zope.configuration-"
7544 version ".tar.gz"))
7545 (sha256
7546 (base32
7547 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7548 (build-system python-build-system)
7549 (propagated-inputs
7550 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7551 ("python-zope-schema" ,python-zope-schema)))
7552 (home-page "http://pypi.python.org/pypi/zope.configuration")
7553 (synopsis "Zope Configuration Markup Language")
7554 (description "Zope.configuration implements ZCML, the Zope Configuration
7555Markup Language.")
3f641af0 7556 (license license:zpl2.1)))
fbac9b17
LF
7557
7558(define-public python2-zope-configuration
7559 (package-with-python2 python-zope-configuration))
2ad52086
LF
7560
7561(define-public python-zope-proxy
7562 (package
7563 (name "python-zope-proxy")
7564 (version "4.1.6")
7565 (source
7566 (origin
7567 (method url-fetch)
7568 (uri (string-append "https://pypi.python.org/packages/source/z"
7569 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7570 (sha256
7571 (base32
7572 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7573 (build-system python-build-system)
7574 (propagated-inputs
7575 `(("python-zope-interface" ,python-zope-interface)))
7576 (home-page "http://pypi.python.org/pypi/zope.proxy")
7577 (synopsis "Generic, transparent proxies")
7578 (description "Zope.proxy provides generic, transparent proxies for Python.
7579Proxies are special objects which serve as mostly-transparent wrappers around
7580another object, intervening in the apparent behavior of the wrapped object
7581only when necessary to apply the policy (e.g., access checking, location
7582brokering, etc.) for which the proxy is responsible.")
3f641af0 7583 (license license:zpl2.1)))
2ad52086
LF
7584
7585(define-public python2-zope-proxy
7586 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7587
7588(define-public python-zope-location
7589 (package
7590 (name "python-zope-location")
7591 (version "4.0.3")
7592 (source
7593 (origin
7594 (method url-fetch)
7595 (uri (string-append "https://pypi.python.org/packages/source/z"
7596 "/zope.location/zope.location-" version ".tar.gz"))
7597 (sha256
7598 (base32
7599 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7600 (build-system python-build-system)
7601 (native-inputs
7602 `(("python-zope-proxy" ,python-zope-proxy)
7603 ("python-zope-schema" ,python-zope-schema)))
7604 (home-page "http://pypi.python.org/pypi/zope.location/")
7605 (synopsis "Zope location library")
7606 (description "Zope.location implements the concept of \"locations\" in
7607Zope3, which are are special objects that have a structural location.")
3f641af0 7608 (license license:zpl2.1)))
f404b5ea
LF
7609
7610(define-public python2-zope-location
7611 (package-with-python2 python-zope-location))
d4b77f36
LF
7612
7613(define-public python-zope-security
7614 (package
7615 (name "python-zope-security")
7616 (version "4.0.3")
7617 (source
7618 (origin
7619 (method url-fetch)
7620 (uri (string-append "https://pypi.python.org/packages/source/z"
7621 "/zope.security/zope.security-" version ".tar.gz"))
7622 (sha256
7623 (base32
7624 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7625 (build-system python-build-system)
7626 (propagated-inputs
7627 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7628 ("python-zope-component" ,python-zope-component)
7629 ("python-zope-location" ,python-zope-location)
7630 ("python-zope-proxy" ,python-zope-proxy)
7631 ("python-zope-schema" ,python-zope-schema)
7632 ("python-zope-testrunner" ,python-zope-testrunner)
7633 ("python-zope-testing" ,python-zope-testing)))
7634 (home-page "http://pypi.python.org/pypi/zope.security")
7635 (synopsis "Zope security framework")
7636 (description "Zope.security provides a generic mechanism to implement
7637security policies on Python objects.")
3f641af0 7638 (license license:zpl2.1)))
d4b77f36
LF
7639
7640(define-public python2-zope-security
04417662
EF
7641 (let ((zope-security (package-with-python2 python-zope-security)))
7642 (package (inherit zope-security)
7643 (propagated-inputs
7644 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7645 ,@(alist-delete
7646 "python-zope-testrunner"
7647 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7648
7649(define-public python-zope-component
7650 (package
7651 (name "python-zope-component")
7652 (version "4.2.2")
7653 (source
7654 (origin
7655 (method url-fetch)
7656 (uri (string-append "https://pypi.python.org/packages/source/z"
7657 "/zope.component/zope.component-" version ".tar.gz"))
7658 (sha256
7659 (base32
7660 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7661 (build-system python-build-system)
7662 (arguments
7663 ;; Skip tests due to circular dependency with python-zope-security.
7664 '(#:tests? #f))
7665 (native-inputs
7666 `(("python-zope-testing" ,python-zope-testing)))
7667 (propagated-inputs
7668 `(("python-zope-event" ,python-zope-event)
7669 ("python-zope-interface" ,python-zope-interface)
7670 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7671 ("python-zope-configuration" ,python-zope-configuration)))
7672 (home-page "https://github.com/zopefoundation/zope.component")
7673 (synopsis "Zope Component Architecture")
7674 (description "Zope.component represents the core of the Zope Component
7675Architecture. Together with the zope.interface package, it provides
7676facilities for defining, registering and looking up components.")
3f641af0 7677 (license license:zpl2.1)))
a6b61b27
LF
7678
7679(define-public python2-zope-component
7680 (package-with-python2 python-zope-component))
3859ac12 7681
1ae44b80 7682(define-public python-pythondialog
b5f218be 7683 (package
1ae44b80 7684 (name "python-pythondialog")
42c4b246 7685 (version "3.4.0")
b5f218be
LF
7686 (source
7687 (origin
7688 (method url-fetch)
1ae44b80 7689 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7690 (sha256
7691 (base32
1ae44b80 7692 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7693 (build-system python-build-system)
7694 (arguments
7695 `(#:phases
7696 (modify-phases %standard-phases
7697 (add-after 'unpack 'patch-path
7698 (lambda* (#:key inputs #:allow-other-keys)
7699 (let* ((dialog (assoc-ref inputs "dialog")))
7700 ;; Since this library really wants to grovel the search path, we
7701 ;; must hardcode dialog's store path into it.
7702 (substitute* "dialog.py"
7703 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7704 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7705 #t))))
b5f218be
LF
7706 #:tests? #f)) ; no test suite
7707 (propagated-inputs
7708 `(("dialog" ,dialog)))
7709 (home-page "http://pythondialog.sourceforge.net/")
7710 (synopsis "Python interface to the UNIX dialog utility")
7711 (description "A Python wrapper for the dialog utility. Its purpose is to
7712provide an easy to use, pythonic and comprehensive Python interface to dialog.
7713This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7714 (license license:lgpl2.1)
1ae44b80
LF
7715 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7716
7717(define-public python2-pythondialog
7718 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7719 (package
7720 (inherit base)
7721 (version (package-version python-pythondialog))
7722 (source (origin
7723 (method url-fetch)
7724 (uri (pypi-uri "python2-pythondialog" version))
7725 (sha256
7726 (base32
7727 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7728
3859ac12
LF
7729(define-public python-pyrfc3339
7730 (package
7731 (name "python-pyrfc3339")
d9aa097b 7732 (version "1.0")
3859ac12
LF
7733 (source
7734 (origin
7735 (method url-fetch)
d9aa097b 7736 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7737 (sha256
7738 (base32
d9aa097b 7739 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7740 (build-system python-build-system)
7741 (propagated-inputs
7742 `(("python-pytz" ,python-pytz)))
7743 (native-inputs
7744 `(("python-nose" ,python-nose)
7745 ("python-setuptools" ,python-setuptools)))
7746 (home-page "https://github.com/kurtraschke/pyRFC3339")
7747 (synopsis "Python timestamp library")
7748 (description "Python library for generating and parsing RFC 3339-compliant
7749timestamps.")
7750 (license license:expat)))
7751
7752(define-public python2-pyrfc3339
7753 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7754
7755(define-public python-werkzeug
7756 (package
7757 (name "python-werkzeug")
0580e383 7758 (version "0.11.11")
5eea2005
LF
7759 (source
7760 (origin
7761 (method url-fetch)
4b47cbfa 7762 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7763 (sha256
7764 (base32
0580e383 7765 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7766 (build-system python-build-system)
7767 (native-inputs
7768 `(("python-pytest" ,python-pytest)))
7769 (home-page "http://werkzeug.pocoo.org/")
7770 (synopsis "Utilities for WSGI applications")
7771 (description "One of the most advanced WSGI utility modules. It includes a
7772powerful debugger, full-featured request and response objects, HTTP utilities to
7773handle entity tags, cache control headers, HTTP dates, cookie handling, file
7774uploads, a powerful URL routing system and a bunch of community-contributed
7775addon modules.")
3f641af0 7776 (license license:x11)))
5eea2005
LF
7777
7778(define-public python2-werkzeug
7779 (package-with-python2 python-werkzeug))
99fffa8a
LF
7780
7781(define-public python-configobj
7782 (package
7783 (name "python-configobj")
7784 (version "5.0.6")
7785 (source (origin
7786 (method url-fetch)
7787 (uri (string-append
7788 "https://pypi.python.org/packages/source/c/configobj/"
7789 "configobj-" version ".tar.gz"))
7790 (sha256
7791 (base32
7792 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7793 ;; Patch setup.py so it looks for python-setuptools, which is
7794 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7795 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
7796 (build-system python-build-system)
7797 (native-inputs
7798 `(("python-setuptools" ,python-setuptools)
7799 ("python-six" ,python-six)))
7800 (synopsis "Config file reading, writing and validation")
7801 (description "ConfigObj is a simple but powerful config file reader and
7802writer: an ini file round tripper. Its main feature is that it is very easy to
7803use, with a straightforward programmer’s interface and a simple syntax for
7804config files.")
7805 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7806 (license license:bsd-3)))
99fffa8a
LF
7807
7808(define-public python2-configobj
7809 (package-with-python2 python-configobj))
79e8a291
LF
7810
7811(define-public python-configargparse
7812 (package
7813 (name "python-configargparse")
7814 (version "0.10.0")
7815 (source (origin
7816 (method url-fetch)
7817 (uri (string-append
7818 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7819 "ConfigArgParse-" version ".tar.gz"))
7820 (sha256
7821 (base32
7822 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7823 (build-system python-build-system)
7824 (arguments
7825 ;; FIXME: Bug in test suite filed upstream:
7826 ;; https://github.com/bw2/ConfigArgParse/issues/32
7827 '(#:tests? #f))
7828 (synopsis "Replacement for argparse")
7829 (description "A drop-in replacement for argparse that allows options to also
7830be set via config files and/or environment variables.")
7831 (home-page "https://github.com/bw2/ConfigArgParse")
7832 (license license:expat)))
7833
7834(define-public python2-configargparse
7835 (package-with-python2 python-configargparse))
ab41f979
LF
7836
7837(define-public python-ndg-httpsclient
7838 (package
7839 (name "python-ndg-httpsclient")
7840 (version "0.4.0")
7841 (source (origin
7842 (method url-fetch)
7843 (uri (string-append
7844 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7845 "ndg_httpsclient-" version ".tar.gz"))
7846 (sha256
7847 (base32
7848 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7849 (build-system python-build-system)
a39cc016
LF
7850 (arguments
7851 '(;; The tests appear to require networking.
7852 #:tests? #f))
ab41f979
LF
7853 (propagated-inputs
7854 `(("python-pyopenssl" ,python-pyopenssl)))
7855 (synopsis "HTTPS support for Python's httplib and urllib2")
7856 (description "This is a HTTPS client implementation for httplib and urllib2
7857based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7858over the default provided with Python and importantly enables full verification
7859of the SSL peer.")
7860 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7861 (license license:bsd-3)))
ab41f979
LF
7862
7863;; python2-openssl requires special care, so package-with-python2 is
7864;; insufficient.
7865(define-public python2-ndg-httpsclient
7866 (package (inherit python-ndg-httpsclient)
7867 (name "python2-ndg-httpsclient")
7868 (arguments `(#:python ,python-2))
7869 (propagated-inputs
7870 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7871
7872(define-public python-contextlib2
7873 (package
7874 (name "python-contextlib2")
7875 (version "0.4.0")
7876 (source
7877 (origin
7878 (method url-fetch)
7879 (uri (pypi-uri "contextlib2" version))
7880 (sha256
7881 (base32
7882 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7883 (build-system python-build-system)
7884 (arguments
7885 `(#:phases
7886 (modify-phases %standard-phases
7887 (replace 'check
7888 (lambda _ (zero?
7889 (system*
b3546174 7890 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7891 (home-page "http://contextlib2.readthedocs.org/")
7892 (synopsis "Tools for decorators and context managers")
7893 (description "This module is primarily a backport of the Python
78943.2 contextlib to earlier Python versions. Like contextlib, it
7895provides utilities for common tasks involving decorators and context
7896managers. It also contains additional features that are not part of
7897the standard library.")
3f641af0 7898 (license license:psfl)))
03f964a5
CM
7899
7900(define-public python2-contextlib2
7901 (package-with-python2 python-contextlib2))
210bf497
DT
7902
7903(define-public python-texttable
7904 (package
7905 (name "python-texttable")
7906 (version "0.8.4")
7907 (source
7908 (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "texttable" version))
7911 (sha256
7912 (base32
7913 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7914 (build-system python-build-system)
7915 (arguments '(#:tests? #f)) ; no tests
7916 (home-page "https://github.com/foutaise/texttable/")
7917 (synopsis "Python module for creating simple ASCII tables")
7918 (description "Texttable is a Python module for creating simple ASCII
7919tables.")
3f641af0 7920 (license license:lgpl2.1+)))
210bf497
DT
7921
7922(define-public python2-texttable
7923 (package-with-python2 python-texttable))
67c52bb3
DT
7924
7925(define-public python-websocket-client
7926 (package
7927 (name "python-websocket-client")
6b810897 7928 (version "0.37.0")
67c52bb3
DT
7929 (source
7930 (origin
7931 (method url-fetch)
6b810897 7932 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7933 (sha256
7934 (base32
6b810897 7935 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3
DT
7936 (build-system python-build-system)
7937 (native-inputs
7938 `(("python-six" ,python-six))) ; for tests
7939 (inputs
7940 `(("python-setuptools" ,python-setuptools)))
7941 (home-page "https://github.com/liris/websocket-client")
7942 (synopsis "WebSocket client for Python")
7943 (description "The Websocket-client module provides the low level APIs for
7944WebSocket usage in Python programs.")
3f641af0 7945 (license license:lgpl2.1+)))
67c52bb3
DT
7946
7947(define-public python2-websocket-client
7948 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7949
7950(define-public python-atomicwrites
7951 (package
7952 (name "python-atomicwrites")
4e92d76a 7953 (version "1.1.0")
5c6eea2a
LF
7954 (source (origin
7955 (method url-fetch)
7956 (uri (pypi-uri "atomicwrites" version))
7957 (sha256
7958 (base32
4e92d76a 7959 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7960 (build-system python-build-system)
7961 (synopsis "Atomic file writes in Python")
7962 (description "Library for atomic file writes using platform dependent tools
8f65585b 7963for atomic file system operations.")
5c6eea2a 7964 (home-page "https://github.com/untitaker/python-atomicwrites")
9bb6d184
LF
7965 (license license:expat)
7966 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7967
7968(define-public python2-atomicwrites
7969 (package (inherit (package-with-python2
7970 (strip-python2-variant python-atomicwrites)))
7971 (native-inputs
7972 `(("python2-setuptools" ,python2-setuptools)))))
561bb3cb
LF
7973
7974(define-public python-requests-toolbelt
7975 (package
7976 (name "python-requests-toolbelt")
c02af1c8 7977 (version "0.6.2")
561bb3cb
LF
7978 (source (origin
7979 (method url-fetch)
c02af1c8
LF
7980 (uri (string-append
7981 "https://pypi.python.org/packages/"
7982 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7983 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7984 (sha256
7985 (base32
c02af1c8 7986 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7987 (build-system python-build-system)
759aadd4
LF
7988 (native-inputs
7989 `(("python-betamax" ,python-betamax)
7990 ("python-mock" ,python-mock)
7991 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7992 (propagated-inputs
7993 `(("python-requests" ,python-requests)))
7994 (synopsis "Extensions to python-requests")
7995 (description "This is a toolbelt of useful classes and functions to be used
7996with python-requests.")
7997 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7998 (license license:asl2.0)))
d1deb90b
LF
7999
8000(define-public python-click-threading
8001 (package
8002 (name "python-click-threading")
3d2e0dbc 8003 (version "0.2.0")
d1deb90b
LF
8004 (source (origin
8005 (method url-fetch)
3d2e0dbc
LF
8006 (uri (string-append
8007 "https://pypi.python.org/packages/"
8008 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8009 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8010 (sha256
8011 (base32
3d2e0dbc 8012 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8013 (build-system python-build-system)
8014 (propagated-inputs
8015 `(("python-click" ,python-click)))
8016 (synopsis "Utilities for multithreading in Click")
8017 (description "This package provides utilities for multithreading in Click
8018applications.")
8019 (home-page "https://github.com/click-contrib/click-threading")
8020 (license license:expat)))
7b17cab9
LF
8021
8022(define-public python-click-log
8023 (package
8024 (name "python-click-log")
a9da8fec 8025 (version "0.1.3")
7b17cab9
LF
8026 (source (origin
8027 (method url-fetch)
8028 (uri (pypi-uri "click-log" version))
8029 (sha256
8030 (base32
a9da8fec 8031 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
8032 (build-system python-build-system)
8033 (propagated-inputs
8034 `(("python-click" ,python-click)))
8035 (synopsis "Logging for click applications")
8036 (description "This package provides a Python library for logging Click
8037applications.")
8038 (home-page "https://github.com/click-contrib/click-log")
8039 (license license:expat)))
7b3a4ee4
LF
8040
8041(define-public python-apipkg
8042 (package
8043 (name "python-apipkg")
8044 (version "1.4")
8045 (source (origin
8046 (method url-fetch)
8047 (uri (pypi-uri "apipkg" version))
8048 (sha256
8049 (base32
8050 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8051 (build-system python-build-system)
b43bab3c 8052 (inputs
7b3a4ee4
LF
8053 `(("python-pytest" ,python-pytest)))
8054 (synopsis "Namespace control and lazy-import mechanism")
8055 (description "With apipkg you can control the exported namespace of a Python
8056package and greatly reduce the number of imports for your users. It is a small
8057pure Python module that works on virtually all Python versions.")
8058 (home-page "https://bitbucket.org/hpk42/apipkg")
e08739c3
CAW
8059 (license license:expat)
8060 (properties `((python2-variant . ,(delay python2-apipkg))))))
8061
8062(define-public python2-apipkg
8063 (package
8064 (inherit (package-with-python2
8065 (strip-python2-variant python-apipkg)))
8066 (native-inputs
8067 `(("python2-setuptools" ,python2-setuptools)))))
848964fe
LF
8068
8069(define-public python-execnet
8070 (package
8071 (name "python-execnet")
8072 (version "1.4.1")
8073 (source (origin
8074 (method url-fetch)
8075 (uri (pypi-uri "execnet" version))
8076 (sha256
8077 (base32
8078 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8079 (build-system python-build-system)
ca0eee9d
LF
8080 (arguments
8081 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8082 ;; The two test failures are caused by the lack of an `ssh` executable.
8083 ;; The test suite can be run with pytest after the 'install' phase.
8084 #:tests? #f))
848964fe 8085 (native-inputs
ca0eee9d
LF
8086 `(("python-pytest" ,python-pytest)
8087 ("python-setuptools-scm" ,python-setuptools-scm)))
584d068f 8088 (inputs
848964fe
LF
8089 `(("python-apipkg" ,python-apipkg)))
8090 (synopsis "Rapid multi-Python deployment")
8091 (description "Execnet provides a share-nothing model with
8092channel-send/receive communication for distributing execution across many
8093Python interpreters across version, platform and network barriers. It has a
8094minimal and fast API targetting the following uses:
8095@enumerate
8096@item distribute tasks to (many) local or remote CPUs
8097@item write and deploy hybrid multi-process applications
8098@item write scripts to administer multiple environments
8099@end enumerate")
8100 (home-page "http://codespeak.net/execnet/")
16c84f90
CAW
8101 (license license:expat)
8102 (properties `((python2-variant . ,(delay python2-execnet))))))
8103
8104(define-public python2-execnet
8105 (let ((execnet (package-with-python2
8106 (strip-python2-variant python-execnet))))
8107 (package
8108 (inherit execnet)
8109 (native-inputs
8110 `(("python2-setuptools" ,python2-setuptools)
8111 ,@(package-native-inputs execnet))))))
6720dbb4
LF
8112
8113;;; The software provided by this package was integrated into pytest 2.8.
8114(define-public python-pytest-cache
8115 (package
8116 (name "python-pytest-cache")
8117 (version "1.0")
8118 (source (origin
8119 (method url-fetch)
8120 (uri (pypi-uri "pytest-cache" version))
8121 (sha256
8122 (base32
8123 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8124 (build-system python-build-system)
630d938f
EF
8125 (inputs
8126 `(("python-apipkg" ,python-apipkg)
8127 ("python-execnet" ,python-execnet)
8128 ("python-py" ,python-py)
8129 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8130 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8131 (description "The pytest-cache plugin provides tools to rerun failures from
8132the last py.test invocation.")
8133 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
0adc21c2
EF
8134 (license license:expat)
8135 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
8136
8137(define-public python2-pytest-cache
8138 (let ((pytest-cache (package-with-python2
8139 (strip-python2-variant python-pytest-cache))))
8140 (package
8141 (inherit pytest-cache)
8142 (native-inputs
8143 `(("python2-setuptools" ,python2-setuptools)
8144 ,@(package-native-inputs pytest-cache))))))
d7e729fe
LF
8145
8146(define-public python-pytest-localserver
8147 (package
8148 (name "python-pytest-localserver")
29f20168 8149 (version "0.3.5")
d7e729fe
LF
8150 (source (origin
8151 (method url-fetch)
29f20168 8152 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8153 (sha256
8154 (base32
29f20168 8155 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8156 (build-system python-build-system)
8157 (arguments
8158 `(#:phases (modify-phases %standard-phases
8159 (replace 'check
8160 (lambda _
8161 (zero? (system* "py.test" "--genscript=runtests.py"))
8162 (zero? (system* "py.test")))))))
8163 (native-inputs
d7e729fe
LF
8164 `(("python-pytest" ,python-pytest)
8165 ("python-requests" ,python-requests)
9ba40f05
EF
8166 ("python-six" ,python-six)))
8167 (inputs
8168 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8169 (synopsis "Py.test plugin to test server connections locally")
8170 (description "Pytest-localserver is a plugin for the pytest testing
8171framework which enables you to test server connections locally.")
8172 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8173 (license license:expat)))
28cecbb7
LF
8174
8175(define-public python-wsgi-intercept
8176 (package
8177 (name "python-wsgi-intercept")
909fbd2b 8178 (version "1.2.2")
28cecbb7
LF
8179 (source (origin
8180 (method url-fetch)
909fbd2b
LF
8181 (uri (string-append
8182 "https://pypi.python.org/packages/"
8183 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8184 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8185 (sha256
8186 (base32
909fbd2b 8187 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7
LF
8188 (build-system python-build-system)
8189 (native-inputs
9d813ec1 8190 `(("python-pytest" ,python-pytest)
8757f050
LF
8191 ("python-six" ,python-six)
8192 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8193 (propagated-inputs
8194 `(("python-httplib2" ,python-httplib2)
8195 ("python-requests" ,python-requests)))
8196 (synopsis "Puts a WSGI application in place of a real URI for testing")
8197 (description "Wsgi_intercept installs a WSGI application in place of a real
8198URI for testing. Testing a WSGI application normally involves starting a
8199server at a local host and port, then pointing your test code to that address.
8200Instead, this library lets you intercept calls to any specific host/port
8201combination and redirect them into a WSGI application importable by your test
8202program. Thus, you can avoid spawning multiple processes or threads to test
8203your Web app.")
8204 (home-page "https://github.com/cdent/wsgi-intercept")
8205 (license license:expat)))
89b8a551
LF
8206
8207(define-public python-pytest-xprocess
8208 (package
8209 (name "python-pytest-xprocess")
8210 (version "0.9.1")
8211 (source (origin
8212 (method url-fetch)
8213 (uri (pypi-uri "pytest-xprocess" version))
8214 (sha256
8215 (base32
8216 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8217 (build-system python-build-system)
8218 (propagated-inputs
8219 `(("python-pytest" ,python-pytest)
8220 ("python-pytest-cache" ,python-pytest-cache)
8221 ("python-psutil" ,python-psutil)))
8222 (synopsis "Pytest plugin to manage external processes across test runs")
8223 (description "Pytest-xprocess is an experimental py.test plugin for managing
8224processes across test runs.")
8225 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8226 (license license:expat)))
5c299bf0
LF
8227
8228(define-public python-icalendar
8229 (package
8230 (name "python-icalendar")
25291aca 8231 (version "3.11")
5c299bf0
LF
8232 (source (origin
8233 (method url-fetch)
8234 (uri (pypi-uri "icalendar" version))
8235 (sha256
8236 (base32
25291aca 8237 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8238 (build-system python-build-system)
8239 (propagated-inputs
8240 `(("python-dateutil-2" ,python-dateutil-2)
8241 ("python-pytz" ,python-pytz)))
8242 (synopsis "Python library for parsing iCalendar files")
8243 (description "The icalendar package is a parser/generator of iCalendar
8244files for use with Python.")
8245 (home-page "https://github.com/collective/icalendar")
3f641af0 8246 (license license:bsd-2)))
6bbbb53e
LF
8247
8248(define-public python-sphinxcontrib-newsfeed
8249 (package
8250 (name "python-sphinxcontrib-newsfeed")
8251 (version "0.1.4")
8252 (source (origin
8253 (method url-fetch)
8254 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8255 (sha256
8256 (base32
8257 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8258 (build-system python-build-system)
8259 (propagated-inputs
8260 `(("python-docutils" ,python-docutils)
8261 ("python-sphinx" ,python-sphinx)))
8262 (synopsis "News Feed extension for Sphinx")
8263 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8264Blog, News or Announcements section to a Sphinx website.")
8265 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8266 (license license:bsd-2)))
2216e15c
SB
8267
8268(define-public python-args
8269 (package
8270 (name "python-args")
8271 (version "0.1.0")
8272 (source (origin
8273 (method url-fetch)
8274 (uri (pypi-uri "args" version))
8275 (sha256
8276 (base32
8277 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8278 (build-system python-build-system)
8279 (inputs
8280 `(("python-setuptools" ,python-setuptools)))
8281 (home-page "https://github.com/kennethreitz/args")
8282 (synopsis "Command-line argument parser")
8283 (description
8284 "This library provides a Python module to parse command-line arguments.")
3f641af0 8285 (license license:bsd-3)))
2216e15c
SB
8286
8287(define-public python2-args
8288 (package-with-python2 python-args))
c06a3de9
SB
8289
8290(define-public python-clint
8291 (package
8292 (name "python-clint")
8293 (version "0.5.1")
8294 (source (origin
8295 (method url-fetch)
8296 (uri (pypi-uri "clint" version))
8297 (sha256
8298 (base32
8299 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8300 (build-system python-build-system)
8301 (inputs
8302 `(("python-args" ,python-args)
8303 ("python-setuptools" ,python-setuptools)))
8304 (home-page "https://github.com/kennethreitz/clint")
8305 (synopsis "Command-line interface tools")
8306 (description
8307 "Clint is a Python module filled with a set of tools for developing
8308command-line applications, including tools for colored and indented
8309output, progress bar display, and pipes.")
3f641af0 8310 (license license:isc)))
c06a3de9
SB
8311
8312(define-public python2-clint
8313 (package-with-python2 python-clint))
4ecdeef8
SB
8314
8315(define-public python-astor
8316 (package
8317 (name "python-astor")
8318 (version "0.5")
8319 (source (origin
8320 (method url-fetch)
8321 (uri (pypi-uri "astor" version))
8322 (sha256
8323 (base32
8324 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8325 (build-system python-build-system)
8326 (inputs
8327 `(("python-setuptools" ,python-setuptools)))
8328 (home-page "https://github.com/berkerpeksag/astor")
8329 (synopsis "Read and write Python ASTs")
8330 (description
8331 "Astor is designed to allow easy manipulation of Python source via the
8332Abstract Syntax Tree.")
3f641af0 8333 (license license:bsd-3)))
4ecdeef8
SB
8334
8335(define-public python2-astor
8336 (package-with-python2 python-astor))
e224b7d0
SB
8337
8338(define-public python-rply
8339 (package
8340 (name "python-rply")
8341 (version "0.7.4")
8342 (source (origin
8343 (method url-fetch)
8344 (uri (pypi-uri "rply" version))
8345 (sha256
8346 (base32
8347 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8348 (build-system python-build-system)
8349 (inputs
8350 `(("python-appdirs" ,python-appdirs)
8351 ("python-setuptools" ,python-setuptools)))
8352 (home-page "https://github.com/alex/rply")
8353 (synopsis "Parser generator for Python")
8354 (description
8355 "This package provides a pure Python based parser generator, that also
8356works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8357with a new public API, and RPython support.")
3f641af0 8358 (license license:bsd-3)))
e224b7d0
SB
8359
8360(define-public python2-rply
8361 (package-with-python2 python-rply))
c3e919d7
SB
8362
8363(define-public python-hy
8364 (package
8365 (name "python-hy")
8366 (version "0.11.1")
8367 (source (origin
8368 (method url-fetch)
8369 (uri (pypi-uri "hy" version))
8370 (sha256
8371 (base32
8372 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8373 (build-system python-build-system)
8374 (inputs
8375 `(("python-astor" ,python-astor)
8376 ("python-clint" ,python-clint)
8377 ("python-rply" ,python-rply)
8378 ("python-setuptools" ,python-setuptools)))
8379 (home-page "http://hylang.org/")
8380 (synopsis "Lisp frontend to Python")
8381 (description
8382 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8383its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8384Python at your fingertips, in Lisp form.")
8385 (license license:expat)))
8386
8387(define-public python2-hy
8388 (package-with-python2 python-hy))
7a5b944e 8389
81f7f297
EF
8390(define-public python-rauth
8391 (package
8392 (name "python-rauth")
8393 (version "0.7.2")
8394 (source
8395 (origin
8396 (method url-fetch)
8397 (uri (pypi-uri "rauth" version))
8398 (sha256
8399 (base32
8400 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8401 (build-system python-build-system)
8402 (arguments
8403 `(#:test-target "check"))
0848d8d3 8404 (inputs
81f7f297
EF
8405 `(("python-requests" ,python-requests)))
8406 (home-page "https://github.com/litl/rauth")
8407 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8408 (description
8409 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8410provides service wrappers for convenient connection initialization and
8411authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8412 (license license:expat)
8413 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8414
8415(define-public python2-rauth
0848d8d3
EF
8416 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8417 (package
8418 (inherit base)
8419 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8420 ("python2-unittest2" ,python2-unittest2)
8421 ,@(package-native-inputs base))))))
81f7f297 8422
1abe448d
EF
8423(define-public python2-functools32
8424 (package
8425 (name "python2-functools32")
8426 (version "3.2.3-2")
8427 (source
8428 (origin
8429 (method url-fetch)
8430 (uri (pypi-uri "functools32" version))
8431 (sha256
8432 (base32
8433 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8434 (build-system python-build-system)
8435 (arguments
8436 `(#:python ,python-2
8437 #:tests? #f)) ; no test target
8438 (native-inputs
8439 `(("python2-setuptools" ,python2-setuptools)))
8440 (home-page "https://github.com/MiCHiLU/python-functools32")
8441 (synopsis
8442 "Backport of the functools module from Python 3.2.3")
8443 (description
8444 "This package is a backport of the @code{functools} module from Python
84453.2.3 for use with older versions of Python and PyPy.")
8446 (license license:expat)))
8447
877889f3 8448(define-public python2-futures
7a5b944e 8449 (package
877889f3 8450 (name "python2-futures")
7a5b944e
EF
8451 (version "3.0.3")
8452 (source
8453 (origin
8454 (method url-fetch)
8455 (uri (pypi-uri "futures" version))
8456 (sha256
8457 (base32
8458 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8459 (build-system python-build-system)
877889f3 8460 (arguments `(#:python ,python-2))
7a5b944e 8461 (native-inputs
877889f3 8462 `(("python2-setuptools" ,python2-setuptools)))
7a5b944e
EF
8463 (home-page "https://github.com/agronholm/pythonfutures")
8464 (synopsis
8465 "Backport of the concurrent.futures package from Python 3.2")
8466 (description
8467 "The concurrent.futures module provides a high-level interface for
8468asynchronously executing callables. This package backports the
8469concurrent.futures package from Python 3.2")
3f641af0 8470 (license license:bsd-3)))
7a5b944e 8471
5cb2fe44
EF
8472(define-public python-promise
8473 (package
8474 (name "python-promise")
8475 (version "0.4.2")
8476 (source
8477 (origin
8478 (method url-fetch)
8479 (uri (pypi-uri "promise" version))
8480 (sha256
8481 (base32
8482 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8483 (build-system python-build-system)
8484 ;; Tests wants python-futures, which is a python2 only program, and
8485 ;; can't be found by python-promise at test time.
8486 (arguments `(#:tests? #f))
8487 (home-page "https://github.com/syrusakbary/promise")
8488 (synopsis "Promises/A+ implementation for Python")
8489 (description
8490 "Promises/A+ implementation for Python")
8491 (properties `((python2-variant . ,(delay python2-promise))))
8492 (license license:expat)))
8493
8494(define-public python2-promise
8495 (let ((promise (package-with-python2
8496 (strip-python2-variant python-promise))))
8497 (package (inherit promise)
8498 (arguments (substitute-keyword-arguments (package-arguments promise)
8499 ((#:tests? _) #t)))
8500 (native-inputs
8501 `(("python2-futures" ,python2-futures)
8502 ("python2-pytest" ,python2-pytest)
8503 ("python2-setuptools" ,python2-setuptools)
8504 ,@(package-native-inputs promise))))))
8505
c18f6368
EF
8506(define-public python-urllib3
8507 (package
8508 (name "python-urllib3")
6178274d 8509 (version "1.18.1")
c18f6368
EF
8510 (source
8511 (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "urllib3" version))
8514 (sha256
8515 (base32
6178274d 8516 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8517 (build-system python-build-system)
8518 (arguments `(#:tests? #f))
8519 (native-inputs
8520 `(("python-setuptools" ,python-setuptools)
8521 ;; some packages for tests
8522 ("python-nose" ,python-nose)
8523 ("python-mock" ,python-mock)
8524 ("python-tornado" ,python-tornado)))
8525 (propagated-inputs
8526 `(;; packages for https security
8527 ("python-certifi" ,python-certifi)
8528 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8529 ("python-pyasn1" ,python-pyasn1)
8530 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8531 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8532 (synopsis "HTTP library with thread-safe connection pooling")
8533 (description
8534 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8535can reuse the same socket connection for multiple requests, it can POST files,
8536supports url redirection and retries, and also gzip and deflate decoding.")
8537 (license license:expat)))
8538
8539(define-public python2-urllib3
8540 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8541
8542(define-public python-colorama
8543 (package
8544 (name "python-colorama")
8545 (version "0.3.3")
8546 (source
8547 (origin
8548 (method url-fetch)
8549 (uri (pypi-uri "colorama" version))
8550 (sha256
8551 (base32
8552 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8553 (build-system python-build-system)
8554 (inputs
8555 `(("python-setuptools" ,python-setuptools)))
8556 (synopsis "colored terminal text rendering for Python")
8557 (description "Colorama is a Python library for rendering colored terminal
8558text.")
8559 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8560 (license license:bsd-3)))
2b2f2fc1
DT
8561
8562(define-public python2-colorama
8563 (package-with-python2 python-colorama))
f5bcec6e
DT
8564
8565(define-public python-rsa
8566 (package
8567 (name "python-rsa")
ecd68c53 8568 (version "3.4.2")
f5bcec6e
DT
8569 (source
8570 (origin
8571 (method url-fetch)
8572 (uri (pypi-uri "rsa" version))
8573 (sha256
8574 (base32
ecd68c53 8575 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e
DT
8576 (build-system python-build-system)
8577 (inputs
8578 `(("python-pyasn1" ,python-pyasn1)
8579 ("python-setuptools" ,python-setuptools)))
8580 (synopsis "Pure-Python RSA implementation")
8581 (description "Python-RSA is a pure-Python RSA implementation. It supports
8582encryption and decryption, signing and verifying signatures, and key
8583generation according to PKCS#1 version 1.5. It can be used as a Python
8584library as well as on the command line.")
8585 (home-page "http://stuvel.eu/rsa")
3f641af0 8586 (license license:asl2.0)))
f5bcec6e
DT
8587
8588(define-public python2-rsa
8589 (package-with-python2 python-rsa))
c0aacfa5
DT
8590
8591(define-public python-pluggy
8592 (package
8593 (name "python-pluggy")
8594 (version "0.3.1")
8595 (source
8596 (origin
8597 (method url-fetch)
8598 (uri (pypi-uri "pluggy" version))
8599 (sha256
8600 (base32
8601 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8602 (build-system python-build-system)
8603 (inputs
8604 `(("python-setuptools" ,python-setuptools)))
8605 (synopsis "Plugin and hook calling mechanism for Python")
8606 (description "Pluggy is an extraction of the plugin manager as used by
8607Pytest but stripped of Pytest specific details.")
8608 (home-page "https://pypi.python.org/pypi/pluggy")
8609 (license license:expat)))
8610
8611(define-public python2-pluggy
8612 (package-with-python2 python-pluggy))
a4af21ca
DT
8613
8614(define-public python-tox
8615 (package
8616 (name "python-tox")
8617 (version "2.3.1")
8618 (source
8619 (origin
8620 (method url-fetch)
8621 (uri (pypi-uri "tox" version))
8622 (sha256
8623 (base32
8624 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8625 (build-system python-build-system)
8626 (arguments
8627 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8628 ;; pytest breaks other packages.
8629 '(#:tests? #f))
8630 (inputs
8631 `(("python-setuptools" ,python-setuptools)
8632 ("python-pluggy" ,python-pluggy)
8633 ("python-py" ,python-py)
8634 ("python-virtualenv" ,python-virtualenv)
8635 ("python-pytest" ,python-pytest)))
8636 (home-page "http://tox.testrun.org/")
8637 (synopsis "Virtualenv-based automation of test activities")
8638 (description "Tox is a generic virtualenv management and test command line
8639tool. It can be used to check that a package installs correctly with
8640different Python versions and interpreters, or run tests in each type of
8641supported environment, or act as a frontend to continuous integration
8642servers.")
8643 (license license:expat)))
8644
8645(define-public python2-tox
8646 (package-with-python2 python-tox))
ba9da248
DT
8647
8648(define-public python-jmespath
8649 (package
8650 (name "python-jmespath")
8651 (version "0.9.0")
8652 (source
8653 (origin
8654 (method url-fetch)
8655 (uri (pypi-uri "jmespath" version))
8656 (sha256
8657 (base32
8658 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8659 (build-system python-build-system)
8660 (inputs
8661 `(("python-setuptools" ,python-setuptools)))
8662 (synopsis "JSON Matching Expressions")
8663 (description "JMESPath (pronounced “james path”) is a Python library that
8664allows one to declaratively specify how to extract elements from a JSON
8665document.")
8666 (home-page "https://github.com/jmespath/jmespath.py")
8667 (license license:expat)))
8668
8669(define-public python2-jmespath
8670 (package-with-python2 python-jmespath))
935fcd5c
DT
8671
8672(define-public python-botocore
8673 (package
8674 (name "python-botocore")
e09f952d 8675 (version "1.4.62")
935fcd5c
DT
8676 (source
8677 (origin
8678 (method url-fetch)
8679 (uri (pypi-uri "botocore" version))
8680 (sha256
8681 (base32
e09f952d 8682 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c
DT
8683 (build-system python-build-system)
8684 (inputs
8685 `(("python-dateutil" ,python-dateutil-2)
8686 ("python-docutils" ,python-docutils)
8687 ("python-mock" ,python-mock)
8688 ("python-nose" ,python-nose)
8689 ("python-setuptools" ,python-setuptools)
8690 ("python-tox" ,python-tox)
8691 ("python-wheel" ,python-wheel)
8692 ("python-jmespath" ,python-jmespath)))
8693 (home-page "https://github.com/boto/botocore")
8694 (synopsis "Low-level interface to AWS")
8695 (description "Botocore is a Python library that provides a low-level
8696interface to the Amazon Web Services (AWS) API.")
3f641af0 8697 (license license:asl2.0)))
935fcd5c
DT
8698
8699(define-public python2-botocore
8700 (package-with-python2 python-botocore))
f861b8b8
DT
8701
8702(define-public awscli
8703 (package
8704 (name "awscli")
d5ccf71e 8705 (version "1.11.5")
f861b8b8
DT
8706 (source
8707 (origin
8708 (method url-fetch)
d5ccf71e 8709 (uri (pypi-uri name version))
f861b8b8
DT
8710 (sha256
8711 (base32
d5ccf71e 8712 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8
DT
8713 (build-system python-build-system)
8714 (inputs
8715 `(("python-colorama" ,python-colorama)
8716 ("python-docutils" ,python-docutils)
8717 ("python-mock" ,python-mock)
8718 ("python-nose" ,python-nose)
8719 ("python-rsa" ,python-rsa)
8720 ("python-setuptools" ,python-setuptools)
8721 ("python-sphinx" ,python-sphinx)
8722 ("python-tox" ,python-tox)
8723 ("python-wheel" ,python-wheel)
d5ccf71e
LF
8724 ("python-botocore" ,python-botocore)
8725 ("python-s3transfer" ,python-s3transfer)))
f861b8b8
DT
8726 (home-page "http://aws.amazon.com/cli/")
8727 (synopsis "Command line client for AWS")
8728 (description "AWS CLI provides a unified command line interface to the
8729Amazon Web Services (AWS) API.")
3f641af0 8730 (license license:asl2.0)))
6a44697d
LF
8731
8732(define-public python-hypothesis
8733 (package
8734 (name "python-hypothesis")
bea6d94d 8735 (version "3.1.0")
6a44697d
LF
8736 (source (origin
8737 (method url-fetch)
8738 (uri (pypi-uri "hypothesis" version))
8739 (sha256
8740 (base32
bea6d94d 8741 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8742 (build-system python-build-system)
6a44697d
LF
8743 (propagated-inputs
8744 `(("python-flake8" ,python-flake8)
8745 ("python-pytest" ,python-pytest)))
8746 (synopsis "Library for property based testing")
8747 (description "Hypothesis is a library for testing your Python code against a
8748much larger range of examples than you would ever want to write by hand. It’s
8749based on the Haskell library, Quickcheck, and is designed to integrate
8750seamlessly into your existing Python unit testing work flow.")
8751 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8752 (license license:mpl2.0)
6f068e08 8753 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8754
8755(define-public python2-hypothesis
6f068e08
EF
8756 (let ((hypothesis (package-with-python2
8757 (strip-python2-variant python-hypothesis))))
8758 (package (inherit hypothesis)
8759 (native-inputs
8760 `(("python2-enum34" ,python2-enum34)
8761 ("python2-setuptools" ,python2-setuptools))))))
7517e73c
LF
8762
8763(define-public python-pytest-subtesthack
8764 (package
8765 (name "python-pytest-subtesthack")
8766 (version "0.1.1")
8767 (source (origin
8768 (method url-fetch)
8769 (uri (pypi-uri "pytest-subtesthack" version))
8770 (sha256
8771 (base32
8772 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8773 (build-system python-build-system)
8774 (native-inputs
8775 `(;; setuptools required for python-2 variant
8776 ("python-setuptools" ,python-setuptools)))
8777 (propagated-inputs
8778 `(("python-pytest" ,python-pytest)))
8779 (synopsis "Set-up and tear-down fixtures for unit tests")
8780 (description "This plugin allows you to set up and tear down fixtures within
8781unit test functions that use @code{py.test}. This is useful for using
8782@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8783function multiple times, without setting up or tearing down fixture state as is
8784normally the case.")
8785 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8786 (license license:unlicense)))
7517e73c
LF
8787
8788(define-public python2-pytest-subtesthack
8789 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8790
8791(define-public python2-xdo
8792 (package
8793 (name "python2-xdo")
8794 (version "0.2")
8795 (source (origin
8796 (method url-fetch)
8797 (uri (string-append
8798 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8799 "python-xdo_" version ".orig.tar.gz"))
8800 (sha256
8801 (base32
8802 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8803 (build-system python-build-system)
8804 (arguments
8805 `(#:python ,python-2
8806 #:tests? #f)) ; no tests provided
8807 (inputs
8808 `(("xdotool" ,xdotool)
8809 ("libX11" ,libx11)))
8810 (home-page "https://tracker.debian.org/pkg/python-xdo")
8811 (synopsis "Python library for simulating X11 keyboard/mouse input")
8812 (description "Provides bindings to libxdo for manipulating X11 via simulated
8813input. (Note that this is mostly a legacy library; you may wish to look at
8814python-xdo for newer bindings.)")
3f641af0 8815 (license license:bsd-3)))
0bdc1671 8816
cb34dc6c
CAW
8817(define-public python-wtforms
8818 (package
8819 (name "python-wtforms")
8820 (version "2.1")
8821 (source
8822 (origin
8823 (method url-fetch)
8824 (uri (pypi-uri "WTForms" version ".zip"))
8825 (sha256
8826 (base32
8827 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8828 (build-system python-build-system)
13c4d874
EF
8829 (arguments
8830 '(#:phases
8831 (modify-phases %standard-phases
8832 (add-after 'unpack 'remove-django-test
8833 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8834 (lambda _
8835 (substitute*
8836 "tests/runtests.py"
8837 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8838 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8839 #t)))))
cb34dc6c
CAW
8840 (native-inputs
8841 `(("unzip" ,unzip)))
8842 (home-page "http://wtforms.simplecodes.com/")
8843 (synopsis
8844 "Form validation and rendering library for Python web development")
8845 (description
8846 "WTForms is a flexible forms validation and rendering library
8847for Python web development. It is very similar to the web form API
8848available in Django, but is a standalone package.")
3f641af0 8849 (license license:bsd-3)
cb34dc6c
CAW
8850 (properties `((python2-variant . ,(delay python2-wtforms))))))
8851
8852(define-public python2-wtforms
8853 (package
8854 (inherit (package-with-python2
8855 (strip-python2-variant python-wtforms)))
8856 (inputs `(("python2-setuptools" ,python2-setuptools)))))
50aaec25
DT
8857
8858(define-public python-mako
8859 (package
8860 (name "python-mako")
8861 (version "1.0.3")
8862 (source
8863 (origin
8864 (method url-fetch)
8865 (uri (pypi-uri "Mako" version))
8866 (sha256
8867 (base32
8868 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8869 (build-system python-build-system)
8870 (native-inputs
8871 `(("python-markupsafe" ,python-markupsafe)
8872 ("python-mock" ,python-mock)
8873 ("python-nose" ,python-nose)))
8874 (home-page "http://www.makotemplates.org/")
8875 (synopsis "Templating language for Python")
8876 (description "Mako is a templating language for Python that compiles
8877templates into Python modules.")
8878 (license license:expat)
8879 (properties `((python2-variant . ,(delay python2-mako))))))
8880
8881(define-public python2-mako
8882 (let ((base (package-with-python2
8883 (strip-python2-variant python-mako))))
8884 (package
8885 (inherit base)
8886 (native-inputs
8887 (cons `("python2-setuptools" ,python2-setuptools)
8888 (package-native-inputs base))))))
ae00a41f
CAW
8889
8890(define-public python-waitress
8891 (package
8892 (name "python-waitress")
8893 (version "0.8.10")
8894 (source
8895 (origin
8896 (method url-fetch)
8897 (uri (pypi-uri "waitress" version))
8898 (sha256
8899 (base32
8900 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8901 (build-system python-build-system)
8902 (home-page "https://github.com/Pylons/waitress")
8903 (synopsis "Waitress WSGI server")
8904 (description "Waitress is meant to be a production-quality pure-Python WSGI
8905server with very acceptable performance.")
3f641af0 8906 (license license:zpl2.1)
ae00a41f
CAW
8907 (properties `((python2-variant . ,(delay python2-waitress))))))
8908
8909(define-public python2-waitress
8910 (package
8911 (inherit (package-with-python2
8912 (strip-python2-variant python-waitress)))
8913 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
778a284b
CAW
8914
8915(define-public python-wsgiproxy2
8916 (package
8917 (name "python-wsgiproxy2")
8918 (version "0.4.2")
8919 (source
8920 (origin
8921 (method url-fetch)
8922 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8923 (sha256
8924 (base32
8925 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8926 (build-system python-build-system)
e359b31a
LF
8927 (arguments
8928 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8929 ;; support Python 3:
8930 ;; https://github.com/benoitc/restkit/issues/140
8931 #:tests? #f))
778a284b
CAW
8932 (native-inputs
8933 `(("unzip" ,unzip)
8934 ("python-nose" ,python-nose)
8935 ("python-coverage" ,python-coverage)))
8936 (propagated-inputs
8937 `(("python-six" ,python-six)
8938 ("python-webob" ,python-webob)))
8939 (home-page
8940 "https://github.com/gawel/WSGIProxy2/")
8941 (synopsis "WSGI Proxy with various http client backends")
8942 (description "WSGI turns HTTP requests into WSGI function calls.
8943WSGIProxy turns WSGI function calls into HTTP requests.
8944It also includes code to sign requests and pass private data,
8945and to spawn subprocesses to handle requests.")
8946 (license license:expat)
8947 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8948
8949(define-public python2-wsgiproxy2
8950 (let ((wsgiproxy2 (package-with-python2
8951 (strip-python2-variant python-wsgiproxy2))))
8952 (package
8953 (inherit wsgiproxy2)
8954 (inputs `(("python2-setuptools" ,python2-setuptools)
8955 ,@(package-inputs wsgiproxy2))))))
bb7518b1
CAW
8956
8957(define-public python-pastedeploy
8958 (package
8959 (name "python-pastedeploy")
8960 (version "1.5.2")
8961 (source
8962 (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "PasteDeploy" version))
8965 (sha256
8966 (base32
8967 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8968 (build-system python-build-system)
8969 (native-inputs
8970 `(("python-nose" ,python-nose)))
8971 (propagated-inputs
8972 ;; This package uses pkg_resources, part of setuptools, during runtime,
8973 ;; hence why not a native-input.
8974 `(("python-setuptools" ,python-setuptools)))
8975 (home-page "http://pythonpaste.org/deploy/")
8976 (synopsis
8977 "Load, configure, and compose WSGI applications and servers")
8978 (description
8979 "This tool provides code to load WSGI applications and servers from URIs;
8980these URIs can refer to Python Eggs for INI-style configuration files. Paste
8981Script provides commands to serve applications based on this configuration
8982file.")
8983 (license license:expat)))
8984
8985(define-public python2-pastedeploy
8986 (package-with-python2 python-pastedeploy))
1cf53652 8987
c4a7904c
CAW
8988(define-public python-paste
8989 (package
8990 (name "python-paste")
8991 (version "2.0.2")
8992 (source
8993 (origin
8994 (method url-fetch)
8995 (uri (pypi-uri "Paste" version))
8996 (sha256
8997 (base32
8998 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8999 (patches (search-patches "python-paste-remove-website-test.patch"
9000 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9001 (build-system python-build-system)
9002 (native-inputs
9003 `(("python-nose" ,python-nose)))
9004 (propagated-inputs
9005 `(;; Uses pkg_resources provided by setuptools internally.
9006 ("python-setuptools" ,python-setuptools)
9007 ("python-six" ,python-six)))
9008 (arguments
9009 '(;; Tests don't pass on Python 3, but work fine on Python 2.
9010 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
9011 ;; but is usable enough for the minimal amount it's used in MediaGoblin
9012 ;; still... things should be better by the next Paste release.)
9013 #:tests? #f))
9014 (home-page "http://pythonpaste.org")
9015 (synopsis
9016 "Python web development tools, focusing on WSGI")
9017 (description
9018 "Paste provides a variety of web development tools and middleware which
9019can be nested together to build web applications. Paste's design closely
9020follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9021 (license license:expat)
9022 (properties `((python2-variant . ,(delay python2-paste))))))
9023
9024(define-public python2-paste
9025 (let ((paste (package-with-python2
9026 (strip-python2-variant python-paste))))
9027 (package
9028 (inherit paste)
9029 (arguments
9030 ;; Tests are back for Python 2!
9031 `(#:tests? #t
9032 ,@(package-arguments paste))))))
9033
a8f20f63
CAW
9034(define-public python-pastescript
9035 (package
9036 (name "python-pastescript")
9037 (version "2.0.2")
9038 (source
9039 (origin
9040 (method url-fetch)
9041 (uri (pypi-uri "PasteScript" version))
9042 (sha256
9043 (base32
9044 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9045 (build-system python-build-system)
9046 (native-inputs
9047 `(("python-nose" ,python-nose)))
9048 (propagated-inputs
9049 `(;; Uses pkg_resources provided by setuptools internally.
9050 ("python-setuptools" ,python-setuptools)
9051 ("python-paste" ,python-paste)
9052 ("python-pastedeploy" ,python-pastedeploy)))
9053 (home-page "http://pythonpaste.org/script/")
9054 (arguments
9055 '(;; Unfortunately, this requires the latest unittest2,
9056 ;; but that requires traceback2 which requires linecache2 which requires
9057 ;; unittest2. So we're skipping tests for now.
9058 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9059 ;; so in theory we could get around this situation somehow.)
9060 #:tests? #f))
9061 (synopsis
9062 "Pluggable command line tool for serving web applications and more")
9063 (description
9064 "PasteScript is a plugin-friendly command line tool which provides a
9065variety of features, from launching web applications to bootstrapping project
9066layouts.")
9067 (license license:expat)))
9068
9069(define-public python2-pastescript
9070 (package-with-python2 python-pastescript))
9071
1cf53652
CAW
9072(define-public python-pyquery
9073 (package
9074 (name "python-pyquery")
aab76e80 9075 (version "1.2.13")
1cf53652
CAW
9076 (source
9077 (origin
9078 (method url-fetch)
9079 (uri (pypi-uri "pyquery" version))
9080 (sha256
9081 (base32
aab76e80 9082 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 9083 (build-system python-build-system)
2ddbfa8c
LF
9084 (native-inputs
9085 `(("python-webob" ,python-webob)
9086 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9087 (propagated-inputs
9088 `(("python-lxml" ,python-lxml)
9089 ("python-cssselect" ,python-cssselect)))
9090 (home-page "https://github.com/gawel/pyquery")
9091 (synopsis "Make jQuery-like queries on xml documents")
9092 (description "pyquery allows you to make jQuery queries on xml documents.
9093The API is as much as possible the similar to jQuery. pyquery uses lxml for
9094fast xml and html manipulation.")
3f641af0 9095 (license license:bsd-3)
1cf53652
CAW
9096 (properties `((python2-variant . ,(delay python2-pyquery))))))
9097
9098(define-public python2-pyquery
9099 (let ((pyquery (package-with-python2
9100 (strip-python2-variant python-pyquery))))
9101 (package
9102 (inherit pyquery)
2ddbfa8c
LF
9103 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9104 ,@(package-native-inputs pyquery))))))
aa6313d6
CAW
9105
9106(define-public python-webtest
9107 (package
9108 (name "python-webtest")
9109 (version "2.0.20")
9110 (source
9111 (origin
9112 (method url-fetch)
9113 (uri (pypi-uri "WebTest" version))
9114 (sha256
9115 (base32
9116 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9117 (build-system python-build-system)
9118 (arguments
9119 `(;; Unfortunately we have to disable tests!
9120 ;; This release of WebTest is pinned to python-nose < 1.3,
9121 ;; but older versions of python-nose are plagued with the following
9122 ;; bug(s), which rears its ugly head during test execution:
9123 ;; https://github.com/nose-devs/nose/issues/759
9124 ;; https://github.com/nose-devs/nose/pull/811
9125 #:tests? #f))
9126 ;; Commented out code is no good, but in this case, once tests
9127 ;; are ready to be enabled again, we should put the following
9128 ;; in place:
9129 ;; (native-inputs
9130 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9131 ;; ; but see above comment
9132 ;; ("python-coverage" ,python-coverage)
9133 ;; ("python-mock" ,python-mock)
9134 ;; ("python-pastedeploy" ,python-pastedeploy)
9135 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9136 ;; ("python-pyquery" ,python-pyquery)))
9137 (propagated-inputs
9138 `(("python-waitress" ,python-waitress)
9139 ("python-webob" ,python-webob)
9140 ("python-six" ,python-six)
9141 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9142 (home-page "http://webtest.pythonpaste.org/")
9143 (synopsis "Helper to test WSGI applications")
9144 (description "Webtest allows you to test your Python web applications
9145without starting an HTTP server. It supports anything that supports the
9146minimum of WSGI.")
9147 (license license:expat)
9148 (properties `((python2-variant . ,(delay python2-webtest))))))
9149
9150(define-public python2-webtest
9151 (let ((webtest (package-with-python2
9152 (strip-python2-variant python-webtest))))
9153 (package
9154 (inherit webtest)
9155 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9156 ,@(package-native-inputs webtest))))))
4cb122cd
CAW
9157
9158(define-public python-anyjson
9159 (package
9160 (name "python-anyjson")
9161 (version "0.3.3")
9162 (source
9163 (origin
9164 (method url-fetch)
9165 (uri (pypi-uri "anyjson" version))
9166 (sha256
9167 (base32
9168 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9169 (build-system python-build-system)
9170 (arguments
9171 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9172 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9173 ;; whatever) so this transformation needs to be done before the tests
9174 ;; can be run. Maybe we could add a build step to transform beforehand
9175 ;; but it could be annoying/difficult.
9176 ;; We can enable tests for the Python 2 version, though, and do below.
9177 #:tests? #f))
9178 (home-page "http://bitbucket.org/runeh/anyjson/")
9179 (synopsis
9180 "Wraps best available JSON implementation in a common interface")
9181 (description
9182 "Anyjson loads whichever is the fastest JSON module installed
9183and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9184 (license license:bsd-3)
4cb122cd
CAW
9185 (properties `((python2-variant . ,(delay python2-anyjson))))))
9186
9187(define-public python2-anyjson
9188 (let ((anyjson (package-with-python2
9189 (strip-python2-variant python-anyjson))))
9190 (package
9191 (inherit anyjson)
9192 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9193 #:tests? #t
9194 ,@(package-arguments anyjson)))
9195 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9196 ("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9197
9198(define-public python-amqp
9199 (package
9200 (name "python-amqp")
9201 (version "1.4.9")
9202 (source
9203 (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "amqp" version))
9206 (sha256
9207 (base32
9208 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9209 (build-system python-build-system)
9210 (native-inputs
9211 `(("python-nose" ,python-nose)
9212 ("python-mock" ,python-mock)))
9213 (home-page "http://github.com/celery/py-amqp")
9214 (synopsis
9215 "Low-level AMQP client for Python (fork of amqplib)")
9216 (description
9217 "This is a fork of amqplib which was originally written by Barry Pederson.
9218It is maintained by the Celery project, and used by kombu as a pure python
9219alternative when librabbitmq is not available.")
3f641af0 9220 (license license:lgpl2.1+)
8dfceab7
CAW
9221 (properties `((python2-variant . ,(delay python2-amqp))))))
9222
9223(define-public python2-amqp
9224 (let ((amqp (package-with-python2
9225 (strip-python2-variant python-amqp))))
9226 (package
9227 (inherit amqp)
9228 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9229 ;; unmaintained. Weirdly, does not do this on the python 3
9230 ;; version?
9231 #:tests? #f
9232 ,@(package-arguments amqp)))
9233 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9234 ,@(package-native-inputs amqp))))))
7d387305
CAW
9235
9236(define-public python-kombu
9237 (package
9238 (name "python-kombu")
0cb59822 9239 (version "3.0.37")
7d387305
CAW
9240 (source
9241 (origin
9242 (method url-fetch)
9243 (uri (pypi-uri "kombu" version))
9244 (sha256
9245 (base32
0cb59822 9246 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9247 (build-system python-build-system)
9248 (native-inputs
9249 `(("python-mock" ,python-mock)
9250 ("python-nose" ,python-nose)))
9251 (propagated-inputs
9252 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9253 ("python-amqp" ,python-amqp)
9254 ("python-redis" ,python-redis)))
7d387305
CAW
9255 (home-page "http://kombu.readthedocs.org")
9256 (synopsis "Message passing library for Python")
9257 (description "The aim of Kombu is to make messaging in Python as easy as
9258possible by providing an idiomatic high-level interface for the AMQ protocol,
9259and also provide proven and tested solutions to common messaging problems.
9260AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9261message orientation, queuing, routing, reliability and security, for which the
9262RabbitMQ messaging server is the most popular implementation.")
3f641af0 9263 (license license:bsd-3)
7d387305
CAW
9264 (properties `((python2-variant . ,(delay python2-kombu))))))
9265
9266(define-public python2-kombu
9267 (let ((kombu (package-with-python2
9268 (strip-python2-variant python-kombu))))
9269 (package
9270 (inherit kombu)
9271 (inputs `(("python2-setuptools" ,python2-setuptools)
9272 ("python2-unittest2" ,python2-unittest2)
9273 ,@(package-inputs kombu))))))
b6f0b9fb
CAW
9274
9275(define-public python-billiard
9276 (package
9277 (name "python-billiard")
a6bb9e44 9278 (version "3.3.0.23")
b6f0b9fb
CAW
9279 (source
9280 (origin
9281 (method url-fetch)
9282 (uri (pypi-uri "billiard" version))
9283 (sha256
9284 (base32
a6bb9e44 9285 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9286 (build-system python-build-system)
9287 (native-inputs
9288 `(("python-nose" ,python-nose)))
9289 (home-page "http://github.com/celery/billiard")
9290 (synopsis
9291 "Python multiprocessing fork with improvements and bugfixes")
9292 (description
9293 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9294multiprocessing package itself is a renamed and updated version of R Oudkerk's
9295pyprocessing package. This standalone variant is intended to be compatible with
9296Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9297 (license license:bsd-3)
b6f0b9fb
CAW
9298 (properties `((python2-variant . ,(delay python2-billiard))))))
9299
9300(define-public python2-billiard
9301 (let ((billiard (package-with-python2
9302 (strip-python2-variant python-billiard))))
9303 (package
9304 (inherit billiard)
9305 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9306 ("python2-unittest2" ,python2-unittest2)
9307 ("python2-mock" ,python2-mock)
9308 ,@(package-native-inputs billiard))))))
22df6419
CAW
9309
9310(define-public python-celery
9311 (package
9312 (name "python-celery")
9ebe87fe 9313 (version "3.1.24")
22df6419
CAW
9314 (source
9315 (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "celery" version))
9318 (sha256
9319 (base32
9ebe87fe 9320 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9321 (build-system python-build-system)
9ebe87fe
LF
9322 (arguments
9323 `(#:phases
9324 (modify-phases %standard-phases
9325 ;; These tests break with Python 3.5:
9326 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9327 (replace 'check
9328 (lambda _
9329 (zero?
9330 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9331 (native-inputs
9332 `(("python-nose" ,python-nose)))
a64cbb6f 9333 (inputs
22df6419 9334 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
9335 ("python-amqp" ,python-amqp)
9336 ("python-anyjson" ,python-anyjson)
22df6419
CAW
9337 ("python-billiard" ,python-billiard)
9338 ("python-kombu" ,python-kombu)))
9339 (home-page "http://celeryproject.org")
9340 (synopsis "Distributed Task Queue")
9341 (description "Celery is an asynchronous task queue/job queue based on
9342distributed message passing. It is focused on real-time operation, but
9343supports scheduling as well. The execution units, called tasks, are executed
9344concurrently on a single or more worker servers using multiprocessing,
9345Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9346synchronously (wait until ready).")
3f641af0 9347 (license license:bsd-3)
22df6419
CAW
9348 (properties `((python2-variant . ,(delay python2-celery))))))
9349
9350(define-public python2-celery
9351 (let ((celery (package-with-python2
9352 (strip-python2-variant python-celery))))
9353 (package
9354 (inherit celery)
9355 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9356 ("python2-unittest2" ,python2-unittest2)
9357 ("python2-mock" ,python2-mock)
9358 ,@(package-native-inputs celery))))))
97e32948
CAW
9359
9360(define-public python-translitcodec
9361 (package
9362 (name "python-translitcodec")
9363 (version "0.4.0")
9364 (source
9365 (origin
9366 (method url-fetch)
9367 (uri (pypi-uri "translitcodec" version))
9368 (sha256
9369 (base32
9370 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9371 (build-system python-build-system)
9372 (arguments
9373 `(#:tests? #f)) ; no tests provided
9374 (home-page
9375 "https://github.com/claudep/translitcodec")
9376 (synopsis
9377 "Unicode to 8-bit charset transliteration codec")
9378 (description
9379 "This package contains codecs for transliterating ISO 10646 texts into
9380best-effort representations using smaller coded character sets (ASCII,
9381ISO 8859, etc.).")
9382 (license license:expat)
9383 (properties `((python2-variant . ,(delay python2-translitcodec))))))
9384
9385(define-public python2-translitcodec
9386 (package
9387 (inherit (package-with-python2
9388 (strip-python2-variant python-translitcodec)))
9389 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0c3b90d4
CAW
9390
9391(define-public python-editor
9392 (package
9393 (name "python-editor")
9394 (version "0.5")
9395 (source
9396 (origin
9397 (method url-fetch)
9398 (uri (pypi-uri "python-editor" version))
9399 (sha256
9400 (base32
9401 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9402 (build-system python-build-system)
9403 (home-page
9404 "https://github.com/fmoo/python-editor")
9405 (synopsis
9406 "Programmatically open an editor, capture the result")
9407 (description
9408 "python-editor is a library that provides the editor module for
9409programmatically interfacing with your system's $EDITOR.")
3f641af0 9410 (license license:asl2.0)
0c3b90d4
CAW
9411 (properties `((python2-variant . ,(delay python2-editor))))))
9412
9413(define-public python2-editor
9414 (package
9415 (inherit (package-with-python2
9416 (strip-python2-variant python-editor)))
9417 (inputs `(("python2-setuptools" ,python2-setuptools)))))
3276517c
LF
9418
9419(define-public python-sphinxcontrib-programoutput
9420 (package
9421 (name "python-sphinxcontrib-programoutput")
9422 (version "0.8")
9423 (source (origin
9424 (method url-fetch)
9425 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9426 (sha256
9427 (base32
9428 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9429 (build-system python-build-system)
9430 (propagated-inputs
9431 `(("python-docutils" ,python-docutils)
9432 ("python-sphinx" ,python-sphinx)))
9433 (synopsis "Sphinx extension to include program output")
9434 (description "A Sphinx extension to literally insert the output of arbitrary
9435commands into documents, helping you to keep your command examples up to date.")
9436 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
3f641af0 9437 (license license:bsd-2)
3276517c
LF
9438 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
9439
9440(define-public python2-sphinxcontrib-programoutput
9441 (package
9442 (inherit (package-with-python2
9443 (strip-python2-variant python-sphinxcontrib-programoutput)))
9444 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
548d7165
LF
9445
9446(define-public python-sphinx-repoze-autointerface
9447 (package
9448 (name "python-sphinx-repoze-autointerface")
328ae341 9449 (version "0.8")
548d7165
LF
9450 (source (origin
9451 (method url-fetch)
9452 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9453 (sha256
9454 (base32
328ae341 9455 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9456 (build-system python-build-system)
9457 (propagated-inputs
9458 `(("python-docutils" ,python-docutils)
9459 ("python-sphinx" ,python-sphinx)
9460 ("python-zope-interface" ,python-zope-interface)))
9461 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9462 (description "This package defines an extension for the Sphinx documentation
9463system. The extension allows generation of API documentation by
9464introspection of @code{zope.interface} instances in code.")
9465 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9466 (license license:repoze)))
548d7165
LF
9467
9468(define-public python2-sphinx-repoze-autointerface
9469 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9470
9471(define-public python-psycopg2
9472 (package
9473 (name "python-psycopg2")
9474 (version "2.6.1")
9475 (source
9476 (origin
9477 (method url-fetch)
9478 (uri (pypi-uri "psycopg2" version))
9479 (sha256
9480 (base32
9481 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9482 (build-system python-build-system)
9483 (arguments
9484 ;; Tests would require a postgresql database "psycopg2_test"
9485 ;; and a running postgresql database management service.
9486 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9487 (inputs
9488 `(("postgresql" ,postgresql))) ; libpq
9489 (home-page "http://initd.org/psycopg/")
9490 (synopsis "Python PostgreSQL adapter")
9491 (description
9492 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
3f641af0 9493 (license license:lgpl3+)
b31fbea5
DM
9494 (properties `((python2-variant . ,(delay python2-psycopg2))))))
9495
9496(define-public python2-psycopg2
9497 (package
9498 (inherit (package-with-python2
9499 (strip-python2-variant python-psycopg2)))
9500 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
eed1a61f
LF
9501
9502(define-public python-vobject
9503 (package
9504 (name "python-vobject")
9bed9b15 9505 (version "0.9.2")
eed1a61f
LF
9506 (source (origin
9507 (method url-fetch)
9508 (uri (pypi-uri "vobject" version))
9509 (sha256
9510 (base32
9bed9b15 9511 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9512 (build-system python-build-system)
a9871b7b
LF
9513 (arguments
9514 '(;; The test suite relies on some non-portable Windows interfaces.
9515 #:tests? #f))
eed1a61f
LF
9516 (inputs
9517 `(("python-dateutil-2" ,python-dateutil-2)
9518 ("python-pyicu" ,python-pyicu)))
9519 (synopsis "Parse and generate vCard and vCalendar files")
9520 (description "Vobject is intended to be a full featured Python package for
9521parsing and generating vCard and vCalendar files. Currently, iCalendar files
9522are supported and well tested. vCard 3.0 files are supported, and all data
9523should be imported, but only a few components are understood in a sophisticated
9524way.")
9525 (home-page "http://eventable.github.io/vobject/")
3f641af0 9526 (license license:asl2.0)
eed1a61f
LF
9527 (properties `((python2-variant . ,(delay python2-vobject))))))
9528
9529(define-public python2-vobject
9530 (package
9531 (inherit (package-with-python2
9532 (strip-python2-variant python-vobject)))
9533 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cedac813
LF
9534
9535(define-public python-munkres
9536 (package
9537 (name "python-munkres")
38e81a2c 9538 (version "1.0.8")
cedac813
LF
9539 (source (origin
9540 (method url-fetch)
9541 (uri (pypi-uri "munkres" version))
9542 (sha256
9543 (base32
38e81a2c 9544 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9545 (build-system python-build-system)
9546 (arguments
9547 '(#:tests? #f)) ; no test suite
9548 (home-page "http://software.clapper.org/munkres/")
9549 (synopsis "Implementation of the Munkres algorithm")
9550 (description "The Munkres module provides an implementation of the Munkres
9551algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9552useful for solving the Assignment Problem.")
3f641af0 9553 (license license:bsd-3)))
cedac813
LF
9554
9555(define-public python2-munkres
9556 (package-with-python2 python-munkres))
f3b3d78f
LF
9557
9558(define-public python-flask
9559 (package
9560 (name "python-flask")
c6c80104 9561 (version "0.11.1")
f3b3d78f
LF
9562 (source (origin
9563 (method url-fetch)
9564 (uri (pypi-uri "Flask" version))
9565 (sha256
9566 (base32
c6c80104 9567 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9568 (build-system python-build-system)
9569 (propagated-inputs
9570 `(("python-itsdangerous" ,python-itsdangerous)
9571 ("python-jinja2" ,python-jinja2)
9572 ("python-werkzeug" ,python-werkzeug)))
c6c80104
DM
9573 (native-inputs
9574 `(("python-click" ,python-click)))
f3b3d78f
LF
9575 (home-page "https://github.com/mitsuhiko/flask/")
9576 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9577 (description "Flask is a micro web framework based on the Werkzeug toolkit
9578and Jinja2 template engine. It is called a micro framework because it does not
9579presume or force a developer to use a particular tool or library.")
3f641af0 9580 (license license:bsd-3)
f3b3d78f
LF
9581 (properties `((python2-variant . ,(delay python2-flask))))))
9582
9583(define-public python2-flask
7574cecf
DM
9584 (let ((base (package-with-python2 (strip-python2-variant python-flask))))
9585 (package
9586 (inherit base)
9587 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9588 ,@(package-native-inputs base))))))
603d665b
LF
9589
9590(define-public python-cookies
9591 (package
9592 (name "python-cookies")
9593 (version "2.2.1")
9594 (source (origin
9595 (method url-fetch)
9596 (uri (pypi-uri "cookies" version))
9597 (sha256
9598 (base32
9599 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9600 (build-system python-build-system)
9601 (arguments
9602 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9603 #:tests? #f))
9604 (native-inputs
9605 `(("python-pytest" ,python2-pytest)))
9606 (synopsis "HTTP cookie parser and renderer")
9607 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9608Python.")
9609 (home-page "https://gitlab.com/sashahart/cookies")
9610 (license license:expat)
9611 (properties `((python2-variant . ,(delay python2-cookies))))))
9612
9613(define-public python2-cookies
9614 (let ((cookies (package-with-python2
9615 (strip-python2-variant python-cookies))))
9616 (package (inherit cookies)
9617 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9618 ,@(package-native-inputs cookies))))))
0efde7d6
LF
9619
9620(define-public python-responses
9621 (package
9622 (name "python-responses")
9623 (version "0.5.1")
9624 (source (origin
9625 (method url-fetch)
9626 (uri (pypi-uri "responses" version))
9627 (sha256
9628 (base32
9629 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9630 (build-system python-build-system)
9631 (arguments
9632 `(;; Test suite is not distributed:
9633 ;; https://github.com/getsentry/responses/issues/38
9634 #:tests? #f))
9635 (native-inputs
9636 `(("python-cookies" ,python-cookies)
9637 ("python-mock" ,python-mock)))
9638 (propagated-inputs
9639 `(("python-requests" ,python-requests)
9640 ("python-six" ,python-six)))
9641 (home-page "https://github.com/getsentry/responses")
9642 (synopsis "Utility for mocking out the `requests` Python library")
9643 (description "A utility library for mocking out the `requests` Python
9644library.")
3f641af0 9645 (license license:asl2.0)
0efde7d6
LF
9646 (properties `((python2-variant . ,(delay python2-responses))))))
9647
9648(define-public python2-responses
9649 (let ((responses (package-with-python2
9650 (strip-python2-variant python-responses))))
9651 (package (inherit responses)
9652 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9653 ,@(package-native-inputs responses))))))
76b94885 9654
b7afd018
RW
9655(define-public python-whoosh
9656 (package
9657 (name "python-whoosh")
9658 (version "2.7.4")
9659 (source
9660 (origin
9661 (method url-fetch)
9662 (uri (pypi-uri "Whoosh" version))
9663 (sha256
9664 (base32
9665 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9666 (build-system python-build-system)
9667 (native-inputs
9668 `(("python-setuptools" ,python-setuptools)
9669 ("python-pytest" ,python-pytest)))
9670 (home-page "http://bitbucket.org/mchaput/whoosh")
9671 (synopsis "Full text indexing, search, and spell checking library")
9672 (description
9673 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9674checking library.")
9675 (license license:bsd-2)))
9676
9677(define-public python2-whoosh
9678 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9679 (package (inherit whoosh)
9680 (propagated-inputs
9681 `(("python2-backport-ssl-match-hostname"
9682 ,python2-backport-ssl-match-hostname)
9683 ,@(package-propagated-inputs whoosh))))))
9684
76b94885
LF
9685(define-public python-pathlib
9686 (package
9687 (name "python-pathlib")
9688 (version "1.0.1")
9689 (source (origin
9690 (method url-fetch)
9691 (uri (pypi-uri "pathlib" version))
9692 (sha256
9693 (base32
9694 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9695 (build-system python-build-system)
92a312dc
RW
9696 ;; The tests depend on the internal "test" module, which does not provide
9697 ;; a stable interface.
9698 (arguments `(#:tests? #f))
76b94885 9699 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9700 (synopsis "Object-oriented file system paths")
9701 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9702It offers the following advantages over using string objects:
9703
9704@enumerate
9705@item No more cumbersome use of os and os.path functions. Everything can
9706be done easily through operators, attribute accesses, and method calls.
9707@item Embodies the semantics of different path types. For example,
9708comparing Windows paths ignores casing.
9709@item Well-defined semantics, eliminating any inconsistencies or
9710ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9711@end enumerate
9712
9713Note: In Python 3.4, pathlib is now part of the standard library. For other
9714Python versions please consider python-pathlib2 instead, which tracks the
9715standard library module. This module (python-pathlib) isn't maintained
9716anymore.")
76b94885
LF
9717 (license license:expat)))
9718
9719(define-public python2-pathlib
9720 (package-with-python2 python-pathlib))
25a7db0a 9721
b7703c81
HG
9722(define-public python2-pathlib2
9723 (package
9724 (name "python2-pathlib2")
9725 (version "2.1.0")
9726 (source (origin
9727 (method url-fetch)
9728 (uri (pypi-uri "pathlib2" version))
9729 (sha256
9730 (base32
9731 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9732 (build-system python-build-system)
49a531f5
HG
9733 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9734 ;; version is 3.4 which already includes this package as part of the
9735 ;; standard library.
b7703c81
HG
9736 (arguments
9737 `(#:python ,python-2))
9738 (native-inputs
9739 `(("python2-setuptools" ,python2-setuptools)
9740 ("python2-six" ,python2-six)))
9741 (home-page "http://pypi.python.org/pypi/pathlib2/")
9742 (synopsis "Object-oriented file system paths - backport of standard
9743pathlib module")
9744 (description "The goal of pathlib2 is to provide a backport of standard
9745pathlib module which tracks the standard library module, so all the newest
9746features of the standard pathlib can be used also on older Python versions.
9747
9748Pathlib offers a set of classes to handle file system paths. It offers the
9749following advantages over using string objects:
9750
9751@enumerate
9752@item No more cumbersome use of os and os.path functions. Everything can
9753be done easily through operators, attribute accesses, and method calls.
9754@item Embodies the semantics of different path types. For example,
9755comparing Windows paths ignores casing.
9756@item Well-defined semantics, eliminating any inconsistencies or
9757ambiguities (forward vs. backward slashes, etc.).
9758@end enumerate")
9759 (license license:expat)))
9760
25a7db0a
LF
9761(define-public python-jellyfish
9762 (package
9763 (name "python-jellyfish")
9764 (version "0.5.3")
9765 (source (origin
9766 (method url-fetch)
9767 (uri (pypi-uri "jellyfish" version))
9768 (sha256
9769 (base32
9770 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9771 (build-system python-build-system)
9772 (native-inputs
9773 `(("python-pytest" ,python-pytest)))
9774 (home-page "https://github.com/jamesturk/jellyfish")
9775 (synopsis "Approximate and phonetic matching of strings")
9776 (description "Jellyfish uses a variety of string comparison and phonetic
9777encoding algorithms to do fuzzy string matching.")
3f641af0 9778 (license license:bsd-2)
25a7db0a
LF
9779 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9780
9781(define-public python2-jellyfish
9782 (let ((jellyfish (package-with-python2
9783 (strip-python2-variant python-jellyfish))))
9784 (package (inherit jellyfish)
9785 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9786 ("python2-unicodecsv" ,python2-unicodecsv)
9787 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9788
9789(define-public python2-unicodecsv
9790 (package
9791 (name "python2-unicodecsv")
9792 (version "0.14.1")
9793 (source (origin
9794 (method url-fetch)
9795 ;; The test suite is not included in the PyPi release.
9796 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9797 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9798 "archive/" version ".tar.gz"))
9799 (file-name (string-append name "-" version ".tar.gz"))
9800 (sha256
9801 (base32
9802 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9803 (build-system python-build-system)
9804 (arguments
9805 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9806 #:python ,python-2))
9807 (native-inputs
9808 `(("python2-setuptools" ,python2-setuptools)
9809 ("python2-unittest2" ,python2-unittest2)))
9810 (home-page "https://github.com/jdunck/python-unicodecsv")
9811 (synopsis "Unicode CSV module for Python 2")
9812 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9813module, adding support for Unicode strings.")
3f641af0 9814 (license license:bsd-2)))
064503aa
LF
9815
9816(define-public python-rarfile
9817 (package
9818 (name "python-rarfile")
9819 (version "2.7")
9820 (source (origin
9821 (method url-fetch)
9822 (uri (pypi-uri "rarfile" version))
9823 (sha256
9824 (base32
9825 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9826 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 9827 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
9828 (build-system python-build-system)
9829 (arguments
9830 '(#:phases
9831 (modify-phases %standard-phases
9832 (replace 'check
9833 ;; Many tests fail, but the installation proceeds.
9834 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9835 (native-inputs
9836 `(("which" ,which))) ; required for tests
9837 (propagated-inputs
9838 `(("libarchive" ,libarchive)))
9839 (home-page "https://github.com/markokr/rarfile")
9840 (synopsis "RAR archive reader for Python")
9841 (description "This is Python module for RAR archive reading. The interface
9842is made as zipfile like as possible.")
3f641af0 9843 (license license:isc)))
064503aa
LF
9844
9845(define-public python2-rarfile
9846 (package-with-python2 python-rarfile))
daeeea71
CM
9847
9848(define-public python-magic
9849 (package
9850 (name "python-magic")
9851 (version "0.4.3")
9852 (source
9853 (origin
9854 (method url-fetch)
9855 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9856 version ".tar.gz"))
9857 (sha256
9858 (base32
9859 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9860 (file-name (string-append name "-" version "-checkout"))))
9861 (build-system python-build-system)
9862 (arguments
9863 ;; The tests are unreliable, so don't run them. The tests fail
9864 ;; under Python3 because they were written for Python2 and
9865 ;; contain import statements that do not work in Python3. One of
9866 ;; the tests fails under Python2 because its assertions are
9867 ;; overly stringent; it relies on comparing output strings which
9868 ;; are brittle and can change depending on the version of
9869 ;; libmagic being used and the system on which the test is
9870 ;; running. In my case, under GuixSD 0.10.0, only one test
9871 ;; failed, and it seems to have failed only because the version
9872 ;; of libmagic that is packaged in Guix outputs a slightly
9873 ;; different (but not wrong) string than the one that the test
9874 ;; expected.
9875 '(#:tests? #f
9876 #:phases (modify-phases %standard-phases
9877 ;; Replace a specific method call with a hard-coded
9878 ;; path to the necessary libmagic.so file in the
9879 ;; store. If we don't do this, then the method call
9880 ;; will fail to find the libmagic.so file, which in
9881 ;; turn will cause any application using
9882 ;; python-magic to fail.
9883 (add-before 'build 'hard-code-path-to-libmagic
9884 (lambda* (#:key inputs #:allow-other-keys)
9885 (let ((file (assoc-ref inputs "file")))
9886 (substitute* "magic.py"
9887 (("ctypes.util.find_library\\('magic'\\)")
9888 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9889 #t)))
9890 (add-before 'install 'disable-egg-compression
9891 (lambda _
9892 (let ((port (open-file "setup.cfg" "a")))
9893 (display "\n[easy_install]\nzip_ok = 0\n"
9894 port)
9895 (close-port port)
9896 #t))))))
daeeea71
CM
9897 (native-inputs
9898 `(("python-setuptools" ,python-setuptools)))
9899 (inputs
9900 ;; python-magic needs to be able to find libmagic.so.
9901 `(("file" ,file)))
9902 (home-page "https://github.com/ahupp/python-magic")
9903 (synopsis "File type identification using libmagic")
9904 (description
9905 "This module uses ctypes to access the libmagic file type
9906identification library. It makes use of the local magic database and
9907supports both textual and MIME-type output. Note that this module and
9908the python-file module both provide a \"magic.py\" file; these two
9909modules, which are different and were developed separately, both serve
9910the same purpose: to provide Python bindings for libmagic.")
9911 (license license:expat)))
9912
9913(define-public python2-magic
9914 (package-with-python2 python-magic))
12af303f
CM
9915
9916(define-public python2-s3cmd
9917 (package
9918 (name "python2-s3cmd")
9919 (version "1.6.1")
9920 (source
9921 (origin
9922 (method url-fetch)
de67e922 9923 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9924 "s3cmd-" version ".tar.gz"))
9925 (sha256
9926 (base32
9927 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9928 (build-system python-build-system)
9929 (arguments
9930 ;; s3cmd is written for python2 only and contains no tests.
9931 `(#:python ,python-2
9932 #:tests? #f))
9933 (native-inputs
9934 `(("python2-setuptools" ,python2-setuptools)))
9935 (inputs
9936 `(("python2-dateutil" ,python2-dateutil)
9937 ;; The python-file package also provides a magic.py module.
9938 ;; This is an unfortunate state of affairs; however, s3cmd
9939 ;; fails to install if it cannot find specifically the
9940 ;; python-magic package. Thus we include it, instead of using
9941 ;; python-file. Ironically, s3cmd sometimes works better
9942 ;; without libmagic bindings at all:
9943 ;; https://github.com/s3tools/s3cmd/issues/198
9944 ("python2-magic" ,python2-magic)))
9945 (home-page "http://s3tools.org/s3cmd")
9946 (synopsis "Command line tool for S3-compatible storage services")
9947 (description
9948 "S3cmd is a command line tool for uploading, retrieving and managing data
9949in storage services that are compatible with the Amazon Simple Storage
9950Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9951GnuPG encryption, and more. It also supports management of Amazon's
9952CloudFront content delivery network.")
3f641af0 9953 (license license:gpl2+)))
4323a5f0
AE
9954
9955(define-public python-pkgconfig
9956 (package
9957 (name "python-pkgconfig")
9958 (version "1.1.0")
9959 (source
9960 (origin
9961 (method url-fetch)
9962 (uri (pypi-uri "pkgconfig" version))
9963 (sha256
9964 (base32
9965 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9966 (build-system python-build-system)
9967 (native-inputs
9968 `(("python-nose" ,python-nose)
9969 ("python-setuptools" ,python-setuptools)))
9970 (inputs
9971 `(("pkg-config" ,pkg-config)))
9972 (arguments
9973 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9974 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9975 #:tests? #f
9976 ;; Prevent creation of the egg. This works around
9977 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9978 #:configure-flags '("--single-version-externally-managed" "--root=/")
9979 ;; Hard-code the path to pkg-config.
9980 #:phases
9981 (modify-phases %standard-phases
9982 (add-before
9983 'build 'patch
9984 (lambda _
9985 (substitute* "pkgconfig/pkgconfig.py"
9986 (("cmd = 'pkg-config")
9987 (string-append "cmd = '" (which "pkg-config"))))
9988 #t)))))
9989 (home-page "http://github.com/matze/pkgconfig")
9990 (synopsis "Python interface for pkg-config")
9991 (description "This module provides a Python interface to pkg-config. It
9992can be used to find all pkg-config packages, check if a package exists,
9993check if a package meets certain version requirements, query CFLAGS and
9994LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9995 (license license:expat)))
4323a5f0
AE
9996
9997(define-public python2-pkgconfig
9998 (package-with-python2 python-pkgconfig))
9999
2e697322
BW
10000(define-public python-bz2file
10001 (package
10002 (name "python-bz2file")
10003 (version "0.98")
10004 (source
10005 (origin
10006 (method url-fetch)
10007 (uri (pypi-uri "bz2file" version))
10008 (sha256
10009 (base32
10010 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10011 (build-system python-build-system)
10012 (arguments
124df723 10013 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10014 (home-page "https://github.com/nvawda/bz2file")
10015 (synopsis "Read and write bzip2-compressed files")
10016 (description
10017 "Bz2file is a Python library for reading and writing bzip2-compressed
10018files. It contains a drop-in replacement for the I/O interface in the
10019standard library's @code{bz2} module, including features from the latest
10020development version of CPython that are not available in older releases.")
3f641af0 10021 (license license:asl2.0)
2e697322
BW
10022 (properties `((python2-variant . ,(delay python2-bz2file))))))
10023
10024(define-public python2-bz2file
10025 (let ((base (package-with-python2
10026 (strip-python2-variant python-bz2file))))
10027 (package
10028 (inherit base)
10029 (native-inputs
124df723
BW
10030 `(("python2-setuptools" ,python2-setuptools)))
10031 (arguments
752bb447
BW
10032 `(#:python ,python-2
10033 #:phases
124df723
BW
10034 (modify-phases %standard-phases
10035 ;; 'python setup.py test' does not work as of 0.98.
10036 ;; There is only the one test file, so we run it directly.
10037 (replace 'check
10038 (lambda _ (zero? (system* "python"
10039 "test_bz2file.py"))))))))))
2e697322 10040
da4ac1aa
BW
10041(define-public python-future
10042 (package
10043 (name "python-future")
10044 (version "0.15.2")
10045 (source
10046 (origin
10047 (method url-fetch)
10048 (uri (pypi-uri "future" version))
10049 (sha256
10050 (base32
10051 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10052 (build-system python-build-system)
10053 ;; Many tests connect to the network or are otherwise flawed.
10054 ;; https://github.com/PythonCharmers/python-future/issues/210
10055 (arguments
10056 `(#:tests? #f))
10057 (home-page "http://python-future.org")
10058 (synopsis "Single-source support for Python 3 and 2")
10059 (description
10060 "@code{python-future} is the missing compatibility layer between Python 2 and
10061Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10062to support both Python 2 and Python 3 with minimal overhead.")
10063 (license license:expat)
10064 (properties `((python2-variant . ,(delay python2-future))))))
10065
10066(define-public python2-future
10067 (let ((base (package-with-python2
10068 (strip-python2-variant python-future))))
10069 (package
10070 (inherit base)
10071 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
10072
8e451885
AE
10073(define-public python-cysignals
10074 (package
10075 (name "python-cysignals")
10076 (version "1.1.0")
10077 (source
10078 (origin
10079 (method url-fetch)
10080 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10081 (sha256
10082 (base32
10083 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10084 (build-system python-build-system)
10085 (native-inputs
10086 `(("python-cython" ,python-cython)
10087 ("python-setuptools" ,python-setuptools)
10088 ("python-sphinx" ,python-sphinx)))
10089 (inputs
10090 `(("pari-gp" ,pari-gp)))
10091 (arguments
10092 `(#:modules ((guix build python-build-system)
10093 ((guix build gnu-build-system) #:prefix gnu:)
10094 (guix build utils))
10095 ;; FIXME: Tests are executed after installation and currently fail
10096 ;; when not installing into standard locations; the author is working
10097 ;; on a fix.
10098 #:tests? #f
10099 #:phases
10100 (modify-phases %standard-phases
10101 (add-before
10102 'build 'configure
10103 (assoc-ref gnu:%standard-phases 'configure)))))
10104 (home-page
10105 "https://github.com/sagemath/cysignals")
10106 (synopsis
10107 "Handling of interrupts and signals for Cython")
10108 (description
10109 "The cysignals package provides mechanisms to handle interrupts (and
10110other signals and errors) in Cython code, using two related approaches,
10111for mixed Cython/Python code or external C libraries and pure Cython code,
10112respectively.")
3f641af0 10113 (license license:lgpl3+)))
8e451885
AE
10114
10115(define-public python2-cysignals
10116 (package-with-python2 python-cysignals))
10117
63bcec71
DM
10118(define-public python2-shedskin
10119 (package
10120 (name "python2-shedskin")
10121 (version "0.9.4")
10122 (source
10123 (origin
10124 (method url-fetch)
10125 (uri (string-append "https://github.com/shedskin/shedskin/"
10126 "releases/download/v" version
10127 "/shedskin-" version ".tgz"))
10128 (sha256
10129 (base32
10130 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10131 (build-system python-build-system)
10132 (arguments
10133 `(#:python ,python-2
10134 #:phases (modify-phases %standard-phases
10135 (add-after 'unpack 'fix-resulting-include-libs
10136 (lambda* (#:key inputs #:allow-other-keys)
10137 (let ((libgc (assoc-ref inputs "libgc"))
10138 (pcre (assoc-ref inputs "pcre")))
10139 (substitute* "shedskin/makefile.py"
10140 (("variable == 'CCFLAGS':[ ]*")
10141 (string-append "variable == 'CCFLAGS':\n"
10142 " line += ' -I " pcre "/include"
10143 " -I " libgc "/include'"))
10144 (("variable == 'LFLAGS':[ ]*")
10145 (string-append "variable == 'LFLAGS':\n"
10146 " line += ' -L" pcre "/lib"
10147 " -L " libgc "/lib'")))
10148 #t))))))
10149 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
10150 (inputs `(("pcre" ,pcre)
10151 ("libgc" ,libgc)))
10152 (home-page "https://shedskin.github.io/")
10153 (synopsis "Experimental Python-2 to C++ Compiler")
10154 (description (string-append "This is an experimental compiler for a subset of
10155Python. It generates C++ code and a Makefile."))
3f641af0 10156 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10157
10158(define-public python2-rope
10159 (package
10160 (name "python2-rope")
10161 (version "0.10.3")
10162 (source
10163 (origin
10164 (method url-fetch)
10165 (uri (pypi-uri "rope" version))
10166 (sha256
10167 (base32
10168 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10169 (arguments
10170 ;; Rope is currently python-2 only.
10171 ;; https://github.com/python-rope/rope/issues/57
10172 `(#:python ,python-2))
10173 (build-system python-build-system)
10174 (native-inputs
10175 `(("python2-unittest2" ,python2-unittest2)
10176 ("python2-setuptools" ,python2-setuptools)))
10177 (home-page "https://github.com/python-rope/rope")
10178 (synopsis "Refactoring library for Python")
10179 (description "Rope is a refactoring library for Python. It facilitates
10180the renaming, moving and extracting of attributes, functions, modules, fields
10181and parameters in Python 2 source code. These refactorings can also be applied
10182to occurences in strings and comments.")
3f641af0 10183 (license license:gpl2)))
6ba8ca17
10184
10185(define-public python-py3status
10186 (package
10187 (name "python-py3status")
d2262d70 10188 (version "3.1")
6ba8ca17
10189 (source
10190 (origin
10191 (method url-fetch)
10192 (uri (pypi-uri "py3status" version))
10193 (sha256
10194 (base32
d2262d70 10195 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17
10196 (build-system python-build-system)
10197 (native-inputs
10198 `(("python-setuptools" ,python-setuptools)))
10199 (home-page "https://github.com/ultrabug/py3status")
10200 (synopsis "Extensible i3status wrapper written in Python")
10201 (description "py3status is an i3status wrapper which extends i3status
10202functionality in a modular way, allowing you to extend your panel with your
10203own code, responding to click events and updating clock every second.")
3f641af0 10204 (license license:bsd-3)))
b8fdbca3
HG
10205
10206(define-public python-tblib
10207 (package
10208 (name "python-tblib")
10209 (version "1.3.0")
10210 (source (origin
10211 (method url-fetch)
10212 (uri (pypi-uri "tblib" version))
10213 (sha256 (base32
10214 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10215 (build-system python-build-system)
10216 (arguments
10217 `(#:phases
10218 (modify-phases %standard-phases
10219 (replace 'check
10220 (lambda _
10221 ;; Upstream runs tests after installation and the package itself
10222 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10223 ;; found.
10224 (setenv "PYTHONPATH"
10225 (string-append (getcwd) "/build/lib:"
10226 (getenv "PYTHONPATH")))
10227 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10228 (native-inputs
10229 `(("python-pytest" ,python-pytest)
10230 ("python-setuptools" ,python-setuptools)
10231 ("python-six" ,python-six)))
10232 (home-page "https://github.com/ionelmc/python-tblib")
10233 (synopsis "Traceback serialization library")
10234 (description
10235 "Traceback serialization allows you to:
10236
10237@enumerate
10238@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10239different processes. This allows better error handling when running code over
10240multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10241
10242@item Parse traceback strings and raise with the parsed tracebacks.
10243@end itemize")
3f641af0 10244 (license license:bsd-3)))
b8fdbca3
HG
10245
10246(define-public python2-tblib
10247 (package-with-python2 python-tblib))
1a024de4
HG
10248
10249(define-public python-sqlparse
10250 (package
10251 (name "python-sqlparse")
10252 (version "0.1.19")
10253 (source (origin
10254 (method url-fetch)
10255 (uri (pypi-uri "sqlparse" version))
10256 (sha256
10257 (base32
10258 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10259 (build-system python-build-system)
10260 (arguments
10261 `(#:phases
10262 (modify-phases %standard-phases
10263 (replace 'check
10264 (lambda* _
10265 ;; setup.py-integrated 2to3 only affects the build files, but
10266 ;; py.test is using the source files. So we need to convert them
10267 ;; manually.
10268 (when (zero? (system* "python3"))
10269 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10270 (zero? (system* "py.test")))))))
10271 (native-inputs
10272 `(("python-pytest" ,python-pytest)
10273 ("python-setuptools" ,python-setuptools)))
10274 (home-page "https://github.com/andialbrecht/sqlparse")
10275 (synopsis "Non-validating SQL parser")
10276 (description "Sqlparse is a non-validating SQL parser for Python. It
10277provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10278 (license license:bsd-3)))
1a024de4
HG
10279
10280(define-public python2-sqlparse
10281 (package-with-python2 python-sqlparse))
68b9d242
SB
10282
10283(define-public python-greenlet
10284 (package
10285 (name "python-greenlet")
10286 (version "0.4.9")
10287 (source (origin
10288 (method url-fetch)
10289 (uri (pypi-uri "greenlet" version))
10290 (sha256
10291 (base32
10292 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
10293 (build-system python-build-system)
10294 (native-inputs
10295 `(("python-setuptools" ,python-setuptools)))
10296 (home-page "https://greenlet.readthedocs.io/")
10297 (synopsis "Lightweight in-process concurrent programming")
10298 (description
10299 "Greenlet package is a spin-off of Stackless, a version of CPython
10300that supports micro-threads called \"tasklets\". Tasklets run
10301pseudo-concurrently (typically in a single or a few OS-level threads) and
10302are synchronized with data exchanges on \"channels\".")
3f641af0 10303 (license (list license:psfl license:expat))))
68b9d242
SB
10304
10305(define-public python2-greenlet
10306 (package-with-python2 python-greenlet))
d79a343b
SB
10307
10308(define-public python-gevent
10309 (package
10310 (name "python-gevent")
10311 (version "1.1.1")
10312 (source (origin
10313 (method url-fetch)
10314 (uri (pypi-uri "gevent" version))
10315 (sha256
10316 (base32
10317 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10318 (modules '((guix build utils)))
10319 (snippet
10320 '(begin
10321 ;; unbunding libev and c-ares
10322 (for-each delete-file-recursively '("libev" "c-ares"))
10323 ;; fixing testsuite
10324 (call-with-output-file "greentest/__init__.py" noop)
10325 (substitute* "greentest/testrunner.py"
10326 (("import util") "from . import util")
10327 (("from util import log") "from .util import log"))))))
10328 (build-system python-build-system)
10329 (propagated-inputs
10330 `(("python-greenlet" ,python-greenlet)))
10331 (native-inputs
10332 `(("python-setuptools" ,python-setuptools)
10333 ("python-six" ,python-six)))
10334 (inputs
10335 `(("c-ares" ,c-ares)
10336 ("libev" ,libev)))
10337 (home-page "http://www.gevent.org/")
10338 (synopsis "Coroutine-based network library")
10339 (description
10340 "gevent is a coroutine-based Python networking library that uses greenlet
10341to provide a high-level synchronous API on top of the libev event loop.")
10342 (license license:expat)))
10343
10344(define-public python2-gevent
10345 (package-with-python2 python-gevent))
da3aeeb6
SB
10346
10347(define-public python-twisted
10348 (package
10349 (name "python-twisted")
10350 (version "16.2.0")
10351 (source (origin
10352 (method url-fetch)
8ea8e8d3 10353 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10354 (sha256
10355 (base32
10356 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10357 (build-system python-build-system)
10358 (native-inputs
45912170
SB
10359 `(("python-setuptools" ,python-setuptools)))
10360 (propagated-inputs
10361 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10362 (home-page "https://twistedmatrix.com/")
10363 (synopsis "Asynchronous networking framework written in Python")
10364 (description
10365 "Twisted is an extensible framework for Python programming, with special
10366focus on event-based network programming and multiprotocol integration.")
10367 (license license:expat)))
10368
10369(define-public python2-twisted
10370 (package-with-python2 python-twisted))
d0b6fed6 10371
4d3fa5a4
EF
10372(define-public python-pika
10373 (package
10374 (name "python-pika")
10375 (version "0.10.0")
10376 (source
10377 (origin
10378 (method url-fetch)
10379 (uri (pypi-uri "pika" version))
10380 (sha256
10381 (base32
10382 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10383 (build-system python-build-system)
10384 (native-inputs
269d9172
LF
10385 `(("python-pyev" ,python-pyev)
10386 ("python-tornado" ,python-tornado)
10387 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10388 (home-page "https://pika.readthedocs.org")
10389 (synopsis "Pure Python AMQP Client Library")
10390 (description
10391 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10392Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10393network support library.")
10394 (license license:bsd-3)))
10395
10396(define-public python2-pika
10397 (package-with-python2 python-pika))
10398
d0b6fed6
DM
10399(define-public python-ply
10400 (package
10401 (name "python-ply")
10402 (version "3.8")
10403 (source
10404 (origin
10405 (method url-fetch)
10406 (uri (string-append
10407 "https://pypi.python.org/packages/"
10408 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10409 "/ply-" version ".tar.gz"))
10410 (sha256
10411 (base32
10412 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10413 (build-system python-build-system)
10414 (home-page "http://www.dabeaz.com/ply/")
10415 (synopsis "Python Lex & Yacc")
10416 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10417It uses LR parsing and does extensive error checking.")
3f641af0 10418 (license license:bsd-3)
d0b6fed6
DM
10419 (properties `((python2-variant . ,(delay python2-ply))))))
10420
10421(define-public python2-ply
10422 (package
10423 (inherit (package-with-python2
10424 (strip-python2-variant python-ply)))
10425 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
d951bd54
SB
10426
10427(define-public python-tabulate
10428 (package
10429 (name "python-tabulate")
10430 (version "0.7.5")
10431 (source (origin
10432 (method url-fetch)
10433 (uri (pypi-uri "tabulate" version))
10434 (sha256
10435 (base32
10436 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10437 ;; Fix tests
10438 (modules '((guix build utils)))
10439 (snippet '(substitute* '("test/test_cli.py"
10440 "test/test_input.py"
10441 "test/test_output.py"
10442 "test/test_regression.py")
10443 (("from common") "from nose.tools")))))
10444 (build-system python-build-system)
10445 (native-inputs
10446 `(("python-setuptools" ,python-setuptools)
10447 ;; For testing
10448 ("python-nose" ,python-nose)))
10449 (home-page "https://bitbucket.org/astanin/python-tabulate")
10450 (synopsis "Pretty-print tabular data")
10451 (description
10452 "Tabulate is a library and command-line utility to pretty-print tabular
10453data in Python.")
10454 (license license:expat)))
10455
10456(define-public python2-tabulate
10457 (package-with-python2 python-tabulate))
1c4c8a33
SB
10458
10459(define-public python-kazoo
10460 (package
10461 (name "python-kazoo")
10462 (version "2.2.1")
10463 (source
10464 (origin
10465 (method url-fetch)
10466 (uri (pypi-uri "kazoo" version))
10467 (sha256
10468 (base32
10469 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10470 (build-system python-build-system)
10471 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10472 (native-inputs
c18899e8
SB
10473 `(("python-setuptools" ,python-setuptools)))
10474 (propagated-inputs
10475 `(("python-six" ,python-six)))
1c4c8a33
SB
10476 (home-page "https://kazoo.readthedocs.org")
10477 (synopsis "High-level Zookeeper client library")
10478 (description
10479 "Kazoo is a Python client library for the Apache Zookeeper distributed
10480application service. It is designed to be easy to use and to avoid common
10481programming errors.")
3f641af0 10482 (license license:asl2.0)))
1c4c8a33
SB
10483
10484(define-public python2-kazoo
10485 (package-with-python2 python-kazoo))
45dda35e
SB
10486
10487(define-public python-pykafka
10488 (package
10489 (name "python-pykafka")
10490 (version "2.4.0")
10491 (source (origin
10492 (method url-fetch)
c6bccf71
EF
10493 (uri (string-append
10494 "https://pypi.python.org/packages/8b/3e/"
10495 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10496 "pykafka-" version ".tar.gz"))
45dda35e
SB
10497 (sha256
10498 (base32
10499 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10500 (build-system python-build-system)
10501 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10502 (native-inputs
c8fa3d9b
SB
10503 `(("python-setuptools" ,python-setuptools)))
10504 (propagated-inputs
45dda35e
SB
10505 `(("python-gevent" ,python-gevent)
10506 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10507 ("python-tabulate" ,python-tabulate)))
10508 (inputs
10509 `(("librdkafka" ,librdkafka)))
10510 (home-page "https://pykafka.readthedocs.io/")
10511 (synopsis "Apache Kafka client for Python")
10512 (description
10513 "PyKafka is a client for the Apache Kafka distributed messaging system.
10514It includes Python implementations of Kafka producers and consumers, which
10515are optionally backed by a C extension built on librdkafka.")
3f641af0 10516 (license license:asl2.0)))
45dda35e
SB
10517
10518(define-public python2-pykafka
10519 (package-with-python2 python-pykafka))
a44fd439
DM
10520
10521(define-public python-wcwidth
10522 (package
10523 (name "python-wcwidth")
10524 (version "0.1.6")
10525 (source
10526 (origin
10527 (method url-fetch)
10528 (uri (string-append
10529 "https://pypi.python.org/packages/"
10530 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10531 "wcwidth-" version ".tar.gz"))
10532 (sha256
10533 (base32
10534 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10535 (build-system python-build-system)
10536 (home-page "https://github.com/jquast/wcwidth")
66e07664 10537 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10538 (description "Wcwidth measures the number of terminal column cells of
10539wide-character codes. It is useful for those implementing a terminal emulator,
10540or programs that carefully produce output to be interpreted by one. It is a
10541Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10542specified in POSIX.1-2001 and POSIX.1-2008.")
e4875826
LF
10543 (license license:expat)
10544 (properties `((python2-variant . ,(delay python2-wcwidth))))))
a44fd439
DM
10545
10546(define-public python2-wcwidth
10547 (package
10548 (inherit (package-with-python2
10549 (strip-python2-variant python-wcwidth)))
10550 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0de78c95
DP
10551
10552(define-public python2-jsonrpclib
10553 (package
10554 (name "python2-jsonrpclib")
10555 (version "0.1.7")
10556 (source (origin
10557 (method url-fetch)
10558 (uri (string-append
10559 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10560 "jsonrpclib-" version ".tar.gz"))
10561 (sha256
10562 (base32
10563 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10564 (build-system python-build-system)
10565 (native-inputs
10566 `(("python2-setuptools" ,python2-setuptools)))
10567 (arguments
10568 `(#:tests? #f
10569 #:python ,python-2))
10570 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10571 (synopsis "Implementation of JSON-RPC specification for Python")
10572 (description
10573 "This library is an implementation of the JSON-RPC specification.
10574It supports both the original 1.0 specification, as well as the
10575new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10576etc.")
3f641af0 10577 (license license:asl2.0)))
9250b0f3
SB
10578
10579(define-public python-chai
10580 (package
10581 (name "python-chai")
10582 (version "1.1.1")
10583 (source (origin
10584 (method url-fetch)
10585 (uri (pypi-uri "chai" version))
10586 (sha256
10587 (base32
10588 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10589 (build-system python-build-system)
10590 (native-inputs
10591 `(("python-setuptools" ,python-setuptools)))
10592 (home-page "https://github.com/agoragames/chai")
10593 (synopsis "Mocking framework for Python")
10594 (description
10595 "Chai provides an api for mocking, stubbing and spying your python
10596objects, patterned after the Mocha library for Ruby.")
3f641af0 10597 (license license:bsd-3)))
9250b0f3
SB
10598
10599(define-public python2-chai
10600 (package-with-python2 python-chai))
10601
ae43baa8
SB
10602(define-public python-arrow
10603 (package
10604 (name "python-arrow")
10605 (version "0.8.0")
10606 (source (origin
10607 (method url-fetch)
10608 (uri (pypi-uri "arrow" version))
10609 (sha256
10610 (base32
10611 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10612 (build-system python-build-system)
10613 (native-inputs
10614 `(("python-setuptools" ,python-setuptools)
ae43baa8
SB
10615 ;; For testing
10616 ("python-chai" ,python-chai)
10617 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10618 (propagated-inputs
10619 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10620 (home-page "https://github.com/crsmithdev/arrow/")
10621 (synopsis "Dates and times for Python")
10622 (description
10623 "Arrow is a Python library to creating, manipulating, formatting and
10624converting dates, times, and timestamps. It implements and updates the
10625datetime type.")
3f641af0 10626 (license license:asl2.0)))
ae43baa8
SB
10627
10628(define-public python2-arrow
10629 (package-with-python2 python-arrow))
10630
1f2b62a4
SB
10631(define-public python-inflection
10632 (package
10633 (name "python-inflection")
10634 (version "0.3.1")
10635 (source
10636 (origin (method url-fetch)
10637 (uri (pypi-uri "inflection" version))
10638 (sha256
10639 (base32
10640 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10641 (build-system python-build-system)
10642 (native-inputs
10643 `(("python-setuptools" ,python-setuptools)))
10644 (home-page "http://github.com/jpvanhal/inflection")
10645 (synopsis "Python string transformation library")
10646 (description
10647 "Inflection is a string transformation library. It singularizes
10648and pluralizes English words, and transforms strings from CamelCase to
10649underscored string.")
10650 (license license:expat)))
10651
10652(define-public python2-inflection
10653 (package-with-python2 python-inflection))
10654
18995566
SB
10655(define-public python-pylev
10656 (package
10657 (name "python-pylev")
10658 (version "1.3.0")
10659 (source (origin
10660 (method url-fetch)
10661 (uri (pypi-uri "pylev" version))
10662 (sha256
10663 (base32
10664 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10665 (build-system python-build-system)
10666 (native-inputs
10667 `(("python-setuptools" ,python-setuptools)))
10668 (home-page "http://github.com/toastdriven/pylev")
10669 (synopsis "Levenshtein distance implementation in Python")
10670 (description "Pure Python Levenshtein implementation, based off the
10671Wikipedia code samples at
10672@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10673 (license license:bsd-3)))
18995566
SB
10674
10675(define-public python2-pylev
10676 (package-with-python2 python-pylev))
10677
f5deff7a
SB
10678(define-public python-cleo
10679 (package
10680 (name "python-cleo")
10681 (version "0.4.1")
10682 (source (origin
10683 (method url-fetch)
10684 (uri (pypi-uri "cleo" version))
10685 (sha256
10686 (base32
10687 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10688 (build-system python-build-system)
10689 (native-inputs
9403150a 10690 `(("python-setuptools" ,python-setuptools)
f5deff7a
SB
10691 ;; For testing
10692 ("python-mock" ,python-mock)
10693 ("python-pytest" ,python-pytest)))
9403150a
SB
10694 (propagated-inputs
10695 `(("python-psutil" ,python-psutil)
10696 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10697 (home-page "https://github.com/sdispater/cleo")
10698 (synopsis "Command-line arguments library for Python")
10699 (description
10700 "Cleo allows you to create command-line commands with signature in
10701docstring and colored output.")
10702 (license license:expat)))
10703
10704(define-public python2-cleo
10705 (package-with-python2 python-cleo))
10706
77cadb43
SB
10707(define-public python-lazy-object-proxy
10708 (package
10709 (name "python-lazy-object-proxy")
10710 (version "1.2.2")
10711 (source (origin
10712 (method url-fetch)
10713 (uri (pypi-uri "lazy-object-proxy" version))
10714 (sha256
10715 (base32
10716 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10717 (build-system python-build-system)
10718 (native-inputs
10719 `(("python-setuptools" ,python-setuptools)))
10720 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10721 (synopsis "Lazy object proxy for python")
10722 (description
10723 "Lazy object proxy is an object that wraps a callable but defers the call
10724until the object is actually required, and caches the result of said call.")
3f641af0 10725 (license license:bsd-2)))
77cadb43
SB
10726
10727(define-public python2-lazy-object-proxy
10728 (package-with-python2 python-lazy-object-proxy))
10729
5477e05f
SB
10730(define-public python-dnspython
10731 (package
10732 (name "python-dnspython")
6c514128 10733 (version "1.15.0")
5477e05f
SB
10734 (source (origin
10735 (method url-fetch)
10736 (uri (string-append "http://www.dnspython.org/kits/"
10737 version "/dnspython-" version ".tar.gz"))
10738 (sha256
10739 (base32
6c514128 10740 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10741 (build-system python-build-system)
10742 (arguments '(#:tests? #f)) ; XXX: requires internet access
10743 (native-inputs
10744 `(("python-setuptools" ,python-setuptools)))
10745 (home-page "http://www.dnspython.org")
10746 (synopsis "DNS toolkit for Python")
10747 (description
10748 "dnspython is a DNS toolkit for Python. It supports almost all record
10749types. It can be used for queries, zone transfers, and dynamic updates.
10750It supports TSIG authenticated messages and EDNS0.")
10751 (license license:expat)))
10752
10753(define-public python2-dnspython
10754 (package-with-python2 python-dnspython))
10755
22711e25
SB
10756(define-public python-email-validator
10757 (package
10758 (name "python-email-validator")
10759 (version "1.0.1")
10760 (source
10761 (origin (method url-fetch)
10762 (uri (pypi-uri "email_validator" version))
10763 (sha256
10764 (base32
10765 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10766 (build-system python-build-system)
10767 (arguments
10768 '(#:phases
10769 (modify-phases %standard-phases
10770 (add-before 'build 'use-dnspython
10771 (lambda _
10772 (substitute* "setup.py"
10773 (("dnspython3") "dnspython"))
10774 #t)))))
10775 (native-inputs
d42560bd
SB
10776 `(("python-setuptools" ,python-setuptools)))
10777 (propagated-inputs
22711e25 10778 `(("python-dnspython" ,python-dnspython)
d42560bd 10779 ("python-idna" ,python-idna)))
22711e25
SB
10780 (home-page "https://github.com/JoshData/python-email-validator")
10781 (synopsis "Email address validation library for Python")
10782 (description
10783 "This library validates email address syntax and deliverability.")
3f641af0 10784 (license license:cc0)))
22711e25
SB
10785
10786(define-public python2-email-validator
10787 (package-with-python2 python-email-validator))
10788
8987d91e
SB
10789(define-public python-ukpostcodeparser
10790 (package
10791 (name "python-ukpostcodeparser")
10792 (version "1.0.3")
10793 (source (origin
10794 (method url-fetch)
10795 (uri (pypi-uri "UkPostcodeParser" version))
10796 (sha256
10797 (base32
10798 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10799 (build-system python-build-system)
10800 (native-inputs
10801 `(("python-setuptools" ,python-setuptools)))
10802 (home-page "https://github.com/hamstah/ukpostcodeparser")
10803 (synopsis "UK Postcode parser for Python")
10804 (description
10805 "This library provides the @code{parse_uk_postcode} function for
10806parsing UK postcodes.")
10807 (license license:expat)))
10808
10809(define-public python2-ukpostcodeparser
10810 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10811
10812(define-public python-fake-factory
10813 (package
10814 (name "python-fake-factory")
7adc698f 10815 (version "0.7.2")
ea92ae01
SB
10816 (source (origin
10817 (method url-fetch)
10818 (uri (pypi-uri "fake-factory" version))
10819 (sha256
10820 (base32
7adc698f 10821 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10822 (build-system python-build-system)
ea92ae01 10823 (native-inputs
bbcd7297 10824 `(("python-setuptools" ,python-setuptools)
ea92ae01
SB
10825 ;; For testing
10826 ("python-email-validator" ,python-email-validator)
10827 ("python-mock" ,python-mock)
10828 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10829 (propagated-inputs
10830 `(("python-dateutil" ,python-dateutil-2)
10831 ("python-six" ,python-six)))
7adc698f 10832 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10833 (synopsis "Python package that generates fake data")
10834 (description
10835 "Faker is a Python package that generates fake data such as names,
10836addresses, and phone numbers.")
10837 (license license:expat)
10838 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10839
10840(define-public python2-fake-factory
10841 (let ((base (package-with-python2 (strip-python2-variant
10842 python-fake-factory))))
10843 (package
10844 (inherit base)
24c9aa18 10845 (propagated-inputs
ea92ae01 10846 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10847 ,@(package-propagated-inputs base))))))
ea92ae01 10848
b49504fd
SB
10849(define-public python-pyaml
10850 (package
10851 (name "python-pyaml")
10852 (version "15.8.2")
10853 (source (origin
10854 (method url-fetch)
10855 (uri (pypi-uri "pyaml" version))
10856 (sha256
10857 (base32
10858 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10859 (build-system python-build-system)
10860 (native-inputs
10861 `(("python-setuptools" ,python-setuptools)))
10862 (propagated-inputs
10863 `(("python-pyyaml" ,python-pyyaml)))
10864 (home-page "https://github.com/mk-fg/pretty-yaml")
10865 (synopsis "YAML pretty-print library for Python")
10866 (description
10867 "pyaml is a PyYAML based python module to produce pretty and readable
10868YAML-serialized data.")
3f641af0 10869 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10870
10871(define-public python2-pyaml
10872 (package-with-python2 python-pyaml))
10873
347175a2
SB
10874(define-public python-flexmock
10875 (package
10876 (name "python-flexmock")
10877 (version "0.10.2")
10878 (source (origin
10879 (method url-fetch)
10880 (uri (pypi-uri "flexmock" version))
10881 (sha256
10882 (base32
10883 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10884 (build-system python-build-system)
10885 (native-inputs
10886 `(("python-setuptools" ,python-setuptools)))
10887 (home-page "https://flexmock.readthedocs.org")
10888 (synopsis "Testing library for Python")
10889 (description
10890 "flexmock is a testing library for Python that makes it easy to create
10891mocks, stubs and fakes.")
3f641af0 10892 (license license:bsd-3)))
347175a2
SB
10893
10894(define-public python2-flexmock
10895 (package-with-python2 python-flexmock))
10896
5a744191
SB
10897(define-public python-orator
10898 (package
10899 (name "python-orator")
10900 (version "0.8.2")
10901 (source (origin
10902 (method url-fetch)
10903 (uri (pypi-uri "orator" version))
10904 (sha256
10905 (base32
10906 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10907 (build-system python-build-system)
10908 (arguments '(#:tests? #f)) ; no tests
10909 (native-inputs
b2676030
SB
10910 `(("python-setuptools" ,python-setuptools)))
10911 (propagated-inputs
5a744191
SB
10912 `(("python-arrow" ,python-arrow)
10913 ("python-blinker" ,python-blinker)
10914 ("python-cleo" ,python-cleo)
10915 ("python-fake-factory" ,python-fake-factory)
10916 ("python-inflection" ,python-inflection)
10917 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10918 ("python-pyaml" ,python-pyaml)
5a744191
SB
10919 ("python-simplejson" ,python-simplejson)
10920 ("python-wrapt" ,python-wrapt)))
10921 (home-page "https://orator-orm.com/")
10922 (synopsis "ActiveRecord ORM for Python")
10923 (description
10924 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10925implementation for Python.")
10926 (license license:expat)
10927 (properties `((python2-variant . ,(delay python2-orator))))))
10928
10929(define-public python2-orator
10930 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10931 (package
10932 (inherit base)
06961617 10933 (propagated-inputs
5a744191 10934 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10935 ,@(package-propagated-inputs base))))))
f4155188
DM
10936
10937(define-public python-prompt-toolkit
10938 (package
10939 (name "python-prompt-toolkit")
d15e2ef0 10940 (version "1.0.7")
f4155188
DM
10941 (source
10942 (origin
10943 (method url-fetch)
d15e2ef0 10944 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10945 (sha256
10946 (base32
d15e2ef0 10947 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10948 (build-system python-build-system)
bae18710
LF
10949 (arguments
10950 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f4155188
DM
10951 (inputs `(("python-wcwidth" ,python-wcwidth)
10952 ("python-pygments" ,python-pygments)))
10953 (native-inputs `(("python-six" ,python-six)))
10954 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10955 (synopsis "Library for building command line interfaces in Python")
10956 (description
10957 "Prompt-Toolkit is a library for building interactive command line
10958interfaces in Python. It's like GNU Readline but it also features syntax
10959highlighting while typing, out-of-the-box multi-line input editing, advanced
10960code completion, incremental search, support for Chinese double-width
10961characters, mouse support, and auto suggestions.")
3f641af0 10962 (license license:bsd-3)
f4155188
DM
10963 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10964
10965(define-public python2-prompt-toolkit
10966 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10967 (package
10968 (inherit base)
10969 (native-inputs
10970 `(("python2-setuptools" ,python2-setuptools)
10971 ,@(package-native-inputs base))))))
a502dfbf
DM
10972
10973(define-public python-jedi
10974 (package
10975 (name "python-jedi")
10976 (version "0.9.0")
10977 (source
10978 (origin
10979 (method url-fetch)
10980 (uri (pypi-uri "jedi" version))
10981 (sha256
10982 (base32
10983 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10984 (build-system python-build-system)
10985 (home-page "https://github.com/davidhalter/jedi")
10986 (synopsis
10987 "Autocompletion for Python that can be used for text editors")
10988 (description
10989 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10990 (license license:expat)
10991 (properties `((python2-variant . ,(delay python2-jedi))))))
10992
10993(define-public python2-jedi
10994 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10995 (package
10996 (inherit base)
10997 (native-inputs
10998 `(("python2-setuptools" ,python2-setuptools)
10999 ,@(package-native-inputs base))))))
c2f0dc6e
DM
11000
11001(define-public ptpython
11002 (package
11003 (name "ptpython")
11004 (version "0.34")
11005 (source (origin
11006 (method url-fetch)
11007 (uri (pypi-uri "ptpython" version))
11008 (sha256
11009 (base32
11010 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11011 (build-system python-build-system)
11012 (inputs
11013 `(("python-docopt" ,python-docopt)
11014 ("python-jedi" ,python-jedi)
11015 ("python-prompt-toolkit" ,python-prompt-toolkit)
11016 ("python-pygments" ,python-pygments)
11017 ("python-setuptools" ,python-setuptools)))
11018 (home-page "https://github.com/jonathanslenders/ptpython")
11019 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11020 (description
11021 "ptpython is a Python read-eval-print loop with IDE-like features.
11022It supports syntax highlighting, multiline editing, autocompletion, mouse,
11023color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11024etc.")
3f641af0 11025 (license license:bsd-3)
c2f0dc6e
DM
11026 (properties `((python2-variant . ,(delay ptpython-2))))))
11027
11028(define-public ptpython-2
11029 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11030 (package
11031 (inherit base)
11032 (name "ptpython2"))))
b227f0be 11033
b04a52a6
DJ
11034(define-public python-requests-oauthlib
11035 (package
11036 (name "python-requests-oauthlib")
11037 (version "0.6.2")
11038 (source
11039 (origin
11040 (method url-fetch)
11041 (uri (pypi-uri "requests-oauthlib" version))
11042 (sha256
11043 (base32
11044 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11045 (build-system python-build-system)
11046 (arguments
11047 `(#:phases
11048 (modify-phases %standard-phases
11049 ;; removes tests that require network access
11050 (add-before 'check 'pre-check
11051 (lambda _
11052 (delete-file "tests/test_core.py")
11053 #t)))))
11054 (native-inputs
11055 `(("python-requests-mock" ,python-requests-mock)
11056 ("python-mock" ,python-mock)))
11057 (inputs
11058 `(("python-oauthlib" ,python-oauthlib)
11059 ("python-requests" ,python-requests)))
11060 (home-page
11061 "https://github.com/requests/requests-oauthlib")
11062 (synopsis
11063 "OAuthlib authentication support for Requests")
11064 (description
11065 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11066provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11067 (license license:isc)
11068 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
11069
11070(define-public python2-requests-oauthlib
11071 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
11072 (package
11073 (inherit base)
11074 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11075 ,@(package-native-inputs base))))))
11076
b227f0be 11077(define-public python-stem
11078 (package
11079 (name "python-stem")
11080 (version "1.4.1b")
11081 (source
11082 (origin
11083 (method url-fetch)
11084 (uri (pypi-uri "stem" version ".tar.bz2"))
11085 (sha256
11086 (base32
11087 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
11088 (build-system python-build-system)
11089 (arguments
11090 `(#:phases
11091 (modify-phases %standard-phases
11092 (replace 'check
11093 (lambda _
11094 (zero? (system* "./run_tests.py" "--unit")))))))
11095 (native-inputs
11096 `(("python-mock" ,python-mock)
11097 ("python-pep8" ,python-pep8)
11098 ("python-pyflakes" ,python-pyflakes)))
11099 (inputs
11100 `(("python-pycrypto" ,python-pycrypto)))
11101 (home-page "https://stem.torproject.org/")
11102 (synopsis
11103 "Python controller library that allows applications to interact with Tor")
11104 (description
11105 "Stem is a Python controller library for Tor. With it you can use Tor's
11106control protocol to script against the Tor process and read descriptor data
11107relays publish about themselves.")
3f641af0 11108 (license license:lgpl3)))
b227f0be 11109
11110(define-public python2-stem
11111 (package-with-python2 python-stem))
517a6c0c
DM
11112
11113(define-public python-pyserial
11114 (package
11115 (name "python-pyserial")
11116 (version "3.1.1")
11117 (source
11118 (origin
11119 (method url-fetch)
11120 (uri (pypi-uri "pyserial" version))
11121 (sha256
11122 (base32
11123 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11124 (build-system python-build-system)
11125 (home-page
11126 "https://github.com/pyserial/pyserial")
11127 (synopsis "Python Serial Port Bindings")
11128 (description "@code{pyserial} provide serial port bindings for Python. It
11129supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11130and/or Xon/Xoff. The port is accessed in RAW mode.")
3f641af0 11131 (license license:bsd-3)
517a6c0c
DM
11132 (properties `((python2-variant . ,(delay python2-pyserial))))))
11133
11134(define-public python2-pyserial
11135 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
11136 (package
11137 (inherit base)
11138 (native-inputs
11139 `(("python2-setuptools" ,python2-setuptools)
11140 ,@(package-native-inputs base))))))
6eb7af2a
DJ
11141
11142(define-public python-kivy
11143 (package
11144 (name "python-kivy")
11145 (version "1.9.1")
11146 (source
11147 (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "kivy" version))
11150 (file-name (string-append name "-" version ".tar.gz"))
11151 (sha256
11152 (base32
11153 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11154 (build-system python-build-system)
11155 (arguments
11156 `(#:tests? #f ; Tests require many optional packages
11157 #:phases
11158 (modify-phases %standard-phases
11159 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11160 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11161 (lambda* (#:key inputs #:allow-other-keys)
11162 (setenv "KIVY_SDL2_PATH"
11163 (string-append (assoc-ref inputs "sdl-union")
11164 "/include/SDL2"))
11165 #t)))))
11166 (native-inputs
11167 `(("pkg-config" ,pkg-config)))
11168 (inputs
11169 `(("python-cython" ,python-cython)
11170 ("gstreamer" ,gstreamer)
11171 ("mesa" ,mesa)
11172 ("sdl-union"
11173 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11174 (home-page "http://kivy.org")
11175 (synopsis
11176 "Multitouch application framework")
11177 (description
11178 "A software library for rapid development of
11179hardware-accelerated multitouch applications.")
11180 (license license:expat)))
11181
11182(define-public python2-kivy
11183 (package-with-python2 python-kivy))
11184
11185(define-public python-kivy-next
11186 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11187 (revision "1"))
11188 (package (inherit python-kivy)
11189 (name "python-kivy-next")
d80a71eb 11190 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11191 (string-take commit 7)))
11192 (source
11193 (origin
11194 (method git-fetch)
11195 (uri (git-reference
11196 (url "https://github.com/kivy/kivy")
11197 (commit commit)))
11198 (file-name (string-append name "-" version "-checkout"))
11199 (sha256
11200 (base32
11201 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11202
11203(define-public python2-kivy-next
11204 (package-with-python2 python-kivy-next))
8794bd8b
DC
11205
11206(define-public python-binaryornot
11207 (package
11208 (name "python-binaryornot")
11209 (version "0.4.0")
11210 (source (origin
11211 (method url-fetch)
11212 (uri (pypi-uri "binaryornot" version))
11213 (sha256
11214 (base32
11215 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11216 (build-system python-build-system)
11217 (inputs
11218 `(("python-chardet" ,python-chardet)
11219 ("python-hypothesis" ,python-hypothesis)))
11220 (home-page "https://github.com/audreyr/binaryornot")
11221 (synopsis "Package to check if a file is binary or text")
11222 (description "Ultra-lightweight pure Python package to check if a file is
11223binary or text.")
11224 (license license:bsd-3)
11225 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11226
11227(define-public python2-binaryornot
11228 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11229 (package (inherit base)
11230 (native-inputs
11231 `(("python2-setuptools" ,python2-setuptools)
11232 ,@(package-native-inputs base)))
11233 (inputs
11234 `(("python2-enum34" ,python2-enum34)
11235 ,@(package-inputs base))))))
a9ac982a
DC
11236
11237(define-public python-nltk
11238 (package
11239 (name "python-nltk")
11240 (version "3.2.1")
11241 (source (origin
11242 (method url-fetch)
11243 (uri (pypi-uri "nltk" version))
11244 (sha256
11245 (base32
11246 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11247 (build-system python-build-system)
59f12985
LF
11248 (arguments
11249 '(;; The tests require some extra resources to be downloaded.
11250 ;; TODO Try packaging these resources.
11251 #:tests? #f))
a9ac982a
DC
11252 (home-page "http://nltk.org/")
11253 (synopsis "Natural Language Toolkit")
11254 (description "It provides interfaces to over 50 corpora and lexical
11255resources such as WordNet, along with a suite of text processing libraries
11256for classification, tokenization, stemming, tagging, parsing, and semantic
11257reasoning, wrappers for natural language processing libraries.")
11258 (license license:asl2.0)
11259 (properties `((python2-variant . ,(delay python2-nltk))))))
11260
11261(define-public python2-nltk
11262 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
11263 (package (inherit base)
11264 (native-inputs
11265 `(("python2-setuptools" ,python2-setuptools)
11266 ,@(package-native-inputs base))))))
691cd90d
DC
11267
11268(define-public python-pymongo
11269 (package
11270 (name "python-pymongo")
11271 (version "3.3.0")
11272 (source (origin
11273 (method url-fetch)
11274 (uri (pypi-uri "pymongo" version))
11275 (sha256
11276 (base32
11277 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11278 (build-system python-build-system)
11279 (inputs
11280 `(("python-certifi" ,python-certifi)))
11281 (home-page "http://github.com/mongodb/mongo-python-driver")
11282 (synopsis "Python driver for MongoDB")
11283 (description "Python driver for MongoDB.")
11284 (license license:asl2.0)
11285 (properties `((python2-variant . ,(delay python2-pymongo))))))
11286
11287(define-public python2-pymongo
11288 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
11289 (package (inherit base)
11290 (native-inputs
11291 `(("python2-setuptools" ,python2-setuptools)
11292 ,@(package-native-inputs base))))))
6a6c9d43
DC
11293
11294(define-public python-sh
11295 (package
11296 (name "python-sh")
11297 (version "1.11")
11298 (source (origin
11299 (method url-fetch)
11300 (uri (pypi-uri "sh" version))
11301 (sha256
11302 (base32
11303 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11304 (build-system python-build-system)
11305 (arguments
11306 `(#:tests? #f)) ; no tests
11307 (home-page "https://github.com/amoffat/sh")
11308 (synopsis "Python subprocess interface")
11309 (description "Abstracts process invocation by providing a function
11310interface for programs.")
11311 (license license:expat)
11312 (properties `((python2-variant . ,(delay python2-sh))))))
11313
11314(define-public python2-sh
11315 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
11316 (package (inherit base)
11317 (native-inputs
11318 `(("python2-setuptools" ,python2-setuptools)
11319 ,@(package-native-inputs base))))))
05b59190 11320
25702397
EF
11321(define-public python-consul
11322 (package
11323 (name "python-consul")
11324 (version "0.6.1")
11325 (source
11326 (origin
11327 (method url-fetch)
11328 (uri (pypi-uri "python-consul" version))
11329 (sha256
11330 (base32
11331 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11332 (build-system python-build-system)
11333 (native-inputs
11334 `(("python-pytest" ,python-pytest)
11335 ("python-requests" ,python-requests)
11336 ("python-six" ,python-six)))
11337 (home-page "https://github.com/cablehead/python-consul")
11338 (synopsis "Python client for Consul")
11339 (description
11340 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11341discovery, monitoring and configuration.")
11342 (license license:expat)))
11343
11344(define-public python2-consul
11345 (let ((consul (package-with-python2 python-consul)))
11346 (package (inherit consul)
11347 (native-inputs
11348 `(("python2-setuptools" ,python2-setuptools)
11349 ,@(package-native-inputs consul))))))
11350
05b59190
DC
11351(define-public python-schematics
11352 (package
11353 (name "python-schematics")
11354 (version "1.1.1")
11355 (source
11356 (origin
11357 (method url-fetch)
11358 (uri (string-append
11359 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11360 (file-name (string-append name "-" version ".tar.gz"))
11361 (sha256
11362 (base32
11363 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11364 (build-system python-build-system)
11365 (inputs
11366 `(("python-six" ,python-six)))
11367 (arguments
11368 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11369 ; version requirements (eg python-coveralls)
11370 (home-page "https://github.com/schematics/schematics")
11371 (synopsis "Python Data Structures for Humans")
11372 (description "Python Data Structures for Humans.")
11373 (license license:bsd-3)
11374 (properties `((python2-variant . ,(delay python2-schematics))))))
11375
11376(define-public python2-schematics
11377 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
11378 (package (inherit base)
11379 (native-inputs
11380 `(("python2-setuptools" ,python2-setuptools)
11381 ,@(package-native-inputs base))))))
d6907ff7
DC
11382
11383(define-public python-publicsuffix
11384 (package
11385 (name "python-publicsuffix")
11386 (version "1.1.0")
11387 (source (origin
11388 (method url-fetch)
11389 (uri (pypi-uri "publicsuffix" version))
11390 (sha256
11391 (base32
11392 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11393 (build-system python-build-system)
11394 (arguments
11395 `(#:tests? #f)) ; tests use the internet
11396 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11397 (synopsis "Get suffix for a domain name")
11398 (description "Get a public suffix for a domain name using the Public Suffix
11399List.")
11400 (license license:expat)
11401 (properties `((python2-variant . ,(delay python2-nltk))))))
11402
11403(define-public python2-publicsuffix
11404 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
11405 (package (inherit base)
11406 (native-inputs
11407 `(("python2-setuptools" ,python2-setuptools)
11408 ,@(package-native-inputs base))))))
b2319996
DC
11409
11410(define-public python-publicsuffix2
11411 (package
11412 (name "python-publicsuffix2")
11413 (version "2.20160621")
11414 (source
11415 (origin
11416 (method url-fetch)
11417 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11418 (sha256
11419 (base32
11420 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11421 (build-system python-build-system)
10797a0a
LF
11422 (arguments
11423 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11424 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11425 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11426 (description "Get a public suffix for a domain name using the Public Suffix
11427List. Forked from and using the same API as the publicsuffix package.")
11428 (license (list license:expat license:mpl2.0))
11429 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
11430
11431(define-public python2-publicsuffix2
11432 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
11433 (package (inherit base)
11434 (native-inputs
11435 `(("python2-setuptools" ,python2-setuptools)
11436 ,@(package-native-inputs base))))))
81f1515d
DC
11437
11438(define-public python-url
11439 (package
11440 (name "python-url")
11441 (version "0.2.0")
11442 (source (origin
11443 (method url-fetch)
11444 (uri (pypi-uri "url" version))
11445 (sha256
11446 (base32
11447 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11448 (build-system python-build-system)
11449 (inputs
11450 `(("python-publicsuffix" ,python-publicsuffix)))
11451 (native-inputs
11452 `(("python-coverage" ,python-coverage)
11453 ("python-nose" ,python-nose)))
11454 (arguments
11455 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11456 (home-page "http://github.com/seomoz/url-py")
11457 (synopsis "URL Parsing")
11458 (description "Library for parsing urls.")
11459 (license license:expat)
11460 (properties `((python2-variant . ,(delay python2-url))))))
11461
11462(define-public python2-url
11463 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11464 (package (inherit base)
11465 (inputs
11466 `(("python2-publicsuffix" ,python2-publicsuffix)))
11467 (native-inputs
11468 `(("python2-setuptools" ,python2-setuptools)
11469 ,@(package-native-inputs base))))))
974ee2c1
TS
11470
11471(define-public python-freezegun
11472 (package
11473 (name "python-freezegun")
11474 (version "0.3.7")
11475 (source
11476 (origin
11477 (method url-fetch)
11478 (uri (pypi-uri "freezegun" version))
11479 (sha256
11480 (base32
11481 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11482 (build-system python-build-system)
11483 (native-inputs
11484 `(("python-mock" ,python-mock)
11485 ("python-nose" ,python-nose)
11486 ("python-coverage" ,python-coverage)
11487 ("python-dateutil-2" ,python-dateutil-2)))
11488 (inputs
11489 `(("python-six" ,python-six)))
11490 (arguments
11491 `(#:phases (modify-phases %standard-phases
11492 ;; The tests are normally executed via `make test`, but the PyPi
11493 ;; package does not include the Makefile.
11494 (replace 'check
11495 (lambda _
11496 (zero? (system* "nosetests" "./tests/")))))))
11497 (home-page "https://github.com/spulec/freezegun")
11498 (synopsis "Test utility for mocking the datetime module")
11499 (description
11500 "FreezeGun is a library that allows your python tests to travel through
11501time by mocking the datetime module.")
11502 (license license:asl2.0)))
11503
11504(define-public python2-freezegun
11505 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
11506 (package (inherit base)
11507 (native-inputs
11508 `(("python2-setuptools" ,python2-setuptools)
11509 ,@(package-native-inputs base))))))
dddcb25c
MB
11510
11511(define-public python-odfpy
11512 (package
11513 (name "python-odfpy")
11514 (version "1.3.3")
11515 (source (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "odfpy" version))
11518 (sha256
11519 (base32
11520 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11521 (arguments
11522 `(#:modules ((srfi srfi-1)
11523 (guix build python-build-system)
11524 (guix build utils))
11525 #:phases
11526 (modify-phases %standard-phases
11527 (replace 'check
11528 ;; The test runner invokes python2 and python3 for test*.py.
11529 ;; To avoid having both in inputs, we replicate it here.
11530 (lambda _
11531 (every (lambda (test-file)
11532 (zero? (system* "python" test-file)))
11533 (find-files "tests" "^test.*\\.py$")))))))
11534 (build-system python-build-system)
11535 (home-page "https://github.com/eea/odfpy")
11536 (synopsis "Python API and tools to manipulate OpenDocument files")
11537 (description "Collection of libraries and utility programs written in
11538Python to manipulate OpenDocument 1.2 files.")
11539 (license
11540 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11541 ;; number of files with other licenses.
11542 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11543
11544(define-public python2-odfpy
11545 (package-with-python2 python-odfpy))
b30565bd
MB
11546
11547(define-public python-cachecontrol
11548 (package
11549 (name "python-cachecontrol")
11550 (version "0.11.6")
11551 (source
11552 (origin
11553 (method url-fetch)
11554 ;; Pypi does not have tests.
11555 (uri (string-append
11556 "https://github.com/ionrock/cachecontrol/archive/v"
11557 version ".tar.gz"))
11558 (file-name (string-append name "-" version ".tar.gz"))
11559 (sha256
11560 (base32
11561 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11562 (build-system python-build-system)
11563 (arguments
11564 `(#:phases
11565 (modify-phases %standard-phases
11566 (replace 'check
11567 (lambda _
11568 ;; Drop test that requires internet access.
11569 (delete-file "tests/test_regressions.py")
11570 (setenv "PYTHONPATH"
11571 (string-append (getcwd) "/build/lib:"
11572 (getenv "PYTHONPATH")))
11573 (zero? (system* "py.test" "-vv")))))))
11574 (native-inputs
11575 `(("python-pytest" ,python-pytest)
11576 ("python-redis" ,python-redis)
11577 ("python-webtest" ,python-webtest)
11578 ("python-mock" ,python-mock)))
11579 (propagated-inputs
11580 `(("python-requests" ,python-requests)
11581 ("python-lockfile" ,python-lockfile)))
11582 (home-page "https://github.com/ionrock/cachecontrol")
11583 (synopsis "The httplib2 caching algorithms for use with requests")
11584 (description "CacheControl is a port of the caching algorithms in
11585@code{httplib2} for use with @code{requests} session objects.")
11586 (license license:asl2.0)
dd447621 11587 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
b30565bd
MB
11588
11589(define-public python2-cachecontrol
11590 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
11591 (package (inherit base)
11592 (native-inputs
11593 `(("python2-setuptools" ,python2-setuptools)
11594 ,@(package-native-inputs base))))))
243db824
DM
11595
11596(define-public python-lit
11597 (package
11598 (name "python-lit")
11599 (version "0.5.0")
11600 (source
11601 (origin
11602 (method url-fetch)
11603 (uri (pypi-uri "lit" version))
11604 (sha256
11605 (base32
11606 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11607 (build-system python-build-system)
11608 (home-page "http://llvm.org/")
11609 (synopsis "LLVM Software Testing Tool")
11610 (description "@code{lit} is a portable tool for executing LLVM and Clang
11611style test suites, summarizing their results, and providing indication of
11612failures.")
11613 (license license:ncsa)
11614 (properties `((python2-variant . ,(delay python2-lit))))))
11615
11616(define-public python2-lit
11617 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
11618 (package
11619 (inherit base)
11620 (native-inputs
11621 `(("python2-setuptools" ,python2-setuptools)
11622 ,@(package-native-inputs base))))))
66f95b20
MB
11623
11624(define-public python-pytest-pep8
11625 (package
11626 (name "python-pytest-pep8")
11627 (version "1.0.6")
11628 (source (origin
11629 (method url-fetch)
11630 (uri (pypi-uri "pytest-pep8" version))
11631 (sha256
11632 (base32
11633 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11634 (build-system python-build-system)
11635 (arguments
11636 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
11637 ;; Prevent creation of the egg. This works around
11638 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
11639 #:configure-flags '("--single-version-externally-managed" "--root=/")))
11640 (native-inputs
11641 `(("python-pytest" ,python-pytest)))
11642 (propagated-inputs
11643 `(("python-pep8" ,python-pep8)))
11644 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11645 (synopsis "Py.test plugin to check PEP8 requirements")
11646 (description "Pytest plugin for checking PEP8 compliance.")
11647 (license license:expat)
11648 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
11649
11650(define-public python2-pytest-pep8
11651 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
11652 (package (inherit base)
11653 (native-inputs
11654 `(("python2-setuptools" ,python2-setuptools)
11655 ,@(package-native-inputs base))))))
df94a6b5
MB
11656
11657(define-public python-pytest-flakes
11658 (package
11659 (name "python-pytest-flakes")
11660 (version "1.0.1")
11661 (source (origin
11662 (method url-fetch)
11663 (uri (pypi-uri "pytest-flakes" version))
11664 (sha256
11665 (base32
11666 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11667 (build-system python-build-system)
11668 (arguments
11669 `(;; Prevent creation of the egg. This works around
11670 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
11671 #:configure-flags '("--single-version-externally-managed" "--root=/")
11672 #:phases
11673 (modify-phases %standard-phases
11674 (delete 'check)
11675 (add-after 'install 'check
11676 (lambda _ ; It's easier to run tests after install.
11677 (zero? (system* "py.test" "-vv")))))))
11678 (native-inputs
11679 `(("python-coverage" ,python-coverage)
11680 ("python-pytest" ,python-pytest)
11681 ("python-pytest-cache" ,python-pytest-cache)
11682 ("python-pytest-pep8" ,python-pytest-pep8)))
11683 (propagated-inputs
11684 `(("python-pyflakes" ,python-pyflakes)))
11685 (home-page "https://github.com/fschulze/pytest-flakes")
11686 (synopsis "Py.test plugin to check source code with pyflakes")
11687 (description "Pytest plugin for checking Python source code with pyflakes.")
11688 (license license:expat)
11689 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
11690
11691(define-public python2-pytest-flakes
11692 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
11693 (package (inherit base)
11694 (native-inputs
11695 `(("python2-setuptools" ,python2-setuptools)
11696 ,@(package-native-inputs base))))))
5467ea62
MB
11697
11698(define-public python-natsort
11699 (package
11700 (name "python-natsort")
11701 (version "5.0.1")
11702 (source (origin
11703 (method url-fetch)
11704 (uri (pypi-uri "natsort" version))
11705 (sha256
11706 (base32
11707 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11708 (build-system python-build-system)
11709 (arguments
11710 `(#:phases
11711 (modify-phases %standard-phases
11712 (add-before 'check 'set-cachedir
11713 ;; Tests require write access to $HOME by default
11714 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11715 (native-inputs
11716 `(("python-hypothesis" ,python-hypothesis)
11717 ("python-pytest-cache" ,python-pytest-cache)
11718 ("python-pytest-cov" ,python-pytest-cov)
11719 ("python-pytest-flakes" ,python-pytest-flakes)
11720 ("python-pytest-pep8" ,python-pytest-pep8)))
11721 (propagated-inputs ; TODO: Add python-fastnumbers.
11722 `(("python-pyicu" ,python-pyicu)))
11723 (home-page "https://github.com/SethMMorton/natsort")
11724 (synopsis "Natural sorting for python and shell")
11725 (description
11726 "Natsort lets you apply natural sorting on lists instead of
11727lexicographical. If you use the built-in @code{sorted} method in python
11728on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11729returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11730function @code{natsorted} that identifies numbers and sorts them separately
11731from strings. It can also sort version numbers, real numbers, mixed types
11732and more, and comes with a shell command @command{natsort} that exposes this
11733functionality in the command line.")
11734 (license license:expat)
11735 (properties `((python2-variant . ,(delay python2-natsort))))))
11736
11737(define-public python2-natsort
11738 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11739 (package (inherit base)
11740 (native-inputs
11741 `(("python2-setuptools" ,python2-setuptools)
11742 ("python2-pathlib" ,python2-pathlib)
11743 ("python2-mock" ,python2-mock)
11744 ("python2-enum34" ,python2-enum34)
11745 ,@(package-native-inputs base))))))
4efb9c54
SR
11746
11747(define-public python-glances
11748 (package
11749 (name "python-glances")
11750 (version "2.7.1")
11751 (source
11752 (origin
11753 (method url-fetch)
11754 (uri (pypi-uri "Glances" version))
11755 (sha256
11756 (base32
11757 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11758 (build-system python-build-system)
11759 (inputs
11760 `(("python-psutil" ,python-psutil)))
11761 (home-page
11762 "https://github.com/nicolargo/glances")
11763 (synopsis
11764 "A cross-platform curses-based monitoring tool")
11765 (description
11766 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11767Glances uses the PsUtil library to get information from your system. It monitors
11768CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11769 (license license:lgpl3+)
11770 (properties `((python2-variant . ,(delay python2-glances))))))
11771
11772(define-public python2-glances
11773 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
11774 (package
11775 (inherit base)
11776 (native-inputs
11777 `(("python2-setuptools" ,python2-setuptools)
11778 ,@(package-native-inputs base))))))
05b7a593
EF
11779
11780(define-public python-graphql-core
11781 (package
11782 (name "python-graphql-core")
11783 (version "0.5.3")
11784 (source
11785 (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "graphql-core" version))
11788 (sha256
11789 (base32
11790 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11791 (build-system python-build-system)
11792 (arguments
326f8285
LF
11793 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11794 #:phases
05b7a593
EF
11795 (modify-phases %standard-phases
11796 (add-after 'unpack 'patch-hardcoded-version
11797 (lambda _ (substitute*
11798 "setup.py"
11799 (("'gevent==1.1rc1'") "'gevent'"))
11800 #t)))))
11801 (native-inputs
11802 `(("python-gevent" ,python-gevent)
11803 ("python-mock" ,python-mock)
11804 ("python-pytest-mock" ,python-pytest-mock)))
11805 (inputs
11806 `(("python-promise" ,python-promise)
11807 ("python-six" ,python-six)))
11808 (home-page "https://github.com/graphql-python/graphql-core")
11809 (synopsis "GraphQL implementation for Python")
11810 (description
11811 "GraphQL implementation for Python. GraphQL is a data query language and
11812runtime designed and used to request and deliver data to mobile and web apps.
11813This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11814to Python.")
11815 (properties `((python2-variant . ,(delay python2-graphql-core))))
11816 (license license:expat)))
11817
11818(define-public python2-graphql-core
11819 (let ((base (package-with-python2
11820 (strip-python2-variant python-graphql-core))))
11821 (package (inherit base)
11822 (native-inputs
11823 `(("python2-setuptools" ,python2-setuptools)
11824 ,@(package-native-inputs base))))))
7ee51575
EF
11825
11826(define-public python-graphql-relay
11827 (package
11828 (name "python-graphql-relay")
11829 (version "0.4.4")
11830 (source
11831 (origin
11832 (method url-fetch)
11833 (uri (pypi-uri "graphql-relay" version))
11834 (sha256
11835 (base32
11836 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11837 (build-system python-build-system)
11838 (native-inputs
11839 `(("python-pytest" ,python-pytest)))
11840 (inputs
11841 `(("python-graphql-core" ,python-graphql-core)
11842 ("python-promise" ,python-promise)
11843 ("python-six" ,python-six)))
11844 (home-page "https://github.com/graphql-python/graphql-relay-py")
11845 (synopsis "Relay implementation for Python")
11846 (description
11847 "This is a library to allow the easy creation of Relay-compliant servers
11848using the GraphQL Python reference implementation of a GraphQL server. It
11849should be noted that the code is a exact port of the original
11850@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11851from Facebook.")
11852 (properties `((python2-variant . ,(delay python2-graphql-relay))))
11853 (license license:expat)))
11854
11855(define-public python2-graphql-relay
11856 (let ((base (package-with-python2
11857 (strip-python2-variant python-graphql-relay))))
11858 (package (inherit base)
11859 (native-inputs
11860 `(("python2-setuptools" ,python2-setuptools)
11861 ,@(package-native-inputs base))))))
ddc63a56
EF
11862
11863(define-public python-graphene
11864 (package
11865 (name "python-graphene")
11866 (version "0.10.2")
11867 (source
11868 (origin
11869 (method url-fetch)
11870 (uri (pypi-uri "graphene" version))
11871 (sha256
11872 (base32
11873 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11874 (build-system python-build-system)
11875 (native-inputs
11876 `(("python-django-filter" ,python-django-filter)
11877 ("python-mock" ,python-mock)
11878 ("python-psycopg2" ,python-psycopg2)
11879 ("python-pytest-django" ,python-pytest-django)
11880 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11881 (inputs
11882 `(("python-graphql-core" ,python-graphql-core)
11883 ("python-graphql-relay" ,python-graphql-relay)
11884 ("python-iso8601" ,python-iso8601)
11885 ("python-promise" ,python-promise)
11886 ("python-six" ,python-six)))
11887 (home-page "http://graphene-python.org/")
11888 (synopsis "GraphQL Framework for Python")
11889 (description
11890 "Graphene is a Python library for building GraphQL schemas/types.
11891A GraphQL schema describes your data model, and provides a GraphQL server
11892with an associated set of resolve methods that know how to fetch data.")
11893 (properties `((python2-variant . ,(delay python2-graphene))))
11894 (license license:expat)))
11895
11896(define-public python2-graphene
11897 (let ((base (package-with-python2
11898 (strip-python2-variant python-graphene))))
11899 (package (inherit base)
11900 (native-inputs
11901 `(("python2-setuptools" ,python2-setuptools)
11902 ("python2-sqlalchemy" ,python2-sqlalchemy)
11903 ,@(package-native-inputs base))))))
d488d5d6
EF
11904
11905(define-public python-nautilus
11906 (package
11907 (name "python-nautilus")
11908 (version "0.4.9")
11909 (source
11910 (origin
11911 (method url-fetch)
11912 (uri (pypi-uri "nautilus" version))
11913 (sha256
11914 (base32
11915 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11916 (build-system python-build-system)
11917 (arguments `(#:tests? #f)) ; fails to import test modules
11918 (native-inputs
11919 `(("python-setuptools" ,python-setuptools)))
11920 (inputs
11921 `(("python-bcrypt" ,python-bcrypt)
11922 ("python-click" ,python-click)
11923 ("python-consul" ,python-consul)
11924 ("python-graphql-core" ,python-graphql-core)
11925 ("python-graphql-relay" ,python-graphql-relay)
11926 ("python-graphene" ,python-graphene)
11927 ("python-jinja2" ,python-jinja2)
11928 ("python-nose2" ,python-nose2)
11929 ("python-peewee" ,python-peewee)
11930 ("python-pika" ,python-pika)
11931 ("python-pycparser" ,python-pycparser)
11932 ("python-requests" ,python-requests)
11933 ("python-tornado" ,python-tornado)
11934 ("python-wtforms" ,python-wtforms)))
11935 (home-page "https://github.com/AlecAivazis/nautilus")
11936 (synopsis "Library for creating microservice applications")
11937 (description
11938 "Nautilus is a framework for flux based microservices that looks to
11939provide extendible implementations of common aspects of a cloud so that you can
11940focus on building massively scalable web applications.")
11941 (license license:expat)))
94cffc63 11942
66d3f50a
LF
11943(define-public python-betamax
11944 (package
11945 (name "python-betamax")
11946 (version "0.8.0")
11947 (source
11948 (origin
11949 (method url-fetch)
11950 (uri (pypi-uri "betamax" version))
11951 (sha256
11952 (base32
11953 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11954 (build-system python-build-system)
11955 (arguments
11956 '(;; Many tests fail because they require networking.
11957 #:tests? #f))
11958 (inputs
11959 `(("python-requests" ,python-requests)))
11960 (home-page "https://github.com/sigmavirus24/betamax")
11961 (synopsis "Record HTTP interactions with python-requests")
11962 (description "Betamax will record your test suite's HTTP interactions and
11963replay them during future tests. It is designed to work with python-requests.")
11964 (license license:expat)
11965 (properties `((python2-variant . ,(delay python2-betamax))))))
11966
11967(define-public python2-betamax
11968 (let ((base (package-with-python2 (strip-python2-variant python-betamax))))
11969 (package
11970 (inherit base)
11971 (native-inputs
11972 `(("python2-setuptools" ,python2-setuptools)
11973 ,@(package-native-inputs base))))))
ca0635b4 11974
94cffc63
LF
11975(define-public python-s3transfer
11976 (package
11977 (name "python-s3transfer")
11978 (version "0.1.8")
11979 (source (origin
11980 (method url-fetch)
11981 (uri (pypi-uri "s3transfer" version))
11982 (sha256
11983 (base32
11984 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11985 (build-system python-build-system)
fad8bf97
LF
11986 (arguments
11987 `(#:phases
11988 (modify-phases %standard-phases
11989 (replace 'check
11990 (lambda _
11991 ;; 7 of the 'integration' tests require network access or login
11992 ;; credentials.
11993 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11994 (native-inputs
fad8bf97
LF
11995 `(("python-docutils" ,python-docutils)
11996 ("python-mock" ,python-mock)
11997 ("python-nose" ,python-nose)))
94cffc63
LF
11998 (inputs
11999 `(("python-botocore" ,python-botocore)))
12000 (synopsis "Amazon S3 Transfer Manager")
12001 (description "S3transfer is a Python library for managing Amazon S3
12002transfers.")
12003 (home-page "https://github.com/boto/s3transfer")
12004 (license license:asl2.0)
12005 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12006
12007(define-public python2-s3transfer
12008 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12009 (package
12010 (inherit base)
12011 (native-inputs
12012 `(("python2-futures" ,python2-futures)
12013 ("python2-setuptools" ,python2-setuptools)
12014 ,@(package-native-inputs base))))))
8ab59181
HG
12015
12016(define-public python-setproctitle
12017(package
12018 (name "python-setproctitle")
12019 (version "1.1.10")
12020 (source
12021 (origin
12022 (method url-fetch)
12023 (uri (pypi-uri "setproctitle" version))
12024 (sha256
12025 (base32
12026 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12027 (build-system python-build-system)
12028 (arguments
12029 '(#:phases
12030 (modify-phases %standard-phases
12031 (add-before 'check 'patch-Makefile
12032 ;; Stricly this is only required for the python2 variant.
12033 ;; But adding a phase in an inherited package seems to be
12034 ;; cumbersum. So we patch even for python3.
12035 (lambda _
12036 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12037 (when nose
12038 (substitute* "Makefile"
12039 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12040 (string-append nose "/bin/nosetests "))))
12041 #t)))
12042 (replace 'check
12043 (lambda _
12044 (setenv "PYTHON" (or (which "python3") (which "python")))
12045 (setenv "PYCONFIG" (or (which "python3-config")
12046 (which "python-config")))
12047 (setenv "CC" "gcc")
12048 ;; No need to extend PYTHONPATH to find the built package, since
12049 ;; the Makefile will build anyway
12050 (zero? (system* "make" "check")))))))
12051 (native-inputs
12052 `(("procps" ,procps))) ; required for tests
12053 (home-page
12054 "https://github.com/dvarrazzo/py-setproctitle")
12055 (synopsis
12056 "Setproctitle implementation for Python to customize the process title")
12057 (description "The library allows a process to change its title (as displayed
12058by system tools such as ps and top).
12059
12060Changing the title is mostly useful in multi-process systems, for
12061example when a master process is forked: changing the children's title
12062allows to identify the task each process is busy with. The technique
12063is used by PostgreSQL and the OpenSSH Server for example.")
12064 (license license:bsd-3)
12065 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12066
12067(define-public python2-setproctitle
12068 (let ((base (package-with-python2
12069 (strip-python2-variant python-setproctitle))))
12070 (package
12071 (inherit base)
12072 (native-inputs `(("python2-nose" ,python2-nose)
12073 ,@(package-native-inputs base))))))
162e42d8
HG
12074
12075(define-public python-validictory
12076 (package
12077 (name "python-validictory")
12078 (version "1.0.1")
12079 (source
12080 (origin
12081 (method url-fetch)
12082 (uri (pypi-uri "validictory" version))
12083 (sha256
12084 (base32
12085 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12086 (build-system python-build-system)
12087 (arguments
12088 '(#:phases
12089 (modify-phases %standard-phases
12090 (add-after 'unpack 'bootstrap
12091 ;; Move the tests out of the package directory to avoid
12092 ;; packaging them.
12093 (lambda* _
12094 (rename-file "validictory/tests" "tests")
12095 (delete-file "tests/__init__.py")))
12096 (replace 'check
12097 (lambda _
12098 ;; Extend PYTHONPATH so the built package will be found.
12099 (setenv "PYTHONPATH"
12100 (string-append (getcwd) "/build/lib:"
12101 (getenv "PYTHONPATH")))
12102 (zero? (system* "py.test" "-vv" )))))))
12103 (native-inputs
12104 `(("python-pytest" ,python-pytest)))
12105 (home-page
12106 "https://github.com/jamesturk/validictory")
12107 (synopsis "General purpose Python data validator")
12108 (description "It allows validation of arbitrary Python data structures.
12109
12110The schema format is based on the JSON Schema
12111proposal (http://json-schema.org), so combined with json the library is also
12112useful as a validator for JSON data.")
7ca68304
EF
12113 (license license:expat)
12114 (properties `((python2-variant . ,(delay python2-validictory))))))
162e42d8
HG
12115
12116(define-public python2-validictory
7ca68304
EF
12117 (let ((base (package-with-python2
12118 (strip-python2-variant python-validictory))))
12119 (package
12120 (inherit base)
12121 (native-inputs `(("python2-setuptools" ,python2-setuptools)
12122 ,@(package-native-inputs base))))))
0990edfe
DM
12123
12124(define-public python-aniso8601
12125 (package
12126 (name "python-aniso8601")
12127 (version "1.1.0")
12128 (source
12129 (origin
12130 (method url-fetch)
12131 (uri (pypi-uri "aniso8601" version))
12132 (sha256
12133 (base32
12134 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12135 (build-system python-build-system)
12136 (propagated-inputs
12137 `(("python-dateutil-2" ,python-dateutil-2)))
12138 (home-page
12139 "https://bitbucket.org/nielsenb/aniso8601")
12140 (synopsis
12141 "Python library for parsing ISO 8601 strings")
12142 (description
12143 "This package contains a library for parsing ISO 8601 datetime strings.")
12144 (license license:bsd-3)))
999d964d
DM
12145
12146(define-public python-flask-restful
12147 (package
12148 (name "python-flask-restful")
12149 (version "0.3.5")
12150 (source
12151 (origin
12152 (method url-fetch)
12153 (uri (pypi-uri "Flask-RESTful" version))
12154 (sha256
12155 (base32
12156 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12157 (build-system python-build-system)
12158 (propagated-inputs
12159 `(("python-aniso8601" ,python-aniso8601)
12160 ("python-flask" ,python-flask)
12161 ("python-pycrypto" ,python-pycrypto)
12162 ("python-pytz" ,python-pytz)))
12163 (native-inputs
12164 `(;; Optional dependency of Flask. Tests need it.
12165 ("python-blinker" ,python-blinker)
12166 ("python-mock" ,python-mock) ; For tests
12167 ("python-nose" ,python-nose) ; For tests
12168 ("python-sphinx" ,python-sphinx)))
12169 (home-page
12170 "https://www.github.com/flask-restful/flask-restful/")
12171 (synopsis
12172 "Flask module for creating REST APIs")
12173 (description
12174 "This package contains a Flask module for creating REST APIs.")
12175 (license license:bsd-3)))
31288222
DM
12176
12177(define-public python-flask-basicauth
12178 (package
12179 (name "python-flask-basicauth")
12180 (version "0.2.0")
12181 (source
12182 (origin
12183 (method url-fetch)
12184 (uri (pypi-uri "Flask-BasicAuth" version))
12185 (sha256
12186 (base32
12187 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12188 (build-system python-build-system)
12189 (propagated-inputs
12190 `(("python-flask" ,python-flask)))
12191 (home-page
12192 "https://github.com/jpvanhal/flask-basicauth")
12193 (synopsis
12194 "HTTP basic access authentication for Flask")
12195 (description
12196 "This package provides HTTP basic access authentication for Flask.")
12197 (license license:bsd-3)))
903276d0
DM
12198
12199(define-public python-flask-sqlalchemy
12200 (package
12201 (name "python-flask-sqlalchemy")
12202 (version "2.1")
12203 (source
12204 (origin
12205 (method url-fetch)
12206 (uri (pypi-uri "Flask-SQLAlchemy" version))
12207 (sha256
12208 (base32
12209 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12210 (build-system python-build-system)
12211 (propagated-inputs
12212 `(("python-flask" ,python-flask)
12213 ("python-sqlalchemy" ,python-sqlalchemy)))
12214 (home-page
12215 "http://github.com/mitsuhiko/flask-sqlalchemy")
12216 (synopsis
12217 "Module adding SQLAlchemy support to your Flask application")
12218 (description
12219 "This package adds SQLAlchemy support to your Flask application.")
12220 (license license:bsd-3)))
329b4b3b
LF
12221
12222(define-public python-pyev
12223 (package
12224 (name "python-pyev")
12225 (version "0.9.0")
12226 (source
12227 (origin
12228 (method url-fetch)
12229 (uri (pypi-uri "pyev" version))
12230 (sha256
12231 (base32
12232 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12233 (build-system python-build-system)
12234 (arguments
12235 `(#:tests? #f ; no test suite
12236 #:phases
12237 (modify-phases %standard-phases
12238 (add-after 'unpack 'patch
12239 (lambda* (#:key inputs #:allow-other-keys)
12240 (let ((libev (string-append (assoc-ref inputs "libev")
12241 "/lib/libev.so.4")))
12242 (substitute* "setup.py"
12243 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12244 (string-append "libev_dll_name = \"" libev "\"")))))))))
12245 (inputs
12246 `(("libev" ,libev)))
12247 (home-page "http://pythonhosted.org/pyev/")
12248 (synopsis "Python libev interface")
12249 (description "Pyev provides a Python interface to libev.")
12250 (license license:gpl3)))
12251
12252(define-public python2-pyev
12253 (package-with-python2 python-pyev))
45b4f127
DM
12254
12255(define-public python-imagesize
12256 (package
12257 (name "python-imagesize")
12258 (version "0.7.1")
12259 (source
12260 (origin
12261 (method url-fetch)
12262 (uri (pypi-uri "imagesize" version))
12263 (sha256
12264 (base32
12265 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12266 (build-system python-build-system)
9422c98a
LF
12267 (arguments
12268 '(;; Test files are not distributed on PyPi:
12269 ;; https://github.com/shibukawa/imagesize_py/issues/7
12270 #:tests? #f))
45b4f127
DM
12271 (home-page "https://github.com/shibukawa/imagesize_py")
12272 (synopsis "Gets image size of files in variaous formats in Python")
12273 (description
12274 "This package allows determination of image size from
12275PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12276 (license license:expat)
12277 (properties `((python2-variant . ,(delay python2-imagesize))))))
12278
12279(define-public python2-imagesize
12280 (let ((base (package-with-python2 (strip-python2-variant python-imagesize))))
12281 (package
12282 (inherit base)
12283 (native-inputs `(("python2-setuptools" ,python2-setuptools)
12284 ,@(package-native-inputs base))))))
2f6dd9cd
AI
12285
12286(define-public python-axolotl-curve25519
12287 (package
12288 (name "python-axolotl-curve25519")
12289 (version "0.1")
12290 (source
12291 (origin
12292 (method git-fetch)
12293 (uri (git-reference
12294 (url "git://github.com/tgalal/python-axolotl-curve25519")
12295 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12296 (file-name (string-append name "-" version "-checkout"))
12297 (sha256
12298 (base32
12299 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12300 (build-system python-build-system)
12301 (arguments
12302 `(;; Prevent creation of the egg. This works around
12303 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12304 #:configure-flags '("--root=/")))
12305 (native-inputs
12306 `(("python-setuptools" ,python-setuptools)))
12307 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12308 (synopsis "Python wrapper for curve25519 library")
12309 (description "This is a python wrapper for the curve25519 library
12310with ed25519 signatures. The C code was pulled from
12311libaxolotl-android. At the moment this wrapper is meant for use by
12312python-axolotl.")
12313 (license (list license:gpl3 ; Most files
683cdbf5 12314 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
12315
12316(define-public python2-axolotl-curve25519
12317 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
12318
12319(define-public python-axolotl
12320 (package
12321 (name "python-axolotl")
12322 (version "0.1.35")
12323 (source
12324 (origin
12325 (method url-fetch)
12326 (uri (string-append
12327 "https://github.com/tgalal/python-axolotl/archive/"
12328 version ".tar.gz"))
12329 (file-name (string-append name "-" version ".tar.gz"))
12330 (sha256
12331 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12332 (build-system python-build-system)
12333 (arguments
12334 `(#:phases
12335 (modify-phases %standard-phases
12336 ;; Don't install tests
12337 (add-before 'install 'remove-tests
12338 (lambda _
12339 (for-each delete-file-recursively
12340 '("axolotl/tests" "build/lib/axolotl/tests"))
12341 #t)))
12342 ;; Prevent creation of the egg. This works around
12343 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12344 #:configure-flags '("--root=/")))
12345 (native-inputs
12346 `(("python-setuptools" ,python-setuptools)))
12347 (propagated-inputs
12348 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12349 ("python-dateutil" ,python-dateutil)
12350 ("python-protobuf" ,python-protobuf)
12351 ("python-pycrypto" ,python-pycrypto)))
12352 (home-page "https://github.com/tgalal/python-axolotl")
12353 (synopsis "Python port of libaxolotl-android")
12354 (description "This is a python port of libaxolotl-android. This
12355is a ratcheting forward secrecy protocol that works in synchronous and
12356asynchronous messaging environments.")
12357 (license license:gpl3)))
12358
12359(define-public python2-axolotl
12360 (package-with-python2 python-axolotl))
e2fca490
DM
12361
12362(define-public python-termstyle
12363 (package
12364 (name "python-termstyle")
12365 (version "0.1.11")
12366 (source
12367 (origin
12368 (method url-fetch)
12369 (uri (pypi-uri "termstyle" version))
12370 (sha256
12371 (base32
12372 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12373 (build-system python-build-system)
12374 (home-page "http://github.com/gfxmonk/termstyle")
12375 (synopsis "Console text coloring for Python")
12376 (description "This package provides console text coloring for Python.")
12377 (license license:bsd-3)))
1e6112d8
DM
12378
12379(define-public python-rednose
12380 (package
12381 (name "python-rednose")
12382 (version "1.2.1")
12383 (source
12384 (origin
12385 (method url-fetch)
12386 (uri (pypi-uri "rednose" version))
12387 (sha256
12388 (base32
12389 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12390 (build-system python-build-system)
12391 (arguments
12392 `(#:phases
12393 (modify-phases %standard-phases
12394 (add-after 'unpack 'fix-deps
12395 (lambda _
12396 ;; See <https://github.com/JBKahn/rednose/issues/12>
12397 (substitute* "setup.py"
12398 (("python-termstyle") "termstyle"))
12399 #t)))))
12400 (propagated-inputs
12401 `(("python-colorama" ,python-colorama)
12402 ("python-termstyle" ,python-termstyle)))
12403 (native-inputs
12404 `(("python-six" ,python-six)
12405 ("python-nose" ,python-nose)))
12406 (home-page "https://github.com/JBKahn/rednose")
12407 (synopsis "Colored output for Python nosetests")
12408 (description "This package provides colored output for the
12409@command{nosetests} command of the Python Nose unit test framework.")
12410 (license license:bsd-3)))
0a7f17f0
DM
12411
12412(define-public python-flask-restplus
12413 (package
12414 (name "python-flask-restplus")
12415 (version "0.9.2")
12416 (source
12417 (origin
12418 (method url-fetch)
12419 (uri (pypi-uri "flask-restplus" version))
12420 (sha256
12421 (base32
12422 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12423 (build-system python-build-system)
12424 (propagated-inputs
12425 `(("python-aniso8601" ,python-aniso8601)
12426 ("python-flask" ,python-flask)
12427 ("python-jsonschema" ,python-jsonschema)
12428 ("python-pytz" ,python-pytz)
12429 ("python-six" ,python-six)))
12430 (native-inputs
12431 `(("python-tzlocal" ,python-tzlocal)
12432 ("python-blinker" ,python-blinker)
12433 ("python-nose" ,python-nose)
12434 ("python-rednose" ,python-rednose)))
12435 (home-page "https://github.com/noirbizarre/flask-restplus")
12436 (synopsis "Framework for documented API development with Flask")
12437 (description "This package provides a framework for API development with
12438the Flask web framework in Python. It is similar to package
12439@code{python-flask-restful} but supports the @code{python-swagger}
12440documentation builder.")
12441 (license license:expat)))