gnu: libgit2: Update to 0.24.3 [fixes CVE-2016-{8568,8569}].
[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>
a01b6da7
NK
34;;;
35;;; This file is part of GNU Guix.
36;;;
37;;; GNU Guix is free software; you can redistribute it and/or modify it
38;;; under the terms of the GNU General Public License as published by
39;;; the Free Software Foundation; either version 3 of the License, or (at
40;;; your option) any later version.
41;;;
42;;; GNU Guix is distributed in the hope that it will be useful, but
43;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45;;; GNU General Public License for more details.
46;;;
47;;; You should have received a copy of the GNU General Public License
48;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
1ffa7090 50(define-module (gnu packages python)
3f641af0 51 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 52 #:use-module (gnu packages)
8e451885 53 #:use-module (gnu packages algebra)
d79a343b 54 #:use-module (gnu packages adns)
89b2e0b0 55 #:use-module (gnu packages attr)
d96034ed 56 #:use-module (gnu packages backup)
1ffa7090 57 #:use-module (gnu packages compression)
4ed20663 58 #:use-module (gnu packages databases)
ddc63a56 59 #:use-module (gnu packages django)
5e1c9367 60 #:use-module (gnu packages file)
4ed20663 61 #:use-module (gnu packages fontutils)
4ed20663
AE
62 #:use-module (gnu packages gcc)
63 #:use-module (gnu packages ghostscript)
6eb7af2a 64 #:use-module (gnu packages gl)
4ed20663 65 #:use-module (gnu packages glib)
6eb7af2a 66 #:use-module (gnu packages gstreamer)
4ed20663 67 #:use-module (gnu packages gtk)
421a80a2 68 #:use-module (gnu packages icu4c)
c937562e 69 #:use-module (gnu packages image)
4ed20663 70 #:use-module (gnu packages imagemagick)
d79a343b 71 #:use-module (gnu packages libevent)
b10ab723 72 #:use-module (gnu packages libffi)
89b2e0b0 73 #:use-module (gnu packages linux)
0da98533 74 #:use-module (gnu packages maths)
4ed20663 75 #:use-module (gnu packages multiprecision)
45203542 76 #:use-module (gnu packages networking)
be7134bf 77 #:use-module (gnu packages ncurses)
b04a52a6 78 #:use-module (gnu packages openstack)
d488d5d6 79 #:use-module (gnu packages password-utils)
c9b1b4f9 80 #:use-module (gnu packages pcre)
4ed20663 81 #:use-module (gnu packages perl)
b10ab723 82 #:use-module (gnu packages pkg-config)
06ff0837 83 #:use-module (gnu packages protobuf)
4ed20663 84 #:use-module (gnu packages readline)
6eb7af2a 85 #:use-module (gnu packages sdl)
c9b1b4f9 86 #:use-module (gnu packages statistics)
8f9ac901 87 #:use-module (gnu packages tex)
1c65314c 88 #:use-module (gnu packages texinfo)
cc2b77df 89 #:use-module (gnu packages tls)
e25f0174 90 #:use-module (gnu packages version-control)
02f8f804 91 #:use-module (gnu packages video)
8d12be1e 92 #:use-module (gnu packages web)
ce0614dd 93 #:use-module (gnu packages base)
26b307e2 94 #:use-module (gnu packages xml)
6fa14469 95 #:use-module (gnu packages xorg)
0bdc1671 96 #:use-module (gnu packages xdisorg)
4ed20663 97 #:use-module (gnu packages zip)
afa181ff 98 #:use-module (gnu packages tcl)
63bcec71 99 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
100 #:use-module (guix packages)
101 #:use-module (guix download)
ea5456c8 102 #:use-module (guix git-download)
11bb85a1 103 #:use-module (guix utils)
acc26ff1 104 #:use-module (guix build-system gnu)
d8c4998f 105 #:use-module (guix build-system cmake)
898238b9 106 #:use-module (guix build-system python)
1c65314c
FB
107 #:use-module (guix build-system trivial)
108 #:use-module (srfi srfi-1))
a01b6da7 109
45848023 110(define-public python-2.7
a01b6da7
NK
111 (package
112 (name "python")
e7e7a1eb 113 (version "2.7.11")
a01b6da7
NK
114 (source
115 (origin
116 (method url-fetch)
9b43a0ff 117 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
118 version "/Python-" version ".tar.xz"))
119 (sha256
120 (base32
e7e7a1eb 121 "0iiz844riiznsyhhyy962710pz228gmhv8qi3yk4w4jhmx2lqawn"))
c3052d6b
ML
122 (patches (search-patches "python-2.7-search-paths.patch"
123 "python-2-deterministic-build-info.patch"
124 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
125 (modules '((guix build utils)))
126 ;; suboptimal to delete failing tests here, but if we delete them in the
127 ;; arguments then we need to make sure to strip out that phase when it
128 ;; gets inherited by python and python-minimal.
129 (snippet
130 '(begin
131 (for-each delete-file
132 '("Lib/test/test_compileall.py"
133 "Lib/test/test_distutils.py"
134 "Lib/test/test_import.py"
135 "Lib/test/test_shutil.py"
136 "Lib/test/test_socket.py"
1bb163b0 137 "Lib/test/test_subprocess.py"))
10a42aa2 138 #t))))
02f0c3b2
LC
139 (outputs '("out"
140 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 141 (build-system gnu-build-system)
3fdc99da 142 (arguments
10a42aa2 143 `(;; 356 tests OK.
e7e7a1eb
EF
144 ;; 6 tests failed:
145 ;; test_compileall test_distutils test_import test_shutil test_socket
146 ;; test_subprocess
147 ;; 39 tests skipped:
ff6f33cf
ED
148 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
149 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
150 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
151 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
152 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
153 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
154 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
155 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
156 ;; test_winreg test_winsound test_zipfile64
157 ;; 4 skips unexpected on linux2:
158 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 159 #:test-target "test"
3fdc99da 160 #:configure-flags
6a20289d
LC
161 (list "--enable-shared" ;allow embedding
162 "--with-system-ffi" ;build ctypes
163 (string-append "LDFLAGS=-Wl,-rpath="
164 (assoc-ref %outputs "out") "/lib"))
fd982732 165
d2cc9c7c
LC
166 #:modules ((ice-9 ftw) (ice-9 match)
167 (guix build utils) (guix build gnu-build-system))
fd982732 168 #:phases
46472ecd
MW
169 (modify-phases %standard-phases
170 (add-before
171 'configure 'patch-lib-shells
172 (lambda _
173 ;; Filter for existing files, since some may not exist in all
174 ;; versions of python that are built with this recipe.
175 (substitute* (filter file-exists?
176 '("Lib/subprocess.py"
177 "Lib/popen2.py"
178 "Lib/distutils/tests/test_spawn.py"
179 "Lib/test/test_subprocess.py"))
180 (("/bin/sh") (which "sh")))
dedc8320
LC
181
182 ;; Use zero as the timestamp in .pyc files so that builds are
183 ;; deterministic. TODO: Remove it when this variable is set in
184 ;; gnu-build-system.scm.
a665996f 185 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 186 #t))
5b4e2791
LC
187 (add-before 'configure 'do-not-record-configure-flags
188 (lambda* (#:key configure-flags #:allow-other-keys)
189 ;; Remove configure flags from the installed '_sysconfigdata.py'
190 ;; and 'Makefile' so we don't end up keeping references to the
191 ;; build tools.
192 ;;
193 ;; Preserve at least '--with-system-ffi' since otherwise the
194 ;; thing tries to build libffi, fails, and we end up with a
195 ;; Python that lacks ctypes.
196 (substitute* "configure"
197 (("^CONFIG_ARGS=.*$")
198 (format #f "CONFIG_ARGS='~a'\n"
199 (if (member "--with-system-ffi" configure-flags)
200 "--with-system-ffi"
201 ""))))
202 #t))
46472ecd
MW
203 (add-before
204 'check 'pre-check
205 (lambda _
206 ;; 'Lib/test/test_site.py' needs a valid $HOME
207 (setenv "HOME" (getcwd))
1bb163b0
LC
208 ,@(if (string-prefix? "mips64el" (%current-system))
209
210 ;; XXX: The following test fails on mips64el.
211 '((false-if-exception
212 (delete-file "Lib/test/test_ctypes.py")))
213
214 '())
46472ecd
MW
215 #t))
216 (add-after
217 'unpack 'set-source-file-times-to-1980
218 ;; XXX One of the tests uses a ZIP library to pack up some of the
219 ;; source tree, and fails with "ZIP does not support timestamps
220 ;; before 1980". Work around this by setting the file times in the
221 ;; source tree to sometime in early 1980.
222 (lambda _
223 (let ((circa-1980 (* 10 366 24 60 60)))
224 (ftw "." (lambda (file stat flag)
225 (utime file circa-1980 circa-1980)
226 #t))
02f0c3b2 227 #t)))
9ffe61b0
LC
228 (add-after 'install 'remove-tests
229 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
230 ;; because these files are used by some libraries out there.
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 (match (scandir (string-append out "/lib")
234 (lambda (name)
235 (string-prefix? "python" name)))
236 ((pythonX.Y)
237 (let ((testdir (string-append out "/lib/" pythonX.Y
238 "/test")))
239 (with-directory-excursion testdir
240 (for-each delete-file-recursively
241 (scandir testdir
242 (match-lambda
243 ((or "." "..") #f)
244 (file
245 (not
246 (string-prefix? "test_support."
247 file))))))
248 (call-with-output-file "__init__.py" (const #t))
249 #t)))))))
216c283b
LC
250 (add-before 'strip 'make-libraries-writable
251 (lambda* (#:key outputs #:allow-other-keys)
252 ;; Make .so files writable so they can be stripped.
253 (let ((out (assoc-ref outputs "out")))
254 (for-each (lambda (file)
255 (chmod file #o755))
256 (find-files (string-append out "/lib")
257 "\\.so"))
258 #t)))
02f0c3b2
LC
259 (add-after 'install 'move-tk-inter
260 (lambda* (#:key outputs #:allow-other-keys)
261 ;; When Tkinter support is built move it to a separate output so
262 ;; that the main output doesn't contain a reference to Tcl/Tk.
263 (let ((out (assoc-ref outputs "out"))
264 (tk (assoc-ref outputs "tk")))
265 (when tk
266 (match (find-files out "tkinter.*\\.so")
267 ((tkinter.so)
268 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
269 ;; want it under TK/lib/pythonX.Y/site-packages.
270 (let* ((len (string-length out))
271 (target (string-append
272 tk "/"
273 (string-drop
274 (dirname (dirname tkinter.so))
275 len)
276 "/site-packages")))
277 (install-file tkinter.so target)
278 (delete-file tkinter.so)))))
279 #t))))))
a01b6da7 280 (inputs
3fdc99da
CR
281 `(("bzip2" ,bzip2)
282 ("gdbm" ,gdbm)
b10ab723 283 ("libffi" ,libffi) ; for ctypes
b88e1b0a 284 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 285 ("openssl" ,openssl)
3fdc99da 286 ("readline" ,readline)
afa181ff
LC
287 ("zlib" ,zlib)
288 ("tcl" ,tcl)
289 ("tk" ,tk))) ; for tkinter
b10ab723
CR
290 (native-inputs
291 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
292 (native-search-paths
293 (list (search-path-specification
294 (variable "PYTHONPATH")
af070955 295 (files '("lib/python2.7/site-packages")))))
a01b6da7 296 (home-page "http://python.org")
afa181ff 297 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
298 (description
299 "Python is a remarkably powerful dynamic programming language that
300is used in a wide variety of application domains. Some of its key
301distinguishing features include: clear, readable syntax; strong
302introspection capabilities; intuitive object orientation; natural
303expression of procedural code; full modularity, supporting hierarchical
304packages; exception-based error handling; and very high level dynamic
305data types.")
3f641af0 306 (license license:psfl)))
acc26ff1 307
45848023
HG
308;; Current 2.x version.
309(define-public python-2 python-2.7)
310
311(define-public python-3.4
b24d1cfc 312 (package (inherit python-2)
08c04509 313 (version "3.4.3")
717003e3
LC
314 (source (origin
315 (method url-fetch)
316 (uri (string-append "https://www.python.org/ftp/python/"
317 version "/Python-" version ".tar.xz"))
fc1adab1
AK
318 (patches (search-patches
319 "python-fix-tests.patch"
320 ;; XXX Try removing this patch for python > 3.4.3
321 "python-disable-ssl-test.patch"
322 "python-3-deterministic-build-info.patch"
323 "python-3-search-paths.patch"))
717003e3
LC
324 (patch-flags '("-p0"))
325 (sha256
326 (base32
08c04509 327 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
328 (arguments (substitute-keyword-arguments (package-arguments python-2)
329 ((#:tests? _) #t)))
1aebc0cb
AE
330 (native-search-paths
331 (list (search-path-specification
332 (variable "PYTHONPATH")
0e05d01e
SB
333 (files (list (string-append "lib/python"
334 (version-major+minor version)
335 "/site-packages"))))))))
f26a77ff 336
45848023
HG
337;; Current 3.x version.
338(define-public python-3 python-3.4)
339
340;; Current major version.
341(define-public python python-3)
342
95288fcc
LC
343;; Minimal variants of Python, mostly used to break the cycle between Tk and
344;; Python (Tk -> libxcb -> Python.)
345
346(define-public python2-minimal
347 (package (inherit python-2)
348 (name "python-minimal")
02f0c3b2 349 (outputs '("out"))
95288fcc
LC
350 (arguments
351 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
352 ((#:configure-flags cf)
353 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
354 (inputs '()))) ;none of the optional dependencies
355
356(define-public python-minimal
898238b9 357 (package (inherit python)
95288fcc 358 (name "python-minimal")
02f0c3b2 359 (outputs '("out"))
95288fcc
LC
360 (arguments
361 (substitute-keyword-arguments (package-arguments python)
c5a05e31
LC
362 ((#:configure-flags cf)
363 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
364
365 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
366 ;; zlib is required by 'zipimport', used by pip.
367 (inputs `(("openssl" ,openssl)
368 ("zlib" ,zlib)))))
369
64cb064c
LC
370(define* (wrap-python3 python
371 #:optional
372 (name (string-append (package-name python) "-wrapper")))
898238b9 373 (package (inherit python)
95288fcc 374 (name name)
898238b9
AE
375 (source #f)
376 (build-system trivial-build-system)
02f0c3b2 377 (outputs '("out"))
3c0f2329 378 (propagated-inputs `(("python" ,python)))
898238b9
AE
379 (arguments
380 `(#:modules ((guix build utils))
381 #:builder
382 (begin
383 (use-modules (guix build utils))
384 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
385 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
386 (mkdir-p bin)
387 (for-each
388 (lambda (old new)
389 (symlink (string-append python old)
390 (string-append bin "/" new)))
187e9094
LF
391 '("python3" "pydoc3" "idle3")
392 '("python" "pydoc" "idle"))))))
0d56e3e1
LC
393 (synopsis "Wrapper for the Python 3 commands")
394 (description
395 "This package provides wrappers for the commands of Python@tie{}3.x such
396that they can be invoked under their usual name---e.g., @command{python}
397instead of @command{python3}.")))
398
95288fcc
LC
399(define-public python-wrapper (wrap-python3 python))
400(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 401
aaf625b8
RW
402(define-public python-psutil
403 (package
404 (name "python-psutil")
88535a44 405 (version "4.3.0")
aaf625b8
RW
406 (source
407 (origin
408 (method url-fetch)
f56777be 409 (uri (pypi-uri "psutil" version))
aaf625b8
RW
410 (sha256
411 (base32
88535a44 412 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8
RW
413 (build-system python-build-system)
414 (native-inputs
415 `(("python-setuptools" ,python-setuptools)))
88535a44 416 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
417 (synopsis "Library for retrieving information on running processes")
418 (description
419 "psutil (Python system and process utilities) is a library for retrieving
420information on running processes and system utilization (CPU, memory, disks,
421network) in Python. It is useful mainly for system monitoring, profiling and
422limiting process resources and management of running processes. It implements
423many functionalities offered by command line tools such as: ps, top, lsof,
424netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
425pidof, tty, taskset, pmap.")
3f641af0 426 (license license:bsd-3)))
aaf625b8
RW
427
428(define-public python2-psutil
429 (package-with-python2 python-psutil))
898238b9 430
f9da1d8a
ED
431(define-public python-passlib
432 (package
433 (name "python-passlib")
690e8c66 434 (version "1.6.5")
f9da1d8a
ED
435 (source
436 (origin
437 (method url-fetch)
690e8c66 438 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
439 (sha256
440 (base32
690e8c66 441 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
442 (build-system python-build-system)
443 (native-inputs
444 `(("python-nose" ,python-nose)
445 ("python-setuptools" ,python-setuptools)))
446 (inputs
447 `(("python-py-bcrypt" ,python-py-bcrypt)))
448 (arguments
449 `(#:phases
450 (alist-cons-before
451 'check 'set-PYTHON_EGG_CACHE
452 ;; some tests require access to "$HOME/.cython"
453 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
454 %standard-phases)))
455 (home-page "https://bitbucket.org/ecollins/passlib")
456 (synopsis
457 "Comprehensive password hashing framework")
458 (description
459 "Passlib is a password hashing library for Python 2 & 3, which provides
460cross-platform implementations of over 30 password hashing algorithms, as well
461as a framework for managing existing password hashes. It's designed to be
462useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
463to providing full-strength password hashing for multi-user application.")
3f641af0 464 (license license:bsd-3)))
f9da1d8a
ED
465
466(define-public python2-passlib
467 (package-with-python2 python-passlib))
468
feb0d9c3
ED
469(define-public python-py-bcrypt
470 (package
471 (name "python-py-bcrypt")
472 (version "0.4")
473 (source
474 (origin
475 (method url-fetch)
476 (uri (string-append
477 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
478 version
479 ".tar.gz"))
480 (sha256
481 (base32
482 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
483 (build-system python-build-system)
484 (native-inputs
485 `(("python-setuptools" ,python-setuptools)))
486 (home-page "https://code.google.com/p/py-bcrypt")
487 (synopsis
488 "Bcrypt password hashing and key derivation")
489 (description
490 "A python wrapper of OpenBSD's Blowfish password hashing code. This
491system hashes passwords using a version of Bruce Schneier's Blowfish block
492cipher with modifications designed to raise the cost of off-line password
493cracking and frustrate fast hardware implementation. The computation cost of
494the algorithm is parametised, so it can be increased as computers get faster.
495The intent is to make a compromise of a password database less likely to
496result in an attacker gaining knowledge of the plaintext passwords (e.g. using
497John the Ripper).")
498 ;; "sha2.c" is under BSD-3;
499 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
500 ;; the rest is under ISC.
3f641af0 501 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
502
503(define-public python2-py-bcrypt
504 (package-with-python2 python-py-bcrypt))
505
506
429fdea1
ED
507(define-public python-paramiko
508 (package
509 (name "python-paramiko")
81b9bbbd 510 (version "1.16.0")
429fdea1
ED
511 (source
512 (origin
513 (method url-fetch)
81b9bbbd 514 (uri (pypi-uri "paramiko" version))
429fdea1
ED
515 (sha256
516 (base32
81b9bbbd 517 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1
ED
518 (build-system python-build-system)
519 (native-inputs
520 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
521 (propagated-inputs
522 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 523 (inputs
a3fc12da 524 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
525 (home-page "http://www.paramiko.org/")
526 (synopsis "SSHv2 protocol library")
527 (description "Paramiko is a python implementation of the SSHv2 protocol,
528providing both client and server functionality. While it leverages a Python C
529extension for low level cryptography (PyCrypto), Paramiko itself is a pure
530Python interface around SSH networking concepts.")
3f641af0 531 (license license:lgpl2.1+)))
429fdea1
ED
532
533(define-public python2-paramiko
534 (package-with-python2 python-paramiko))
535
536
de73dbf6
ED
537(define-public python-httplib2
538 (package
539 (name "python-httplib2")
286f1bac 540 (version "0.9.2")
de73dbf6
ED
541 (source
542 (origin
543 (method url-fetch)
286f1bac 544 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
545 (sha256
546 (base32
286f1bac 547 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6
ED
548 (build-system python-build-system)
549 (native-inputs
550 `(("python-setuptools" ,python-setuptools)))
286f1bac 551 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
552 (synopsis "Comprehensive HTTP client library")
553 (description
554 "A comprehensive HTTP client library supporting many features left out of
555other HTTP libraries.")
556 (license license:expat)))
557
558(define-public python2-httplib2
559 (package-with-python2 python-httplib2))
560
67039875
ED
561(define-public python-ecdsa
562 (package
563 (name "python-ecdsa")
564 (version "0.13")
565 (source
566 (origin
567 (method url-fetch)
568 (uri (string-append
569 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
570 version
571 ".tar.gz"))
572 (sha256
573 (base32
574 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
575 (build-system python-build-system)
576 (native-inputs
577 `(("python-setuptools" ,python-setuptools)))
578 (inputs
579 `(("openssl" ,openssl)))
580 (home-page
581 "http://github.com/warner/python-ecdsa")
582 (synopsis
583 "ECDSA cryptographic signature library (pure python)")
584 (description
585 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
586Curve Digital Signature Algorithm), implemented purely in Python. With this
587library, you can quickly create keypairs (signing key and verifying key), sign
588messages, and verify the signatures. The keys and signatures are very short,
589making them easy to handle and incorporate into other protocols.")
590 (license license:expat)))
591
592(define-public python2-ecdsa
593 (package-with-python2 python-ecdsa))
594
52323f32
ED
595(define-public python-ccm
596 (package
597 (name "python-ccm")
db5567f7 598 (version "2.1.6")
52323f32
ED
599 (source
600 (origin
601 (method url-fetch)
db5567f7 602 (uri (pypi-uri "ccm" version))
52323f32
ED
603 (sha256
604 (base32
db5567f7 605 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32
ED
606 (build-system python-build-system)
607 (native-inputs
608 `(("python-setuptools" ,python-setuptools)))
609 (inputs
610 `(("python-pyyaml" ,python-pyyaml)
611 ("python-six" ,python-six)))
612 (home-page "https://github.com/pcmanus/ccm")
613 (synopsis "Cassandra Cluster Manager")
614 (description "A script/library to create, launch and remove an Apache
615Cassandra cluster on localhost.")
3f641af0 616 (license license:asl2.0)))
52323f32
ED
617
618(define-public python2-ccm
619 (package-with-python2 python-ccm))
620
89114f39 621(define-public python-pytz
acc26ff1 622 (package
89114f39 623 (name "python-pytz")
61c9babb 624 (version "2016.3")
acc26ff1
CR
625 (source
626 (origin
627 (method url-fetch)
61c9babb 628 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
629 (sha256
630 (base32
61c9babb 631 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 632 (build-system python-build-system)
8498b8cf 633 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 634 (home-page "http://pythonhosted.org/pytz")
9e771e3b 635 (synopsis "Python timezone library")
acc26ff1
CR
636 (description
637 "This library allows accurate and cross platform timezone calculations
638using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 639 (license license:expat)))
5ace6e2f 640
89114f39 641(define-public python2-pytz
11bb85a1 642 (package-with-python2 python-pytz))
89114f39 643
fc50e9c6 644
89114f39 645(define-public python-babel
5ace6e2f 646 (package
89114f39 647 (name "python-babel")
3f37db6b 648 (version "2.3.2")
5ace6e2f
CR
649 (source
650 (origin
651 (method url-fetch)
b850a6d8 652 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
653 (sha256
654 (base32
3f37db6b 655 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f
CR
656 (build-system python-build-system)
657 (inputs
e1804763
AE
658 `(("python-pytz" ,python-pytz)
659 ("python-setuptools" ,python-setuptools)))
8498b8cf 660 (arguments `(#:tests? #f)) ; no test target
e1804763 661 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
662 (synopsis
663 "Tools for internationalizing Python applications")
664 (description
665 "Babel is composed of two major parts:
666- tools to build and work with gettext message catalogs
667- a Python interface to the CLDR (Common Locale Data Repository), providing
668access to various locale display names, localized number and date formatting,
669etc. ")
3f641af0 670 (license license:bsd-3)))
89114f39
AE
671
672(define-public python2-babel
11bb85a1 673 (package-with-python2 python-babel))
73adf220 674
ed377cc6
RW
675(define-public python2-backport-ssl-match-hostname
676 (package
677 (name "python2-backport-ssl-match-hostname")
f2d06d46 678 (version "3.5.0.1")
ed377cc6
RW
679 (source
680 (origin
681 (method url-fetch)
682 (uri (string-append
683 "https://pypi.python.org/packages/source/b/"
684 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
685 version ".tar.gz"))
686 (sha256
687 (base32
f2d06d46 688 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 689 (build-system python-build-system)
f2d06d46
EF
690 (arguments
691 `(#:python ,python-2
692 #:tests? #f)) ; no test target
ed377cc6
RW
693 (inputs
694 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
695 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
696 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
697 (description
698 "This backport brings the ssl.match_hostname() function to users of
699earlier versions of Python. The function checks the hostname in the
700certificate returned by the server to which a connection has been established,
701and verifies that it matches the intended target hostname.")
3f641af0 702 (license license:psfl)))
ed377cc6 703
ef5cbf9b
RW
704(define-public python-h5py
705 (package
706 (name "python-h5py")
fe147c41 707 (version "2.6.0")
ef5cbf9b
RW
708 (source
709 (origin
710 (method url-fetch)
fe147c41 711 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
712 (sha256
713 (base32
fe147c41 714 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 715 (build-system python-build-system)
797e1401
RW
716 (arguments
717 `(#:tests? #f ; no test target
718 #:phases
719 (modify-phases %standard-phases
720 (add-after 'unpack 'fix-hdf5-paths
721 (lambda* (#:key inputs #:allow-other-keys)
722 (let ((prefix (assoc-ref inputs "hdf5")))
723 (substitute* "setup_build.py"
724 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
725 (string-append "['" prefix "/lib" "']"))
726 (("'/opt/local/include', '/usr/local/include'")
727 (string-append "'" prefix "/include" "'")))
728 (substitute* "setup_configure.py"
729 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
730 (string-append "['" prefix "/lib" "']")))
731 #t))))))
3c4010b1
RW
732 (propagated-inputs
733 `(("python-numpy" ,python-numpy)))
ef5cbf9b 734 (inputs
fe147c41
EF
735 `(("hdf5" ,hdf5)
736 ("python-six" ,python-six)))
ef5cbf9b 737 (native-inputs
fe147c41
EF
738 `(("python-cython" ,python-cython)
739 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
740 (home-page "http://www.h5py.org/")
741 (synopsis "Read and write HDF5 files from Python")
742 (description
743 "The h5py package provides both a high- and low-level interface to the
744HDF5 library from Python. The low-level interface is intended to be a
745complete wrapping of the HDF5 API, while the high-level component supports
746access to HDF5 files, datasets and groups using established Python and NumPy
747concepts.")
3f641af0 748 (license license:bsd-3)
fe147c41 749 (properties `((python2-variant . ,(delay python2-h5py))))))
ef5cbf9b
RW
750
751(define-public python2-h5py
fe147c41 752 (package-with-python2 (strip-python2-variant python-h5py)))
ef5cbf9b 753
c1448c69
EB
754(define-public python-lockfile
755 (package
756 (name "python-lockfile")
692add53 757 (version "0.12.2")
c1448c69
EB
758 (source
759 (origin
760 (method url-fetch)
761 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
762 "lockfile-" version ".tar.gz"))
763 (sha256
764 (base32
692add53 765 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
766 (build-system python-build-system)
767 (arguments '(#:test-target "check"))
692add53
BW
768 (native-inputs
769 `(("python-pbr" ,python-pbr)))
6a8f26a4 770 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
771 (synopsis "Platform-independent file locking module")
772 (description
773 "The lockfile package exports a LockFile class which provides a simple
774API for locking files.")
1804527a
BW
775 (license license:expat)
776 (properties `((python2-variant . ,(delay python2-lockfile))))))
c1448c69
EB
777
778(define-public python2-lockfile
1804527a
BW
779 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
780 (package
692add53
BW
781 (inherit base)
782 (native-inputs `(("python2-setuptools" ,python2-setuptools)
783 ,@(package-native-inputs base))))))
c1448c69 784
5a1a4bf6
EB
785(define-public python-mock
786 (package
787 (name "python-mock")
788 (version "1.0.1")
789 (source
790 (origin
791 (method url-fetch)
792 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
793 "mock-" version ".tar.gz"))
794 (sha256
795 (base32
796 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
797 (build-system python-build-system)
798 (arguments '(#:test-target "check"))
07af3e5e 799 (home-page "http://code.google.com/p/mock/")
9e771e3b 800 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
801 (description
802 "Mock is a library for testing in Python. It allows you to replace parts
803of your system under test with mock objects and make assertions about how they
804have been used.")
bd3fa666 805 (license license:expat)))
5a1a4bf6
EB
806
807(define-public python2-mock
808 (package-with-python2 python-mock))
809
fc50e9c6 810
73adf220
AE
811(define-public python-setuptools
812 (package
813 (name "python-setuptools")
62a9a23b 814 (version "18.3.1")
73adf220
AE
815 (source
816 (origin
817 (method url-fetch)
818 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
819 version ".tar.gz"))
820 (sha256
821 (base32
62a9a23b 822 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 823 (build-system python-build-system)
d3d656c5
AE
824 ;; FIXME: Tests require pytest, which itself relies on setuptools.
825 ;; One could bootstrap with an internal untested setuptools.
73adf220 826 (arguments
824af8ca 827 `(#:tests? #f))
73adf220
AE
828 (home-page "https://pypi.python.org/pypi/setuptools")
829 (synopsis
830 "Library designed to facilitate packaging Python projects")
831 (description
832 "Setuptools is a fully-featured, stable library designed to facilitate
833packaging Python projects, where packaging includes:
834Python package and module definitions,
835distribution package metadata,
836test hooks,
837project installation,
838platform-specific details,
839Python 3 support.")
3f641af0 840 (license license:psfl)))
73adf220
AE
841
842(define-public python2-setuptools
843 (package-with-python2 python-setuptools))
fc50e9c6
AE
844
845
cafc3f5a
EB
846(define-public python-pycrypto
847 (package
848 (name "python-pycrypto")
849 (version "2.6.1")
850 (source
851 (origin
852 (method url-fetch)
853 (uri (string-append "https://pypi.python.org/packages/source/p/"
854 "pycrypto/pycrypto-" version ".tar.gz"))
855 (sha256
856 (base32
857 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
858 (build-system python-build-system)
859 (native-inputs
860 `(("python-setuptools" ,python-setuptools)))
861 (inputs
862 `(("python" ,python)
863 ("gmp" ,gmp)))
864 (arguments
865 `(#:phases
866 (alist-cons-before
867 'build 'set-build-env
868 ;; pycrypto runs an autoconf configure script behind the scenes
869 (lambda _
870 (setenv "CONFIG_SHELL" (which "bash")))
871 %standard-phases)))
872 (home-page "http://www.pycrypto.org/")
873 (synopsis "Cryptographic modules for Python")
874 (description
875 "Pycrypto is a collection of both secure hash functions (such as SHA256
876and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 877etc.). The package is structured to make adding new modules easy.")
3f641af0 878 (license license:public-domain)))
cafc3f5a 879
345f0611 880(define-public python2-pycrypto
1c0059da
EF
881 (let ((pycrypto (package-with-python2 python-pycrypto)))
882 (package (inherit pycrypto)
883 (inputs
884 `(("python" ,python-2)
885 ,@(alist-delete
886 "python"
887 (package-inputs pycrypto)))))))
345f0611 888
cafc3f5a
EB
889(define-public python-keyring
890 (package
891 (name "python-keyring")
13f3ff35 892 (version "8.7")
cafc3f5a
EB
893 (source
894 (origin
895 (method url-fetch)
664e6c3a 896 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
897 (sha256
898 (base32
13f3ff35 899 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
900 (build-system python-build-system)
901 (native-inputs
13f3ff35 902 `(("python-setuptools-scm" ,python-setuptools-scm)))
cafc3f5a
EB
903 (inputs
904 `(("python-pycrypto" ,python-pycrypto)))
905 (arguments
664e6c3a 906 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 907 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
908 (synopsis "Store and access your passwords safely")
909 (description
910 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 911service from python. It can be used in any application that needs safe
cafc3f5a
EB
912password storage.")
913 ;; "MIT" and PSF dual license
3f641af0 914 (license license:x11)
13f3ff35 915 (properties `((python2-variant . ,(delay python2-keyring))))))
cafc3f5a 916
d7af1069 917(define-public python2-keyring
13f3ff35
EF
918 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
919 (package
920 (inherit base)
921 (native-inputs `(("python2-setuptools" ,python2-setuptools)
922 ,@(package-native-inputs base))))))
d7af1069 923
a480bc41
EB
924(define-public python-six
925 (package
926 (name "python-six")
b6ab89ef 927 (version "1.10.0")
a480bc41
EB
928 (source
929 (origin
930 (method url-fetch)
b6ab89ef 931 (uri (pypi-uri "six" version))
a480bc41
EB
932 (sha256
933 (base32
b6ab89ef 934 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
935 (build-system python-build-system)
936 (inputs
937 `(("python-setuptools" ,python-setuptools)))
938 (home-page "http://pypi.python.org/pypi/six/")
939 (synopsis "Python 2 and 3 compatibility utilities")
940 (description
35b9e423 941 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
942functions for smoothing over the differences between the Python versions with
943the goal of writing Python code that is compatible on both Python versions.
35b9e423 944Six supports every Python version since 2.5. It is contained in only one
a480bc41 945Python file, so it can be easily copied into your project.")
3f641af0 946 (license license:x11)))
a480bc41 947
0c20025c
AE
948(define-public python2-six
949 (package-with-python2 python-six))
950
cafc3f5a
EB
951(define-public python-dateutil-2
952 (package
953 (name "python-dateutil")
394b8060 954 (version "2.5.2")
cafc3f5a
EB
955 (source
956 (origin
957 (method url-fetch)
394b8060 958 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
959 (sha256
960 (base32
394b8060 961 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a
EB
962 (build-system python-build-system)
963 (inputs
394b8060 964 `(("python-six" ,python-six)))
b5a5fb19 965 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
966 (synopsis "Extensions to the standard datetime module")
967 (description
968 "The dateutil module provides powerful extensions to the standard
969datetime module, available in Python 2.3+.")
3f641af0 970 (license license:bsd-3)
394b8060 971 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
cafc3f5a
EB
972
973(define-public python2-dateutil-2
394b8060
EF
974 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
975 (package
976 (inherit base)
977 (inputs `(("python2-setuptools" ,python2-setuptools)
978 ,@(package-inputs base))))))
cafc3f5a 979
fc50e9c6
AE
980(define-public python-dateutil
981 (package
982 (name "python-dateutil")
983 (version "1.5") ; last version for python < 3
984 (source
985 (origin
986 (method url-fetch)
cafc3f5a
EB
987 (uri (string-append "http://labix.org/download/python-dateutil/"
988 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
989 (sha256
990 (base32
991 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
992 (build-system python-build-system)
993 (inputs
994 `(("python-setuptools" ,python-setuptools)))
b5a5fb19 995 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 996 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
997 (description
998 "The dateutil module provides powerful extensions to the standard
999datetime module, available in Python 2.3+.")
3f641af0 1000 (license license:psfl)))
fc50e9c6
AE
1001
1002(define-public python2-dateutil
1003 (package-with-python2 python-dateutil))
1d08c01f 1004
cafc3f5a
EB
1005(define-public python-parsedatetime
1006 (package
1007 (name "python-parsedatetime")
eebf6f01 1008 (version "2.1")
cafc3f5a
EB
1009 (source
1010 (origin
1011 (method url-fetch)
eebf6f01 1012 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1013 (sha256
1014 (base32
eebf6f01 1015 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1016 (build-system python-build-system)
1017 (native-inputs
eebf6f01
EF
1018 `(("python-nose" ,python-nose)
1019 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1020 (home-page "http://github.com/bear/parsedatetime/")
1021 (synopsis
1022 "Parse human-readable date/time text")
1023 (description
e881752c 1024 "Parse human-readable date/time text.")
3f641af0 1025 (license license:asl2.0)
eebf6f01 1026 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
cafc3f5a 1027
38b8f9b2 1028(define-public python2-parsedatetime
eebf6f01
EF
1029 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1030 (package
1031 (inherit base)
1032 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1033 ,@(package-native-inputs base))))))
38b8f9b2 1034
d072efcb
RW
1035(define-public python-pandas
1036 (package
1037 (name "python-pandas")
7d0c3c8d 1038 (version "0.18.1")
d072efcb
RW
1039 (source
1040 (origin
1b96f069 1041 (method url-fetch)
7d0c3c8d
EF
1042 (uri (string-append
1043 "https://pypi.python.org/packages/11/09/"
1044 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1045 "pandas-" version ".tar.gz"))
1b96f069 1046 (sha256
7d0c3c8d 1047 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1048 (build-system python-build-system)
d072efcb 1049 (propagated-inputs
42603726
EF
1050 `(("python-numpy" ,python-numpy)))
1051 (inputs
1052 `(("python-pytz" ,python-pytz)
d072efcb
RW
1053 ("python-dateutil" ,python-dateutil-2)))
1054 (native-inputs
7d0c3c8d 1055 `(("python-nose" ,python-nose)))
d072efcb
RW
1056 (home-page "http://pandas.pydata.org")
1057 (synopsis "Data structures for data analysis, time series, and statistics")
1058 (description
1059 "Pandas is a Python package providing fast, flexible, and expressive data
1060structures designed to make working with structured (tabular,
1061multidimensional, potentially heterogeneous) and time series data both easy
1062and intuitive. It aims to be the fundamental high-level building block for
1063doing practical, real world data analysis in Python.")
3f641af0 1064 (license license:bsd-3)
7d0c3c8d 1065 (properties `((python2-variant . ,(delay python2-pandas))))))
d072efcb
RW
1066
1067(define-public python2-pandas
7d0c3c8d
EF
1068 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1069 (package
1070 (inherit base)
1071 (native-inputs `(("python2-setuptools" ,python2-setuptools)
dbd40ac1 1072 ,@(package-native-inputs base))))))
d072efcb 1073
cafc3f5a
EB
1074(define-public python-tzlocal
1075 (package
1076 (name "python-tzlocal")
ed80839b 1077 (version "1.2.2")
cafc3f5a
EB
1078 (source
1079 (origin
1080 (method url-fetch)
226d3331 1081 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1082 (sha256
1083 (base32
ed80839b 1084 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1085 (build-system python-build-system)
ed80839b 1086 (inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1087 (home-page "https://github.com/regebro/tzlocal")
1088 (synopsis
35b9e423 1089 "Local timezone information for Python")
cafc3f5a
EB
1090 (description
1091 "Tzlocal returns a tzinfo object with the local timezone information.
1092This module attempts to fix a glaring hole in pytz, that there is no way to
1093get the local timezone information, unless you know the zoneinfo name, and
1094under several distributions that's hard or impossible to figure out.")
3f641af0 1095 (license license:cc0)))
cafc3f5a 1096
1d08c01f
AE
1097(define-public python2-pysqlite
1098 (package
1099 (name "python2-pysqlite")
fe476868 1100 (version "2.8.1")
1d08c01f
AE
1101 (source
1102 (origin
1103 (method url-fetch)
fe476868 1104 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1105 (sha256
1106 (base32
fe476868 1107 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1108 (build-system python-build-system)
1109 (inputs
1110 `(("sqlite" ,sqlite)))
1111 (arguments
1112 `(#:python ,python-2 ; incompatible with Python 3
1113 #:tests? #f)) ; no test target
fe476868 1114 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1115 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1116 (description
1117 "Pysqlite provides SQLite bindings for Python that comply to the
1118Database API 2.0T.")
ed0cdf83 1119 (license license:zlib)))
1d08c01f 1120
2875caf5
AE
1121
1122(define-public python2-mechanize
1123 (package
1124 (name "python2-mechanize")
1125 (version "0.2.5")
1126 (source
1127 (origin
1128 (method url-fetch)
1129 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1130 version ".tar.gz"))
1131 (sha256
1132 (base32
1133 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1134 (build-system python-build-system)
1135 (inputs
1136 `(("python2-setuptools" ,python2-setuptools)))
1137 (arguments
1138 `(#:python ,python-2 ; apparently incompatible with Python 3
1139 #:tests? #f))
1140 ;; test fails with message
1141 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1142 ;; (python-3.3.2) or
1143 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1144 ;; (python-2.7.5).
1145 ;; The source code is from March 2011 and probably not up-to-date
1146 ;; with respect to python unit tests.
1147 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1148 (synopsis
1149 "Stateful programmatic web browsing in Python")
1150 (description
1151 "Mechanize implements stateful programmatic web browsing in Python,
1152after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1153 (license (license:non-copyleft
1154 "file://COPYING"
1155 "See COPYING in the distribution."))))
2875caf5 1156
0352532e
AE
1157
1158(define-public python-simplejson
1159 (package
1160 (name "python-simplejson")
988d1bad 1161 (version "3.8.2")
0352532e
AE
1162 (source
1163 (origin
1164 (method url-fetch)
988d1bad 1165 (uri (pypi-uri "simplejson" version))
0352532e
AE
1166 (sha256
1167 (base32
988d1bad 1168 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
0352532e
AE
1169 (build-system python-build-system)
1170 (home-page "http://simplejson.readthedocs.org/en/latest/")
1171 (synopsis
1172 "Json library for Python")
1173 (description
e881752c
AK
1174 "JSON (JavaScript Object Notation) is a subset of JavaScript
1175syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1176format.
0352532e
AE
1177
1178Simplejson exposes an API familiar to users of the standard library marshal
1179and pickle modules. It is the externally maintained version of the json
1180library contained in Python 2.6, but maintains compatibility with Python 2.5
1181and (currently) has significant performance advantages, even without using
1182the optional C extension for speedups. Simplejson is also supported on
1183Python 3.3+.")
3f641af0 1184 (license license:x11)))
0352532e
AE
1185
1186(define-public python2-simplejson
1187 (package-with-python2 python-simplejson))
421a80a2
AE
1188
1189
ed07b08d 1190(define-public python-pyicu
421a80a2 1191 (package
ed07b08d 1192 (name "python-pyicu")
d3b29319 1193 (version "1.9.2")
421a80a2
AE
1194 (source
1195 (origin
1196 (method url-fetch)
1197 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1198 version ".tar.gz"))
1199 (sha256
1200 (base32
d3b29319 1201 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1202 (build-system python-build-system)
1203 (inputs
1204 `(("icu4c" ,icu4c)))
421a80a2 1205 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1206 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1207 (description
1208 "PyICU is a python extension wrapping the ICU C++ API.")
3f641af0 1209 (license license:x11)
ed07b08d
LF
1210 (properties `((python2-variant . ,(delay python2-pyicu))))))
1211
1212(define-public python2-pyicu
1213 (package
1214 (inherit (package-with-python2
1215 (strip-python2-variant python-pyicu)))
1216 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cc20a22a
LC
1217
1218(define-public python2-dogtail
1219 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1220 ;; spaces in indentation" with Python 3.
1221 (package
1222 (name "python2-dogtail")
1223 (version "0.8.2")
1224 (source (origin
1225 (method url-fetch)
1226 (uri (string-append
1227 "https://fedorahosted.org/released/dogtail/dogtail-"
1228 version ".tar.gz"))
1229 (sha256
1230 (base32
1231 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1232 (build-system python-build-system)
1233 (arguments `(#:python ,python-2
1234 #:tests? #f)) ; invalid command "test"
1235 (home-page "https://fedorahosted.org/dogtail/")
1236 (synopsis "GUI test tool and automation framework written in ​Python")
1237 (description
35b9e423 1238 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1239It uses Accessibility (a11y) technologies to communicate with desktop
1240applications. dogtail scripts are written in Python and executed like any
1241other Python program.")
3f641af0 1242 (license license:gpl2+)))
515e6878 1243
011b18c3
LC
1244(define-public python2-empy
1245 (package
1246 (name "python2-empy")
1247 (version "3.3")
1248 (source (origin
1249 (method url-fetch)
1250 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1251 version ".tar.gz"))
1252 (sha256
1253 (base32
1254 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1255 (build-system python-build-system)
1256 (arguments
1257 `(#:python ,python-2
1258 #:phases (alist-replace
1259 'check
1260 (lambda _
1261 (zero? (system* "./test.sh")))
1262 %standard-phases)))
1263 (home-page "http://www.alcyone.com/software/empy/")
1264 (synopsis "Templating system for Python")
1265 (description
1266 "EmPy is a system for embedding Python expressions and statements in
1267template text; it takes an EmPy source file, processes it, and produces
1268output. This is accomplished via expansions, which are special signals to the
1cd4027c 1269EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1270EmPy can expand arbitrary Python expressions and statements in this way, as
1271well as a variety of special forms. Textual data not explicitly delimited in
1272this way is sent unaffected to the output, allowing Python to be used in
1273effect as a markup language. Also supported are callbacks via hooks,
1274recording and playback via diversions, and dynamic, chainable filters. The
1275system is highly configurable via command line options and embedded
1276commands.")
3f641af0 1277 (license license:lgpl2.1+)))
011b18c3 1278
8deeda0c
LC
1279(define-public python2-element-tree
1280 (package
1281 (name "python2-element-tree")
1282 (version "1.2.6")
1283 (source (origin
1284 (method url-fetch)
1285 (uri (string-append
1286 "http://effbot.org/media/downloads/elementtree-"
1287 version "-20050316.tar.gz"))
1288 (sha256
1289 (base32
1290 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1291 (build-system python-build-system)
1292 (arguments
1293 `(#:python ,python-2 ; seems to be part of Python 3
1294 #:tests? #f)) ; no 'test' sub-command
1295 (synopsis "Toolkit for XML processing in Python")
1296 (description
1297 "ElementTree is a Python library supporting lightweight XML processing.")
1298 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1299 (license (license:x11-style
1300 "http://docs.python.org/2/license.html"
1301 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1302
1303(define-public python2-pybugz
1304 (package
1305 (name "python2-pybugz")
1306 (version "0.6.11")
1307 (source (origin
1308 (method url-fetch)
1309 (uri (string-append
1310 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1311 version ".tar.gz"))
1312 (sha256
1313 (base32
6f194a1e 1314 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1315 (patches (search-patches "pybugz-stty.patch"
1316 "pybugz-encode-error.patch"))))
8deeda0c
LC
1317 (build-system python-build-system)
1318 (arguments
1319 `(#:python ,python-2 ; SyntaxError with Python 3
1320 #:tests? #f)) ; no 'test' sub-command
1321 (inputs `(("element-tree" ,python2-element-tree)))
1322 (synopsis "Python and command-line interface to Bugzilla")
1323 (description
1324 "PyBugz is a Python library and command-line tool to query the Bugzilla
1325bug tracking system. It is meant as an aid to speed up interaction with the
1326bug tracker.")
1327 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1328 (license license:gpl2)))
8deeda0c 1329
a480bc41
EB
1330(define-public python-enum34
1331 (package
1332 (name "python-enum34")
d39ae1e5 1333 (version "1.1.0")
a480bc41
EB
1334 (source
1335 (origin
1336 (method url-fetch)
d39ae1e5 1337 (uri (pypi-uri "enum34" version))
a480bc41
EB
1338 (sha256
1339 (base32
d39ae1e5 1340 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1341 (build-system python-build-system)
a480bc41
EB
1342 (arguments
1343 `(#:phases
1344 (alist-replace
1345 'check
1346 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1347 %standard-phases)))
1348 (home-page "https://pypi.python.org/pypi/enum34")
1349 (synopsis "Backported Python 3.4 Enum")
1350 (description
1351 "Enum34 is the new Python stdlib enum module available in Python 3.4
1352backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1353 (license license:bsd-3)))
a480bc41 1354
820acd1b
LF
1355(define-public python2-enum34
1356 (package-with-python2 python-enum34))
1357
a480bc41
EB
1358(define-public python-parse-type
1359 (package
1360 (name "python-parse-type")
1361 (version "0.3.4")
1362 (source
1363 (origin
1364 (method url-fetch)
1365 (uri (string-append "https://pypi.python.org/packages/source/p/"
1366 "parse_type/parse_type-" version ".tar.gz"))
1367 (sha256
1368 (base32
1369 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1370 (build-system python-build-system)
1371 (inputs
1372 `(("python-setuptools" ,python-setuptools)
1373 ("python-six" ,python-six)
68f1cdec 1374 ("python-parse" ,python-parse)))
a480bc41
EB
1375 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1376 (home-page "https://github.com/jenisys/parse_type")
1377 (synopsis "Extended parse module")
1378 (description
1379 "Parse_type extends the python parse module.")
3f641af0 1380 (license license:bsd-3)))
a480bc41
EB
1381
1382(define-public python-parse
1383 (package
1384 (name "python-parse")
eb3d3503 1385 (version "1.6.6")
a480bc41
EB
1386 (source
1387 (origin
1388 (method url-fetch)
eb3d3503 1389 (uri (pypi-uri "parse" version))
a480bc41
EB
1390 (sha256
1391 (base32
eb3d3503 1392 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
a480bc41
EB
1393 (build-system python-build-system)
1394 (arguments
1395 `(#:phases
1396 (alist-replace
1397 'check
1398 (lambda _ (zero? (system* "python" "test_parse.py")))
1399 %standard-phases)))
1400 (home-page "https://github.com/r1chardj0n3s/parse")
1401 (synopsis "Parse strings")
1402 (description
1403 "Parse strings using a specification based on the Python format()
1404syntax.")
3f641af0 1405 (license license:x11)))
a480bc41
EB
1406
1407
515e6878
LC
1408(define-public scons
1409 (package
1410 (name "scons")
a3f61425 1411 (version "2.3.4")
515e6878
LC
1412 (source (origin
1413 (method url-fetch)
de67e922
LF
1414 (uri (string-append "mirror://sourceforge/scons/scons/" version
1415 "/scons-" version ".tar.gz"))
515e6878
LC
1416 (sha256
1417 (base32
a3f61425 1418 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1419 (build-system python-build-system)
1420 (arguments
1421 ;; With Python 3.x, fails to build with a syntax error.
1422 `(#:python ,python-2
1423 #:tests? #f)) ; no 'python setup.py test' command
1424 (home-page "http://scons.org/")
1425 (synopsis "Software construction tool written in Python")
1426 (description
1427 "SCons is a software construction tool. Think of SCons as an improved,
1428cross-platform substitute for the classic Make utility with integrated
1429functionality similar to autoconf/automake and compiler caches such as ccache.
1430In short, SCons is an easier, more reliable and faster way to build
1431software.")
3f641af0 1432 (license license:x11)))
011b18c3 1433
c15a5c0e
DT
1434(define-public python-extras
1435 (package
1436 (name "python-extras")
1437 (version "0.0.3")
1438 (source
1439 (origin
1440 (method url-fetch)
1441 (uri (string-append
1442 "https://pypi.python.org/packages/source/e/extras/extras-"
1443 version ".tar.gz"))
1444 (sha256
1445 (base32
1446 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1447 (build-system python-build-system)
1448 (inputs
1449 `(("python-setuptools" ,python-setuptools)))
1450 (arguments
1451 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1452 '(#:tests? #f))
1453 (home-page "https://github.com/testing-cabal/extras")
1454 (synopsis "Useful extensions to the Python standard library")
1455 (description
1456 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1457 (license license:expat)))
c15a5c0e
DT
1458
1459(define-public python2-extras
1460 (package-with-python2 python-extras))
1461
56ea0efd
DT
1462(define-public python-mimeparse
1463 (package
1464 (name "python-mimeparse")
1465 (version "0.1.4")
1466 (source
1467 (origin
1468 (method url-fetch)
1469 (uri (string-append
1470 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1471 version ".tar.gz"))
1472 (sha256
1473 (base32
1474 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1475 (build-system python-build-system)
1476 (inputs
1477 `(("python-setuptools" ,python-setuptools)))
1478 (arguments
1479 '(#:tests? #f)) ; no setup.py test command
1480 (home-page
1481 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1482 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1483 (description
1484 "Mimeparse provides basic functions for parsing MIME type names and
1485matching them against a list of media-ranges.")
bd3fa666 1486 (license license:expat)))
56ea0efd
DT
1487
1488(define-public python2-mimeparse
1489 (package-with-python2 python-mimeparse))
1490
4435427e
DT
1491(define-public python-nose
1492 (package
1493 (name "python-nose")
f7cb9841 1494 (version "1.3.7")
4435427e
DT
1495 (source
1496 (origin
1497 (method url-fetch)
f7cb9841 1498 (uri (pypi-uri "nose" version))
4435427e
DT
1499 (sha256
1500 (base32
f7cb9841 1501 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1502 (build-system python-build-system)
1503 (inputs
1504 `(("python-setuptools" ,python-setuptools)))
1505 (arguments
1506 '(#:tests? #f)) ; FIXME: test suite fails
1507 (home-page "http://readthedocs.org/docs/nose/")
1508 (synopsis "Python testing library")
1509 (description
1510 "Nose extends the unittest library to make testing easier.")
3f641af0 1511 (license license:lgpl2.0+)))
4435427e
DT
1512
1513(define-public python2-nose
1514 (package-with-python2 python-nose))
1515
0aea283a
EF
1516(define-public python-nose2
1517 (package
1518 (name "python-nose2")
1519 (version "0.6.5")
1520 (source
1521 (origin
1522 (method url-fetch)
1523 (uri (pypi-uri "nose2" version))
1524 (sha256
1525 (base32
1526 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1527 (build-system python-build-system)
1528 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1529 (native-inputs
1530 `(("python-setuptools" ,python-setuptools)))
1531 (inputs
1532 `(("python-cov-core" ,python-cov-core)
1533 ("python-pytest-cov" ,python-pytest-cov)
1534 ("python-six" ,python-six)))
1535 (home-page "https://github.com/nose-devs/nose2")
1536 (synopsis "Next generation of nicer testing for Python")
1537 (description
1538 "Nose2 is the next generation of nicer testing for Python, based on the
1539plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1540better plugin api, being easier for users to configure, and simplifying internal
1541interfaces and processes.")
1542 (license license:bsd-2)))
1543
1544(define-public python2-nose2
1545 (package-with-python2 python-nose2))
1546
6cd9c356
DT
1547(define-public python-unittest2
1548 (package
1549 (name "python-unittest2")
1550 (version "0.5.1")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (string-append
1555 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1556 version ".tar.gz"))
1557 (sha256
1558 (base32
1559 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1560 (build-system python-build-system)
1561 (inputs
1562 `(("python-setuptools" ,python-setuptools)))
1563 (home-page "http://pypi.python.org/pypi/unittest2")
1564 (synopsis "Python unit testing library")
1565 (description
1566 "Unittest2 is a replacement for the unittest module in the Python
1567standard library.")
3f641af0 1568 (license license:psfl)))
6cd9c356
DT
1569
1570(define-public python2-unittest2
1571 (package (inherit python-unittest2)
1572 (name "python2-unittest2")
1573 (version "0.5.1")
1574 (source
1575 (origin
1576 (method url-fetch)
1577 (uri (string-append
1578 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1579 version ".tar.gz"))
1580 (sha256
1581 (base32
1582 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1583 (inputs
7957fe6c 1584 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1585 (arguments
1586 `(#:python ,python-2
1587 #:tests? #f)))) ; no setup.py test command
1588
02f8f804 1589(define-public python-pafy
1590 (package
1591 (name "python-pafy")
1592 (version "0.5.2")
1593 (source
1594 (origin
1595 (method url-fetch)
1596 (uri (pypi-uri "pafy" version))
1597 (sha256
1598 (base32
1599 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1600 (build-system python-build-system)
1601 (propagated-inputs
1602 ;; Youtube-dl is a python package which is imported in the file
1603 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1604 `(("youtube-dl" ,youtube-dl)))
1605 (home-page "https://np1.github.io/pafy/")
1606 (synopsis "Retrieve YouTube content and metadata")
1607 (description
1608 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1609 (license license:lgpl3+)))
1610
542ad60f
DT
1611(define-public python-py
1612 (package
1613 (name "python-py")
71c8a804 1614 (version "1.4.31")
542ad60f
DT
1615 (source
1616 (origin
1617 (method url-fetch)
71c8a804 1618 (uri (pypi-uri "py" version))
542ad60f
DT
1619 (sha256
1620 (base32
71c8a804 1621 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1622 (build-system python-build-system)
1623 (inputs
1624 `(("python-setuptools" ,python-setuptools)))
1625 (home-page "http://pylib.readthedocs.org/")
1626 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1627 (description
1628 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1629code introspection, and logging.")
bd3fa666 1630 (license license:expat)))
542ad60f
DT
1631
1632(define-public python2-py
1633 (package-with-python2 python-py))
1634
855d4761
DT
1635(define-public python-pytest
1636 (package
1637 (name "python-pytest")
61a4332d 1638 (version "2.7.3")
855d4761
DT
1639 (source
1640 (origin
1641 (method url-fetch)
1642 (uri (string-append
1643 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1644 version ".tar.gz"))
1645 (sha256
1646 (base32
61a4332d 1647 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1648 (modules '((guix build utils)))
1649 (snippet
1650 ;; One of the tests involves the /usr directory, so it fails.
1651 '(substitute* "testing/test_argcomplete.py"
1652 (("def test_remove_dir_prefix\\(self\\):")
1653 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1654 (build-system python-build-system)
1655 (inputs
1656 `(("python-setuptools" ,python-setuptools)
1657 ("python-py" ,python-py)
1658 ("python-nose" ,python-nose)
1659 ("python-mock" ,python-mock)))
1660 (home-page "http://pytest.org")
1661 (synopsis "Python testing library")
1662 (description
1663 "Pytest is a testing tool that provides auto-discovery of test modules
1664and functions, detailed info on failing assert statements, modular fixtures,
1665and many external plugins.")
bd3fa666 1666 (license license:expat)))
855d4761
DT
1667
1668(define-public python2-pytest
1669 (package-with-python2 python-pytest))
1670
fca4ff35
LF
1671;; This package is used by Borg until we can upgrade all our Python packages to
1672;; use a more recent pytest.
1673(define-public python-pytest-2.9.2
1674 (package
1675 (inherit python-pytest)
1676 (name "python-pytest")
1677 (version "2.9.2")
1678 (source (origin
1679 (method url-fetch)
1680 (uri (pypi-uri "pytest" version))
1681 (sha256
1682 (base32
1683 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1684 (arguments
1685 `(#:phases
1686 (modify-phases %standard-phases
1687 (add-before 'check 'disable-invalid-test
1688 (lambda _
1689 (substitute* "testing/test_argcomplete.py"
1690 (("def test_remove_dir_prefix" line)
1691 (string-append "@pytest.mark.skip"
1692 "(reason=\"Assumes that /usr exists.\")\n "
1693 line)))
1694 #t)))))))
1695
358c3d61
EF
1696(define-public python-pytest-cov
1697 (package
1698 (name "python-pytest-cov")
545f4a1c 1699 (version "2.2.1")
358c3d61
EF
1700 (source
1701 (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "pytest-cov" version))
1704 (sha256
545f4a1c
EF
1705 (base32
1706 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1707 (build-system python-build-system)
545f4a1c 1708 (inputs
10468636
EF
1709 `(("python-coverage" ,python-coverage)
1710 ("python-pytest" ,python-pytest)))
10468636
EF
1711 (home-page "https://github.com/pytest-dev/pytest-cov")
1712 (synopsis "Pytest plugin for measuring coverage")
1713 (description
1714 "Pytest-cov produces coverage reports. It supports centralised testing and
1715distributed testing in both @code{load} and @code{each} modes. It also
1716supports coverage of subprocesses.")
545f4a1c
EF
1717 (license license:expat)
1718 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
358c3d61
EF
1719
1720(define-public python2-pytest-cov
545f4a1c
EF
1721 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1722 (package
1723 (inherit base)
1724 (inputs `(("python2-setuptools" ,python2-setuptools)
1725 ,@(package-inputs base))))))
358c3d61 1726
6784f2e3
RW
1727(define-public python-pytest-runner
1728 (package
1729 (name "python-pytest-runner")
1730 (version "2.6.2")
1731 (source
1732 (origin
1733 (method url-fetch)
54cd239b 1734 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1735 (sha256
1736 (base32
1737 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1738 (build-system python-build-system)
1739 (arguments
1740 `(#:phases
1741 (modify-phases %standard-phases
1742 ;; The fancy way of setting the version with setuptools_scm does not
1743 ;; seem to work here.
1744 (add-after 'unpack 'set-version
1745 (lambda _
1746 (substitute* "docs/conf.py"
1747 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1748 (string-append "version = \"" ,version "\"")))
1749 #t)))))
1750 (native-inputs
1751 `(("python-pytest" ,python-pytest)
1752 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1753 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1754 (synopsis "Invoke py.test as a distutils command")
1755 (description
1756 "This package provides a @command{pytest-runner} command that
1757@file{setup.py} files can use to run tests.")
54cd239b
EF
1758 (license license:expat)
1759 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1760
1761(define-public python2-pytest-runner
1762 (let ((base (package-with-python2
1763 (strip-python2-variant python-pytest-runner))))
1764 (package
1765 (inherit base)
1766 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1767 ,@(package-native-inputs base))))))
6784f2e3 1768
44547e51
EF
1769(define-public python-pytest-mock
1770 (package
1771 (name "python-pytest-mock")
1772 (version "1.2")
1773 (source
1774 (origin
1775 (method url-fetch)
1776 (uri (pypi-uri "pytest-mock" version ".zip"))
1777 (sha256
1778 (base32
1779 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1780 (build-system python-build-system)
1781 (native-inputs
1782 `(("unzip" ,unzip)))
1783 (inputs
1784 `(("python-py" ,python-py)
1785 ("python-pytest" ,python-pytest)))
1786 (home-page "https://github.com/pytest-dev/pytest-mock/")
1787 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1788 (description
1789 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1790around the patching API provided by the @code{mock} package, but with the
1791benefit of not having to worry about undoing patches at the end of a test.
1792The mocker fixture has the same API as @code{mock.patch}, supporting the
1793same arguments.")
1794 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1795 (license license:expat)))
1796
1797(define-public python2-pytest-mock
1798 (let ((base (package-with-python2
1799 (strip-python2-variant python-pytest-mock))))
1800 (package (inherit base)
1801 (native-inputs
1802 `(("python2-setuptools" ,python2-setuptools)
1803 ,@(package-native-inputs base)))
1804 (inputs
1805 `(("python2-mock" ,python2-mock)
1806 ,@(package-inputs base))))))
1807
8fa58fc9
CAW
1808(define-public python-pytest-xdist
1809 (package
1810 (name "python-pytest-xdist")
1811 (version "1.14")
1812 (source
1813 (origin
1814 (method url-fetch)
1815 (uri (pypi-uri "pytest-xdist" version ".zip"))
1816 (sha256
1817 (base32
de585a7e
HG
1818 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1819 (modules '((guix build utils)))
1820 (snippet
1821 '(begin
1822 ;; Remove pre-compiled .pyc files from source.
1823 (for-each delete-file-recursively
1824 (find-files "." "__pycache__" #:directories? #t))
1825 (for-each delete-file (find-files "." "\\.pyc$"))
1826 #t))))
8fa58fc9
CAW
1827 (build-system python-build-system)
1828 (native-inputs
1829 `(("unzip" ,unzip)
8fa58fc9 1830 ("python-setuptools-scm" ,python-setuptools-scm)))
fbe9abcc
EF
1831 (inputs
1832 `(("python-apipkg" ,python-apipkg)
1833 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1834 ("python-pytest" ,python-pytest)
1835 ("python-py" ,python-py)))
1836 (home-page
1837 "https://github.com/pytest-dev/pytest-xdist")
1838 (synopsis
1839 "Plugin for py.test with distributed testing and loop-on-failing modes")
1840 (description
1841 "The pytest-xdist plugin extends py.test with some unique test execution
1842modes: parallelization, running tests in boxed subprocesses, the ability
1843to run tests repeatedly when failed, and the ability to run tests on multiple
1844Python interpreters or platforms. It uses rsync to copy the existing
1845program code to a remote location, executes there, and then syncs the
1846result back.")
fbe9abcc
EF
1847 (license license:expat)
1848 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
8fa58fc9
CAW
1849
1850(define-public python2-pytest-xdist
fbe9abcc
EF
1851 (let ((base (package-with-python2
1852 (strip-python2-variant python-pytest-xdist))))
1853 (package
1854 (inherit base)
1855 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1856 ,@(package-native-inputs base))))))
8fa58fc9 1857
84d24017
DT
1858(define-public python-scripttest
1859 (package
1860 (name "python-scripttest")
1861 (version "1.3")
1862 (source
1863 (origin
1864 (method url-fetch)
1865 (uri (string-append
1866 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1867 version ".tar.gz"))
1868 (sha256
1869 (base32
1870 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1871 (build-system python-build-system)
1872 (inputs
1873 `(("python-setuptools" ,python-setuptools)
1874 ("python-pytest" ,python-pytest)))
1875 (home-page "http://pythonpaste.org/scripttest/")
1876 (synopsis "Python library to test command-line scripts")
1877 (description "Scripttest is a Python helper library for testing
1878interactive command-line applications. With it you can run a script in a
1879subprocess and see the output as well as any file modifications.")
bd3fa666 1880 (license license:expat)))
84d24017
DT
1881
1882(define-public python2-scripttest
1883 (package-with-python2 python-scripttest))
1884
d8fa80e1
DT
1885(define-public python-testtools
1886 (package
1887 (name "python-testtools")
1888 (version "1.0.0")
1889 (source
1890 (origin
1891 (method url-fetch)
1892 (uri (string-append
1893 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1894 version ".tar.gz"))
1895 (sha256
1896 (base32
1897 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1898 (build-system python-build-system)
0e88cbf8
CR
1899 (propagated-inputs
1900 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1901 (inputs
1902 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1903 ("python-extras" ,python-extras)))
1904 (home-page "https://github.com/testing-cabal/testtools")
1905 (synopsis
1906 "Extensions to the Python standard library unit testing framework")
1907 (description
1908 "Testtools extends the Python standard library unit testing framework to
1909provide matchers, more debugging information, and cross-Python
1910compatibility.")
3f641af0 1911 (license license:psfl)))
d8fa80e1
DT
1912
1913(define-public python2-testtools
1914 (package-with-python2 python-testtools))
1915
5bf3afea
DT
1916(define-public python-testscenarios
1917 (package
1918 (name "python-testscenarios")
1919 (version "0.4")
1920 (source
1921 (origin
1922 (method url-fetch)
1923 (uri (string-append
1924 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1925 version ".tar.gz"))
1926 (sha256
1927 (base32
1928 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1929 (build-system python-build-system)
1930 (inputs
1931 `(("python-setuptools" ,python-setuptools)
1932 ("python-testtools" ,python-testtools)
1933 ("python-mimeparse" ,python-mimeparse)))
1934 (home-page "https://launchpad.net/testscenarios")
1935 (synopsis "Pyunit extension for dependency injection")
1936 (description
1937 "Testscenarios provides clean dependency injection for Python unittest
1938style tests.")
3f641af0 1939 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1940
1941(define-public python2-testscenarios
1942 (package-with-python2 python-testscenarios))
1943
dac79ecc
DT
1944(define-public python-testresources
1945 (package
1946 (name "python-testresources")
1947 (version "0.2.7")
1948 (source
1949 (origin
1950 (method url-fetch)
1951 (uri (string-append
1952 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1953 version ".tar.gz"))
1954 (sha256
1955 (base32
1956 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1957 (build-system python-build-system)
1958 (inputs
1959 `(("python-setuptools" ,python-setuptools)))
1960 (home-page "https://launchpad.net/testresources")
1961 (synopsis
1962 "Pyunit extension for managing test resources")
1963 (description
1964 "Testresources is an extension to Python's unittest to allow declarative
1965use of resources by test cases.")
3f641af0 1966 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1967
1968(define-public python2-testresources
1969 (package-with-python2 python-testresources))
1970
070ab058
DT
1971(define-public python-subunit
1972 (package
1973 (name "python-subunit")
1974 (version "0.0.21")
1975 (source
1976 (origin
1977 (method url-fetch)
1978 (uri (string-append
1979 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1980 version ".tar.gz"))
1981 (sha256
1982 (base32
1983 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1984 (build-system python-build-system)
1985 (inputs
1986 `(("python-setuptools" ,python-setuptools)
1987 ("python-testtools" ,python-testtools)
1988 ("python-mimeparse" ,python-mimeparse)
1989 ("python-testscenarios" ,python-testscenarios)))
1990 (home-page "http://launchpad.net/subunit")
1991 (synopsis "Python implementation of the subunit protocol")
1992 (description
1993 "Python-subunit is a Python implementation of the subunit test streaming
1994protocol.")
3f641af0 1995 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1996
1997(define-public python2-subunit
1998 (package-with-python2 python-subunit))
1999
7787ef76
CR
2000;; Recent versions of python-fixtures need a recent version of python-pbr,
2001;; which needs a recent version of python-fixtures. To fix this circular
2002;; dependency, we keep old versions of python-fixtures and python-pbr to
2003;; bootstrap the whole thing:
2004;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
2005;; - python-pbr-0.11 is used to build python-fixtures
2006;; - python-fixtures is used to build python-pbr
2007(define-public python-fixtures-0.3.16
cd49454b
DT
2008 (package
2009 (name "python-fixtures")
2010 (version "0.3.16")
2011 (source
2012 (origin
2013 (method url-fetch)
2014 (uri (string-append
2015 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
2016 version ".tar.gz"))
2017 (sha256
2018 (base32
2019 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
2020 (build-system python-build-system)
2021 (inputs
2022 `(("python-setuptools" ,python-setuptools)))
2023 (arguments
2024 '(#:tests? #f)) ; no setup.py test command
2025 (home-page "https://launchpad.net/python-fixtures")
2026 (synopsis "Python test fixture library")
2027 (description
2028 "Fixtures provides a way to create reusable state, useful when writing
2029Python tests.")
3f641af0 2030 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
cd49454b 2031
7787ef76
CR
2032(define-public python2-fixtures-0.3.16
2033 (package-with-python2 python-fixtures-0.3.16))
2034
2035(define-public python-pbr-0.11
2036 (package
2037 (name "python-pbr")
2038 (version "0.11.0")
2039 (source
2040 (origin
2041 (method url-fetch)
2042 (uri (string-append
2043 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2044 version ".tar.gz"))
2045 (sha256
2046 (base32
2047 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
2048 (build-system python-build-system)
2049 (arguments
2050 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2051 (inputs
2052 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2053 ("python-pip" ,python-pip)
2054 ("python-setuptools" ,python-setuptools)))
2055 (home-page "https://launchpad.net/pbr")
2056 (synopsis "Change the default behavior of Python’s setuptools")
2057 (description
2058 "Python Build Reasonableness (PBR) is a library that injects some useful
2059and sensible default behaviors into your setuptools run.")
3f641af0 2060 (license license:asl2.0)))
7787ef76
CR
2061
2062(define-public python2-pbr-0.11
2063 (package-with-python2 python-pbr-0.11))
2064
1ef09c0c 2065(define-public python-pbr
e25f0174
BW
2066 (package
2067 (name "python-pbr")
1ef09c0c
BW
2068 (version "1.8.1")
2069 (source
e25f0174
BW
2070 (origin
2071 (method url-fetch)
2072 (uri (string-append
2073 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2074 version
2075 ".tar.gz"))
2076 (sha256
2077 (base32
2078 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1ef09c0c 2079 (build-system python-build-system)
e25f0174
BW
2080 (arguments
2081 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2082 (propagated-inputs
2083 `(("python-testrepository" ,python-testrepository)
2084 ("git" ,git))) ;; pbr actually uses the "git" binary.
1ef09c0c 2085 (inputs
e25f0174
BW
2086 `(("python-fixtures" ,python-fixtures)
2087 ("python-mimeparse" ,python-mimeparse)
2088 ("python-mock" ,python-mock)
2089 ("python-setuptools" ,python-setuptools)
2090 ("python-six" ,python-six)
2091 ("python-sphinx" ,python-sphinx)
2092 ("python-testrepository" ,python-testrepository)
2093 ("python-testresources" ,python-testresources)
2094 ("python-testscenarios" ,python-testscenarios)
2095 ("python-testtools" ,python-testtools)
2096 ("python-virtualenv" ,python-virtualenv)))
2097 (home-page "https://launchpad.net/pbr")
2098 (synopsis "Change the default behavior of Python’s setuptools")
2099 (description
2100 "Python Build Reasonableness (PBR) is a library that injects some useful
2101and sensible default behaviors into your setuptools run.")
3f641af0 2102 (license license:asl2.0)))
1ef09c0c
BW
2103
2104(define-public python2-pbr
e25f0174 2105 (package-with-python2 python-pbr))
1ef09c0c 2106
7787ef76
CR
2107(define-public python-fixtures
2108 (package
2109 (name "python-fixtures")
13fcc6df 2110 (version "1.4.0")
7787ef76
CR
2111 (source
2112 (origin
2113 (method url-fetch)
13fcc6df 2114 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2115 (sha256
2116 (base32
13fcc6df 2117 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2118 (build-system python-build-system)
2119 (propagated-inputs
2120 `(("python-six" ,python-six)
2121 ("python-pbr-0.11" ,python-pbr-0.11)))
2122 (inputs
2123 `(("python-pip" ,python-pip)
2124 ("python-setuptools" ,python-setuptools)
2125 ;; Tests
2126 ("python-testtools" ,python-testtools)))
2127 (arguments
2128 '(#:tests? #f)) ; no setup.py test command
2129 (home-page "https://launchpad.net/python-fixtures")
2130 (synopsis "Python test fixture library")
2131 (description
2132 "Fixtures provides a way to create reusable state, useful when writing
2133Python tests.")
3f641af0 2134 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2135
cd49454b
DT
2136(define-public python2-fixtures
2137 (package-with-python2 python-fixtures))
2138
b24a0c00
DT
2139(define-public python-testrepository
2140 (package
2141 (name "python-testrepository")
2142 (version "0.0.20")
2143 (source
2144 (origin
2145 (method url-fetch)
2146 (uri (string-append
2147 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2148 version ".tar.gz"))
2149 (sha256
2150 (base32
2151 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2152 (build-system python-build-system)
05de40c5 2153 (propagated-inputs
7787ef76 2154 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 2155 ("python-testtools" ,python-testtools)))
b24a0c00
DT
2156 (inputs
2157 `(("python-setuptools" ,python-setuptools)
b24a0c00 2158 ("python-subunit" ,python-subunit)
b24a0c00
DT
2159 ("python-mimeparse" ,python-mimeparse)))
2160 (home-page "https://launchpad.net/testrepository")
2161 (synopsis "Database for Python test results")
2162 (description "Testrepository provides a database of test results which can
2163be used as part of a developer's workflow to check things such as what tests
2164have failed since the last commit or what tests are currently failing.")
3f641af0 2165 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2166
2167(define-public python2-testrepository
2168 (package-with-python2 python-testrepository))
2169
243a009a
DT
2170(define-public python-coverage
2171 (package
2172 (name "python-coverage")
4d4cf3dd 2173 (version "4.1")
243a009a
DT
2174 (source
2175 (origin
2176 (method url-fetch)
82a3c582 2177 (uri (pypi-uri "coverage" version))
243a009a
DT
2178 (sha256
2179 (base32
4d4cf3dd 2180 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a
DT
2181 (build-system python-build-system)
2182 (inputs
2183 `(("python-setuptools" ,python-setuptools)))
2184 (home-page "http://nedbatchelder.com/code/coverage")
2185 (synopsis "Code coverage measurement for Python")
2186 (description
2187 "Coverage measures code coverage, typically during test execution. It
2188uses the code analysis tools and tracing hooks provided in the Python standard
2189library to determine which lines are executable, and which have been
2190executed.")
3f641af0 2191 (license license:bsd-3)))
243a009a
DT
2192
2193(define-public python2-coverage
2194 (package-with-python2 python-coverage))
2195
12f839fd
EF
2196(define-public python-cov-core
2197 (package
2198 (name "python-cov-core")
2199 (version "1.15.0")
2200 (source
2201 (origin
2202 (method url-fetch)
2203 (uri (pypi-uri "cov-core" version))
2204 (sha256
2205 (base32
2206 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2207 (build-system python-build-system)
2208 (native-inputs
2209 `(("python-coverage" ,python-coverage)))
2210 (home-page "https://github.com/schlamar/cov-core")
2211 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2212 (description
2213 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2214It is useful for developing coverage plugins for these testing frameworks.")
8120205c
EF
2215 (license license:expat)
2216 (properties `((python2-variant . ,(delay python2-cov-core))))))
12f839fd
EF
2217
2218(define-public python2-cov-core
8120205c 2219 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
12f839fd
EF
2220 (package (inherit cov-core)
2221 (native-inputs
2222 `(("python2-setuptools" ,python2-setuptools)
2223 ,@(package-native-inputs cov-core))))))
2224
041358fb
DT
2225(define-public python-discover
2226 (package
2227 (name "python-discover")
2228 (version "0.4.0")
2229 (source
2230 (origin
2231 (method url-fetch)
2232 (uri (string-append
2233 "https://pypi.python.org/packages/source/d/discover/discover-"
2234 version ".tar.gz"))
2235 (sha256
2236 (base32
2237 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2238 (build-system python-build-system)
2239 (inputs
2240 `(("python-setuptools" ,python-setuptools)))
2241 (home-page "http://pypi.python.org/pypi/discover/")
2242 (synopsis
2243 "Python test discovery for unittest")
2244 (description
2245 "Discover provides test discovery for unittest, a feature that has been
e881752c 2246backported from Python 2.7 for Python 2.4+.")
3f641af0 2247 (license license:bsd-3)))
041358fb
DT
2248
2249(define-public python2-discover
2250 (package-with-python2 python-discover))
2251
a480bc41
EB
2252(define-public behave
2253 (package
2254 (name "behave")
287cfd1a 2255 (version "1.2.5")
a480bc41
EB
2256 (source (origin
2257 (method url-fetch)
287cfd1a 2258 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2259 (sha256
2260 (base32
287cfd1a 2261 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41
EB
2262 (build-system python-build-system)
2263 (inputs
2264 `(("python-setuptools" ,python-setuptools)
2265 ("python-six" ,python-six)
a480bc41
EB
2266 ("python-parse" ,python-parse)
2267 ("python-parse-type" ,python-parse-type)))
2268 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2269 ;PyHamcrest>=1.8
2270 (home-page "http://github.com/behave/behave")
2271 (synopsis "Python behavior-driven development")
2272 (description
2273 "Behave is a tool for behavior-driven development in python.
2274Behavior-driven development (or BDD) is an agile software development
2275technique that encourages collaboration between developers, QA and
2276non-technical or business participants in a software project. Behave uses
2277tests written in a natural language style, backed up by Python code.")
3f641af0 2278 (license license:x11)))
c7303d3c
DT
2279
2280(define-public python-exif-read
2281 (package
2282 (name "python-exif-read")
2a2d0981 2283 (version "2.1.2")
c7303d3c
DT
2284 (source (origin
2285 (method url-fetch)
2a2d0981 2286 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2287 (sha256
2288 (base32
2a2d0981 2289 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2290 (build-system python-build-system)
2291 (inputs
2292 `(("python-setuptools" ,python-setuptools)))
2293 (arguments `(#:tests? #f)) ; no tests
2294 (home-page "https://github.com/ianare/exif-py")
2295 (synopsis "Python library to extract EXIF data from image files")
2296 (description
2297 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2298files.")
3f641af0 2299 (license license:bsd-3)))
c7303d3c
DT
2300
2301(define-public python2-exif-read
2302 (package-with-python2 python-exif-read))
d5f89b22
DT
2303
2304(define-public python-pyld
2305 (package
2306 (name "python-pyld")
af1ab773 2307 (version "0.6.8")
d5f89b22
DT
2308 (source (origin
2309 (method url-fetch)
af1ab773 2310 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2311 (sha256
2312 (base32
af1ab773 2313 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2314 (build-system python-build-system)
2315 (inputs
2316 `(("python-setuptools" ,python-setuptools)))
2317 (arguments `(#:tests? #f)) ; no tests
2318 (home-page "http://github.com/digitalbazaar/pyld")
2319 (synopsis "Python implementation of the JSON-LD specification")
2320 (description
2321 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2322 (license license:bsd-3)))
d5f89b22
DT
2323
2324(define-public python2-pyld
2325 (package-with-python2 python-pyld))
3a1f9a68
DT
2326
2327(define-public python-certifi
2328 (package
2329 (name "python-certifi")
b2a2232c 2330 (version "2016.8.31")
3a1f9a68
DT
2331 (source (origin
2332 (method url-fetch)
9a41f443 2333 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2334 (sha256
2335 (base32
b2a2232c 2336 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68
DT
2337 (build-system python-build-system)
2338 (inputs
2339 `(("python-setuptools" ,python-setuptools)))
2340 (arguments `(#:tests? #f)) ; no tests
2341 (home-page "http://python-requests.org/")
2342 (synopsis "Python CA certificate bundle")
2343 (description
2344 "Certifi is a Python library that contains a CA certificate bundle, which
2345is used by the Requests library to verify HTTPS requests.")
3f641af0 2346 (license license:asl2.0)))
3a1f9a68
DT
2347
2348(define-public python2-certifi
2349 (package-with-python2 python-certifi))
e6cfbd36 2350
12c270dd
RW
2351(define-public python-click
2352 (package
2353 (name "python-click")
43accb58 2354 (version "6.6")
12c270dd
RW
2355 (source
2356 (origin
2357 (method url-fetch)
375f224b 2358 (uri (pypi-uri "click" version))
12c270dd 2359 (sha256
43accb58
LF
2360 (base32
2361 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2362 (build-system python-build-system)
e2ab5a09
BW
2363 (arguments
2364 `(#:phases
2365 (modify-phases %standard-phases
2366 (add-after 'unpack 'fix-paths
2367 (lambda* (#:key inputs #:allow-other-keys)
2368 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2369 "cross-libc" "libc"))))
2370 (substitute* "click/_unicodefun.py"
2371 (("'locale'")
2372 (string-append "'" glibc "/bin/locale'"))))
2373 #t)))))
12c270dd
RW
2374 (native-inputs
2375 `(("python-setuptools" ,python-setuptools)))
2376 (home-page "http://click.pocoo.org")
2377 (synopsis "Command line library for Python")
2378 (description
2379 "Click is a Python package for creating command line interfaces in a
2380composable way with as little code as necessary. Its name stands for
2381\"Command Line Interface Creation Kit\". It's highly configurable but comes
2382with sensible defaults out of the box.")
3f641af0 2383 (license license:bsd-3)))
12c270dd
RW
2384
2385(define-public python2-click
2386 (package-with-python2 python-click))
2387
addc808d
EF
2388(define-public python-wheel
2389 (package
2390 (name "python-wheel")
40981b5c 2391 (version "0.29.0")
e1ba0749
EF
2392 (source
2393 (origin
2394 (method url-fetch)
2395 (uri (pypi-uri "wheel" version))
2396 (sha256
2397 (base32
40981b5c 2398 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2399 (build-system python-build-system)
2400 (native-inputs
2401 `(("python-setuptools" ,python-setuptools)
2402 ("python-jsonschema" ,python-jsonschema)
2403 ("python-pytest-cov" ,python-pytest-cov)))
2404 (home-page "https://bitbucket.org/pypa/wheel/")
2405 (synopsis "Format for built Python packages")
2406 (description
2407 "A wheel is a ZIP-format archive with a specially formatted filename and
2408the @code{.whl} extension. It is designed to contain all the files for a PEP
2409376 compatible install in a way that is very close to the on-disk format. Many
2410packages will be properly installed with only the @code{Unpack} step and the
2411unpacked archive preserves enough information to @code{Spread} (copy data and
2412scripts to their final locations) at any later time. Wheel files can be
2413installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2414 (license license:expat)
2415 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2416
2417(define-public python2-wheel
8ad4ae20
LF
2418 (let ((wheel (package-with-python2
2419 (strip-python2-variant python-wheel))))
264ae686 2420 (package (inherit wheel)
8ad4ae20
LF
2421 (native-inputs `(("python2-functools32" ,python2-functools32)
2422 ,@(package-native-inputs wheel))))))
2423
addc808d 2424
ae641128 2425(define-public python-requests
e6cfbd36 2426 (package
ae641128 2427 (name "python-requests")
74a066f9 2428 (version "2.9.1")
e6cfbd36
DT
2429 (source (origin
2430 (method url-fetch)
5d691657 2431 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2432 (sha256
2433 (base32
74a066f9 2434 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2435 (build-system python-build-system)
5d691657 2436 (native-inputs
6a308947
EF
2437 `(("python-setuptools" ,python-setuptools)
2438 ("python-py" ,python-py)
5d691657
EF
2439 ("python-pytest" ,python-pytest)
2440 ("python-pytest-cov" ,python-pytest-cov)
2441 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2442 (home-page "http://python-requests.org/")
2443 (synopsis "Python HTTP library")
2444 (description
2445 "Requests is a Python HTTP client library. It aims to be easier to use
2446than Python’s urllib2 library.")
3f641af0 2447 (license license:asl2.0)))
864b5211 2448
e9005180
DT
2449;; Some software requires an older version of Requests, notably Docker
2450;; Compose.
2451(define-public python-requests-2.7
2452 (package (inherit python-requests)
2453 (version "2.7.0")
2454 (source (origin
2455 (method url-fetch)
2456 (uri (pypi-uri "requests" version))
2457 (sha256
2458 (base32
2459 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2460
ae641128 2461(define-public python2-requests
8ad4ae20 2462 (package-with-python2 python-requests))
ae641128 2463
ea521b42
DT
2464(define-public python-vcversioner
2465 (package
2466 (name "python-vcversioner")
2467 (version "2.14.0.0")
2468 (source
2469 (origin
2470 (method url-fetch)
2471 (uri (pypi-uri "vcversioner" version))
2472 (sha256
2473 (base32
2474 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2475 (build-system python-build-system)
2476 (inputs
2477 `(("python-setuptools" ,python-setuptools)))
2478 (synopsis "Python library for version number discovery")
2479 (description "Vcversioner is a Python library that inspects tagging
2480information in a variety of version control systems in order to discover
2481version numbers.")
2482 (home-page "https://github.com/habnabit/vcversioner")
3f641af0 2483 (license license:isc)))
ea521b42
DT
2484
2485(define-public python2-vcversioner
2486 (package-with-python2 python-vcversioner))
ae641128 2487
864b5211
DT
2488(define-public python-jsonschema
2489 (package
2490 (name "python-jsonschema")
b3667afb 2491 (version "2.5.1")
864b5211
DT
2492 (source (origin
2493 (method url-fetch)
2494 (uri
2495 (string-append
2496 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2497 version ".tar.gz"))
2498 (sha256
2499 (base32
b3667afb 2500 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2501 (build-system python-build-system)
2502 (inputs
b3667afb
DT
2503 `(("python-setuptools" ,python-setuptools)
2504 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2505 (home-page "http://github.com/Julian/jsonschema")
2506 (synopsis "Implementation of JSON Schema for Python")
2507 (description
2508 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2509 (license license:expat)
2510 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2511
2512(define-public python2-jsonschema
a14600ec
LF
2513 (let ((jsonschema (package-with-python2
2514 (strip-python2-variant python-jsonschema))))
264ae686
EF
2515 (package (inherit jsonschema)
2516 (inputs
2517 `(("python2-functools32" ,python2-functools32)
2518 ,@(package-inputs jsonschema))))))
850189b8
DT
2519
2520(define-public python-unidecode
2521 (package
2522 (name "python-unidecode")
8925d4f3 2523 (version "0.04.18")
850189b8
DT
2524 (source (origin
2525 (method url-fetch)
8925d4f3 2526 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2527 (sha256
2528 (base32
8925d4f3 2529 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2530 (build-system python-build-system)
2531 (inputs
2532 `(("python-setuptools" ,python-setuptools)))
2533 (home-page "https://pypi.python.org/pypi/Unidecode")
2534 (synopsis "ASCII transliterations of Unicode text")
2535 (description
2536 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2537useful when integrating with legacy code that doesn't support Unicode, or for
2538ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2539machine identifiers from human-readable Unicode strings that should still be
2540somewhat intelligeble.")
3f641af0 2541 (license license:gpl2+)))
850189b8
DT
2542
2543(define-public python2-unidecode
2544 (package-with-python2 python-unidecode))
6d45fef4
DT
2545
2546(define-public python-pyjwt
2547 (package
2548 (name "python-pyjwt")
eb31d4b4 2549 (version "1.4.0")
6d45fef4
DT
2550 (source
2551 (origin
2552 (method url-fetch)
eb31d4b4 2553 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2554 (sha256
2555 (base32
eb31d4b4 2556 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2557 (build-system python-build-system)
eb31d4b4
EF
2558 (native-inputs
2559 `(("python-setuptools" ,python-setuptools)
2560 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2561 (arguments
2562 '(#:tests? #f)) ; test suite doesn't work
2563 (home-page "http://github.com/progrium/pyjwt")
2564 (synopsis "JSON Web Token implementation in Python")
2565 (description
2566 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2567 (license license:expat)))
6d45fef4
DT
2568
2569(define-public python2-pyjwt
2570 (package-with-python2 python-pyjwt))
2571
2cec1f6f
DT
2572(define-public python-oauthlib
2573 (package
2574 (name "python-oauthlib")
bde2171d 2575 (version "1.0.3")
2cec1f6f
DT
2576 (source (origin
2577 (method url-fetch)
bde2171d 2578 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2579 (sha256
2580 (base32
bde2171d 2581 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2582 (build-system python-build-system)
bde2171d 2583 (native-inputs
59f151ec 2584 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2585 ("python-nose" ,python-nose)
2586 ("python-mock" ,python-mock)))
bde2171d
EF
2587 (inputs
2588 `(("python-blinker" ,python-blinker)
2589 ("python-cryptography" ,python-cryptography)
2590 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2591 (home-page "https://github.com/idan/oauthlib")
2592 (synopsis "OAuth implementation for Python")
2593 (description
2594 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2595OAuth request-signing logic.")
3f641af0 2596 (license license:bsd-3)
59f151ec 2597 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2598
2599(define-public python2-oauthlib
59f151ec 2600 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2601 (package
2602 (inherit base)
59f151ec
EF
2603 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2604 ("python2-unittest2" ,python2-unittest2)
2605 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2606
2607(define-public python-itsdangerous
2608 (package
2609 (name "python-itsdangerous")
2610 (version "0.24")
2611 (source
2612 (origin
2613 (method url-fetch)
2614 (uri (string-append
2615 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2616 version ".tar.gz"))
2617 (sha256
2618 (base32
2619 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2620 (build-system python-build-system)
ec5dbb5c
DT
2621 (home-page "http://github.com/mitsuhiko/itsdangerous")
2622 (synopsis "Python library for passing data to/from untrusted environments")
2623 (description
2624 "Itsdangerous provides various helpers to pass trusted data to untrusted
2625environments and back.")
3f641af0 2626 (license license:bsd-3)
194d0d98 2627 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
ec5dbb5c
DT
2628
2629(define-public python2-itsdangerous
194d0d98
EF
2630 (let ((base (package-with-python2
2631 (strip-python2-variant python-itsdangerous))))
2632 (package
2633 (inherit base)
2634 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2635 ,@(package-native-inputs base))))))
5731cae3 2636
8d12be1e
RW
2637(define-public python-pyyaml
2638 (package
2639 (name "python-pyyaml")
2640 (version "3.11")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (string-append
2645 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2646 version ".tar.gz"))
2647 (sha256
2648 (base32
2649 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2650 (build-system python-build-system)
2651 (inputs
2652 `(("libyaml" ,libyaml)))
2653 (native-inputs
2654 `(("python-setuptools" ,python-setuptools)))
2655 (home-page "http://pyyaml.org/wiki/PyYAML")
2656 (synopsis "YAML parser and emitter for Python")
2657 (description
2658 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2659complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2660API, and sensible error messages. PyYAML supports standard YAML tags and
2661provides Python-specific tags that allow to represent an arbitrary Python
2662object.")
2663 (license license:expat)))
2664
2665(define-public python2-pyyaml
2666 (package-with-python2 python-pyyaml))
2667
5731cae3
DT
2668(define-public python-virtualenv
2669 (package
2670 (name "python-virtualenv")
58d04dba 2671 (version "15.0.3")
5731cae3
DT
2672 (source
2673 (origin
2674 (method url-fetch)
17804240 2675 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2676 (sha256
2677 (base32
58d04dba 2678 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2679 (build-system python-build-system)
17804240
EF
2680 (arguments
2681 `(#:phases
2682 (modify-phases %standard-phases
58d04dba
RW
2683 (replace 'check
2684 (lambda _
2685 ;; Disable failing test. See upstream bug report
2686 ;; https://github.com/pypa/virtualenv/issues/957
2687 (substitute* "tests/test_virtualenv.py"
2688 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2689 (zero? (system* "py.test")))))))
5731cae3
DT
2690 (inputs
2691 `(("python-setuptools" ,python-setuptools)
2692 ("python-mock" ,python-mock)
17804240 2693 ("python-pytest" ,python-pytest)))
5731cae3
DT
2694 (home-page "https://virtualenv.pypa.io/")
2695 (synopsis "Virtual Python environment builder")
2696 (description
2697 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2698 (license license:expat)))
5731cae3
DT
2699
2700(define-public python2-virtualenv
2701 (package-with-python2 python-virtualenv))
8176d4d5
DT
2702
2703(define-public python-markupsafe
2704 (package
2705 (name "python-markupsafe")
2706 (version "0.23")
2707 (source
2708 (origin
2709 (method url-fetch)
2710 (uri (string-append
2711 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2712 version ".tar.gz"))
2713 (sha256
2714 (base32
2715 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2716 (build-system python-build-system)
2717 (inputs
2718 `(("python-setuptools" ,python-setuptools)))
2719 (home-page "http://github.com/mitsuhiko/markupsafe")
2720 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2721 (description
2722 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2723for Python.")
3f641af0 2724 (license license:bsd-3)))
8176d4d5
DT
2725
2726(define-public python2-markupsafe
2727 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2728
2729(define-public python-jinja2
2730 (package
2731 (name "python-jinja2")
e98149b3 2732 (version "2.8")
fe34f0d1
DT
2733 (source
2734 (origin
2735 (method url-fetch)
e98149b3 2736 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2737 (sha256
2738 (base32
e98149b3 2739 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2740 (build-system python-build-system)
2741 (inputs
2742 `(("python-setuptools" ,python-setuptools)
2743 ("python-markupsafe" ,python-markupsafe)))
2744 (home-page "http://jinja.pocoo.org/")
2745 (synopsis "Python template engine")
2746 (description
2747 "Jinja2 is a small but fast and easy to use stand-alone template engine
2748written in pure Python.")
3f641af0 2749 (license license:bsd-3)))
fe34f0d1
DT
2750
2751(define-public python2-jinja2
2752 (package-with-python2 python-jinja2))
3580ab8b 2753
f7d17ac7
EE
2754(define-public python-pystache
2755 (package
2756 (name "python-pystache")
2757 (version "0.5.4")
2758 (source (origin
2759 (method url-fetch)
2760 (uri (pypi-uri "pystache" version))
2761 (sha256
2762 (base32
2763 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2764 (build-system python-build-system)
2765 (native-inputs
2766 `(("python-setuptools" ,python-setuptools)))
2767 (home-page "http://defunkt.io/pystache/")
2768 (synopsis "Python logic-less template engine")
2769 (description
2770 "Pystache is a Python implementation of the framework agnostic,
2771logic-free templating system Mustache.")
2772 (license license:expat)))
2773
2774(define-public python2-pystache
2775 (package-with-python2 python-pystache))
2776
1285119b
RW
2777(define-public python-joblib
2778 (package
2779 (name "python-joblib")
2780 (version "0.9.0b4")
2781 (source (origin
2782 (method url-fetch)
2783 (uri (string-append "https://pypi.python.org/packages/source/"
2784 "j/joblib/joblib-" version ".tar.gz"))
2785 (sha256
2786 (base32
2787 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2788 (build-system python-build-system)
2789 (native-inputs
2790 `(("python-setuptools" ,python-setuptools)
2791 ("python-nose" ,python-nose)))
2792 (home-page "http://pythonhosted.org/joblib/")
2793 (synopsis "Using Python functions as pipeline jobs")
2794 (description
2795 "Joblib is a set of tools to provide lightweight pipelining in Python.
2796In particular, joblib offers: transparent disk-caching of the output values
2797and lazy re-evaluation (memoize pattern), easy simple parallel computing
2798logging and tracing of the execution.")
3f641af0 2799 (license license:bsd-3)))
1285119b
RW
2800
2801(define-public python2-joblib
2802 (package-with-python2 python-joblib))
2803
3580ab8b
DT
2804(define-public python-docutils
2805 (package
2806 (name "python-docutils")
2807 (version "0.12")
2808 (source
2809 (origin
2810 (method url-fetch)
2811 (uri (string-append
2812 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2813 version ".tar.gz"))
2814 (sha256
2815 (base32
2816 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2817 (build-system python-build-system)
2818 (inputs
2819 `(("python-setuptools" ,python-setuptools)))
2820 (arguments
2821 '(#:tests? #f)) ; no setup.py test command
2822 (home-page "http://docutils.sourceforge.net/")
2823 (synopsis "Python Documentation Utilities")
2824 (description
2825 "Docutils is a modular system for processing documentation into useful
2826formats, such as HTML, XML, and LaTeX. For input Docutils supports
2827reStructuredText.")
2828 ;; Most of the source code is public domain, but some source files are
2829 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2830 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2831
2832(define-public python2-docutils
2833 (package-with-python2 python-docutils))
fb35b7c0
DT
2834
2835(define-public python-pygments
2836 (package
2837 (name "python-pygments")
9f442285 2838 (version "2.0.2")
fb35b7c0
DT
2839 (source
2840 (origin
2841 (method url-fetch)
9f442285 2842 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2843 (sha256
2844 (base32
9f442285 2845 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2846 (build-system python-build-system)
2847 (inputs
2848 `(("python-setuptools" ,python-setuptools)))
2849 (home-page "http://pygments.org/")
2850 (synopsis "Syntax highlighting")
2851 (description
2852 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2853 (license license:bsd-2)))
fb35b7c0
DT
2854
2855(define-public python2-pygments
2856 (package-with-python2 python-pygments))
9dd6078d
DT
2857
2858(define-public python-sphinx
2859 (package
2860 (name "python-sphinx")
2861 (version "1.2.3")
2862 (source
2863 (origin
2864 (method url-fetch)
2865 (uri (string-append
2866 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2867 version ".tar.gz"))
2868 (sha256
2869 (base32
2870 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2871 (build-system python-build-system)
2872 (inputs
2873 `(("python-setuptools" ,python-setuptools)
2874 ("python-jinja2" ,python-jinja2)
2875 ("python-docutils" ,python-docutils)
2876 ("python-pygments" ,python-pygments)))
2877 (home-page "http://sphinx-doc.org/")
2878 (synopsis "Python documentation generator")
2879 (description "Sphinx is a tool that makes it easy to create documentation
2880for Python projects or other documents consisting of multiple reStructuredText
2881sources.")
3f641af0 2882 (license license:bsd-3)))
9dd6078d
DT
2883
2884(define-public python2-sphinx
2885 (package-with-python2 python-sphinx))
6888830b 2886
ad320b20
RW
2887(define-public python-sphinx-rtd-theme
2888 (package
2889 (name "python-sphinx-rtd-theme")
2890 (version "0.1.6")
2891 (source
2892 (origin
2893 (method url-fetch)
2894 (uri (string-append "https://pypi.python.org/packages/source/s/"
2895 "sphinx_rtd_theme/sphinx_rtd_theme-"
2896 version ".tar.gz"))
2897 (sha256
2898 (base32
2899 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2900 (build-system python-build-system)
2901 (arguments
2902 `(;; With standard flags, the install phase attempts to create a zip'd
2903 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2904 ;; before 1980'
2905 #:configure-flags '("--single-version-externally-managed"
2906 "--record=sphinx-rtd-theme.txt")))
2907 (native-inputs
2908 `(("python-setuptools" ,python-setuptools)))
2909 (inputs
2910 `(("python-docutils" ,python-docutils)
2911 ("python-sphinx" ,python-sphinx)))
2912 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2913 (synopsis "ReadTheDocs.org theme for Sphinx")
2914 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2915 (license license:expat)))
ad320b20
RW
2916
2917(define-public python2-sphinx-rtd-theme
2918 (package-with-python2 python-sphinx-rtd-theme))
2919
f4de5b3b
CAW
2920(define-public python-feedgenerator
2921 (package
2922 (name "python-feedgenerator")
f0412aa2 2923 (version "1.8")
f4de5b3b 2924 (source
f4de5b3b 2925 (origin
f0412aa2
EF
2926 (method url-fetch)
2927 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2928 (sha256
2929 (base32
f0412aa2 2930 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 2931 (build-system python-build-system)
f0412aa2 2932 (native-inputs
f4de5b3b
CAW
2933 `(("python-setuptools" ,python-setuptools)
2934 ("python-pytz" ,python-pytz)
2935 ("python-six" ,python-six)))
f0412aa2 2936 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2937 (synopsis
2938 "Standalone version of Django's Atom/RSS feed generator")
2939 (description
2940 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2941which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2942 (license license:bsd-3)))
f4de5b3b
CAW
2943
2944(define-public python2-feedgenerator
2945 (package-with-python2 python-feedgenerator))
2946
59ad30e3
CAW
2947(define-public python-blinker
2948 (package
2949 (name "python-blinker")
7fb9ff4d 2950 (version "1.4")
59ad30e3
CAW
2951 (source
2952 (origin
2953 (method url-fetch)
7fb9ff4d 2954 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2955 (sha256
2956 (base32
7fb9ff4d 2957 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2958 (build-system python-build-system)
2959 (native-inputs
2960 `(("python-setuptools" ,python-setuptools)))
2961 ;; No "test" command supplied to setuptools, so unless there's another way
2962 ;; to run tests, we're skipping them!
2963 (arguments '(#:tests? #f))
2964 (home-page "http://pythonhosted.org/blinker/")
2965 (synopsis "Fast, simple object-to-object and broadcast signaling")
2966 (description
2967 "Blinker provides a fast dispatching system that allows any number of
2968interested parties to subscribe to events, or \"signals\".")
2969 (license license:expat)))
2970
2971(define-public python2-blinker
2972 (package-with-python2 python-blinker))
2973
b8050e71
CAW
2974(define-public pelican
2975 (package
2976 (name "pelican")
11f97c27 2977 (version "3.6.3")
b8050e71
CAW
2978 (source
2979 (origin
2980 (method url-fetch)
11f97c27 2981 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2982 (sha256
2983 (base32
11f97c27 2984 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2985 (build-system python-build-system)
d9f2dece 2986 (inputs
b8050e71
CAW
2987 `(("python-feedgenerator" ,python-feedgenerator)
2988 ("python-jinja2" ,python-jinja2)
2989 ("python-pygments" ,python-pygments)
2990 ("python-docutils" ,python-docutils)
2991 ("python-pytz" ,python-pytz)
2992 ("python-blinker" ,python-blinker)
2993 ("python-unidecode" ,python-unidecode)
2994 ("python-six" ,python-six)
2995 ("python-dateutil-2" ,python-dateutil-2)))
2996 (home-page "http://getpelican.com/")
2997 (arguments
2998 `(;; XXX Requires a lot more packages to do unit tests :P
2999 #:tests? #f
3000 #:phases (modify-phases %standard-phases
3001 (add-before
3002 'install 'adjust-requires
3003 ;; Since feedgenerator is installed from git, it doesn't
3004 ;; conform to the version requirements.
3005 ;;
3006 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3007 ;; version requirement so setuptools doesn't get confused.
3008 (lambda _
3009 (substitute* "setup.py"
3010 (("['\"]feedgenerator.*?['\"]")
3011 "'feedgenerator'")))))))
3012 (synopsis "Python-based static site publishing system")
3013 (description
3014 "Pelican is a tool to generate a static blog from reStructuredText,
3015Markdown input files, and more. Pelican uses Jinja2 for templating
3016and is very extensible.")
3f641af0 3017 (license license:agpl3+)))
b8050e71 3018
240ca4aa
RW
3019(define-public python-scikit-learn
3020 (package
3021 (name "python-scikit-learn")
be0a4c26 3022 (version "0.16.1")
240ca4aa
RW
3023 (source
3024 (origin
3025 (method url-fetch)
3026 (uri (string-append
3027 "https://github.com/scikit-learn/scikit-learn/archive/"
3028 version ".tar.gz"))
7e21b9fb 3029 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3030 (sha256
3031 (base32
be0a4c26 3032 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
3033 (build-system python-build-system)
3034 (arguments
3035 `(#:phases
3036 (alist-cons-before
2f6b3d2e
RW
3037 'check 'set-HOME
3038 ;; some tests require access to "$HOME"
3039 (lambda _ (setenv "HOME" "/tmp"))
3040 ;; Tests can only be run after the library has been installed and not
3041 ;; within the source directory.
3042 (alist-cons-after
3043 'install 'check
3044 (lambda _
3045 (with-directory-excursion "/tmp"
3046 ;; With Python 3 one test of 3334 fails
3047 ;; (sklearn.tests.test_common.test_transformers); see
3048 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3049 (system* "nosetests" "-v" "sklearn")))
3050 (alist-delete 'check %standard-phases)))))
240ca4aa 3051 (inputs
2f6b3d2e 3052 `(("openblas" ,openblas)
240ca4aa
RW
3053 ("python-nose" ,python-nose)))
3054 (propagated-inputs
3055 `(("python-numpy" ,python-numpy)
3056 ("python-scipy" ,python-scipy)))
3057 (home-page "http://scikit-learn.org/")
3058 (synopsis "Machine Learning in Python")
3059 (description
3060 "Scikit-learn provides simple and efficient tools for data
3061mining and data analysis.")
25a2f81f
EF
3062 (license license:bsd-3)
3063 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
240ca4aa
RW
3064
3065(define-public python2-scikit-learn
25a2f81f 3066 (package-with-python2 (strip-python2-variant python-scikit-learn)))
240ca4aa 3067
12f8f9bb
RW
3068(define-public python-scikit-image
3069 (package
3070 (name "python-scikit-image")
3071 (version "0.11.3")
3072 (source
3073 (origin
3074 (method url-fetch)
3075 (uri (string-append
3076 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3077 version ".tar.gz"))
3078 (sha256
3079 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3080 (build-system python-build-system)
3081 (propagated-inputs
3082 `(("python-matplotlib" ,python-matplotlib)
3083 ("python-networkx" ,python-networkx)
3084 ("python-numpy" ,python-numpy)
3085 ("python-scipy" ,python-scipy)
3086 ("python-six" ,python-six)
3087 ("python-pillow" ,python-pillow)))
3088 (native-inputs
3089 `(("python-cython" ,python-cython)
3090 ("python-setuptools" ,python-setuptools)))
3091 (home-page "http://scikit-image.org/")
3092 (synopsis "Image processing in Python")
3093 (description
e881752c 3094 "Scikit-image is a collection of algorithms for image processing.")
2b031d3f
EF
3095 (license license:bsd-3)
3096 (properties `((python2-variant . ,(delay python2-scikit-image))))))
12f8f9bb
RW
3097
3098(define-public python2-scikit-image
2b031d3f
EF
3099 (let ((scikit-image (package-with-python2
3100 (strip-python2-variant python-scikit-image))))
12f8f9bb
RW
3101 (package (inherit scikit-image)
3102 (native-inputs
3103 `(("python2-mock" ,python2-mock)
3104 ,@(package-native-inputs scikit-image)))
3105 (propagated-inputs
3106 `(("python2-pytz" ,python2-pytz)
2b031d3f 3107 ,@(package-propagated-inputs scikit-image))))))
12f8f9bb 3108
5394a6a6
RW
3109(define-public python-redis
3110 (package
3111 (name "python-redis")
3112 (version "2.10.3")
3113 (source
3114 (origin
3115 (method url-fetch)
3116 (uri (string-append
3117 "https://pypi.python.org/packages/source/r/redis/redis-"
3118 version ".tar.gz"))
3119 (sha256
3120 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3121 (build-system python-build-system)
3122 ;; Tests require a running Redis server
3123 (arguments '(#:tests? #f))
3124 (native-inputs
3125 `(("python-setuptools" ,python-setuptools)
3126 ("python-pytest" ,python-pytest)))
3127 (home-page "https://github.com/andymccurdy/redis-py")
3128 (synopsis "Redis Python client")
3129 (description
3130 "This package provides a Python interface to the Redis key-value store.")
3131 (license license:expat)))
3132
3133(define-public python2-redis
3134 (package-with-python2 python-redis))
3135
748cef5b
RW
3136(define-public python-rq
3137 (package
3138 (name "python-rq")
3139 (version "0.5.2")
3140 (source
3141 (origin
3142 (method url-fetch)
3143 (uri (string-append
3144 "https://pypi.python.org/packages/source/r/rq/rq-"
3145 version ".tar.gz"))
3146 (sha256
3147 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3148 (build-system python-build-system)
3149 (propagated-inputs
3150 `(("python-click" ,python-click)
3151 ("python-redis" ,python-redis)))
3152 (native-inputs
3153 `(("python-setuptools" ,python-setuptools)))
3154 (home-page "http://python-rq.org/")
3155 (synopsis "Simple job queues for Python")
3156 (description
3157 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3158processing them in the background with workers. It is backed by Redis and it
3159is designed to have a low barrier to entry.")
3f641af0 3160 (license license:bsd-2)))
748cef5b
RW
3161
3162(define-public python2-rq
3163 (package-with-python2 python-rq))
3164
6888830b
FB
3165(define-public python-cython
3166 (package
3167 (name "python-cython")
dd22efef 3168 (version "0.24.1")
6888830b
FB
3169 (source
3170 (origin
3171 (method url-fetch)
56918e26 3172 (uri (pypi-uri "Cython" version))
6888830b
FB
3173 (sha256
3174 (base32
dd22efef 3175 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3176 (build-system python-build-system)
3177 ;; we need the full python package and not just the python-wrapper
3178 ;; because we need libpython3.3m.so
3179 (inputs
3180 `(("python" ,python)))
3181 (arguments
3182 `(#:phases
b92f651b
EF
3183 (modify-phases %standard-phases
3184 (add-before 'check 'set-HOME
3185 ;; some tests require access to "$HOME/.cython"
3186 (lambda _ (setenv "HOME" "/tmp")))
3187 (replace 'check
3188 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3189 (home-page "http://cython.org/")
3190 (synopsis "C extensions for Python")
3191 (description "Cython is an optimising static compiler for both the Python
3192programming language and the extended Cython programming language. It makes
3193writing C extensions for Python as easy as Python itself.")
3f641af0 3194 (license license:asl2.0)
48b311b1 3195 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3196
3197(define-public python2-cython
48b311b1
LC
3198 (package (inherit (package-with-python2
3199 (strip-python2-variant python-cython)))
6888830b
FB
3200 (name "python2-cython")
3201 (inputs
3202 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3203
ee5fb7ee
AV
3204;; The RPython toolchain currently does not support Python 3.
3205(define-public python2-rpython
3206 (package
3207 (name "python2-rpython")
3208 (version "0.1.4")
3209 (source
3210 (origin
3211 (method url-fetch)
3212 (uri (pypi-uri "rpython" version))
3213 (sha256
3214 (base32
3215 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3216 (build-system python-build-system)
3217 (arguments `(#:python ,python-2))
3218 (native-inputs
3219 `(("python2-pytest" ,python2-pytest) ; needed for running tests
3220 ("python2-setuptools" ,python2-setuptools)))
3221 (home-page "https://rpython.readthedocs.org")
3222 (synopsis "Framework for implementing interpreters and virtual machines")
3223 (description "RPython is a translation and support framework for
3224producing implementations of dynamic languages, emphasizing a clean separation
3225between language specification and implementation aspects.")
3226 (license license:expat)))
3227
0da98533
FB
3228;; This version of numpy is missing the documentation and is only used to
3229;; build matplotlib which is required to build numpy's documentation.
3230(define python-numpy-bootstrap
3231 (package
3232 (name "python-numpy-bootstrap")
ef9b4c04 3233 (version "1.10.4")
0da98533
FB
3234 (source
3235 (origin
3236 (method url-fetch)
de67e922 3237 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3238 "/numpy-" version ".tar.gz"))
3239 (sha256
3240 (base32
ef9b4c04 3241 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3242 (build-system python-build-system)
3243 (inputs
3244 `(("python-nose" ,python-nose)
cba256f8
RW
3245 ("openblas" ,openblas)
3246 ("lapack" ,lapack)))
0da98533 3247 (native-inputs
19afbea1 3248 `(("gfortran" ,gfortran)))
0da98533
FB
3249 (arguments
3250 `(#:phases
3251 (alist-cons-before
3252 'build 'set-environment-variables
3253 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3254 (call-with-output-file "site.cfg"
3255 (lambda (port)
cba256f8
RW
3256 (format port
3257 "[openblas]
dbdfe515
RW
3258libraries = openblas
3259library_dirs = ~a/lib
3260include_dirs = ~a/include
cba256f8
RW
3261
3262[lapack]
3263lapack_libs = lapack
3264library_dirs = ~a/lib
3265include_dirs = ~a/include
3266"
3267 (assoc-ref inputs "openblas")
3268 (assoc-ref inputs "openblas")
3269 (assoc-ref inputs "lapack")
3270 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3271 ;; Use "gcc" executable, not "cc".
3272 (substitute* "numpy/distutils/system_info.py"
3273 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3274 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3275 #t)
6a843168
FB
3276 ;; Tests can only be run after the library has been installed and not
3277 ;; within the source directory.
3278 (alist-cons-after
3279 'install 'check
89b5c60e 3280 (lambda _
6a843168 3281 (with-directory-excursion "/tmp"
89b5c60e 3282 (zero? (system* "python" "-c"
6a843168 3283 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3284 (alist-delete
3285 'check
6a843168 3286 %standard-phases)))))
0da98533
FB
3287 (home-page "http://www.numpy.org/")
3288 (synopsis "Fundamental package for scientific computing with Python")
3289 (description "NumPy is the fundamental package for scientific computing
e881752c 3290with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3291object, sophisticated (broadcasting) functions, tools for integrating C/C++
3292and Fortran code, useful linear algebra, Fourier transform, and random number
3293capabilities.")
3f641af0 3294 (license license:bsd-3)))
0da98533
FB
3295
3296(define python2-numpy-bootstrap
3297 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3298
3a1bfe18
RW
3299(define-public python2-fastlmm
3300 (package
3301 (name "python2-fastlmm")
b074e7d4 3302 (version "0.2.21")
3a1bfe18
RW
3303 (source
3304 (origin
3305 (method url-fetch)
b074e7d4 3306 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3307 (sha256
3308 (base32
b074e7d4 3309 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3310 (build-system python-build-system)
3311 (arguments
3312 `(#:python ,python-2)) ; only Python 2.7 is supported
3313 (propagated-inputs
3314 `(("python2-numpy" ,python2-numpy)
3315 ("python2-scipy" ,python2-scipy)
3316 ("python2-matplotlib" ,python2-matplotlib)
3317 ("python2-pandas" ,python2-pandas)
3318 ("python2-scikit-learn" ,python2-scikit-learn)
3319 ("python2-cython" ,python2-cython)
3320 ("python2-pysnptools" ,python2-pysnptools)))
3321 (native-inputs
3322 `(("unzip" ,unzip)
3323 ("python2-mock" ,python2-mock)
3324 ("python2-setuptools" ,python2-setuptools)))
3325 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3326 (synopsis "Perform genome-wide association studies on large data sets")
3327 (description
3328 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3329Models, is a program for performing both single-SNP and SNP-set genome-wide
3330association studies (GWAS) on extremely large data sets.")
3f641af0 3331 (license license:asl2.0)))
3a1bfe18 3332
2ee8869a
FB
3333(define-public python-numpy
3334 (package (inherit python-numpy-bootstrap)
3335 (name "python-numpy")
3336 (outputs '("out" "doc"))
89b5c60e 3337 (inputs
2ee8869a
FB
3338 `(("which" ,which)
3339 ("python-setuptools" ,python-setuptools)
3340 ("python-matplotlib" ,python-matplotlib)
3341 ("python-sphinx" ,python-sphinx)
3342 ("python-pyparsing" ,python-pyparsing)
3343 ("python-numpydoc" ,python-numpydoc)
3344 ,@(package-inputs python-numpy-bootstrap)))
3345 (native-inputs
3346 `(("pkg-config" ,pkg-config)
3347 ("texlive" ,texlive)
3348 ("texinfo" ,texinfo)
3349 ("perl" ,perl)
3350 ,@(package-native-inputs python-numpy-bootstrap)))
3351 (arguments
89b5c60e 3352 `(,@(substitute-keyword-arguments
2ee8869a
FB
3353 (package-arguments python-numpy-bootstrap)
3354 ((#:phases phases)
3355 `(alist-cons-after
3356 'install 'install-doc
3357 (lambda* (#:key outputs #:allow-other-keys)
3358 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3359 (doc (string-append
3360 data "/doc/" ,name "-"
2ee8869a
FB
3361 ,(package-version python-numpy-bootstrap)))
3362 (info (string-append data "/info"))
3363 (html (string-append doc "/html"))
3364 (pyver ,(string-append "PYVER=")))
3365 (with-directory-excursion "doc"
3366 (mkdir-p html)
3367 (system* "make" "html" pyver)
3368 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3369 (system* "make" "-C" "build/latex"
2ee8869a
FB
3370 "all-pdf" "PAPER=a4" pyver)
3371 ;; FIXME: Generation of the info file fails.
3372 ;; (system* "make" "info" pyver)
3373 ;; (mkdir-p info)
3374 ;; (copy-file "build/texinfo/numpy.info"
3375 ;; (string-append info "/numpy.info"))
3376 (for-each (lambda (file)
3377 (copy-file (string-append "build/latex" file)
3378 (string-append doc file)))
3379 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3380 (with-directory-excursion "build/html"
3381 (for-each (lambda (file)
3382 (let* ((dir (dirname file))
3383 (tgt-dir (string-append html "/" dir)))
3384 (unless (equal? "." dir)
3385 (mkdir-p tgt-dir))
96c46210 3386 (install-file file html)))
2ee8869a
FB
3387 (find-files "." ".*"))))))
3388 ,phases)))))))
3389
764c077b 3390(define-public python2-numpy
57b7b8cd 3391 (package-with-python2 python-numpy))
2ee8869a 3392
15bfe6d6
FB
3393(define-public python-pyparsing
3394 (package
3395 (name "python-pyparsing")
e0669289 3396 (version "2.0.3")
15bfe6d6
FB
3397 (source
3398 (origin
3399 (method url-fetch)
de67e922
LF
3400 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3401 "/pyparsing-" version
15bfe6d6
FB
3402 "/pyparsing-" version ".tar.gz"))
3403 (sha256
3404 (base32
e0669289 3405 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3406 (build-system python-build-system)
3407 (outputs '("out" "doc"))
3408 (arguments
3409 `(#:tests? #f ; no test target
3410 #:modules ((guix build python-build-system)
3411 (guix build utils))
3412 #:phases
3413 (alist-cons-after
3414 'install 'install-doc
3415 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3416 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3417 "/share/doc/" ,name "-" ,version))
3418 (html-doc (string-append doc "/html"))
3419 (examples (string-append doc "/examples")))
3420 (mkdir-p html-doc)
3421 (mkdir-p examples)
89b5c60e 3422 (for-each
15bfe6d6 3423 (lambda (dir tgt)
89b5c60e 3424 (map (lambda (file)
96c46210 3425 (install-file file tgt))
15bfe6d6
FB
3426 (find-files dir ".*")))
3427 (list "docs" "htmldoc" "examples")
3428 (list doc html-doc examples))))
3429 %standard-phases)))
3430 (home-page "http://pyparsing.wikispaces.com")
3431 (synopsis "Python parsing class library")
3432 (description
3433 "The pyparsing module is an alternative approach to creating and
3434executing simple grammars, vs. the traditional lex/yacc approach, or the use
3435of regular expressions. The pyparsing module provides a library of classes
3436that client code uses to construct the grammar directly in Python code.")
bd3fa666 3437 (license license:expat)))
15bfe6d6
FB
3438
3439(define-public python2-pyparsing
3440 (package-with-python2 python-pyparsing))
3441
ec00de35
FB
3442(define-public python-numpydoc
3443 (package
3444 (name "python-numpydoc")
3445 (version "0.5")
3446 (source
3447 (origin
3448 (method url-fetch)
89b5c60e 3449 (uri (string-append
ec00de35
FB
3450 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3451 version ".tar.gz"))
3452 (sha256
3453 (base32
5e4d8f67
AE
3454 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3455 (modules '((guix build utils)))
3456 (snippet
3457 '(begin
3458 ;; Drop a test requiring matplotlib, which we cannot add as an
3459 ;; input since it would create a circular dependency: Extend the
3460 ;; test for Python 3, where it is already dropped, to Python 2.
3461 (substitute* "numpydoc/tests/test_plot_directive.py"
3462 (("3") "2"))))))
ec00de35
FB
3463 (build-system python-build-system)
3464 (inputs
3465 `(("python-setuptools" ,python-setuptools)
3466 ("python-docutils" ,python-docutils)
3467 ("python-sphinx" ,python-sphinx)
3468 ("python-nose" ,python-nose)))
3469 (home-page "https://pypi.python.org/pypi/numpydoc")
3470 (synopsis
3471 "Numpy's Sphinx extensions")
3472 (description
3473 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3474 (license license:bsd-2)))
ec00de35
FB
3475
3476(define-public python2-numpydoc
5e4d8f67 3477 (package-with-python2 python-numpydoc))
1c65314c 3478
1e656049
RW
3479(define-public python-numexpr
3480 (package
3481 (name "python-numexpr")
26112c0a 3482 (version "2.6.0")
1e656049
RW
3483 (source
3484 (origin
3485 (method url-fetch)
26112c0a 3486 (uri (pypi-uri "numexpr" version))
1e656049
RW
3487 (sha256
3488 (base32
26112c0a 3489 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3490 (build-system python-build-system)
3491 (arguments `(#:tests? #f)) ; no tests included
3492 (propagated-inputs
3493 `(("python-numpy" ,python-numpy)))
3494 (home-page "https://github.com/pydata/numexpr")
3495 (synopsis "Fast numerical expression evaluator for NumPy")
3496 (description
3497 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3498expressions that operate on arrays are accelerated and use less memory than
3499doing the same calculation in Python. In addition, its multi-threaded
3500capabilities can make use of all your cores, which may accelerate
3501computations, most specially if they are not memory-bounded (e.g. those using
3502transcendental functions).")
fc1a170e
EF
3503 (license license:expat)
3504 (properties `((python2-variant . ,(delay python2-numexpr))))))
1e656049
RW
3505
3506(define-public python2-numexpr
fc1a170e 3507 (package-with-python2 (strip-python2-variant python-numexpr)))
1e656049 3508
1c65314c
FB
3509(define-public python-matplotlib
3510 (package
3511 (name "python-matplotlib")
1bbc659f 3512 (version "1.4.3")
1c65314c
FB
3513 (source
3514 (origin
3515 (method url-fetch)
de67e922
LF
3516 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3517 "/matplotlib-" version
1c65314c
FB
3518 "/matplotlib-" version ".tar.gz"))
3519 (sha256
3520 (base32
1bbc659f 3521 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3522 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3523 (build-system python-build-system)
3524 (outputs '("out" "doc"))
25f9a068
FB
3525 (propagated-inputs ; the following packages are all needed at run time
3526 `(("python-pyparsing" ,python-pyparsing)
3527 ("python-pygobject" ,python-pygobject)
3528 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3529 ("python-tkinter" ,python "tk")
25f9a068
FB
3530 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3531 ;; from 'gtk+') provides the required 'typelib' files used by
3532 ;; 'gobject-introspection'. The location of these files is set with the
3533 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3534 ;; is done automatically by a 'native-search-path' procedure. However,
3535 ;; at run-time the user must set this variable as follows:
3536 ;;
3537 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3538 ("gtk+" ,gtk+)
3539 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3540 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3541 ;; object. For this reason we need to import both libraries.
3542 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3543 ("python-pycairo" ,python-pycairo)
3544 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3545 (inputs
3546 `(("python-setuptools" ,python-setuptools)
3547 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3548 ("python-six" ,python-six)
3549 ("python-pytz" ,python-pytz)
3550 ("python-numpy" ,python-numpy-bootstrap)
3551 ("python-sphinx" ,python-sphinx)
3552 ("python-numpydoc" ,python-numpydoc)
3553 ("python-nose" ,python-nose)
3554 ("python-mock" ,python-mock)
3555 ("libpng" ,libpng)
3556 ("imagemagick" ,imagemagick)
3557 ("freetype" ,freetype)
25f9a068
FB
3558 ("cairo" ,cairo)
3559 ("glib" ,glib)
4e7a137a 3560 ("python-pillow" ,python-pillow)
1c65314c 3561 ;; FIXME: Add backends when available.
1c65314c
FB
3562 ;("python-wxpython" ,python-wxpython)
3563 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3564 ("tcl" ,tcl)
3565 ("tk" ,tk)))
1c65314c
FB
3566 (native-inputs
3567 `(("pkg-config" ,pkg-config)
3568 ("texlive" ,texlive)
3569 ("texinfo" ,texinfo)))
3570 (arguments
3571 `(#:phases
25f9a068
FB
3572 (alist-cons-before
3573 'build 'configure-environment
3574 (lambda* (#:key outputs inputs #:allow-other-keys)
3575 (let ((cairo (assoc-ref inputs "cairo"))
3576 (gtk+ (assoc-ref inputs "gtk+")))
3577 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3578 ;; has not effect.
25f9a068
FB
3579 (setenv "LD_LIBRARY_PATH"
3580 (string-append cairo "/lib:" gtk+ "/lib"))
3581 (setenv "HOME" (getcwd))
3582 (call-with-output-file "setup.cfg"
3583 (lambda (port)
1bbc659f
FB
3584 (format port "[directories]~%
3585basedirlist = ~a,~a~%
57b7b8cd 3586 [rc_options]~%
1bbc659f
FB
3587backend = TkAgg~%"
3588 (assoc-ref inputs "tcl")
3589 (assoc-ref inputs "tk"))))))
25f9a068
FB
3590 (alist-cons-after
3591 'install 'install-doc
3592 (lambda* (#:key outputs #:allow-other-keys)
3593 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3594 (doc (string-append data "/doc/" ,name "-" ,version))
3595 (info (string-append data "/info"))
3596 (html (string-append doc "/html")))
3597 (with-directory-excursion "doc"
25f9a068
FB
3598 ;; Produce pdf in 'A4' format.
3599 (substitute* (find-files "." "conf\\.py")
3600 (("latex_paper_size = 'letter'")
3601 "latex_paper_size = 'a4'"))
3602 (mkdir-p html)
3603 (mkdir-p info)
3604 ;; The doc recommends to run the 'html' target twice.
3605 (system* "python" "make.py" "html")
3606 (system* "python" "make.py" "html")
18b31516 3607 (copy-recursively "build/html" html)
25f9a068
FB
3608 (system* "python" "make.py" "latex")
3609 (system* "python" "make.py" "texinfo")
18b31516
FB
3610 (symlink (string-append html "/_images")
3611 (string-append info "/matplotlib-figures"))
3612 (with-directory-excursion "build/texinfo"
3613 (substitute* "matplotlib.texi"
3614 (("@image\\{([^,]*)" all file)
3615 (string-append "@image{matplotlib-figures/" file)))
3616 (symlink (string-append html "/_images")
3617 "./matplotlib-figures")
3618 (system* "makeinfo" "--no-split"
3619 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3620 (copy-file "build/texinfo/matplotlib.info"
3621 (string-append info "/matplotlib.info"))
3622 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3623 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3624 %standard-phases))))
1c65314c
FB
3625 (home-page "http://matplotlib.org")
3626 (synopsis "2D plotting library for Python")
3627 (description
3628 "Matplotlib is a Python 2D plotting library which produces publication
3629quality figures in a variety of hardcopy formats and interactive environments
3630across platforms. Matplotlib can be used in Python scripts, the python and
3631ipython shell, web application servers, and six graphical user interface
3632toolkits.")
3f641af0 3633 (license license:psfl)
57b7b8cd 3634 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3635
764c077b 3636(define-public python2-matplotlib
57b7b8cd
LC
3637 (let ((matplotlib (package-with-python2
3638 (strip-python2-variant python-matplotlib))))
764c077b 3639 (package (inherit matplotlib)
88c26834
AE
3640 ;; Make sure to use special packages for Python 2 instead
3641 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3642 (propagated-inputs
7ca0dbc3 3643 `(("python2-pycairo" ,python2-pycairo)
764c077b 3644 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3645 ("python2-tkinter" ,python-2 "tk")
3646 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3647 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3648
0dde6232
RW
3649(define-public python2-pysnptools
3650 (package
3651 (name "python2-pysnptools")
a800018e 3652 (version "0.3.9")
0dde6232
RW
3653 (source
3654 (origin
3655 (method url-fetch)
3f2e9675 3656 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3657 (sha256
3658 (base32
a800018e 3659 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3660 (build-system python-build-system)
3661 (arguments
3662 `(#:python ,python-2)) ; only Python 2.7 is supported
3663 (propagated-inputs
3664 `(("python2-numpy" ,python2-numpy)
3665 ("python2-scipy" ,python2-scipy)
a800018e 3666 ("python2-pytz" ,python2-pytz)
0dde6232 3667 ("python2-cython" ,python2-cython)))
a800018e
EF
3668 (inputs
3669 `(("python2-dateutil-2" ,python2-dateutil-2)
3670 ("python2-pandas" ,python2-pandas)
3671 ("python2-six" ,python2-six)))
0dde6232
RW
3672 (native-inputs
3673 `(("unzip" ,unzip)
3674 ("python2-setuptools" ,python2-setuptools)))
3675 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3676 (synopsis "Library for reading and manipulating genetic data")
3677 (description
3678 "PySnpTools is a library for reading and manipulating genetic data. It
3679can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3680those files. It can also efficiently manipulate ranges of integers using set
3681operators such as union, intersection, and difference.")
3f641af0 3682 (license license:asl2.0)))
0dde6232 3683
c9b1b4f9
RW
3684(define-public python-rpy2
3685 (package
3686 (name "python-rpy2")
ec3bcbc7 3687 (version "2.7.6")
c9b1b4f9
RW
3688 (source
3689 (origin
3690 (method url-fetch)
ec3bcbc7 3691 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3692 (sha256
3693 (base32
ec3bcbc7 3694 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3695 (build-system python-build-system)
3696 (inputs
3697 `(("python-six" ,python-six)
3698 ("readline" ,readline)
3699 ("icu4c" ,icu4c)
3700 ("pcre" ,pcre)
3701 ("r" ,r)))
3702 (native-inputs
5ff6575b
RW
3703 `(("python-setuptools" ,python-setuptools)
3704 ("zlib" ,zlib)))
c9b1b4f9
RW
3705 (home-page "http://rpy.sourceforge.net/")
3706 (synopsis "Python interface to the R language")
3707 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3708low-level interface to R from Python, a proposed high-level interface,
3709including wrappers to graphical libraries, as well as R-like structures and
3710functions.")
3f641af0 3711 (license license:gpl3+)))
c9b1b4f9
RW
3712
3713(define-public python2-rpy2
3714 (let ((rpy2 (package-with-python2 python-rpy2)))
3715 (package (inherit rpy2)
3716 (native-inputs
3717 `(("python2-singledispatch" ,python2-singledispatch)
3718 ,@(package-native-inputs rpy2))))))
3719
bb986599
FB
3720(define-public python-scipy
3721 (package
3722 (name "python-scipy")
ba8a0824 3723 (version "0.16.0")
bb986599
FB
3724 (source
3725 (origin
3726 (method url-fetch)
de67e922
LF
3727; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3728 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3729 "/scipy-" version ".tar.xz"))
bb986599
FB
3730 (sha256
3731 (base32
ba8a0824 3732 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3733 (build-system python-build-system)
dd86c0d1 3734 (propagated-inputs
bb986599
FB
3735 `(("python-numpy" ,python-numpy)
3736 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3737 ("python-pyparsing" ,python-pyparsing)))
3738 (inputs
3739 `(("lapack" ,lapack)
719b01c1 3740 ("openblas" ,openblas)))
bb986599 3741 (native-inputs
dd86c0d1
RW
3742 `(("python-nose" ,python-nose)
3743 ("python-sphinx" ,python-sphinx)
5248d49e 3744 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3745 ("gfortran" ,gfortran)
bb986599
FB
3746 ("texlive" ,texlive)
3747 ("perl" ,perl)))
3748 (outputs '("out" "doc"))
3749 (arguments
3750 `(#:phases
3751 (alist-cons-before
719b01c1 3752 'build 'configure-openblas
bb986599 3753 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3754 (call-with-output-file "site.cfg"
3755 (lambda (port)
3756 (format port
3757 "[blas]
3758libraries = openblas
3759library_dirs = ~a/lib
3760include_dirs = ~a/include
3761[atlas]
3762library_dirs = ~a/lib
3763atlas_libs = openblas
3764"
3765 (assoc-ref inputs "openblas")
3766 (assoc-ref inputs "openblas")
3767 (assoc-ref inputs "openblas"))))
3768 #t)
bb986599
FB
3769 (alist-cons-after
3770 'install 'install-doc
3771 (lambda* (#:key outputs #:allow-other-keys)
3772 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3773 (doc (string-append data "/doc/" ,name "-" ,version))
3774 (html (string-append doc "/html"))
3775 (pyver ,(string-append "PYVER=")))
3776 (with-directory-excursion "doc"
bb986599
FB
3777 ;; Fix generation of images for mathematical expressions.
3778 (substitute* (find-files "source" "conf\\.py")
3779 (("pngmath_use_preview = True")
3780 "pngmath_use_preview = False"))
3781 (mkdir-p html)
3782 (system* "make" "html" pyver)
3783 (system* "make" "latex" "PAPER=a4" pyver)
3784 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3785 (copy-file "build/latex/scipy-ref.pdf"
3786 (string-append doc "/scipy-ref.pdf"))
3787 (with-directory-excursion "build/html"
3788 (for-each (lambda (file)
3789 (let* ((dir (dirname file))
3790 (tgt-dir (string-append html "/" dir)))
96c46210 3791 (install-file file html)))
bb986599
FB
3792 (find-files "." ".*"))))))
3793 ;; Tests can only be run after the library has been installed and not
3794 ;; within the source directory.
3795 (alist-cons-after
3796 'install 'check
89b5c60e 3797 (lambda _
bb986599
FB
3798 (with-directory-excursion "/tmp"
3799 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3800 (alist-delete
3801 'check
4f9ff21e
RW
3802 (alist-cons-after
3803 'unpack 'fix-tests
3804 (lambda _
3805 (substitute* "scipy/integrate/tests/test_quadpack.py"
3806 (("libm.so") "libm.so.6"))
3807 #t)
3808 %standard-phases)))))))
bb986599
FB
3809 (home-page "http://www.scipy.org/")
3810 (synopsis "The Scipy library provides efficient numerical routines")
3811 (description "The SciPy library is one of the core packages that make up
3812the SciPy stack. It provides many user-friendly and efficient numerical
3813routines such as routines for numerical integration and optimization.")
3f641af0 3814 (license license:bsd-3)))
bb986599 3815
764c077b 3816(define-public python2-scipy
57b7b8cd 3817 (package-with-python2 python-scipy))
bb986599 3818
73acc193 3819(define-public python-socksipy-branch
3820 (package
3821 (name "python-socksipy-branch")
3822 (version "1.01")
3823 (source
3824 (origin
3825 (method url-fetch)
3826 (uri (pypi-uri "SocksiPy-branch" version))
3827 (sha256
3828 (base32
3829 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3830 (build-system python-build-system)
3831 (arguments
3832 `(#:tests? #f)) ; There are no tests
3833 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3834 (synopsis "Python SOCKS module")
3835 (description
3836 "SocksiPy - A Python SOCKS client module. It provides a
3837socket-like interface that supports connections to any TCP
3838service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3839The original version was developed by Dan Haim, this is a
3840branch created by Mario Vilas to address some open issues,
3841as the original project seems to have been abandoned circa 2007.")
3842 (license license:bsd-3)))
3843
3844(define-public python2-socksipy-branch
3845 (package-with-python2 python-socksipy-branch))
3846
94914805
EB
3847(define-public python-sqlalchemy
3848 (package
3849 (name "python-sqlalchemy")
a4ba286b 3850 (version "1.0.12")
94914805
EB
3851 (source
3852 (origin
3853 (method url-fetch)
3854 (uri (string-append "https://pypi.python.org/packages/source/S/"
3855 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3856 (sha256
3857 (base32
a4ba286b 3858 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3859 (build-system python-build-system)
3860 (native-inputs
3861 `(("python-cython" ,python-cython) ;for c extensions
3862 ("python-pytest" ,python-pytest)
3863 ("python-mock" ,python-mock))) ;for tests
3864 (arguments
3865 `(#:phases (alist-replace
3866 'check
3867 (lambda _ (zero? (system* "py.test")))
3868 %standard-phases)))
3869 (home-page "http://www.sqlalchemy.org")
3870 (synopsis "Database abstraction library")
3871 (description
3872 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3873gives application developers the full power and flexibility of SQL. It
3874provides a full suite of well known enterprise-level persistence patterns,
3875designed for efficient and high-performing database access, adapted into a
3876simple and Pythonic domain language.")
3f641af0 3877 (license license:x11)))
94914805
EB
3878
3879(define-public python2-sqlalchemy
3880 (package-with-python2 python-sqlalchemy))
c937562e 3881
4a093330
DM
3882(define-public python-pycodestyle
3883 (package
3884 (name "python-pycodestyle")
3885 (version "2.0.0")
3886 (source
3887 (origin
3888 (method url-fetch)
3889 (uri (pypi-uri "pycodestyle" version))
3890 (sha256
3891 (base32
3892 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3893 (build-system python-build-system)
3894 (home-page "https://pycodestyle.readthedocs.io/")
3895 (synopsis "Python style guide checker")
3896 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3897Python code against some of the style conventions in
3898@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3899 (license license:expat)
3900 (properties `((python2-variant . ,(delay python2-pycodestyle))))))
3901
3902(define-public python2-pycodestyle
3903 (let ((base (package-with-python2 (strip-python2-variant
3904 python-pycodestyle))))
3905 (package (inherit base)
3906 (native-inputs
3907 `(("python2-setuptools" ,python2-setuptools)
3908 ,@(package-native-inputs base))))))
b91912c4
DM
3909
3910(define-public python-orderedmultidict
3911 (package
3912 (name "python-orderedmultidict")
3913 (version "0.7.10")
3914 (source
3915 (origin
3916 (method url-fetch)
3917 (uri (pypi-uri "orderedmultidict" version))
3918 (sha256
3919 (base32
3920 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3921 (build-system python-build-system)
3922 (arguments
3923 `(#:phases
3924 (modify-phases %standard-phases
3925 (add-after 'unpack 'fix-tests
3926 (lambda _
3927 ;; The package uses nosetest for running the tests.
3928 ;; Adding this initfile allows to run the test suite
3929 ;; without requiring nosetest.
3930 (zero? (system* "touch" "tests/__init__.py")))))))
3931 (propagated-inputs
3932 `(("python-six" ,python-six)))
3933 (native-inputs
3934 `(("python-pycodestyle" ,python-pycodestyle)))
3935 (home-page "https://github.com/gruns/orderedmultidict")
3936 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3937 (description "This package contains a library for ordered multivalue
3938dictionaries. A multivalue dictionary is a dictionary that can store
3939multiple values for the same key. An ordered multivalue dictionary is a
3940multivalue dictionary that retains the order of insertions and deletions.")
3941 (license license:unlicense)
3942 (properties `((python2-variant . ,(delay python2-orderedmultidict))))))
3943
3944(define-public python2-orderedmultidict
3945 (let ((base (package-with-python2 (strip-python2-variant
3946 python-orderedmultidict))))
3947 (package (inherit base)
3948 (native-inputs
3949 `(("python2-setuptools" ,python2-setuptools)
3950 ,@(package-native-inputs base))))))
9dede065
DM
3951
3952(define-public python-furl
3953 (package
3954 (name "python-furl")
3955 (version "0.5.6")
3956 (source
3957 (origin
3958 (method url-fetch)
3959 (uri (pypi-uri "furl" version))
3960 (sha256
3961 (base32
3962 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3963 (build-system python-build-system)
3964 (propagated-inputs
3965 `(("python-six" ,python-six)
3966 ("python-orderedmultidict" ,python-orderedmultidict)))
3967 (native-inputs
3968 `(("python-pycodestyle" ,python-pycodestyle)))
3969 (home-page "https://github.com/gruns/furl")
3970 (synopsis "URL manipulation in Python")
3971 (description "Furl provides an easy-to-use alternative to the
3972@code{urllib} and @code{urlparse} modules for manipulating URLs.")
3973 (license license:unlicense)
3974 (properties `((python2-variant . ,(delay python2-furl))))))
3975
3976(define-public python2-furl
3977 (let ((base (package-with-python2 (strip-python2-variant
3978 python-furl))))
3979 (package (inherit base)
3980 (native-inputs
3981 `(("python2-setuptools" ,python2-setuptools)
3982 ,@(package-native-inputs base))))))
462bf271
DM
3983
3984(define-public python-flask-babel
3985 (package
3986 (name "python-flask-babel")
3987 (version "0.11.1")
3988 (source
3989 (origin
3990 (method url-fetch)
3991 (uri (pypi-uri "Flask-Babel" version))
3992 (sha256
3993 (base32
3994 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3995 (build-system python-build-system)
3996 (propagated-inputs
3997 `(("python-flask" ,python-flask)
3998 ("python-babel" ,python-babel)
3999 ("python-jinja2" ,python-jinja2)
4000 ("python-pytz" ,python-pytz)))
4001 (home-page "https://github.com/python-babel/flask-babel")
4002 (synopsis "Add i18n/l10n support to Flask applications")
4003 (description "This package implements internationalization and localization
4004support for Flask. This is based on the Python babel module as well as pytz -
4005both of which are installed automatically if you install this library.")
4006 (license license:bsd-3)
4007 (properties `((python2-variant . ,(delay python2-flask-babel))))))
4008
4009(define-public python2-flask-babel
4010 (let ((base (package-with-python2 (strip-python2-variant
4011 python-flask-babel))))
4012 (package (inherit base)
4013 (native-inputs
4014 `(("python2-setuptools" ,python2-setuptools)
4015 ,@(package-native-inputs base))))))
4a093330 4016
de2966cf
EF
4017(define-public python-sqlalchemy-utils
4018 (package
4019 (name "python-sqlalchemy-utils")
4020 (version "0.32.9")
4021 (source
4022 (origin
4023 (method url-fetch)
4024 (uri (pypi-uri "SQLAlchemy-Utils" version))
4025 (sha256
4026 (base32
4027 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
4028 (build-system python-build-system)
c22b4f87 4029 (propagated-inputs
de2966cf
EF
4030 `(("python-six" ,python-six)
4031 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
4032 (native-inputs
4033 `(("python-pytest" ,python-pytest)))
de2966cf
EF
4034 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4035 (synopsis "Various utility functions for SQLAlchemy")
4036 (description
4037 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4038for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4039
4040You might also want to install the following optional dependencies:
4041@enumerate
4042@item @code{python-passlib}
4043@item @code{python-babel}
4044@item @code{python-cryptography}
4045@item @code{python-pytz}
4046@item @code{python-psycopg2}
4047@item @code{python-furl}
4048@item @code{python-flask-babel}
4049@end enumerate
4050")
de2966cf
EF
4051 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
4052 (license license:bsd-3)))
4053
4054(define-public python2-sqlalchemy-utils
4055 (let ((base (package-with-python2
4056 (strip-python2-variant python-sqlalchemy-utils))))
4057 (package (inherit base)
4058 (native-inputs
4059 `(("python2-setuptools" ,python2-setuptools)
4060 ,@(package-native-inputs base))))))
4061
af5a4602
CAW
4062(define-public python-alembic
4063 (package
4064 (name "python-alembic")
bb484529 4065 (version "0.8.7")
af5a4602
CAW
4066 (source
4067 (origin
4068 (method url-fetch)
4069 (uri (pypi-uri "alembic" version))
4070 (sha256
4071 (base32
bb484529 4072 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4073 (build-system python-build-system)
4074 (native-inputs
4075 `(("python-mock" ,python-mock)
4076 ("python-pytest-cov" ,python-pytest-cov)))
4077 (propagated-inputs
4078 `(("python-sqlalchemy" ,python-sqlalchemy)
4079 ("python-mako" ,python-mako)
4080 ("python-editor" ,python-editor)))
4081 (home-page "http://bitbucket.org/zzzeek/alembic")
4082 (synopsis
4083 "Database migration tool for SQLAlchemy")
4084 (description
4085 "Alembic is a lightweight database migration tool for usage with the
4086SQLAlchemy Database Toolkit for Python.")
4087 (license license:expat)
4088 (properties `((python2-variant . ,(delay python2-alembic))))))
4089
4090(define-public python2-alembic
4091 (let ((alembic (package-with-python2
4092 (strip-python2-variant python-alembic))))
4093 (package
4094 (inherit alembic)
4095 (native-inputs `(("python2-setuptools" ,python2-setuptools)
4096 ,@(package-native-inputs alembic))))))
4097
1671c07c
EB
4098(define-public python-distutils-extra
4099 (package
4100 (name "python-distutils-extra")
4101 (version "2.38")
4102 (source
4103 (origin
4104 (method url-fetch)
4105 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4106 version "/+download/python-distutils-extra-"
4107 version ".tar.gz"))
4108 (sha256
4109 (base32
4110 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4111 (build-system python-build-system)
4112 (native-inputs
4113 `(("python-setuptools" ,python-setuptools)))
4114 (home-page "https://launchpad.net/python-distutils-extra/")
4115 (synopsis "Enhancements to Python's distutils")
4116 (description
4117 "The python-distutils-extra module enables you to easily integrate
4118gettext support, themed icons, and scrollkeeper-based documentation into
4119Python's distutils.")
3f641af0 4120 (license license:gpl2)))
1671c07c
EB
4121
4122(define-public python2-distutils-extra
4123 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4124
4125(define-public python2-elib.intl
4126 (package
4127 (name "python2-elib.intl")
4128 (version "0.0.3")
4129 (source
4130 (origin
4131 ;; This project doesn't tag releases or publish tarballs, so we take
4132 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4133 (method git-fetch)
4134 (uri (git-reference
4135 (url "https://github.com/dieterv/elib.intl.git")
4136 (commit "d09997cfef")))
4137 (sha256
4138 (base32
4139 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4140 (build-system python-build-system)
4141 (native-inputs
4142 `(("python2-setuptools" ,python2-setuptools)))
4143 (arguments
4144 ;; incompatible with Python 3 (exception syntax)
4145 `(#:python ,python-2
4146 #:tests? #f
4147 ;; With standard flags, the install phase attempts to create a zip'd
4148 ;; egg file, and fails with an error: 'ZIP does not support timestamps
4149 ;; before 1980'
4150 #:configure-flags '("--single-version-externally-managed"
4151 "--record=elib.txt")))
4152 (home-page "https://github.com/dieterv/elib.intl")
4153 (synopsis "Enhanced internationalization for Python")
4154 (description
4155 "The elib.intl module provides enhanced internationalization (I18N)
4156services for your Python modules and applications.")
3f641af0 4157 (license license:lgpl3+)))
ea5456c8 4158
c937562e
EB
4159(define-public python-pillow
4160 (package
4161 (name "python-pillow")
debf4179 4162 (version "3.3.1")
c937562e
EB
4163 (source
4164 (origin
4165 (method url-fetch)
f1d9231d 4166 (uri (pypi-uri "Pillow" version))
c937562e
EB
4167 (sha256
4168 (base32
debf4179 4169 "1w9x3dfrg8b5lqhpjl0fczfyf9842wbqwgxbjjq4vfpxv5jwm49l"))))
c937562e
EB
4170 (build-system python-build-system)
4171 (native-inputs
4172 `(("python-setuptools" ,python-setuptools)
4173 ("python-nose" ,python-nose)))
4174 (inputs
5ff408d9
SB
4175 `(("freetype" ,freetype)
4176 ("lcms" ,lcms)
c937562e
EB
4177 ("zlib" ,zlib)
4178 ("libjpeg" ,libjpeg)
4179 ("openjpeg" ,openjpeg)
5ff408d9
SB
4180 ("libtiff" ,libtiff)
4181 ("libwebp" ,libwebp)))
c937562e
EB
4182 (propagated-inputs
4183 `(;; Used at runtime for pkg_resources
4184 ("python-setuptools" ,python-setuptools)))
4185 (arguments
e5358a6b
LC
4186 `(#:phases (modify-phases %standard-phases
4187 (add-before
4188 'install 'disable-egg-compression
4189 (lambda _
4190 ;; Leave the .egg uncompressed since compressing it would
4191 ;; prevent the GC from identifying run-time dependencies.
4192 ;; See <http://bugs.gnu.org/20765>.
4193 (let ((port (open-file "setup.cfg" "a")))
4194 (display "\n[easy_install]\nzip_ok = 0\n"
4195 port)
4196 (close-port port)
4197 #t)))
4198 (add-after
4199 'install 'check-installed
4200 (lambda _
4201 (begin
4202 (setenv "HOME" (getcwd))
4203 (and (zero? (system* "python" "selftest.py"
4204 "--installed"))
4205 (zero? (system* "python" "test-installed.py"))))))
4206 (delete 'check))))
c937562e
EB
4207 (home-page "https://pypi.python.org/pypi/Pillow")
4208 (synopsis "Fork of the Python Imaging Library")
4209 (description
4210 "The Python Imaging Library adds image processing capabilities to your
4211Python interpreter. This library provides extensive file format support, an
4212efficient internal representation, and fairly powerful image processing
4213capabilities. The core image library is designed for fast access to data
4214stored in a few basic pixel formats. It should provide a solid foundation for
4215a general image processing tool.")
3f641af0 4216 (license (license:x11-style
c937562e
EB
4217 "http://www.pythonware.com/products/pil/license.htm"
4218 "The PIL Software License"))))
4219
4220(define-public python2-pillow
4221 (package-with-python2 python-pillow))
bb986599 4222
a415f036
FB
4223(define-public python-pycparser
4224 (package
4225 (name "python-pycparser")
38eb6919 4226 (version "2.14")
a415f036
FB
4227 (source
4228 (origin
4229 (method url-fetch)
38eb6919 4230 (uri (pypi-uri "pycparser" version))
a415f036
FB
4231 (sha256
4232 (base32
38eb6919 4233 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4234 (outputs '("out" "doc"))
4235 (build-system python-build-system)
4236 (native-inputs
4237 `(("pkg-config" ,pkg-config)
4238 ("python-setuptools" ,python-setuptools)))
4239 (arguments
89b5c60e 4240 `(#:phases
a415f036
FB
4241 (alist-replace
4242 'check
4243 (lambda _
4244 (with-directory-excursion "tests"
4245 (zero? (system* "python" "all_tests.py"))))
4246 (alist-cons-after
4247 'install 'install-doc
4248 (lambda* (#:key outputs #:allow-other-keys)
4249 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4250 (doc (string-append data "/doc/" ,name "-" ,version))
4251 (examples (string-append doc "/examples")))
4252 (mkdir-p examples)
4253 (for-each (lambda (file)
4254 (copy-file (string-append "." file)
4255 (string-append doc file)))
4256 '("/README.rst" "/CHANGES" "/LICENSE"))
4257 (copy-recursively "examples" examples)))
4258 %standard-phases))))
4259 (home-page "https://github.com/eliben/pycparser")
4260 (synopsis "C parser in Python")
4261 (description
4262 "Pycparser is a complete parser of the C language, written in pure Python
4263using the PLY parsing library. It parses C code into an AST and can serve as
4264a front-end for C compilers or analysis tools.")
3f641af0 4265 (license license:bsd-3)))
a415f036
FB
4266
4267(define-public python2-pycparser
4268 (package-with-python2 python-pycparser))
57c3f716
FB
4269
4270(define-public python-cffi
4271 (package
4272 (name "python-cffi")
2d3a437c 4273 (version "1.4.2")
57c3f716
FB
4274 (source
4275 (origin
4276 (method url-fetch)
2d3a437c 4277 (uri (pypi-uri "cffi" version))
89b5c60e 4278 (sha256
2d3a437c 4279 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4280 (build-system python-build-system)
4281 (outputs '("out" "doc"))
4282 (inputs
4283 `(("libffi" ,libffi)))
4284 (propagated-inputs ; required at run-time
4285 `(("python-pycparser" ,python-pycparser)))
4286 (native-inputs
4287 `(("pkg-config" ,pkg-config)
4288 ("python-sphinx" ,python-sphinx)
4179f952 4289 ("python-pytest" ,python-pytest)
57c3f716
FB
4290 ("python-setuptools" ,python-setuptools)))
4291 (arguments
4179f952 4292 `(#:phases
57c3f716
FB
4293 (alist-cons-after
4294 'install 'install-doc
4295 (lambda* (#:key outputs #:allow-other-keys)
4296 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4297 (doc (string-append data "/doc/" ,name "-" ,version))
4298 (html (string-append doc "/html")))
4299 (with-directory-excursion "doc"
4300 (system* "make" "html")
4301 (mkdir-p html)
4302 (copy-recursively "build/html" html))
4303 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4304 %standard-phases)))
4305 (home-page "http://cffi.readthedocs.org")
4306 (synopsis "Foreign function interface for Python")
4307 (description
4308 "Foreign Function Interface for Python calling C code.")
bd3fa666 4309 (license license:expat)))
57c3f716
FB
4310
4311(define-public python2-cffi
4312 (package-with-python2 python-cffi))
6fa14469
FB
4313
4314(define-public python-xcffib
4315 (package
4316 (name "python-xcffib")
4317 (version "0.1.9")
4318 (source
4319 (origin
4320 (method url-fetch)
4321 (uri (string-append "https://pypi.python.org/packages/source/x/"
4322 "xcffib/xcffib-" version ".tar.gz"))
4323 (sha256
4324 (base32
4325 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4326 (build-system python-build-system)
4327 (inputs
4328 `(("libxcb" ,libxcb)
4329 ("python-six" ,python-six)))
4330 (native-inputs
4331 `(("python-setuptools" ,python-setuptools)))
4332 (propagated-inputs
4333 `(("python-cffi" ,python-cffi))) ; used at run time
4334 (arguments
89b5c60e 4335 `(#:phases
6fa14469
FB
4336 (alist-cons-after
4337 'install 'install-doc
4338 (lambda* (#:key outputs #:allow-other-keys)
4339 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4340 "/doc/" ,name "-" ,version)))
4341 (mkdir-p doc)
4342 (copy-file "README.md"
4343 (string-append doc "/README.md"))))
4344 %standard-phases)))
4345 (home-page "https://github.com/tych0/xcffib")
4346 (synopsis "XCB Python bindings")
4347 (description
4348 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4349support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4350 (license license:expat)))
6fa14469
FB
4351
4352(define-public python2-xcffib
4353 (package-with-python2 python-xcffib))
4354
9e099723
FB
4355(define-public python-cairocffi
4356 (package
4357 (name "python-cairocffi")
4358 (version "0.6")
4359 (source
4360 (origin
4361 (method url-fetch)
4362 ;; The archive on pypi is missing the 'utils' directory!
4363 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4364 version ".tar.gz"))
f586c877 4365 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4366 (sha256
4367 (base32
4368 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4369 (build-system python-build-system)
4370 (outputs '("out" "doc"))
4371 (inputs
4372 `(("gdk-pixbuf" ,gdk-pixbuf)
4373 ("cairo" ,cairo)))
4374 (native-inputs
4375 `(("pkg-config" ,pkg-config)
4376 ("python-sphinx" ,python-sphinx)
4377 ("python-docutils" ,python-docutils)
4378 ("python-setuptools" ,python-setuptools)))
4379 (propagated-inputs
4380 `(("python-xcffib" ,python-xcffib))) ; used at run time
4381 (arguments
89b5c60e 4382 `(#:phases
9e099723
FB
4383 (alist-cons-after
4384 'install 'install-doc
4385 (lambda* (#:key inputs outputs #:allow-other-keys)
4386 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4387 (doc (string-append data "/doc/" ,name "-" ,version))
4388 (html (string-append doc "/html")))
89b5c60e 4389 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4390 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4391 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4392 (setenv "LANG" "en_US.UTF-8")
4393 (mkdir-p html)
4394 (for-each (lambda (file)
4395 (copy-file (string-append "." file)
4396 (string-append doc file)))
4397 '("/README.rst" "/CHANGES" "/LICENSE"))
4398 (system* "python" "setup.py" "build_sphinx")
4399 (copy-recursively "docs/_build/html" html)))
4400 %standard-phases)))
4401 (home-page "https://github.com/SimonSapin/cairocffi")
4402 (synopsis "Python bindings and object-oriented API for Cairo")
4403 (description
4404 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4405Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4406graphics library with support for multiple backends including image buffers,
4407PNG, PostScript, PDF, and SVG file output.")
3f641af0 4408 (license license:bsd-3)))
9e099723
FB
4409
4410(define-public python2-cairocffi
4411 (package-with-python2 python-cairocffi))
4412
3cff95cb
RW
4413(define-public python-decorator
4414 (package
4415 (name "python-decorator")
eb6e2e81 4416 (version "4.0.9")
3cff95cb
RW
4417 (source
4418 (origin
4419 (method url-fetch)
e21338be 4420 (uri (pypi-uri "decorator" version))
3cff95cb 4421 (sha256
eb6e2e81 4422 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4423 (build-system python-build-system)
4424 (arguments '(#:tests? #f)) ; no test target
4425 (native-inputs
4426 `(("python-setuptools" ,python-setuptools)))
eb6e2e81 4427 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4428 (synopsis "Python module to simplify usage of decorators")
4429 (description
4430 "The aim of the decorator module is to simplify the usage of decorators
4431for the average programmer, and to popularize decorators usage giving examples
4432of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4433etc. The core of this module is a decorator factory.")
4434 (license license:expat)))
4435
4436(define-public python2-decorator
4437 (package-with-python2 python-decorator))
4438
2c0499ad
RW
4439(define-public python-drmaa
4440 (package
4441 (name "python-drmaa")
4442 (version "0.7.6")
4443 (source
4444 (origin
4445 (method url-fetch)
4446 (uri (string-append
4447 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4448 version ".tar.gz"))
4449 (sha256
4450 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4451 (build-system python-build-system)
4452 ;; The test suite requires libdrmaa which is provided by the cluster
4453 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4454 ;; should be set to the path of the libdrmaa library.
4455 (arguments '(#:tests? #f))
4456 (native-inputs
4457 `(("python-nose" ,python-nose)
4458 ("python-setuptools" ,python-setuptools)))
4459 (home-page "https://pypi.python.org/pypi/drmaa")
4460 (synopsis "Python bindings for the DRMAA library")
4461 (description
4462 "A Python package for Distributed Resource Management (DRM) job
4463submission and control. This package is an implementation of the DRMAA 1.0
4464Python language binding specification.")
3f641af0 4465 (license license:bsd-3)))
2c0499ad
RW
4466
4467(define-public python2-drmaa
4468 (package-with-python2 python-drmaa))
4469
d05c6da0
RW
4470(define-public python-gridmap
4471 (package
4472 (name "python-gridmap")
4473 (version "0.13.0")
4474 (source
4475 (origin
4476 (method url-fetch)
4477 (uri (string-append
4478 "https://github.com/pygridtools/gridmap/archive/v"
4479 version ".tar.gz"))
4480 (file-name (string-append name "-" version ".tar.gz"))
4481 (sha256
4482 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4483 (build-system python-build-system)
4484 (inputs
4485 `(("python-psutil" ,python-psutil)
4486 ("python-drmaa" ,python-drmaa)
4487 ("python-pyzmq" ,python-pyzmq)))
4488 (native-inputs
4489 `(("python-setuptools" ,python-setuptools)))
4490 (home-page "https://github.com/pygridtools/gridmap")
4491 (synopsis "Create jobs on a cluster directly from Python")
4492 (description
4493 "Gridmap is a Python package to allow you to easily create jobs on the
4494cluster directly from Python. You can directly map Python functions onto the
4495cluster without needing to write any wrapper code yourself.")
3f641af0 4496 (license license:gpl3+)))
d05c6da0
RW
4497
4498(define-public python2-gridmap
4499 (package-with-python2 python-gridmap))
4500
cb6d5c54
RW
4501(define-public python-pexpect
4502 (package
4503 (name "python-pexpect")
4504 (version "3.3")
4505 (source
4506 (origin
4507 (method url-fetch)
4508 (uri (string-append "https://pypi.python.org/packages/source/p/"
4509 "pexpect/pexpect-" version ".tar.gz"))
4510 (sha256
4511 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4512 (build-system python-build-system)
4513 (arguments
4514 `(#:phases
4515 (modify-phases %standard-phases
4516 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4517 (native-inputs
4518 `(("python-nose" ,python-nose)))
4519 (home-page "http://pexpect.readthedocs.org/")
4520 (synopsis "Controlling interactive console applications")
4521 (description
4522 "Pexpect is a pure Python module for spawning child applications;
4523controlling them; and responding to expected patterns in their output.
4524Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4525child application and control it as if a human were typing commands.")
3f641af0 4526 (license license:isc)))
cb6d5c54
RW
4527
4528(define-public python2-pexpect
4529 (package-with-python2 python-pexpect))
4530
229ad120
RW
4531(define-public python-setuptools-scm
4532 (package
4533 (name "python-setuptools-scm")
42d6d0d0 4534 (version "1.11.1")
229ad120
RW
4535 (source (origin
4536 (method url-fetch)
383af6b0 4537 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4538 (sha256
4539 (base32
42d6d0d0 4540 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120 4541 (build-system python-build-system)
383af6b0 4542 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4543 (home-page "https://github.com/pypa/setuptools_scm/")
4544 (synopsis "Manage Python package versions in SCM metadata")
4545 (description
383af6b0 4546 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4547@dfn{software configuration management} (SCM) metadata instead of declaring
4548them as the version argument or in a SCM managed file.")
4549 (license license:expat)))
4550
4551(define-public python2-setuptools-scm
4552 (package-with-python2 python-setuptools-scm))
4553
b74270ee
RW
4554(define-public python-pathpy
4555 (package
4556 (name "python-pathpy")
4557 (version "8.1.1")
4558 (source
4559 (origin
4560 (method url-fetch)
4561 (uri (string-append "https://pypi.python.org/packages/source/p/"
4562 "path.py/path.py-" version ".tar.gz"))
4563 (sha256
4564 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4565 (build-system python-build-system)
4566 (propagated-inputs
4567 `(("python-appdirs" ,python-appdirs)))
4568 (native-inputs
553b709b
EF
4569 `(("python-setuptools" ,python-setuptools)
4570 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4571 ("python-pytest" ,python-pytest)
4572 ("python-pytest-runner" ,python-pytest-runner)))
4573 (home-page "http://github.com/jaraco/path.py")
4574 (synopsis "Python module wrapper for built-in os.path")
4575 (description
4576 "@code{path.py} implements path objects as first-class entities, allowing
4577common operations on files to be invoked on those path objects directly.")
4578 (license license:expat)))
4579
4580(define-public python2-pathpy
4581 (package-with-python2 python-pathpy))
4582
0d34e01b
RW
4583(define-public python-pickleshare
4584 (package
4585 (name "python-pickleshare")
4586 (version "0.5")
4587 (source
4588 (origin
4589 (method url-fetch)
4590 (uri (string-append "https://pypi.python.org/packages/source/p/"
4591 "pickleshare/pickleshare-" version ".tar.gz"))
4592 (sha256
4593 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4594 (build-system python-build-system)
4595 (propagated-inputs
4596 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4597 (native-inputs
4598 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4599 (home-page "https://github.com/vivainio/pickleshare")
4600 (synopsis "Tiny key value database with concurrency support")
4601 (description
4602 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4603Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4604shelve, many processes can access the database simultaneously. Changing a
4605value in database is immediately visible to other processes accessing the same
4606database. Concurrency is possible because the values are stored in separate
4607files. Hence the “database” is a directory where all files are governed by
4608PickleShare.")
4609 (license license:expat)))
4610
4611(define-public python2-pickleshare
4612 (package-with-python2 python-pickleshare))
4613
cd6e5189
RW
4614(define-public python-simplegeneric
4615 (package
4616 (name "python-simplegeneric")
4617 (version "0.8.1")
4618 (source
4619 (origin
4620 (method url-fetch)
4621 (uri (string-append "https://pypi.python.org/packages/source/s/"
4622 "simplegeneric/simplegeneric-" version ".zip"))
4623 (sha256
4624 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4625 (build-system python-build-system)
4626 (native-inputs
69b96e5e
RW
4627 `(("python-setuptools" ,python-setuptools)
4628 ("unzip" ,unzip)))
cd6e5189
RW
4629 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4630 (synopsis "Python module for simple generic functions")
4631 (description
4632 "The simplegeneric module lets you define simple single-dispatch generic
4633functions, akin to Python’s built-in generic functions like @code{len()},
4634@code{iter()} and so on. However, instead of using specially-named methods,
4635these generic functions use simple lookup tables, akin to those used by
4636e.g. @code{pickle.dump()} and other generic functions found in the Python
4637standard library.")
3f641af0 4638 (license license:zpl2.1)))
cd6e5189
RW
4639
4640(define-public python2-simplegeneric
4641 (package-with-python2 python-simplegeneric))
4642
ddc7d8ed
RW
4643(define-public python-ipython-genutils
4644 (package
4645 (name "python-ipython-genutils")
4646 (version "0.1.0")
4647 (source
4648 (origin
4649 (method url-fetch)
4650 (uri (string-append "https://pypi.python.org/packages/source/i/"
4651 "ipython_genutils/ipython_genutils-"
4652 version ".tar.gz"))
4653 (sha256
4654 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4655 (build-system python-build-system)
4656 (arguments `(#:tests? #f)) ; no tests
4657 (home-page "http://ipython.org")
4658 (synopsis "Vestigial utilities from IPython")
4659 (description
4660 "This package provides retired utilities from IPython.")
3f641af0 4661 (license license:bsd-3)))
ddc7d8ed
RW
4662
4663(define-public python2-ipython-genutils
4664 (package-with-python2 python-ipython-genutils))
4665
2b10eb48
RW
4666(define-public python-traitlets
4667 (package
4668 (name "python-traitlets")
a5ba1481 4669 (version "4.2.0")
2b10eb48
RW
4670 (source
4671 (origin
4672 (method url-fetch)
cc0c4fde 4673 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4674 (sha256
4675 (base32
a5ba1481 4676 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4677 (build-system python-build-system)
4678 (arguments
4679 `(#:phases
4680 (modify-phases %standard-phases
4681 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4682 (propagated-inputs
4683 `(("python-ipython-genutils" ,python-ipython-genutils)
4684 ("python-decorator" ,python-decorator)))
4685 (native-inputs
cc0c4fde
EF
4686 `(("python-mock" ,python-mock)
4687 ("python-nose" ,python-nose)))
2b10eb48
RW
4688 (home-page "http://ipython.org")
4689 (synopsis "Configuration system for Python applications")
4690 (description
4691 "Traitlets is a framework that lets Python classes have attributes with
4692type checking, dynamically calculated default values, and ‘on change’
4693callbacks. The package also includes a mechanism to use traitlets for
4694configuration, loading values from files or from command line arguments. This
4695is a distinct layer on top of traitlets, so you can use traitlets in your code
4696without using the configuration machinery.")
3f641af0 4697 (license license:bsd-3)))
2b10eb48
RW
4698
4699(define-public python2-traitlets
4700 (package-with-python2 python-traitlets))
4701
4263b06f
RW
4702(define-public python-jupyter-core
4703 (package
4704 (name "python-jupyter-core")
4705 (version "4.2.0")
4706 (source
4707 (origin
4708 (method url-fetch)
4709 (uri (string-append (pypi-uri "jupyter_core" version)))
4710 (sha256
4711 (base32
4712 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4713 (build-system python-build-system)
4714 ;; FIXME: not sure how to run the tests
4715 (arguments `(#:tests? #f))
4716 (propagated-inputs
4717 `(("python-traitlets" ,python-traitlets)))
4718 (home-page "http://jupyter.org/")
4719 (synopsis "Jupyter base package")
4720 (description
4721 "Jupyter core is the base package on which Jupyter projects rely.")
4722 (license license:bsd-3)))
4723
4724(define-public python2-jupyter-core
4725 (package-with-python2 python-jupyter-core))
4726
9ff01f2d
RW
4727(define-public python-jupyter-client
4728 (package
4729 (name "python-jupyter-client")
4730 (version "4.4.0")
4731 (source
4732 (origin
4733 (method url-fetch)
4734 (uri (pypi-uri "jupyter_client" version))
4735 (sha256
4736 (base32
4737 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4738 (build-system python-build-system)
4739 ;; Tests fail because of missing native python kernel which I assume is
4740 ;; provided by the ipython package, which we cannot use because it would
4741 ;; cause a dependency cycle.
4742 (arguments `(#:tests? #f))
4743 (propagated-inputs
4744 `(("python-pyzmq" ,python-pyzmq)
4745 ("python-traitlets" ,python-traitlets)
4746 ("python-jupyter-core" ,python-jupyter-core)))
4747 (home-page "http://jupyter.org/")
4748 (synopsis "Jupyter protocol implementation and client libraries")
4749 (description
4750 "The @code{jupyter_client} package contains the reference implementation
4751of the Jupyter protocol. It also provides client and kernel management APIs
4752for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4753installing @code{kernelspec}s for use with Jupyter frontends.")
4754 (license license:bsd-3)))
4755
4756(define-public python2-jupyter-client
4757 (package-with-python2 python-jupyter-client))
4758
ab526102
RW
4759(define-public python-ipykernel
4760 (package
4761 (name "python-ipykernel")
4762 (version "4.5.0")
4763 (source
4764 (origin
4765 (method url-fetch)
4766 (uri (pypi-uri "ipykernel" version))
4767 (sha256
4768 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4769 (build-system python-build-system)
4770 ;; The tests load a submodule of IPython. However, IPython itself depends
4771 ;; on ipykernel.
4772 (arguments `(#:tests? #f))
4773 (propagated-inputs
4774 ;; imported at runtime during connect
4775 `(("python-jupyter-client" ,python-jupyter-client)))
4776 (home-page "http://ipython.org")
4777 (synopsis "IPython Kernel for Jupyter")
4778 (description
4779 "This package provides the IPython kernel for Jupyter.")
4780 (license license:bsd-3)))
4781
4782(define-public python2-ipykernel
4783 (package-with-python2 python-ipykernel))
4784
5ff6effc
RW
4785(define-public python-testpath
4786 (package
4787 (name "python-testpath")
4788 (version "0.2")
4789 (source
4790 (origin
4791 (method url-fetch)
4792 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4793 version ".tar.gz"))
4794 (file-name (string-append name "-" version ".tar.gz"))
4795 (sha256
4796 (base32
4797 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4798 (build-system python-build-system)
4799 (arguments
4800 `(#:tests? #f ; this package does not even have a setup.py
4801 #:phases
4802 (modify-phases %standard-phases
4803 (delete 'install)
4804 (replace 'build
4805 (lambda* (#:key inputs outputs #:allow-other-keys)
4806 (let ((dir (string-append
4807 (assoc-ref outputs "out")
4808 "/lib/python"
4809 (string-take (string-take-right
4810 (assoc-ref inputs "python") 5) 3)
4811 "/site-packages/testpath")))
4812 (mkdir-p dir)
4813 (copy-recursively "testpath" dir))
4814 #t)))))
4815 (home-page "https://github.com/takluyver/testpath")
4816 (synopsis "Test utilities for code working with files and commands")
4817 (description
4818 "Testpath is a collection of utilities for Python code working with files
4819and commands. It contains functions to check things on the filesystem, and
4820tools for mocking system commands and recording calls to those.")
4821 (license license:expat)))
4822
4823(define-public python2-testpath
4824 (package-with-python2 python-testpath))
4825
ae1ab9fe
FB
4826(define-public python-ipython
4827 (package
4828 (name "python-ipython")
accd5f99 4829 (version "4.0.0")
ae1ab9fe
FB
4830 (source
4831 (origin
fceac880 4832 (method url-fetch)
accd5f99 4833 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4834 (sha256
accd5f99 4835 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
ae1ab9fe
FB
4836 (build-system python-build-system)
4837 (outputs '("out" "doc"))
3a0b1b9a
FB
4838 (propagated-inputs
4839 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4840 ("python-terminado" ,python-terminado)
ae1ab9fe 4841 ("python-matplotlib" ,python-matplotlib)
5d26e542 4842 ("python-numpy" ,python-numpy)
ae1ab9fe 4843 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4844 ("python-jinja2" ,python-jinja2)
4845 ("python-mistune" ,python-mistune)
accd5f99
RW
4846 ("python-pexpect" ,python-pexpect)
4847 ("python-pickleshare" ,python-pickleshare)
4848 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4849 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4850 ("python-traitlets" ,python-traitlets)
4851 ("python-ipykernel" ,python-ipykernel)
4852 ("python-pygments" ,python-pygments)))
4853 (inputs
4854 `(("readline" ,readline)
4855 ("which" ,which)))
ae1ab9fe
FB
4856 (native-inputs
4857 `(("pkg-config" ,pkg-config)
accd5f99
RW
4858 ("python-requests" ,python-requests) ;; for tests
4859 ("python-testpath" ,python-testpath)
4860 ("python-nose" ,python-nose)
ae1ab9fe
FB
4861 ("python-sphinx" ,python-sphinx)
4862 ("texlive" ,texlive)
4863 ("texinfo" ,texinfo)
4864 ("python-setuptools" ,python-setuptools)))
4865 (arguments
89b5c60e 4866 `(#:phases
3a0b1b9a
FB
4867 (modify-phases %standard-phases
4868 (add-after
4869 'install 'install-doc
4870 (lambda* (#:key inputs outputs #:allow-other-keys)
4871 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4872 (doc (string-append data "/doc/" ,name "-" ,version))
4873 (html (string-append doc "/html"))
4874 (man1 (string-append data "/man/man1"))
4875 (info (string-append data "/info"))
4876 (examples (string-append doc "/examples")))
afd3d931 4877 (setenv "LANG" "en_US.utf8")
3a0b1b9a 4878 (with-directory-excursion "docs"
accd5f99
RW
4879 ;; FIXME: pdf fails to build
4880 ;;(system* "make" "pdf" "PAPER=a4")
4881 (system* "make" "html")
3a0b1b9a
FB
4882 (system* "make" "info"))
4883 (copy-recursively "docs/man" man1)
4884 (copy-recursively "examples" examples)
accd5f99 4885 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4886 ;; (copy-file "docs/build/latex/ipython.pdf"
4887 ;; (string-append doc "/ipython.pdf"))
4888 (mkdir-p info)
4889 (copy-file "docs/build/texinfo/ipython.info"
4890 (string-append info "/ipython.info"))
4891 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4892 ;; Tests can only be run after the library has been installed and not
4893 ;; within the source directory.
4894 (delete 'check)
4895 (add-after
4896 'install 'check
4897 (lambda* (#:key outputs tests? #:allow-other-keys)
4898 (if tests?
4899 (with-directory-excursion "/tmp"
4900 (setenv "HOME" "/tmp/") ;; required by a test
4901 (zero? (system* (string-append (assoc-ref outputs "out")
4902 "/bin/iptest"))))
4903 #t)))
4904 (add-before
4905 'install 'fix-tests
4906 (lambda* (#:key inputs #:allow-other-keys)
4907 (substitute* "./IPython/utils/_process_posix.py"
4908 (("/usr/bin/env', 'which") (which "which")))
4909 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4910 (("#!/usr/bin/env python")
4911 (string-append "#!" (which "python"))))
4912 ;; Disable 1 failing test
4913 (substitute* "./IPython/core/tests/test_magic.py"
4914 (("def test_dirops\\(\\):" all)
4915 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4916 (home-page "http://ipython.org")
4917 (synopsis "IPython is a tool for interactive computing in Python")
4918 (description
4919 "IPython provides a rich architecture for interactive computing with:
4920Powerful interactive shells, a browser-based notebook, support for interactive
4921data visualization, embeddable interpreters and tools for parallel
4922computing.")
135ba811
EF
4923 (license license:bsd-3)
4924 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4925
4926(define-public python2-ipython
135ba811 4927 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4928 (package
4929 (inherit ipython)
4930 ;; FIXME: some tests are failing
4931 (arguments
4932 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4933 ;; FIXME: add pyreadline once available.
89b5c60e 4934 (inputs
135ba811
EF
4935 `(("python2-mock" ,python2-mock)
4936 ,@(package-inputs ipython))))))
03411993
AE
4937
4938(define-public python-isodate
4939 (package
4940 (name "python-isodate")
b6785c2e 4941 (version "0.5.4")
03411993
AE
4942 (source
4943 (origin
4944 (method url-fetch)
b6785c2e 4945 (uri (pypi-uri "isodate" version))
03411993
AE
4946 (sha256
4947 (base32
b6785c2e 4948 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993
AE
4949 (build-system python-build-system)
4950 (inputs
4951 `(("python-setuptools" ,python-setuptools)))
4952 (home-page
4953 "http://cheeseshop.python.org/pypi/isodate")
4954 (synopsis
4955 "Python date parser and formatter")
4956 (description
4957 "Python-isodate is a python module for parsing and formatting
4958ISO 8601 dates, time and duration.")
3f641af0 4959 (license license:bsd-3)))
03411993
AE
4960
4961(define-public python2-isodate
4962 (package-with-python2 python-isodate))
673ab897
AE
4963
4964(define-public python-html5lib
4965 (package
4966 (name "python-html5lib")
fee04c19 4967 (version "1.0b8")
673ab897
AE
4968 (source
4969 (origin
4970 (method url-fetch)
fee04c19 4971 (uri (pypi-uri "html5lib" version))
673ab897
AE
4972 (sha256
4973 (base32
fee04c19 4974 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4975 (build-system python-build-system)
3dd75476
AE
4976 (propagated-inputs
4977 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4978 (inputs
4979 `(("python-setuptools" ,python-setuptools)))
4980 (arguments
4981 `(#:test-target "check"))
4982 (home-page
4983 "https://github.com/html5lib/html5lib-python")
4984 (synopsis
4985 "Python HTML parser based on the WHATWG HTML specifcation")
4986 (description
4987 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4988and written in Python.")
bd3fa666 4989 (license license:expat)))
673ab897
AE
4990
4991(define-public python2-html5lib
4992 (package-with-python2 python-html5lib))
e99f4211 4993
8ee62c97
RW
4994;; Needed for python-bleach, a dependency of python-notebook
4995(define-public python-html5lib-0.9
4996 (package
4997 (inherit python-html5lib)
4998 (version "0.999")
4999 (source
5000 (origin
5001 (method url-fetch)
5002 (uri (pypi-uri "html5lib" version))
5003 (sha256
5004 (base32
5005 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5006
5007(define-public python2-html5lib-0.9
5008 (package-with-python2 python-html5lib-0.9))
5009
e99f4211
MW
5010(define-public python-urwid
5011 (package
5012 (name "python-urwid")
51ff41f6 5013 (version "1.3.1")
e99f4211
MW
5014 (source
5015 (origin
5016 (method url-fetch)
b97c1bfd 5017 (uri (pypi-uri "urwid" version))
e99f4211
MW
5018 (sha256
5019 (base32
51ff41f6 5020 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5021 (build-system python-build-system)
b97c1bfd
LF
5022 (arguments
5023 `(#:phases
5024 (modify-phases %standard-phases
5025 ;; Disable failing test. Bug filed upstream:
5026 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5027 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5028 (add-after 'unpack 'disable-failing-test
5029 (lambda _
5030 (substitute* "urwid/tests/test_event_loops.py"
5031 (("test_remove_watch_file")
5032 "disable_remove_watch_file")))))))
e99f4211
MW
5033 (native-inputs `(("python-setuptools" ,python-setuptools)))
5034 (home-page "http://urwid.org")
5035 (synopsis "Console user interface library for Python")
5036 (description
5037 "Urwid is a curses-based UI/widget library for Python. It includes many
5038features useful for text console applications.")
3f641af0 5039 (license license:lgpl2.1+)))
e99f4211
MW
5040
5041(define-public python2-urwid
5042 (package-with-python2 python-urwid))
d95a56c6 5043
47d0b292
TS
5044(define-public python-urwidtrees
5045 (package
5046 (name "python-urwidtrees")
37ec4623 5047 (version "1.0.2")
47d0b292
TS
5048 (source
5049 (origin
5050 (method url-fetch)
37ec4623
TS
5051 ;; package author intends on distributing via github rather than pypi:
5052 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5053 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5054 version ".tar.gz"))
5055 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5056 (sha256
5057 (base32
37ec4623 5058 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5059 (build-system python-build-system)
5060 (arguments
5061 '(#:tests? #f)) ; no tests
5062 (inputs `(("python-urwid" ,python-urwid)))
5063 (home-page "https://github.com/pazz/urwidtrees")
5064 (synopsis "Tree widgets for urwid")
5065 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5066toolkit. Use it to build trees of widgets.")
3f641af0 5067 (license license:gpl3+)))
47d0b292
TS
5068
5069(define-public python2-urwidtrees
5070 (package-with-python2 python-urwidtrees))
5071
d95a56c6
PAR
5072(define-public python-dbus
5073 (package
5074 (name "python-dbus")
5075 (version "1.2.0")
5076 (source
5077 (origin
5078 (method url-fetch)
5079 (uri (string-append
5cc3096c 5080 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5081 version ".tar.gz"))
5082 (sha256
5083 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5084 (build-system gnu-build-system)
6717c879
SB
5085 (arguments
5086 '(#:phases
5087 (modify-phases %standard-phases
5088 (add-before
5089 'check 'pre-check
5090 (lambda _
5091 ;; XXX: For the missing '/etc/machine-id'.
5092 (substitute* "test/run-test.sh"
5093 (("DBUS_FATAL_WARNINGS=1")
5094 "DBUS_FATAL_WARNINGS=0"))
5095 #t)))))
d95a56c6
PAR
5096 (native-inputs
5097 `(("pkg-config" ,pkg-config)))
5098 (inputs
5099 `(("python" ,python)
2e88d113 5100 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5101 (synopsis "Python bindings for D-bus")
5102 (description "python-dbus provides bindings for libdbus, the reference
5103implementation of D-Bus.")
5104 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5105 (license license:expat)))
b52af02b
MW
5106
5107(define-public python2-dbus
5108 (package (inherit python-dbus)
5109 (name "python2-dbus")
5110 (inputs `(("python" ,python-2)
5111 ,@(alist-delete "python"
5112 (package-inputs python-dbus)
5113 equal?)))
5114 ;; FIXME: on Python 2, the test_utf8 fails with:
5115 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5116 (arguments `(#:tests? #f))))
a6ac8332
AE
5117
5118(define-public python-apsw
5119 (package
5120 (name "python-apsw")
917708c2 5121 (version "3.9.2-r1")
a6ac8332
AE
5122 (source
5123 (origin
5124 (method url-fetch)
917708c2 5125 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5126 (sha256
5127 (base32
917708c2 5128 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5129 (build-system python-build-system)
5130 (inputs
5131 `(("python-setuptools" ,python-setuptools)
5132 ("sqlite" ,sqlite)))
5133 (arguments
5134 `(#:phases
5135 ;; swap check and install phases
5136 (alist-cons-after
5137 'install 'check
5138 (assoc-ref %standard-phases 'check)
5139 (alist-delete
5140 'check
5141 %standard-phases))))
5142 (home-page "https://github.com/rogerbinns/apsw/")
5143 (synopsis "Another Python SQLite Wrapper")
5144 (description "APSW is a Python wrapper for the SQLite
5145embedded relational database engine. In contrast to other wrappers such as
5146pysqlite it focuses on being a minimal layer over SQLite attempting just to
5147translate the complete SQLite API into Python.")
abde5f37 5148 (license license:zlib)))
a6ac8332
AE
5149
5150(define-public python2-apsw
5151 (package-with-python2 python-apsw))
26b307e2
AE
5152
5153(define-public python-lxml
5154 (package
5155 (name "python-lxml")
d58a3203 5156 (version "3.6.0")
26b307e2
AE
5157 (source
5158 (origin
5159 (method url-fetch)
97bbc480 5160 (uri (pypi-uri "lxml" version))
26b307e2 5161 (sha256
d58a3203
EF
5162 (base32
5163 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5164 (build-system python-build-system)
5165 (inputs
5166 `(("libxml2" ,libxml2)
5167 ("libxslt" ,libxslt)
5168 ("python-setuptools" ,python-setuptools)))
5169 (home-page "http://lxml.de/")
5170 (synopsis
5171 "Python XML processing library")
5172 (description
5173 "The lxml XML toolkit is a Pythonic binding for the C libraries
5174libxml2 and libxslt.")
3f641af0 5175 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5176
5177(define-public python2-lxml
5178 (package-with-python2 python-lxml))
4ed20663 5179
b32a1e47
CAW
5180;; beautifulsoup4 has a totally different namespace than 3.x,
5181;; and pypi seems to put it under its own name, so I guess we should too
5182(define-public python-beautifulsoup4
5183 (package
5184 (name "python-beautifulsoup4")
67fd4a12 5185 (version "4.5.1")
b32a1e47
CAW
5186 (source
5187 (origin
5188 (method url-fetch)
5189 (uri (pypi-uri "beautifulsoup4" version))
5190 (sha256
5191 (base32
67fd4a12 5192 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5193 (build-system python-build-system)
5f37f0b6
LF
5194 (arguments
5195 `(#:phases
5196 (modify-phases %standard-phases
5197 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5198 ;; must use this conversion script when building with Python 3. The
5199 ;; conversion script also runs the tests.
5200 ;; For more information, see the file 'convert-py3k' in the source
5201 ;; distribution.
5202 (replace 'check
5203 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5204 (home-page
5205 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5206 (synopsis
5207 "Python screen-scraping library")
5208 (description
5209 "Beautiful Soup is a Python library designed for rapidly setting up
5210screen-scraping projects. It offers Pythonic idioms for navigating,
5211searching, and modifying a parse tree, providing a toolkit for
5212dissecting a document and extracting what you need. It automatically
5213converts incoming documents to Unicode and outgoing documents to UTF-8.")
5214 (license license:expat)
5215 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5216
5217(define-public python2-beautifulsoup4
5218 (package
5219 (inherit (package-with-python2
5220 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6
LF
5221 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
5222 (arguments `(#:python ,python-2))))
b32a1e47 5223
092e86f5
AE
5224(define-public python2-cssutils
5225 (package
5226 (name "python2-cssutils")
58d1d816 5227 (version "1.0.1")
092e86f5
AE
5228 (source
5229 (origin
5230 (method url-fetch)
58d1d816 5231 (uri (pypi-uri "cssutils" version))
092e86f5 5232 (sha256
58d1d816
EF
5233 (base32
5234 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5235 (build-system python-build-system)
5236 (native-inputs
5237 `(("python2-mock" ,python2-mock) ; for the tests
5238 ("unzip" ,unzip))) ; for unpacking the source
5239 (inputs
5240 `(("python2-setuptools" ,python2-setuptools)))
5241 (arguments
5242 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5243 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5244 ))
092e86f5
AE
5245 (home-page "http://cthedot.de/cssutils/")
5246 (synopsis
5247 "CSS Cascading Style Sheets library for Python")
5248 (description
5249 "Cssutils is a Python package for parsing and building CSS
5250Cascading Style Sheets. Currently it provides a DOM only and no rendering
5251options.")
3f641af0 5252 (license license:lgpl3+)))
880ff77c
AE
5253
5254(define-public python-cssselect
5255 (package
5256 (name "python-cssselect")
d5ccd9ab 5257 (version "0.9.2")
880ff77c
AE
5258 (source
5259 (origin
5260 (method url-fetch)
d5ccd9ab 5261 (uri (pypi-uri "cssselect" version))
880ff77c 5262 (sha256
d5ccd9ab
EF
5263 (base32
5264 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c
AE
5265 (build-system python-build-system)
5266 (inputs
5267 `(("python-setuptools" ,python-setuptools)))
5268 (arguments
5269 ;; tests fail with message
5270 ;; AttributeError: 'module' object has no attribute 'tests'
5271 `(#:tests? #f))
5272 (home-page
5273 "https://pythonhosted.org/cssselect/")
5274 (synopsis
5275 "CSS3 selector parser and translator to XPath 1.0")
5276 (description
5277 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5278them to XPath 1.0 expressions. Such expressions can be used in lxml or
5279another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5280 (license license:bsd-3)))
880ff77c
AE
5281
5282(define-public python2-cssselect
5283 (package-with-python2 python-cssselect))
60357f99
AE
5284
5285(define-public python-netifaces
5286 (package
5287 (name "python-netifaces")
5288 (version "0.10.4")
5289 (source
5290 (origin
5291 (method url-fetch)
5292 (uri (string-append
5293 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5294 version
5295 ".tar.gz"))
5296 (sha256
5297 (base32
5298 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5299 (build-system python-build-system)
5300 (inputs
5301 `(("python-setuptools" ,python-setuptools)))
5302 (home-page
5303 "https://bitbucket.org/al45tair/netifaces")
5304 (synopsis
5305 "Python module for portable network interface information")
5306 (description
5307 "Netifaces is a Python module providing information on network
5308interfaces in an easy and portable manner.")
5309 (license license:expat)))
5310
5311(define-public python2-netifaces
5312 (package-with-python2 python-netifaces))
92cb152b 5313
32f77c04
RW
5314(define-public python-networkx
5315 (package
5316 (name "python-networkx")
a4d9609c 5317 (version "1.11")
32f77c04
RW
5318 (source
5319 (origin
5320 (method url-fetch)
a4d9609c 5321 (uri (pypi-uri "networkx" version))
32f77c04 5322 (sha256
a4d9609c 5323 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5324 (build-system python-build-system)
5325 ;; python-decorator is needed at runtime
5326 (propagated-inputs
5327 `(("python-decorator" ,python-decorator)))
5328 (native-inputs
5329 `(("python-setuptools" ,python-setuptools)
5330 ("python-nose" ,python-nose)))
5331 (home-page "http://networkx.github.io/")
5332 (synopsis "Python module for creating and manipulating graphs and networks")
5333 (description
5334 "NetworkX is a Python package for the creation, manipulation, and study
5335of the structure, dynamics, and functions of complex networks.")
3f641af0 5336 (license license:bsd-3)))
32f77c04
RW
5337
5338(define-public python2-networkx
5339 (package-with-python2 python-networkx))
5340
92cb152b
RW
5341(define-public snakemake
5342 (package
5343 (name "snakemake")
5344 (version "3.2.1")
5345 (source
5346 (origin
5347 (method url-fetch)
5348 (uri (string-append
5349 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5350 version ".tar.gz"))
5351 (sha256
5352 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5353 (build-system python-build-system)
5354 (inputs `(("python-setuptools" ,python-setuptools)))
5355 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5356 (synopsis "Python-based execution environment for make-like workflows")
5357 (description
5358 "Snakemake aims to reduce the complexity of creating workflows by
5359providing a clean and modern domain specific specification language (DSL) in
5360Python style, together with a fast and comfortable execution environment.")
5361 (license license:expat)))
a1920bc9 5362
35de1fbd
RW
5363(define-public python-seaborn
5364 (package
5365 (name "python-seaborn")
fc899d4f 5366 (version "0.7.0")
35de1fbd
RW
5367 (source
5368 (origin
5369 (method url-fetch)
fc899d4f 5370 (uri (pypi-uri "seaborn" version))
35de1fbd 5371 (sha256
fc899d4f 5372 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5373 (build-system python-build-system)
5374 (propagated-inputs
5375 `(("python-pandas" ,python-pandas)
5376 ("python-matplotlib" ,python-matplotlib)
5377 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5378 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5379 (synopsis "Statistical data visualization")
5380 (description
5381 "Seaborn is a library for making attractive and informative statistical
5382graphics in Python. It is built on top of matplotlib and tightly integrated
5383with the PyData stack, including support for numpy and pandas data structures
5384and statistical routines from scipy and statsmodels.")
3f641af0 5385 (license license:bsd-3)
fc899d4f 5386 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5387
5388(define-public python2-seaborn
fc899d4f
EF
5389 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5390 (package
5391 (inherit base)
5392 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5393 ,@(package-propagated-inputs base)))
5394 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5395 ,@(package-native-inputs base))))))
35de1fbd 5396
90fc547f
RW
5397(define-public python-sympy
5398 (package
5399 (name "python-sympy")
5400 (version "0.7.6")
5401 (source
5402 (origin
5403 (method url-fetch)
5404 (uri (string-append
5405 "https://github.com/sympy/sympy/releases/download/sympy-"
5406 version "/sympy-" version ".tar.gz"))
5407 (sha256
5408 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5409 (build-system python-build-system)
5410 (native-inputs
5411 `(("python-setuptools" ,python-setuptools)))
5412 (home-page "http://www.sympy.org/")
5413 (synopsis "Python library for symbolic mathematics")
5414 (description
5415 "SymPy is a Python library for symbolic mathematics. It aims to become a
5416full-featured computer algebra system (CAS) while keeping the code as simple
5417as possible in order to be comprehensible and easily extensible.")
3f641af0 5418 (license license:bsd-3)))
90fc547f
RW
5419
5420(define-public python2-sympy
5421 (package-with-python2 python-sympy))
5422
e8c9b010
SR
5423(define-public python-q
5424 (package
5425 (name "python-q")
5426 (version "2.6")
5427 (source
5428 (origin
5429 (method url-fetch)
5430 (uri (pypi-uri "q" version))
5431 (sha256
5432 (base32
5433 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5434 (build-system python-build-system)
5435 (home-page "https://github.com/zestyping/q")
5436 (synopsis "Quick-and-dirty debugging output for tired programmers")
5437 (description
5438 "q is a Python module for \"print\" style of debugging Python code. It
5439provides convenient short API for print out of values, tracebacks, and
5440falling into the Python interpreter.")
5441 (license license:asl2.0)
5442 (properties `((python2-variant . ,(delay python2-q))))))
5443
5444(define-public python2-q
5445 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5446 (package
5447 (inherit base)
5448 (native-inputs
5449 `(("python2-setuptools" ,python2-setuptools)
5450 ,@(package-native-inputs base))))))
5451
a1920bc9
FB
5452(define-public python-testlib
5453 (package
5454 (name "python-testlib")
5455 (version "0.6.5")
5456 (source
5457 (origin
5458 (method url-fetch)
5459 (uri (string-append
5460 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5461 version ".zip"))
5462 (sha256
5463 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5464 (build-system python-build-system)
5465 (inputs
5466 `(("python-setuptools" ,python-setuptools)))
5467 (native-inputs
5468 `(("unzip" ,unzip)))
5469 (arguments
5470 `(#:phases
5471 (alist-replace
5472 'unpack
5473 (lambda* (#:key inputs outputs #:allow-other-keys)
5474 (let ((unzip (string-append (assoc-ref inputs "unzip")
5475 "/bin/unzip"))
5476 (source (assoc-ref inputs "source")))
5477 (and (zero? (system* unzip source))
5478 (chdir (string-append "testlib-" ,version)))))
5479 %standard-phases)))
5480 (synopsis "Python micro test suite harness")
5481 (description "A micro unittest suite harness for Python.")
5482 (home-page "https://github.com/trentm/testlib")
1cb9c006 5483 (license license:expat)))
a1920bc9
FB
5484
5485(define-public python2-testlib
5486 (package-with-python2 python-testlib))
db62afa5
LC
5487
5488(define-public python2-xlib
5489 (package
5490 (name "python2-xlib")
5491 (version "0.14")
5492 (source (origin
5493 (method url-fetch)
de67e922
LF
5494 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5495 "/" version "/"
db62afa5
LC
5496 "python-xlib-" version ".tar.gz"))
5497 (sha256
5498 (base32
5499 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5500 (build-system python-build-system)
5501 (arguments
5502 `(#:python ,python-2 ;Python 2 only
5503 #:tests? #f)) ;no tests
5504 (inputs
5505 `(("python-setuptools" ,python-setuptools)))
5506 (home-page "http://python-xlib.sourceforge.net/")
5507 (synopsis "Python X11 client library")
5508 (description
5509 "The Python X Library is intended to be a fully functional X client
5510library for Python programs. It is useful to implement low-level X clients.
5511It is written entirely in Python.")
3f641af0 5512 (license license:gpl2+)))
0234ca06
DT
5513
5514(define-public python-singledispatch
5515 (package
5516 (name "python-singledispatch")
5517 (version "3.4.0.3")
5518 (source
5519 (origin
5520 (method url-fetch)
bdb67d84 5521 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5522 (sha256
5523 (base32
5524 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5525 (build-system python-build-system)
5526 (native-inputs
5527 `(("python-setuptools" ,python-setuptools)))
bdb67d84 5528 (inputs
0234ca06
DT
5529 `(("python-six" ,python-six)))
5530 (home-page
5531 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5532 (synopsis "Backport of singledispatch feature from Python 3.4")
5533 (description
5534 "This library brings functools.singledispatch from Python 3.4 to Python
55352.6-3.3.")
5536 (license license:expat)))
5537
5538(define-public python2-singledispatch
5539 (package-with-python2 python-singledispatch))
feaae484 5540
310d218f
RW
5541(define-public python-tornado
5542 (package
5543 (name "python-tornado")
a724924b 5544 (version "4.3")
310d218f
RW
5545 (source
5546 (origin
5547 (method url-fetch)
a724924b 5548 (uri (pypi-uri "tornado" version))
310d218f 5549 (sha256
a724924b 5550 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5551 (build-system python-build-system)
310d218f 5552 (native-inputs
b455439b
EF
5553 `(("python-certifi" ,python-certifi)))
5554 (inputs
5555 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5556 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5557 (synopsis "Python web framework and asynchronous networking library")
5558 (description
5559 "Tornado is a Python web framework and asynchronous networking library,
5560originally developed at FriendFeed. By using non-blocking network I/O,
5561Tornado can scale to tens of thousands of open connections, making it ideal
5562for long polling, WebSockets, and other applications that require a long-lived
5563connection to each user.")
3f641af0 5564 (license license:asl2.0)
b455439b 5565 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5566
5567(define-public python2-tornado
b455439b 5568 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f
RW
5569 (package (inherit tornado)
5570 (inputs
5571 `(("python2-backport-ssl-match-hostname"
5572 ,python2-backport-ssl-match-hostname)
b455439b
EF
5573 ("python2-singledispatch" ,python2-singledispatch)
5574 ,@(package-inputs tornado)))
5575 (native-inputs
5576 `(("python2-setuptools" ,python2-setuptools)
5577 ,@(package-native-inputs tornado))))))
310d218f 5578
6b59fc10
EF
5579;; the python- version can be removed with python-3.5
5580(define-public python-backports-abc
5581 (package
5582 (name "python-backports-abc")
5583 (version "0.4")
5584 (source
5585 (origin
5586 (method url-fetch)
5587 (uri (pypi-uri "backports_abc" version))
5588 (sha256
5589 (base32
5590 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5591 (build-system python-build-system)
5592 (inputs
5593 `(("python-setuptools" ,python-setuptools)))
5594 (home-page "https://github.com/cython/backports_abc")
66e07664 5595 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5596 (description
5597 "Python-backports-abc provides a backport of additions to the
5598'collections.abc' module in Python-3.5.")
3f641af0 5599 (license license:psfl)))
6b59fc10
EF
5600
5601(define-public python2-backports-abc
5602 (package-with-python2 python-backports-abc))
5603
feaae484
SB
5604(define-public python-waf
5605 (package
5606 (name "python-waf")
7dd55dfe 5607 (version "1.9.5")
feaae484
SB
5608 (source (origin
5609 (method url-fetch)
bae67829 5610 (uri (string-append "https://waf.io/"
feaae484
SB
5611 "waf-" version ".tar.bz2"))
5612 (sha256
5613 (base32
7dd55dfe 5614 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5615 (build-system python-build-system)
5616 (arguments
5617 '(#:phases
5618 (modify-phases %standard-phases
5619 (replace 'build
7dd55dfe
EF
5620 (lambda _
5621 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5622 (replace 'check
7dd55dfe
EF
5623 (lambda _
5624 (zero? (system* "python" "waf" "--version"))))
feaae484 5625 (replace 'install
7dd55dfe
EF
5626 (lambda _
5627 (copy-file "waf" %output))))))
5628 (home-page "http://waf.io/")
feaae484
SB
5629 (synopsis "Python-based build system")
5630 (description
5631 "Waf is a Python-based framework for configuring, compiling and installing
5632applications.")
3f641af0 5633 (license license:bsd-3)))
feaae484
SB
5634
5635(define-public python2-waf
5636 (package-with-python2 python-waf))
45203542
RW
5637
5638(define-public python-pyzmq
5639 (package
5640 (name "python-pyzmq")
3655ee76 5641 (version "15.1.0")
45203542
RW
5642 (source
5643 (origin
5644 (method url-fetch)
3655ee76 5645 (uri (pypi-uri "pyzmq" version))
45203542 5646 (sha256
3655ee76 5647 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5648 (build-system python-build-system)
5649 (arguments
5650 `(#:configure-flags
5651 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5652 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5653 ;; --inplace' for 'python setup.py test' to work.
5654 #:tests? #f))
5655 (inputs
5656 `(("zeromq" ,zeromq)))
5657 (native-inputs
5658 `(("pkg-config" ,pkg-config)
5659 ("python-nose" ,python-nose)
5660 ("python-setuptools" ,python-setuptools)))
5661 (home-page "http://github.com/zeromq/pyzmq")
5662 (synopsis "Python bindings for 0MQ")
5663 (description
5664 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5665 (license license:bsd-4)))
45203542
RW
5666
5667(define-public python2-pyzmq
5668 (package-with-python2 python-pyzmq))
d889e6c4
CR
5669
5670(define-public python-pep8
5671 (package
5672 (name "python-pep8")
db251311 5673 (version "1.7.0")
d889e6c4
CR
5674 (source
5675 (origin
5676 (method url-fetch)
db251311 5677 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5678 (sha256
5679 (base32
db251311 5680 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4
CR
5681 (build-system python-build-system)
5682 (inputs
5683 `(("python-setuptools" ,python-setuptools)))
5684 (home-page "http://pep8.readthedocs.org/")
5685 (synopsis "Python style guide checker")
5686 (description
5687 "This tools checks Python code against some of the style conventions in
5688PEP 8.")
5689 (license license:expat)))
5690
5691(define-public python2-pep8
5692 (package-with-python2 python-pep8))
e31d7f44
CR
5693
5694(define-public python-pyflakes
5695 (package
5696 (name "python-pyflakes")
2abc3972 5697 (version "1.0.0")
e31d7f44
CR
5698 (source
5699 (origin
5700 (method url-fetch)
2abc3972 5701 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5702 (sha256
5703 (base32
2abc3972 5704 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5705 (build-system python-build-system)
5706 (inputs
5707 `(("python-setuptools" ,python-setuptools)))
5708 (home-page
5709 "https://github.com/pyflakes/pyflakes")
5710 (synopsis "Passive checker of Python programs")
5711 (description
5712 "Pyflakes statically checks Python source code for common errors.")
5713 (license license:expat)))
a59e017c 5714
7261d9eb
CR
5715(define-public python2-pyflakes
5716 (package-with-python2 python-pyflakes))
5717
a59e017c
CR
5718(define-public python-mccabe
5719 (package
5720 (name "python-mccabe")
c6ebd40d 5721 (version "0.4.0")
a59e017c
CR
5722 (source
5723 (origin
5724 (method url-fetch)
c6ebd40d 5725 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5726 (sha256
5727 (base32
c6ebd40d 5728 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c
CR
5729 (build-system python-build-system)
5730 (inputs
c6ebd40d
EF
5731 `(("python-pytest" ,python-pytest)
5732 ("python-pytest-runner" ,python-pytest-runner)
5733 ("python-setuptools" ,python-setuptools)))
a59e017c
CR
5734 (home-page "https://github.com/flintwork/mccabe")
5735 (synopsis "McCabe checker, plugin for flake8")
5736 (description
5737 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5738complexity of Python source code.")
7362371d 5739 (license license:expat)))
a59e017c
CR
5740
5741(define-public python2-mccabe
5742 (package-with-python2 python-mccabe))
e8df8f47 5743
7477fbb1
CR
5744(define-public python-mccabe-0.2.1
5745 (package (inherit python-mccabe)
5746 (version "0.2.1")
5747 (source
5748 (origin
5749 (method url-fetch)
5750 (uri (pypi-uri "mccabe" version))
5751 (sha256
5752 (base32
c6ebd40d 5753 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
b3546174 5754 (inputs `(("python-setuptools" ,python-setuptools)))))
7477fbb1
CR
5755
5756(define-public python2-mccabe-0.2.1
5757 (package-with-python2 python-mccabe-0.2.1))
5758
e8df8f47
CR
5759;; Flake8 2.4.1 requires an older version of pep8.
5760;; This should be removed ASAP.
5761(define-public python-pep8-1.5.7
5762 (package (inherit python-pep8)
5763 (version "1.5.7")
5764 (source
5765 (origin
5766 (method url-fetch)
5767 (uri (string-append
5768 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5769 version
5770 ".tar.gz"))
5771 (sha256
5772 (base32
5773 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5774
5775(define-public python2-pep8-1.5.7
5776 (package-with-python2 python-pep8-1.5.7))
5777
5778;; Flake8 2.4.1 requires an older version of pyflakes.
5779;; This should be removed ASAP.
5780(define-public python-pyflakes-0.8.1
5781 (package (inherit python-pyflakes)
5782 (version "0.8.1")
5783 (source
5784 (origin
5785 (method url-fetch)
5786 (uri (string-append
5787 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5788 version
5789 ".tar.gz"))
5790 (sha256
5791 (base32
5792 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5793
5794(define-public python2-pyflakes-0.8.1
7261d9eb 5795 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5796
5797(define-public python-flake8
5798 (package
5799 (name "python-flake8")
43789136 5800 (version "2.5.4")
e8df8f47
CR
5801 (source
5802 (origin
5803 (method url-fetch)
1b995533 5804 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5805 (sha256
5806 (base32
43789136 5807 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47
CR
5808 (build-system python-build-system)
5809 (inputs
5810 `(("python-setuptools" ,python-setuptools)
43789136
EF
5811 ("python-pep8" ,python-pep8)
5812 ("python-pyflakes" ,python-pyflakes)
e8df8f47
CR
5813 ("python-mccabe" ,python-mccabe)
5814 ("python-mock" ,python-mock)
5815 ("python-nose" ,python-nose)))
5816 (home-page "https://gitlab.com/pycqa/flake8")
5817 (synopsis
5818 "The modular source code checker: pep8, pyflakes and co")
5819 (description
5820 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5821 (license license:expat)))
5822
5823(define-public python2-flake8
5824 (package-with-python2 python-flake8))
61b9ac53 5825
abf21efc
CR
5826;; This will only be needed by the python-hacking package and will not be
5827;; necessary once python-hacking > 0.10.2 is released.
5828(define-public python-flake8-2.2.4
5829 (package (inherit python-flake8)
5830 (inputs
5831 `(("python-setuptools" ,python-setuptools)
5832 ("python-pep8" ,python-pep8-1.5.7)
5833 ("python-pyflakes" ,python-pyflakes-0.8.1)
5834 ("python-mccabe" ,python-mccabe-0.2.1)
5835 ("python-mock" ,python-mock)
5836 ("python-nose" ,python-nose)))
5837 (version "2.2.4")
5838 (source
5839 (origin
5840 (method url-fetch)
5841 (uri (pypi-uri "flake8" version))
5842 (sha256
5843 (base32
5844 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5845
5846(define-public python2-flake8-2.2.4
5847 (package-with-python2 python-flake8-2.2.4))
5848
61b9ac53
FB
5849(define-public python-mistune
5850 (package
5851 (name "python-mistune")
5852 (version "0.7")
5853 (source
5854 (origin
5855 (method url-fetch)
5856 (uri (string-append
5857 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5858 version
5859 ".tar.gz"))
5860 (sha256
5861 (base32
5862 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5863 (build-system python-build-system)
5864 (inputs
5865 `(("python-setuptools" ,python-setuptools)
5866 ("python-nose" ,python-nose)
5867 ("python-cython" ,python-cython)))
5868 (home-page "https://github.com/lepture/mistune")
5869 (synopsis "Markdown parser in pure Python")
5870 (description "This package provides a fast markdown parser in pure
5871Python.")
3f641af0 5872 (license license:bsd-3)))
61b9ac53
FB
5873
5874(define-public python2-mistune
5875 (package-with-python2 python-mistune))
6d992d07 5876
b9893908
EE
5877(define-public python-markdown
5878 (package
5879 (name "python-markdown")
5880 (version "2.6.5")
5881 (source
5882 (origin
5883 (method url-fetch)
5884 (uri (pypi-uri "Markdown" version))
5885 (sha256
5886 (base32
5887 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5888 (build-system python-build-system)
5889 (arguments
5890 `(#:phases
5891 (modify-phases %standard-phases
5892 (replace 'check
5893 (lambda _
5894 (zero? (system* "python" "run-tests.py")))))))
5895 (native-inputs
5896 `(("python-nose" ,python-nose)
5897 ("python-pyyaml" ,python-pyyaml)))
5898 (home-page "https://pythonhosted.org/Markdown/")
5899 (synopsis "Python implementation of Markdown")
5900 (description
5901 "This package provides a Python implementation of John Gruber's
5902Markdown. The library features international input, various Markdown
5903extensions, and several HTML output formats. A command line wrapper
5904markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5905 (license license:bsd-3)))
b9893908
EE
5906
5907(define-public python2-markdown
5908 (package-with-python2 python-markdown))
5909
6d992d07
FB
5910(define-public python-ptyprocess
5911 (package
5912 (name "python-ptyprocess")
5913 (version "0.5")
5914 (source
5915 (origin
5916 (method url-fetch)
5917 (uri (string-append
5918 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5919 version ".tar.gz"))
5920 (sha256
5921 (base32
5922 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5923 (build-system python-build-system)
5924 (inputs
5925 `(("python-setuptools" ,python-setuptools)
5926 ("python-nose" ,python-nose)))
5927 (arguments
5928 `(#:phases
5929 (modify-phases %standard-phases
5930 (replace 'check
5931 (lambda _
5932 (zero? (system* "nosetests")))))))
5933 (home-page "https://github.com/pexpect/ptyprocess")
5934 (synopsis "Run a subprocess in a pseudo terminal")
5935 (description
5936 "This package provides a Python library used to launch a subprocess in a
5937pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5938 (license license:isc)))
6d992d07
FB
5939
5940(define-public python2-ptyprocess
5941 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5942
5943(define-public python-terminado
5944 (package
5945 (name "python-terminado")
783fb0a3 5946 (version "0.6")
4aadb1df
FB
5947 (source
5948 (origin
5949 (method url-fetch)
783fb0a3 5950 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5951 (sha256
5952 (base32
783fb0a3 5953 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5954 (build-system python-build-system)
5955 (propagated-inputs
5956 `(("python-tornado" ,python-tornado)
5957 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5958 (native-inputs
5959 `(("python-nose" ,python-nose)))
4aadb1df
FB
5960 (arguments
5961 `(#:phases
5962 (modify-phases %standard-phases
5963 (replace 'check
5964 (lambda _
5965 (zero? (system* "nosetests")))))))
5966 (home-page "https://github.com/takluyver/terminado")
5967 (synopsis "Terminals served to term.js using Tornado websockets")
5968 (description "This package provides a Tornado websocket backend for the
5969term.js Javascript terminal emulator library.")
3f641af0 5970 (license license:bsd-2)
783fb0a3 5971 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5972
5973(define-public python2-terminado
783fb0a3 5974 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5975 (package (inherit terminado)
783fb0a3
EF
5976 (propagated-inputs
5977 `(("python2-backport-ssl-match-hostname"
5978 ,python2-backport-ssl-match-hostname)
5979 ,@(package-propagated-inputs terminado)))
5980 (native-inputs
5981 `(("python2-setuptools" ,python2-setuptools)
5982 ,@(package-native-inputs terminado))))))
5faa5ce4 5983
d582eaac
SB
5984(define-public python-fonttools
5985 (package
5986 (name "python-fonttools")
5987 (version "2.5")
5988 (source (origin
5989 (method url-fetch)
5990 (uri (string-append
5991 "https://pypi.python.org/packages/source/F/FontTools/"
5992 "fonttools-" version ".tar.gz"))
5993 (sha256
5994 (base32
5995 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5996 (build-system python-build-system)
5997 (arguments '(#:test-target "check"))
5998 (propagated-inputs
5999 ;; XXX: module not found if setuptools is not available.
6000 `(("python-setuptools" ,python-setuptools)))
6001 (home-page "http://github.com/behdad/fonttools")
6002 (synopsis "Tools to manipulate font files")
6003 (description
6004 "FontTools/TTX is a library to manipulate font files from Python. It
6005supports reading and writinfg of TrueType/OpenType fonts, reading and writing
6006of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6007also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6008from an XML-based format.")
3f641af0
DC
6009 (license (license:non-copyleft
6010 "file://LICENSE.txt"
6011 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6012
6013(define-public python2-fonttools
6014 (package-with-python2 python-fonttools))
75710da6 6015
5faa5ce4
RW
6016(define-public python-ly
6017 (package
6018 (name "python-ly")
5135354f 6019 (version "0.9.4")
5faa5ce4
RW
6020 (source
6021 (origin
6022 (method url-fetch)
5135354f
RW
6023 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6024 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6025 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6026 (sha256
6027 (base32
5135354f 6028 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4
RW
6029 (build-system python-build-system)
6030 (native-inputs
6031 `(("python-setuptools" ,python-setuptools)))
6032 (synopsis "Tool and library for manipulating LilyPond files")
6033 (description "This package provides a Python library to parse, manipulate
6034or create documents in LilyPond format. A command line program ly is also
6035provided that can be used to do various manipulations with LilyPond files.")
6036 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6037 (license license:gpl2+)))
7e7b27d9
CR
6038
6039(define-public python-appdirs
6040 (package
6041 (name "python-appdirs")
6042 (version "1.4.0")
6043 (source
6044 (origin
6045 (method url-fetch)
6046 (uri (string-append
6047 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6048 version
6049 ".tar.gz"))
6050 (sha256
6051 (base32
6052 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6053 (build-system python-build-system)
6054 (inputs
6055 `(("python-setuptools" ,python-setuptools)))
6056 (home-page "http://github.com/ActiveState/appdirs")
6057 (synopsis
6058 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6059 (description
6060 "This module provides a portable way of finding out where user data
6061should be stored on various operating systems.")
6062 (license license:expat)))
6063
6064(define-public python2-appdirs
6065 (package-with-python2 python-appdirs))
89b2e0b0
LF
6066
6067(define-public python-llfuse
6068 (package
6069 (name "python-llfuse")
e36ace36 6070 (version "1.1.1")
89b2e0b0
LF
6071 (source (origin
6072 (method url-fetch)
6073 (uri (string-append
6074 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6075 "llfuse-" version ".tar.bz2"))
6076 (sha256
6077 (base32
e36ace36 6078 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6079 (build-system python-build-system)
6080 (inputs
6081 `(("fuse" ,fuse)
6082 ("attr" ,attr)))
6083 (native-inputs
6084 `(("pkg-config" ,pkg-config)
6085 ("python-setuptools" ,python-setuptools)))
6086 (synopsis "Python bindings for FUSE")
6087 (description
6088 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6089 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6090 (license license:lgpl2.0+)
cd0569c4 6091 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6092
6093(define-public python2-llfuse
cd0569c4
LF
6094 (package (inherit (package-with-python2
6095 (strip-python2-variant python-llfuse)))
6096 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6097
6098;; For attic-0.16
6099(define-public python-llfuse-0.41
6100 (package (inherit python-llfuse)
229b3661 6101 (version "0.41.1")
cd0569c4
LF
6102 (source (origin
6103 (method url-fetch)
6104 (uri (string-append
6105 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6106 "llfuse-" version ".tar.bz2"))
6107 (sha256
6108 (base32
229b3661 6109 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6110 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6111 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6112 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6113
6114(define-public python-msgpack
6115 (package
6116 (name "python-msgpack")
aed625bd 6117 (version "0.4.8")
641c9871
LF
6118 (source (origin
6119 (method url-fetch)
ae831df4 6120 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6121 (sha256
6122 (base32
aed625bd 6123 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6124 (build-system python-build-system)
641c9871
LF
6125 (synopsis "MessagePack (de)serializer")
6126 (description "MessagePack is a fast, compact binary serialization format,
6127suitable for similar data to JSON. This package provides CPython bindings for
6128reading and writing MessagePack data.")
6129 (home-page "https://pypi.python.org/pypi/msgpack-python/")
3f641af0 6130 (license license:asl2.0)
bd74be7b
LF
6131 (properties `((python2-variant . ,(delay python2-msgpack))))))
6132
6133(define-public python2-msgpack
6134 (package (inherit (package-with-python2
6135 (strip-python2-variant python-msgpack)))
6136 (native-inputs
6137 `(("python2-setuptools" ,python2-setuptools)))))
641c9871 6138
6e5e39f4
CR
6139(define-public python-netaddr
6140 (package
6141 (name "python-netaddr")
6142 (version "0.7.18")
6143 (source
6144 (origin
6145 (method url-fetch)
6146 (uri (string-append
6147 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6148 version
6149 ".tar.gz"))
6150 (sha256
6151 (base32
6152 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6153 (build-system python-build-system)
6154 (arguments `(#:tests? #f)) ;; No tests.
6155 (inputs
6156 `(("python-setuptools" ,python-setuptools)))
6157 (home-page "https://github.com/drkjam/netaddr/")
6158 (synopsis "Pythonic manipulation of network addresses")
6159 (description
6160 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6161and MAC network addresses.")
3f641af0 6162 (license license:bsd-3)))
6e5e39f4
CR
6163
6164(define-public python2-netaddr
6165 (package-with-python2 python-netaddr))
8c692a52
CR
6166
6167(define-public python-wrapt
6168 (package
6169 (name "python-wrapt")
6170 (version "1.10.5")
6171 (source
6172 (origin
6173 (method url-fetch)
6174 (uri (string-append
6175 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6176 version
6177 ".tar.gz"))
6178 (sha256
6179 (base32
6180 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6181 (build-system python-build-system)
6182 (arguments
6183 ;; Tests are not included in the tarball, they are only available in the
6184 ;; git repository.
6185 `(#:tests? #f))
6186 (inputs
6187 `(("python-setuptools" ,python-setuptools)))
6188 (home-page "https://github.com/GrahamDumpleton/wrapt")
6189 (synopsis "Module for decorators, wrappers and monkey patching")
6190 (description
6191 "The aim of the wrapt module is to provide a transparent object proxy for
6192 Python, which can be used as the basis for the construction of function
6193 wrappers and decorator functions.")
3f641af0 6194 (license license:bsd-2)))
8c692a52
CR
6195
6196(define-public python2-wrapt
6197 (package-with-python2 python-wrapt))
b85c85be
CR
6198
6199(define-public python-iso8601
6200 (package
6201 (name "python-iso8601")
fe84bc9a 6202 (version "0.1.11")
b85c85be
CR
6203 (source
6204 (origin
6205 (method url-fetch)
fe84bc9a 6206 (uri (pypi-uri "iso8601" version))
b85c85be 6207 (sha256
fe84bc9a
EF
6208 (base32
6209 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be
CR
6210 (build-system python-build-system)
6211 (inputs
6212 `(("python-setuptools" ,python-setuptools)))
6213 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6214 (synopsis "Module to parse ISO 8601 dates")
6215 (description
6216 "This module parses the most common forms of ISO 8601 date strings (e.g.
6217@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6218 (license license:expat)))
6219
6220(define-public python2-iso8601
6221 (package-with-python2 python-iso8601))
5e412b63
CR
6222
6223(define-public python-monotonic
6224 (package
6225 (name "python-monotonic")
6226 (version "0.3")
6227 (source
6228 (origin
6229 (method url-fetch)
6230 (uri (string-append
6231 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6232 version
6233 ".tar.gz"))
6234 (sha256
6235 (base32
6236 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6237 (build-system python-build-system)
6238 (inputs
6239 `(("python-setuptools" ,python-setuptools)))
6240 (home-page "https://github.com/atdt/monotonic")
6241 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6242 (description
6243 "This module provides a monotonic() function which returns the value (in
6244fractional seconds) of a clock which never goes backwards.")
3f641af0 6245 (license license:asl2.0)))
5e412b63
CR
6246
6247(define-public python2-monotonic
6248 (package-with-python2 python-monotonic))
de34afac
CR
6249
6250(define-public python-webob
6251 (package
6252 (name "python-webob")
b8834c21 6253 (version "1.5.1")
de34afac
CR
6254 (source
6255 (origin
6256 (method url-fetch)
b8834c21 6257 (uri (pypi-uri "WebOb" version))
de34afac
CR
6258 (sha256
6259 (base32
b8834c21 6260 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
6261 (build-system python-build-system)
6262 (inputs
6263 `(("python-nose" ,python-nose)
6264 ("python-setuptools" ,python-setuptools)))
6265 (home-page "http://webob.org/")
6266 (synopsis "WSGI request and response object")
6267 (description
6268 "WebOb provides wrappers around the WSGI request environment, and an
6269object to help create WSGI responses.")
6270 (license license:expat)))
6271
6272(define-public python2-webob
6273 (package-with-python2 python-webob))
350ba0a3 6274
02a8a187
BW
6275(define-public python-xlrd
6276 (package
6277 (name "python-xlrd")
c2ad4d70 6278 (version "1.0.0")
02a8a187
BW
6279 (source (origin
6280 (method url-fetch)
e775f48e 6281 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6282 (sha256
6283 (base32
c2ad4d70 6284 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6285 (build-system python-build-system)
6286 (arguments
6287 `(#:phases
6288 (modify-phases %standard-phases
c2ad4d70 6289 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6290 ;; run tests instead for now.
6291 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6292 (native-inputs `(("python-nose" ,python-nose)
6293 ("python-setuptools" ,python-setuptools)))
6294 (home-page "http://www.python-excel.org/")
6295 (synopsis "Library for extracting data from Excel files")
6296 (description "This packages provides a library to extract data from
c598e35c 6297spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6298@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6299Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6300 (license license:bsd-3)))
02a8a187
BW
6301
6302(define-public python2-xlrd
6303 (package-with-python2 python-xlrd))
6304
350ba0a3
CR
6305(define-public python-prettytable
6306 (package
6307 (name "python-prettytable")
6308 (version "0.7.2")
6309 (source
6310 (origin
6311 (method url-fetch)
6312 (uri (string-append
6313 "https://pypi.python.org/packages/source/P/PrettyTable/"
6314 "prettytable-" version ".tar.bz2"))
6315 (sha256
6316 (base32
6317 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6318 (build-system python-build-system)
6319 (inputs
6320 `(("python-setuptools" ,python-setuptools)))
6321 (home-page "http://code.google.com/p/prettytable/")
6322 (synopsis "Display tabular data in an ASCII table format")
6323 (description
6324 "A library designed to represent tabular data in visually appealing ASCII
6325tables. PrettyTable allows for selection of which columns are to be printed,
6326independent alignment of columns (left or right justified or centred) and
6327printing of sub-tables by specifying a row range.")
3f641af0 6328 (license license:bsd-3)))
350ba0a3
CR
6329
6330(define-public python2-prettytable
6331 (package-with-python2 python-prettytable))
7a8ac75a 6332
9f8ee3fe
RW
6333(define-public python-tables
6334 (package
6335 (name "python-tables")
6336 (version "3.2.2")
6337 (source
6338 (origin
6339 (method url-fetch)
6340 (uri (pypi-uri "tables" version))
6341 (sha256
6342 (base32
6343 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6344 (build-system python-build-system)
6345 (arguments
6346 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6347 ;; or "check", so we must override the build and check phases.
6348 #:phases
6349 (modify-phases %standard-phases
6350 (add-after 'unpack 'use-gcc
6351 (lambda _
6352 (substitute* "setup.py"
6353 (("compiler = new_compiler\\(\\)" line)
6354 (string-append line
6355 "\ncompiler.set_executables(compiler='gcc',"
6356 "compiler_so='gcc',"
6357 "linker_exe='gcc',"
6358 "linker_so='gcc -shared')")))
6359 #t))
6360 (replace 'build
6361 (lambda* (#:key inputs #:allow-other-keys)
6362 (zero? (system* "python" "setup.py" "build"
6363 (string-append "--hdf5="
6364 (assoc-ref inputs "hdf5"))))))
6365 (replace 'check
6366 (lambda* (#:key inputs #:allow-other-keys)
6367 (zero? (system* "python" "setup.py" "check"
6368 (string-append "--hdf5="
6369 (assoc-ref inputs "hdf5")))))))))
6370 (propagated-inputs
6371 `(("python-numexpr" ,python-numexpr)
6372 ("python-numpy" ,python-numpy)))
6373 (native-inputs
6374 `(("python-setuptools" ,python-setuptools)
6375 ("python-cython" ,python-cython)
6376 ("pkg-config" ,pkg-config)))
6377 (inputs
6378 `(("hdf5" ,hdf5)
6379 ("bzip2" ,bzip2)
6380 ("zlib" ,zlib)))
6381 (home-page "http://www.pytables.org/")
6382 (synopsis "Hierarchical datasets for Python")
6383 (description "PyTables is a package for managing hierarchical datasets and
6384designed to efficently cope with extremely large amounts of data.")
3f641af0 6385 (license license:bsd-3)))
9f8ee3fe
RW
6386
6387(define-public python2-tables
6388 (package-with-python2 python-tables))
6389
7a8ac75a
RW
6390(define-public python-pyasn1
6391 (package
6392 (name "python-pyasn1")
caa0edb3 6393 (version "0.1.9")
7a8ac75a
RW
6394 (source
6395 (origin
6396 (method url-fetch)
caa0edb3 6397 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6398 (sha256
6399 (base32
caa0edb3 6400 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6401 (build-system python-build-system)
6402 (home-page "http://pyasn1.sourceforge.net/")
6403 (synopsis "ASN.1 types and codecs")
6404 (description
6405 "This is an implementation of ASN.1 types and codecs in Python. It is
6406suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6407 (license license:bsd-2)))
7a8ac75a
RW
6408
6409(define-public python2-pyasn1
6410 (package-with-python2 python-pyasn1))
9a49a535 6411
5988c299
EF
6412(define-public python-pyasn1-modules
6413 (package
6414 (name "python-pyasn1-modules")
6415 (version "0.0.8")
6416 (source
6417 (origin
6418 (method url-fetch)
6419 (uri (pypi-uri "pyasn1-modules" version))
6420 (sha256
6421 (base32
6422 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6423 (build-system python-build-system)
6424 (native-inputs
6425 `(("python-setuptools" ,python-setuptools)))
6426 (propagated-inputs
6427 `(("python-pyasn1" ,python-pyasn1)))
6428 (home-page "http://sourceforge.net/projects/pyasn1/")
6429 (synopsis "ASN.1 codec implementations")
6430 (description
6431 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6432implementations of ASN.1-based codecs and protocols.")
3f641af0 6433 (license license:bsd-3)))
5988c299
EF
6434
6435(define-public python2-pyasn1-modules
6436 (package-with-python2 python-pyasn1-modules))
6437
520af157 6438(define-public python-ipaddress
9a49a535 6439 (package
520af157
DC
6440 (name "python-ipaddress")
6441 (version "1.0.16")
6442 (source (origin
6443 (method url-fetch)
6444 (uri (pypi-uri "ipaddress" version))
6445 (sha256
6446 (base32
6447 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6448 (build-system python-build-system)
9a49a535
RW
6449 (home-page "https://github.com/phihag/ipaddress")
6450 (synopsis "IP address manipulation library")
6451 (description
520af157
DC
6452 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6453 in Python. This library is used to create, poke at, and manipulate IPv4 and
6454 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6455 module to older versions of Python.")
6456 (license license:psfl)
6457 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6458
6459(define-public python2-ipaddress
6460 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6461 (package (inherit base)
6462 (native-inputs
6463 `(("python2-setuptools" ,python2-setuptools)
6464 ,@(package-native-inputs base))))))
3f00e078 6465
4a238186
HG
6466(define-public python2-ipaddr
6467 (package
6468 (name "python2-ipaddr")
6469 (version "2.1.11")
6470 (source
6471 (origin
6472 (method url-fetch)
6473 (uri (pypi-uri "ipaddr" version))
6474 (sha256
6475 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6476 (build-system python-build-system)
6477 (arguments
6478 `(#:python ,python-2 ;version 2 only
6479 #:phases
6480 (modify-phases %standard-phases
6481 (replace 'check
6482 (lambda* _
6483 (zero? (system* "python" "ipaddr_test.py")))))))
6484 (home-page "https://github.com/google/ipaddr-py")
6485 (synopsis "IP address manipulation library")
6486 (description
6487 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6488IPv6 addresses and networks.
6489
6490For new implementations you may prefer to use the standard module
6491@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6492versions of Python.")
3f641af0 6493 (license license:asl2.0)))
4a238186 6494
3f00e078
RW
6495(define-public python-idna
6496 (package
6497 (name "python-idna")
6498 (version "2.0")
6499 (source
6500 (origin
6501 (method url-fetch)
6502 (uri (string-append "https://pypi.python.org/packages/source/i/"
6503 "idna/idna-" version ".tar.gz"))
6504 (sha256
6505 (base32
6506 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6507 (build-system python-build-system)
6508 (native-inputs
6509 `(("python-setuptools" ,python-setuptools)))
6510 (home-page "https://github.com/kjd/idna")
6511 (synopsis "Internationalized domain names in applications")
6512 (description
6513 "This is a library to support the Internationalised Domain Names in
6514Applications (IDNA) protocol as specified in RFC 5891. This version of the
6515protocol is often referred to as “IDNA2008” and can produce different results
6516from the earlier standard from 2003. The library is also intended to act as a
6517suitable drop-in replacement for the “encodings.idna” module that comes with
6518the Python standard library but currently only supports the older 2003
6519specification.")
3f641af0 6520 (license license:bsd-4)))
3f00e078
RW
6521
6522(define-public python2-idna
6523 (package-with-python2 python-idna))
36ebf972
RW
6524
6525(define-public python-pretend
6526 (package
6527 (name "python-pretend")
6528 (version "1.0.8")
6529 (source
6530 (origin
6531 (method url-fetch)
6532 (uri (string-append "https://pypi.python.org/packages/source/p/"
6533 "pretend/pretend-" version ".tar.gz"))
6534 (sha256
6535 (base32
6536 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6537 (build-system python-build-system)
6538 (native-inputs
6539 `(("python-setuptools" ,python-setuptools)))
6540 (home-page "https://github.com/alex/pretend")
6541 (synopsis "Library for stubbing in Python")
6542 (description
6543 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6544technique for writing tests. You may hear the term mixed up with mocks,
6545fakes, or doubles. Basically, a stub is an object that returns pre-canned
6546responses, rather than doing any computation.")
3f641af0 6547 (license license:bsd-3)))
36ebf972
RW
6548
6549(define-public python2-pretend
6550 (package-with-python2 python-pretend))
aa759a51
RW
6551
6552(define-public python-cryptography-vectors
6553 (package
6554 (name "python-cryptography-vectors")
912dcbad 6555 (version "1.5.3")
aa759a51
RW
6556 (source
6557 (origin
6558 (method url-fetch)
9c509ca9 6559 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6560 (sha256
6561 (base32
912dcbad 6562 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
aa759a51
RW
6563 (build-system python-build-system)
6564 (native-inputs
6565 `(("python-setuptools" ,python-setuptools)))
6566 (home-page "https://github.com/pyca/cryptography")
66e07664 6567 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6568 (description
6569 "This package contains test vectors for the cryptography package.")
6570 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6571 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6572
6573(define-public python2-cryptography-vectors
6574 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6575
6576(define-public python-cryptography
6577 (package
6578 (name "python-cryptography")
912dcbad 6579 (version "1.5.3")
88b47cb0
RW
6580 (source
6581 (origin
6582 (method url-fetch)
9c509ca9 6583 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6584 (sha256
6585 (base32
912dcbad 6586 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
88b47cb0
RW
6587 (build-system python-build-system)
6588 (inputs
6589 `(("openssl" ,openssl)))
6590 (propagated-inputs
6591 `(("python-cffi" ,python-cffi)
6592 ("python-six" ,python-six)
6593 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6594 ("python-idna" ,python-idna)
6595 ("python-iso8601" ,python-iso8601)))
6596 (native-inputs
6597 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6598 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
6599 ("python-setuptools" ,python-setuptools)
6600 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6601 ("python-pyasn1" ,python-pyasn1)
6602 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6603 ("python-pytz" ,python-pytz)
6604 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6605 (home-page "https://github.com/pyca/cryptography")
6606 (synopsis "Cryptographic recipes and primitives for Python")
6607 (description
6608 "cryptography is a package which provides cryptographic recipes and
6609primitives to Python developers. It aims to be the “cryptographic standard
6610library” for Python. The package includes both high level recipes, and low
6611level interfaces to common cryptographic algorithms such as symmetric ciphers,
6612message digests and key derivation functions.")
6613 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6614 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6615 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6616
6617(define-public python2-cryptography
519e2f4f
LF
6618 (let ((crypto (package-with-python2
6619 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6620 (package (inherit crypto)
6621 (propagated-inputs
6622 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6623 ("python2-backport-ssl-match-hostname"
6624 ,python2-backport-ssl-match-hostname)
68f1cdec 6625 ("python2-enum34" ,python2-enum34)
88b47cb0 6626 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6627
6628(define-public python-pyopenssl
6629 (package
6630 (name "python-pyopenssl")
eb68d268 6631 (version "16.1.0")
5af999b8
RW
6632 (source
6633 (origin
6634 (method url-fetch)
eb68d268 6635 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6636 (sha256
6637 (base32
eb68d268 6638 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
5af999b8 6639 (build-system python-build-system)
5af999b8
RW
6640 (propagated-inputs
6641 `(("python-cryptography" ,python-cryptography)
6642 ("python-six" ,python-six)))
6643 (inputs
6644 `(("openssl" ,openssl)))
6645 (native-inputs
6646 `(("python-setuptools" ,python-setuptools)))
6647 (home-page "https://github.com/pyca/pyopenssl")
6648 (synopsis "Python wrapper module around the OpenSSL library")
6649 (description
6650 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6651library.")
3f641af0 6652 (license license:asl2.0)))
5af999b8
RW
6653
6654(define-public python2-pyopenssl
519e2f4f 6655 (package-with-python2 python-pyopenssl))
643725a1
CR
6656
6657(define-public python-pip
6658 (package
6659 (name "python-pip")
6fb54e3b 6660 (version "8.0.2")
643725a1
CR
6661 (source
6662 (origin
6663 (method url-fetch)
6fb54e3b 6664 (uri (pypi-uri "pip" version))
643725a1
CR
6665 (sha256
6666 (base32
6fb54e3b 6667 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6668 (build-system python-build-system)
6669 (inputs
6670 `(("python-setuptools" ,python-setuptools)
6671 ("python-virtualenv" ,python-virtualenv)
6672 ;; Tests
6673 ("python-mock" ,python-mock)
6674 ("python-pytest" ,python-pytest)
6675 ("python-scripttest" ,python-scripttest)))
6676 (home-page "https://pip.pypa.io/")
6677 (synopsis
6678 "Package manager for Python software")
6679 (description
6680 "Pip is a package manager for Python software, that finds packages on the
6681Python Package Index (PyPI).")
6682 (license license:expat)))
6683
6684(define-public python2-pip
6685 (package-with-python2 python-pip))
d8c4998f
LC
6686
6687(define-public python-tlsh
6688 (package
6689 (name "python-tlsh")
99b00dc7 6690 (version "3.4.4")
d8c4998f
LC
6691 (home-page "https://github.com/trendmicro/tlsh")
6692 (source (origin
99b00dc7
EF
6693 (method url-fetch)
6694 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6695 version ".tar.gz"))
d8c4998f
LC
6696 (sha256
6697 (base32
99b00dc7
EF
6698 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6699 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6700 (build-system cmake-build-system)
6701 (arguments
6702 '(#:out-of-source? #f
6703 #:phases (modify-phases %standard-phases
6704 (replace
6705 'install
6706 (lambda* (#:key outputs #:allow-other-keys)
6707 ;; Build and install the Python bindings. The underlying
6708 ;; C++ library is apparently not meant to be installed.
6709 (let ((out (assoc-ref outputs "out")))
6710 (with-directory-excursion "py_ext"
6711 (and (system* "python" "setup.py" "build")
6712 (system* "python" "setup.py" "install"
6713 (string-append "--prefix=" out))))))))))
6714 (inputs `(("python" ,python-wrapper))) ;for the bindings
6715 (synopsis "Fuzzy matching library for Python")
6716 (description
6717 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6718Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6719value which can be used for similarity comparisons. Similar objects have
6720similar hash values, which allows for the detection of similar objects by
6721comparing their hash values. The byte stream should have a sufficient amount
6722of complexity; for example, a byte stream of identical bytes will not generate
6723a hash value.")
3f641af0 6724 (license license:asl2.0)))
d8c4998f
LC
6725
6726(define-public python2-tlsh
6727 (package
6728 (inherit python-tlsh)
6729 (name "python2-tlsh")
6730 (inputs `(("python" ,python-2)))))
d96034ed 6731
67f66812
BW
6732(define-public python-termcolor
6733 (package
6734 (name "python-termcolor")
6735 (version "1.1.0")
6736 (source
6737 (origin
6738 (method url-fetch)
6739 (uri (pypi-uri "python-termcolor" version))
6740 (sha256
6741 (base32
6742 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6743 (build-system python-build-system)
6744 (arguments
6745 ;; There are no tests.
6746 `(#:tests? #f))
6747 (home-page "http://pypi.python.org/pypi/termcolor")
6748 (synopsis "ANSII Color formatting for terminal output")
6749 (description
6750 "This package provides ANSII Color formatting for output in terminals.")
6751 (license license:expat)))
6752
6753(define-public python2-termcolor
6754 (package-with-python2 python-termcolor))
6755
d96034ed
LC
6756(define-public python-libarchive-c
6757 (package
6758 (name "python-libarchive-c")
03fd001c 6759 (version "2.2")
d96034ed
LC
6760 (source (origin
6761 (method url-fetch)
03fd001c 6762 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6763 (sha256
6764 (base32
03fd001c 6765 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6766 (build-system python-build-system)
6767 (arguments
6768 '(#:phases (modify-phases %standard-phases
6769 (add-before
6770 'build 'reference-libarchive
6771 (lambda* (#:key inputs #:allow-other-keys)
6772 ;; Retain the absolute file name of libarchive.so.
6773 (let ((libarchive (assoc-ref inputs "libarchive")))
6774 (substitute* "libarchive/ffi.py"
6775 (("find_library\\('archive'\\)")
6776 (string-append "'" libarchive
6777 "/lib/libarchive.so'"))))
6778
6779 ;; Do not make a compressed egg (see
6780 ;; <http://bugs.gnu.org/20765>).
6781 (let ((port (open-file "setup.cfg" "a")))
6782 (display "\n[easy_install]\nzip_ok = 0\n"
6783 port)
6784 (close-port port)
6785 #t))))))
6786 (inputs
6787 `(("python-setuptools" ,python-setuptools)
6788 ("libarchive" ,libarchive)))
6789 (home-page "https://github.com/Changaco/python-libarchive-c")
6790 (synopsis "Python interface to libarchive")
6791 (description
6792 "This package provides Python bindings to libarchive, a C library to
6793access possibly compressed archives in many different formats. It uses
6794Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6795 (license license:lgpl2.0+)))
d96034ed
LC
6796
6797(define-public python2-libarchive-c
6798 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6799
6800(define-public python-file
6801 (package
6802 (inherit file)
6803 (name "python-file")
6804 (build-system python-build-system)
6805 (arguments
6806 '(#:tests? #f ;no tests
6807 #:phases (modify-phases %standard-phases
6808 (add-before 'build 'change-directory
6809 (lambda _
6810 (chdir "python")
6811 #t))
6812 (add-before 'build 'set-library-file-name
6813 (lambda* (#:key inputs #:allow-other-keys)
6814 (let ((file (assoc-ref inputs "file")))
6815 (substitute* "magic.py"
6816 (("find_library\\('magic'\\)")
6817 (string-append "'" file "/lib/libmagic.so'")))
6818 #t))))))
6819 (inputs `(("file" ,file)))
6820 (self-native-input? #f)
daeeea71
CM
6821 (synopsis "Python bindings to the libmagic file type guesser. Note that
6822this module and the python-magic module both provide a \"magic.py\" file;
6823these two modules, which are different and were developed separately, both
6824serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6825
6826(define-public python2-file
6827 (package-with-python2 python-file))
85d4aeac
LC
6828
6829(define-public python-debian
6830 (package
6831 (name "python-debian")
6832 (version "0.1.23")
6833 (source
6834 (origin
6835 (method url-fetch)
6836 (uri (string-append
6837 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6838 version ".tar.gz"))
6839 (sha256
6840 (base32
6841 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6842 (build-system python-build-system)
6843 (inputs
6844 `(("python-six" ,python-six)))
6845 (native-inputs
6846 `(("python-setuptools" ,python-setuptools)))
6847 (home-page "http://packages.debian.org/sid/python-debian")
6848 (synopsis "Debian package related modules")
6849 (description
5c7bdc9a
LC
6850 ;; XXX: Use @enumerate instead of @itemize to work around
6851 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6852 "This package provides Python modules that abstract many formats of
6853Debian-related files, such as:
6854
5c7bdc9a 6855@enumerate
85d4aeac
LC
6856@item Debtags information;
6857@item @file{debian/changelog} files;
6858@item packages files, pdiffs;
6859@item control files of single or multiple RFC822-style paragraphs---e.g.
6860 @file{debian/control}, @file{.changes}, @file{.dsc};
6861@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6862 contained files and meta-information.
5c7bdc9a 6863@end enumerate\n")
85d4aeac
LC
6864
6865 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6866 (license license:gpl3+)))
85d4aeac
LC
6867
6868(define-public python2-debian
6869 (package-with-python2 python-debian))
816a6538 6870
2d321bb2
RW
6871(define-public python-nbformat
6872 (package
6873 (name "python-nbformat")
6874 (version "4.1.0")
6875 (source
6876 (origin
6877 (method url-fetch)
6878 (uri (pypi-uri "nbformat" version))
6879 (sha256
6880 (base32
6881 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6882 (build-system python-build-system)
6883 (arguments `(#:tests? #f)) ; no test target
6884 (propagated-inputs
6885 `(("python-ipython-genutils" ,python-ipython-genutils)
6886 ("python-jsonschema" ,python-jsonschema)
6887 ("python-jupyter-core" ,python-jupyter-core)
6888 ("python-traitlets" ,python-traitlets)))
6889 (native-inputs
6890 `(("python-setuptools" ,python-setuptools)))
6891 (home-page "http://jupyter.org")
6892 (synopsis "Jupyter Notebook format")
6893 (description "This package provides the reference implementation of the
6894Jupyter Notebook format and Python APIs for working with notebooks.")
6895 (license license:bsd-3)))
6896
6897(define-public python2-nbformat
6898 (package-with-python2 python-nbformat))
6899
55436048
RW
6900(define-public python-bleach
6901 (package
6902 (name "python-bleach")
6903 (version "1.4.3")
6904 (source
6905 (origin
6906 (method url-fetch)
6907 (uri (pypi-uri "bleach" version))
6908 (sha256
6909 (base32
6910 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6911 (build-system python-build-system)
6912 (propagated-inputs
6913 `(("python-html5lib" ,python-html5lib-0.9)
6914 ("python-setuptools" ,python-setuptools)
6915 ("python-six" ,python-six)))
6916 (native-inputs
6917 `(("python-nose" ,python-nose)))
6918 (home-page "http://github.com/jsocol/bleach")
6919 (synopsis "Whitelist-based HTML-sanitizing tool")
6920 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6921 (license license:asl2.0)))
6922
6923(define-public python2-bleach
6924 (package-with-python2 python-bleach))
6925
60590a3a
RW
6926(define-public python-entrypoints
6927 (package
6928 (name "python-entrypoints")
6929 (version "0.2.2")
6930 (source
6931 (origin
6932 (method url-fetch)
6933 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6934 version ".tar.gz"))
6935 (file-name (string-append name "-" version ".tar.gz"))
6936 (sha256
6937 (base32
6938 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6939 (build-system python-build-system)
6940 ;; The package does not come with a setup.py file, so we have to generate
6941 ;; one ourselves.
6942 (arguments
6943 `(#:tests? #f
6944 #:phases
6945 (modify-phases %standard-phases
6946 (add-after 'unpack 'create-setup.py
6947 (lambda _
6948 (call-with-output-file "setup.py"
6949 (lambda (port)
6950 (format port "\
6951from setuptools import setup
6952setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6953" ,version))))))))
6954 (home-page "https://github.com/takluyver/entrypoints")
6955 (synopsis "Discover and load entry points from installed Python packages")
6956 (description "Entry points are a way for Python packages to advertise
6957objects with some common interface. The most common examples are
6958@code{console_scripts} entry points, which define shell commands by
6959identifying a Python function to run. The @code{entrypoints} module contains
6960functions to find and load entry points.")
6961 (license license:expat)))
6962
6963(define-public python2-entrypoints
6964 (package-with-python2 python-entrypoints))
6965
c60898a8
RW
6966(define-public python-nbconvert
6967 (package
6968 (name "python-nbconvert")
6969 (version "5.0.0b1")
6970 (source
6971 (origin
6972 (method url-fetch)
6973 (uri (pypi-uri "nbconvert" version))
6974 (sha256
6975 (base32
6976 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6977 (build-system python-build-system)
6978 ;; The "bdist_egg" target is disabled by default, causing the installation
6979 ;; to fail.
6980 (arguments `(#:configure-flags (list "bdist_egg")))
6981 (propagated-inputs
6982 `(("python-bleach" ,python-bleach)
6983 ("python-entrypoints" ,python-entrypoints)
6984 ("python-jinja2" ,python-jinja2)
6985 ("python-jupyter-core" ,python-jupyter-core)
6986 ("python-mistune" ,python-mistune)
6987 ("python-nbformat" ,python-nbformat)
6988 ("python-pygments" ,python-pygments)
6989 ("python-setuptools" ,python-setuptools)
6990 ("python-traitlets" ,python-traitlets)))
6991 (home-page "http://jupyter.org")
6992 (synopsis "Converting Jupyter Notebooks")
6993 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6994notebooks to various other formats via Jinja templates. It allows you to
6995convert an @code{.ipynb} notebook file into various static formats including:
6996
6997@enumerate
6998@item HTML
6999@item LaTeX
7000@item PDF
7001@item Reveal JS
7002@item Markdown (md)
7003@item ReStructured Text (rst)
7004@item executable script
7005@end enumerate\n")
7006 (license license:bsd-3)))
7007
7008(define-public python2-nbconvert
7009 (package-with-python2 python-nbconvert))
7010
a0d62280
RW
7011(define-public python-notebook
7012 (package
7013 (name "python-notebook")
7014 (version "4.2.3")
7015 (source (origin
7016 (method url-fetch)
7017 (uri (pypi-uri "notebook" version))
7018 (sha256
7019 (base32
7020 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7021 (build-system python-build-system)
7022 (arguments
7023 `(#:phases
7024 (modify-phases %standard-phases
7025 (replace 'check
7026 (lambda _
7027 ;; HOME must be set for tests
7028 (setenv "HOME" "/tmp")
7029 (zero? (system* "nosetests")))))))
7030 (propagated-inputs
7031 `(("python-jupyter-core" ,python-jupyter-core)
7032 ("python-nbformat" ,python-nbformat)
7033 ("python-nbconvert" ,python-nbconvert)
7034 ("python-ipython" ,python-ipython)))
7035 (native-inputs
7036 `(("python-nose" ,python-nose)
7037 ("python-sphinx" ,python-sphinx)
7038 ("python-requests" ,python-requests)))
7039 (home-page "http://jupyter.org/")
7040 (synopsis "Web-based notebook environment for interactive computing")
7041 (description
7042 "The Jupyter HTML notebook is a web-based notebook environment for
7043interactive computing.")
7044 (license license:bsd-3)))
7045
7046(define-public python2-notebook
7047 (package-with-python2 python-notebook))
7048
d55724ed
RW
7049(define-public python-widgetsnbextension
7050 (package
7051 (name "python-widgetsnbextension")
7052 (version "1.2.6")
7053 (source
7054 (origin
7055 (method url-fetch)
7056 (uri (pypi-uri "widgetsnbextension" version))
7057 (sha256
7058 (base32
7059 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7060 (build-system python-build-system)
7061 (propagated-inputs
7062 `(("python-notebook" ,python-notebook)))
7063 (native-inputs
7064 `(("python-nose" ,python-nose)
7065 ("python-setuptools" ,python-setuptools)))
7066 (home-page "http://ipython.org")
7067 (synopsis "IPython HTML widgets for Jupyter")
7068 (description "This package provides interactive HTML widgets for Jupyter
7069notebooks.")
7070 (license license:bsd-3)))
7071
7072(define-public python2-widgetsnbextension
7073 (package-with-python2 python-widgetsnbextension))
7074
4fe2e344
RW
7075(define-public python-ipywidgets
7076 (package
7077 (name "python-ipywidgets")
7078 (version "5.2.2")
7079 (source
7080 (origin
7081 (method url-fetch)
7082 (uri (pypi-uri "ipywidgets" version))
7083 (sha256
7084 (base32
7085 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7086 (build-system python-build-system)
7087 ;; FIXME: it's not clear how to run the tests.
7088 (arguments `(#:tests? #f))
7089 (propagated-inputs
7090 `(("python-ipykernel" ,python-ipykernel)
7091 ("python-ipython" ,python-ipython)
7092 ("python-setuptools" ,python-setuptools)
7093 ("python-traitlets" ,python-traitlets)
7094 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7095 (home-page "http://ipython.org")
7096 (synopsis "IPython HTML widgets for Jupyter")
7097 (description "Ipywidgets are interactive HTML widgets for Jupyter
7098notebooks and the IPython kernel. Notebooks come alive when interactive
7099widgets are used. Users gain control of their data and can visualize changes
7100in the data.")
7101 (license license:bsd-3)))
7102
7103(define-public python2-ipywidgets
7104 (package-with-python2 python-ipywidgets))
7105
8ceebf8f
RW
7106(define-public python-jupyter-console
7107 (package
7108 (name "python-jupyter-console")
7109 (version "5.0.0")
7110 (source
7111 (origin
7112 (method url-fetch)
7113 (uri (pypi-uri "jupyter_console" version))
7114 (sha256
7115 (base32
7116 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7117 (build-system python-build-system)
7118 ;; FIXME: it's not clear how to run the tests.
7119 (arguments `(#:tests? #f))
7120 (propagated-inputs
7121 `(("python-ipykernel" ,python-ipykernel)
7122 ("python-ipython" ,python-ipython)
7123 ("python-jupyter-client" ,python-jupyter-client)
7124 ("python-prompt-toolkit" ,python-prompt-toolkit)
7125 ("python-pygments" ,python-pygments)
7126 ("python-setuptools" ,python-setuptools)))
7127 (home-page "https://jupyter.org")
7128 (synopsis "Jupyter terminal console")
7129 (description "This package provides a terminal-based console frontend for
7130Jupyter kernels. It also allows for console-based interaction with non-Python
7131Jupyter kernels such as IJulia and IRKernel.")
7132 (license license:bsd-3)))
7133
7134(define-public python2-jupyter-console
7135 (package-with-python2 python-jupyter-console))
7136
c27ae827
RW
7137(define-public jupyter
7138 (package
7139 (name "jupyter")
7140 (version "1.0.0")
7141 (source
7142 (origin
7143 (method url-fetch)
7144 (uri (pypi-uri "jupyter" version))
7145 (sha256
7146 (base32
7147 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7148 (build-system python-build-system)
7149 ;; FIXME: it's not clear how to run the tests.
7150 (arguments `(#:tests? #f))
7151 (propagated-inputs
7152 `(("python-ipykernel" ,python-ipykernel)
7153 ("python-ipywidgets" ,python-ipywidgets)
7154 ("python-jupyter-console" ,python-jupyter-console)
7155 ("python-nbconvert" ,python-nbconvert)
7156 ("python-notebook" ,python-notebook)
7157 ("python-setuptools" ,python-setuptools)))
7158 (home-page "http://jupyter.org")
7159 (synopsis "Web application for interactive documents")
7160 (description
7161 "The Jupyter Notebook is a web application that allows you to create and
7162share documents that contain live code, equations, visualizations and
7163explanatory text. Uses include: data cleaning and transformation, numerical
7164simulation, statistical modeling, machine learning and much more.")
7165 (license license:bsd-3)))
7166
816a6538
LC
7167(define-public python-chardet
7168 (package
7169 (name "python-chardet")
7170 (version "2.3.0")
7171 (source
7172 (origin
7173 (method url-fetch)
7174 (uri (string-append
7175 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7176 version
7177 ".tar.gz"))
7178 (sha256
7179 (base32
7180 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7181 (build-system python-build-system)
7182 (native-inputs
7183 `(("python-setuptools" ,python-setuptools)))
7184 (home-page "https://github.com/chardet/chardet")
7185 (synopsis "Universal encoding detector for Python 2 and 3")
7186 (description
7187 "This package provides @code{chardet}, a Python module that can
7188automatically detect a wide range of file encodings.")
3f641af0 7189 (license license:lgpl2.1+)))
816a6538
LC
7190
7191(define-public python2-chardet
7192 (package-with-python2 python-chardet))
2fc5f186 7193
1872f1bb
KM
7194(define-public python-docopt
7195 (package
7196 (name "python-docopt")
7197 (version "0.6.2")
7198 (source
7199 (origin
7200 (method url-fetch)
7201 ;; The release on PyPI does not include tests.
7202 (uri (string-append
7203 "https://github.com/docopt/docopt/archive/"
7204 version ".tar.gz"))
7205 (file-name (string-append name "-" version ".tar.gz"))
7206 (sha256
7207 (base32
7208 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7209 (build-system python-build-system)
7210 (native-inputs
7211 `(("python-pytest" ,python-pytest)
7212 ("python-setuptools" ,python-setuptools)))
7213 (arguments
7214 `(#:phases (alist-replace
7215 'check
7216 (lambda _ (zero? (system* "py.test")))
7217 %standard-phases)))
7218 (home-page "http://docopt.org")
7219 (synopsis "Command-line interface description language for Python")
7220 (description "This library allows the user to define a command-line
7221interface from a program's help message rather than specifying it
7222programatically with command-line parsers like @code{getopt} and
7223@code{argparse}.")
7224 (license license:expat)))
7225
7226(define-public python2-docopt
7227 (package-with-python2 python-docopt))
7228
2fc5f186
LF
7229(define-public python-zope-event
7230 (package
7231 (name "python-zope-event")
7232 (version "4.1.0")
7233 (source
7234 (origin
7235 (method url-fetch)
7236 (uri (string-append "https://pypi.python.org/packages/source/z"
7237 "/zope.event/zope.event-" version ".tar.gz"))
7238 (sha256
7239 (base32
7240 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7241 (build-system python-build-system)
7242 (inputs
7243 `(("python-setuptools" ,python-setuptools)))
7244 (home-page "http://pypi.python.org/pypi/zope.event")
7245 (synopsis "Event publishing system for Python")
7246 (description "Zope.event provides an event publishing API, intended for
7247use by applications which are unaware of any subscribers to their events. It
7248is a simple event-dispatching system on which more sophisticated event
7249dispatching systems can be built.")
3f641af0 7250 (license license:zpl2.1)))
2fc5f186
LF
7251
7252(define-public python2-zope-event
7253 (package-with-python2 python-zope-event))
97abe268
LF
7254
7255(define-public python-zope-interface
7256 (package
7257 (name "python-zope-interface")
7258 (version "4.1.3")
7259 (source
7260 (origin
7261 (method url-fetch)
7262 (uri (string-append "https://pypi.python.org/packages/source/z"
7263 "/zope.interface/zope.interface-" version ".tar.gz"))
7264 (sha256
7265 (base32
7266 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7267 (build-system python-build-system)
7268 (propagated-inputs
7269 `(("python-zope-event" ,python-zope-event)))
7270 (home-page "https://github.com/zopefoundation/zope.interface")
7271 (synopsis "Python implementation of the \"design by contract\"
7272methodology")
7273 (description "Zope.interface provides an implementation of \"object
7274interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7275conforming to a given API or contract.")
3f641af0 7276 (license license:zpl2.1)))
97abe268
LF
7277
7278(define-public python2-zope-interface
7279 (package-with-python2 python-zope-interface))
81f2373c
LF
7280
7281(define-public python-zope-exceptions
7282 (package
7283 (name "python-zope-exceptions")
7284 (version "4.0.8")
7285 (source
7286 (origin
7287 (method url-fetch)
7288 (uri (string-append "https://pypi.python.org/packages/source/z"
7289 "/zope.exceptions/zope.exceptions-"
7290 version ".tar.gz"))
7291 (sha256
7292 (base32
7293 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7294 (build-system python-build-system)
7295 (arguments
7296 '(#:tests? #f)) ; circular dependency with zope.testrunner
7297 (propagated-inputs
7298 `(("python-zope-interface" ,python-zope-interface)))
7299 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7300 (synopsis "Zope exceptions")
7301 (description "Zope.exceptions provides general-purpose exception types
7302that have uses outside of the Zope framework.")
3f641af0 7303 (license license:zpl2.1)))
81f2373c
LF
7304
7305(define-public python2-zope-exceptions
7306 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7307
7308(define-public python-zope-testing
7309 (package
7310 (name "python-zope-testing")
7311 (version "4.5.0")
7312 (source
7313 (origin
7314 (method url-fetch)
7315 (uri (string-append "https://pypi.python.org/packages/source/z"
7316 "/zope.testing/zope.testing-" version ".tar.gz"))
7317 (sha256
7318 (base32
b02f7a21
HG
7319 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7320 (modules '((guix build utils)))
7321 (snippet
7322 '(begin
7323 ;; Remove pre-compiled .pyc files backup files from source.
7324 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7325 #t))))
900e3c0e
LF
7326 (build-system python-build-system)
7327 (native-inputs
7328 `(("python-zope-exceptions" ,python-zope-exceptions)))
7329 (propagated-inputs
7330 `(("python-zope-interface" ,python-zope-interface)))
7331 (home-page "http://pypi.python.org/pypi/zope.testing")
7332 (synopsis "Zope testing helpers")
7333 (description "Zope.testing provides a number of testing utilities for HTML
7334forms, HTTP servers, regular expressions, and more.")
3f641af0 7335 (license license:zpl2.1)))
900e3c0e
LF
7336
7337(define-public python2-zope-testing
7338 (package-with-python2 python-zope-testing))
01614c4f
LF
7339
7340(define-public python-zope-testrunner
7341 (package
7342 (name "python-zope-testrunner")
7343 (version "4.4.9")
7344 (source
7345 (origin
7346 (method url-fetch)
7347 (uri (string-append "https://pypi.python.org/packages/source/z"
7348 "/zope.testrunner/zope.testrunner-"
7349 version ".zip"))
7350 (sha256
7351 (base32
7352 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7353 (build-system python-build-system)
7354 (native-inputs
7355 `(("python-six" ,python-six)
7356 ("python-zope-exceptions" ,python-zope-exceptions)
7357 ("python-zope-testing" ,python-zope-testing)
7358 ("unzip" ,unzip)))
7359 (propagated-inputs
7360 `(("python-zope-interface" ,python-zope-interface)))
7361 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7362 (synopsis "Zope testrunner script")
7363 (description "Zope.testrunner provides a script for running Python
7364tests.")
3f641af0 7365 (license license:zpl2.1)))
01614c4f
LF
7366
7367(define-public python2-zope-testrunner
7368 (let ((base (package-with-python2 python-zope-testrunner)))
7369 (package
7370 (inherit base)
7371 (native-inputs
7372 (append (package-native-inputs base)
7373 `(("python2-subunit" ,python2-subunit)
7374 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7375
7376(define-public python-zope-i18nmessageid
7377 (package
7378 (name "python-zope-i18nmessageid")
7379 (version "4.0.3")
7380 (source
7381 (origin
7382 (method url-fetch)
7383 (uri (string-append
7384 "https://pypi.python.org/packages/source/z"
7385 "/zope.i18nmessageid/zope.i18nmessageid-"
7386 version ".tar.gz"))
7387 (sha256
7388 (base32
7389 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7390 (build-system python-build-system)
7391 (inputs
7392 `(("python-setuptools" ,python-setuptools)))
7393 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7394 (synopsis "Message identifiers for internationalization")
7395 (description "Zope.i18nmessageid provides facilities for declaring
7396internationalized messages within program source text.")
3f641af0 7397 (license license:zpl2.1)))
6a5c710c
LF
7398
7399(define-public python2-zope-i18nmessageid
7400 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7401
7402(define-public python-zope-schema
7403 (package
7404 (name "python-zope-schema")
7405 (version "4.4.2")
7406 (source
7407 (origin
7408 (method url-fetch)
7409 (uri (string-append "https://pypi.python.org/packages/source/z"
7410 "/zope.schema/zope.schema-" version ".tar.gz"))
7411 (sha256
7412 (base32
7413 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7414 (build-system python-build-system)
7415 (propagated-inputs
7416 `(("python-zope-event" ,python-zope-event)
7417 ("python-zope-interface" ,python-zope-interface)))
7418 (native-inputs
7419 `(("python-zope-testing" ,python-zope-testing)))
7420 (home-page "http://pypi.python.org/pypi/zope.schema")
7421 (synopsis "Zope data schemas")
7422 (description "Zope.scheme provides extensions to zope.interface for
7423defining data schemas.")
3f641af0 7424 (license license:zpl2.1)))
71fb09f3
LF
7425
7426(define-public python2-zope-schema
7427 (package-with-python2 python-zope-schema))
fbac9b17
LF
7428
7429(define-public python-zope-configuration
7430 (package
7431 (name "python-zope-configuration")
7432 (version "4.0.3")
7433 (source (origin
7434 (method url-fetch)
7435 (uri (string-append "https://pypi.python.org/packages/source/z"
7436 "/zope.configuration/zope.configuration-"
7437 version ".tar.gz"))
7438 (sha256
7439 (base32
7440 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7441 (build-system python-build-system)
7442 (propagated-inputs
7443 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7444 ("python-zope-schema" ,python-zope-schema)))
7445 (home-page "http://pypi.python.org/pypi/zope.configuration")
7446 (synopsis "Zope Configuration Markup Language")
7447 (description "Zope.configuration implements ZCML, the Zope Configuration
7448Markup Language.")
3f641af0 7449 (license license:zpl2.1)))
fbac9b17
LF
7450
7451(define-public python2-zope-configuration
7452 (package-with-python2 python-zope-configuration))
2ad52086
LF
7453
7454(define-public python-zope-proxy
7455 (package
7456 (name "python-zope-proxy")
7457 (version "4.1.6")
7458 (source
7459 (origin
7460 (method url-fetch)
7461 (uri (string-append "https://pypi.python.org/packages/source/z"
7462 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7463 (sha256
7464 (base32
7465 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7466 (build-system python-build-system)
7467 (propagated-inputs
7468 `(("python-zope-interface" ,python-zope-interface)))
7469 (home-page "http://pypi.python.org/pypi/zope.proxy")
7470 (synopsis "Generic, transparent proxies")
7471 (description "Zope.proxy provides generic, transparent proxies for Python.
7472Proxies are special objects which serve as mostly-transparent wrappers around
7473another object, intervening in the apparent behavior of the wrapped object
7474only when necessary to apply the policy (e.g., access checking, location
7475brokering, etc.) for which the proxy is responsible.")
3f641af0 7476 (license license:zpl2.1)))
2ad52086
LF
7477
7478(define-public python2-zope-proxy
7479 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7480
7481(define-public python-zope-location
7482 (package
7483 (name "python-zope-location")
7484 (version "4.0.3")
7485 (source
7486 (origin
7487 (method url-fetch)
7488 (uri (string-append "https://pypi.python.org/packages/source/z"
7489 "/zope.location/zope.location-" version ".tar.gz"))
7490 (sha256
7491 (base32
7492 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7493 (build-system python-build-system)
7494 (native-inputs
7495 `(("python-zope-proxy" ,python-zope-proxy)
7496 ("python-zope-schema" ,python-zope-schema)))
7497 (home-page "http://pypi.python.org/pypi/zope.location/")
7498 (synopsis "Zope location library")
7499 (description "Zope.location implements the concept of \"locations\" in
7500Zope3, which are are special objects that have a structural location.")
3f641af0 7501 (license license:zpl2.1)))
f404b5ea
LF
7502
7503(define-public python2-zope-location
7504 (package-with-python2 python-zope-location))
d4b77f36
LF
7505
7506(define-public python-zope-security
7507 (package
7508 (name "python-zope-security")
7509 (version "4.0.3")
7510 (source
7511 (origin
7512 (method url-fetch)
7513 (uri (string-append "https://pypi.python.org/packages/source/z"
7514 "/zope.security/zope.security-" version ".tar.gz"))
7515 (sha256
7516 (base32
7517 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7518 (build-system python-build-system)
7519 (propagated-inputs
7520 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7521 ("python-zope-component" ,python-zope-component)
7522 ("python-zope-location" ,python-zope-location)
7523 ("python-zope-proxy" ,python-zope-proxy)
7524 ("python-zope-schema" ,python-zope-schema)
7525 ("python-zope-testrunner" ,python-zope-testrunner)
7526 ("python-zope-testing" ,python-zope-testing)))
7527 (home-page "http://pypi.python.org/pypi/zope.security")
7528 (synopsis "Zope security framework")
7529 (description "Zope.security provides a generic mechanism to implement
7530security policies on Python objects.")
3f641af0 7531 (license license:zpl2.1)))
d4b77f36
LF
7532
7533(define-public python2-zope-security
04417662
EF
7534 (let ((zope-security (package-with-python2 python-zope-security)))
7535 (package (inherit zope-security)
7536 (propagated-inputs
7537 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7538 ,@(alist-delete
7539 "python-zope-testrunner"
7540 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7541
7542(define-public python-zope-component
7543 (package
7544 (name "python-zope-component")
7545 (version "4.2.2")
7546 (source
7547 (origin
7548 (method url-fetch)
7549 (uri (string-append "https://pypi.python.org/packages/source/z"
7550 "/zope.component/zope.component-" version ".tar.gz"))
7551 (sha256
7552 (base32
7553 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7554 (build-system python-build-system)
7555 (arguments
7556 ;; Skip tests due to circular dependency with python-zope-security.
7557 '(#:tests? #f))
7558 (native-inputs
7559 `(("python-zope-testing" ,python-zope-testing)))
7560 (propagated-inputs
7561 `(("python-zope-event" ,python-zope-event)
7562 ("python-zope-interface" ,python-zope-interface)
7563 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7564 ("python-zope-configuration" ,python-zope-configuration)))
7565 (home-page "https://github.com/zopefoundation/zope.component")
7566 (synopsis "Zope Component Architecture")
7567 (description "Zope.component represents the core of the Zope Component
7568Architecture. Together with the zope.interface package, it provides
7569facilities for defining, registering and looking up components.")
3f641af0 7570 (license license:zpl2.1)))
a6b61b27
LF
7571
7572(define-public python2-zope-component
7573 (package-with-python2 python-zope-component))
3859ac12 7574
1ae44b80 7575(define-public python-pythondialog
b5f218be 7576 (package
1ae44b80 7577 (name "python-pythondialog")
42c4b246 7578 (version "3.4.0")
b5f218be
LF
7579 (source
7580 (origin
7581 (method url-fetch)
1ae44b80 7582 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7583 (sha256
7584 (base32
1ae44b80 7585 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7586 (build-system python-build-system)
7587 (arguments
7588 `(#:phases
7589 (modify-phases %standard-phases
7590 (add-after 'unpack 'patch-path
7591 (lambda* (#:key inputs #:allow-other-keys)
7592 (let* ((dialog (assoc-ref inputs "dialog")))
7593 ;; Since this library really wants to grovel the search path, we
7594 ;; must hardcode dialog's store path into it.
7595 (substitute* "dialog.py"
7596 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7597 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7598 #t))))
b5f218be
LF
7599 #:tests? #f)) ; no test suite
7600 (propagated-inputs
7601 `(("dialog" ,dialog)))
7602 (home-page "http://pythondialog.sourceforge.net/")
7603 (synopsis "Python interface to the UNIX dialog utility")
7604 (description "A Python wrapper for the dialog utility. Its purpose is to
7605provide an easy to use, pythonic and comprehensive Python interface to dialog.
7606This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7607 (license license:lgpl2.1)
1ae44b80
LF
7608 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7609
7610(define-public python2-pythondialog
7611 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7612 (package
7613 (inherit base)
7614 (version (package-version python-pythondialog))
7615 (source (origin
7616 (method url-fetch)
7617 (uri (pypi-uri "python2-pythondialog" version))
7618 (sha256
7619 (base32
7620 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7621
3859ac12
LF
7622(define-public python-pyrfc3339
7623 (package
7624 (name "python-pyrfc3339")
d9aa097b 7625 (version "1.0")
3859ac12
LF
7626 (source
7627 (origin
7628 (method url-fetch)
d9aa097b 7629 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7630 (sha256
7631 (base32
d9aa097b 7632 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7633 (build-system python-build-system)
7634 (propagated-inputs
7635 `(("python-pytz" ,python-pytz)))
7636 (native-inputs
7637 `(("python-nose" ,python-nose)
7638 ("python-setuptools" ,python-setuptools)))
7639 (home-page "https://github.com/kurtraschke/pyRFC3339")
7640 (synopsis "Python timestamp library")
7641 (description "Python library for generating and parsing RFC 3339-compliant
7642timestamps.")
7643 (license license:expat)))
7644
7645(define-public python2-pyrfc3339
7646 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7647
7648(define-public python-werkzeug
7649 (package
7650 (name "python-werkzeug")
0580e383 7651 (version "0.11.11")
5eea2005
LF
7652 (source
7653 (origin
7654 (method url-fetch)
4b47cbfa 7655 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7656 (sha256
7657 (base32
0580e383 7658 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7659 (build-system python-build-system)
7660 (native-inputs
7661 `(("python-pytest" ,python-pytest)))
7662 (home-page "http://werkzeug.pocoo.org/")
7663 (synopsis "Utilities for WSGI applications")
7664 (description "One of the most advanced WSGI utility modules. It includes a
7665powerful debugger, full-featured request and response objects, HTTP utilities to
7666handle entity tags, cache control headers, HTTP dates, cookie handling, file
7667uploads, a powerful URL routing system and a bunch of community-contributed
7668addon modules.")
3f641af0 7669 (license license:x11)))
5eea2005
LF
7670
7671(define-public python2-werkzeug
7672 (package-with-python2 python-werkzeug))
99fffa8a
LF
7673
7674(define-public python-configobj
7675 (package
7676 (name "python-configobj")
7677 (version "5.0.6")
7678 (source (origin
7679 (method url-fetch)
7680 (uri (string-append
7681 "https://pypi.python.org/packages/source/c/configobj/"
7682 "configobj-" version ".tar.gz"))
7683 (sha256
7684 (base32
7685 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7686 ;; Patch setup.py so it looks for python-setuptools, which is
7687 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7688 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
7689 (build-system python-build-system)
7690 (native-inputs
7691 `(("python-setuptools" ,python-setuptools)
7692 ("python-six" ,python-six)))
7693 (synopsis "Config file reading, writing and validation")
7694 (description "ConfigObj is a simple but powerful config file reader and
7695writer: an ini file round tripper. Its main feature is that it is very easy to
7696use, with a straightforward programmer’s interface and a simple syntax for
7697config files.")
7698 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7699 (license license:bsd-3)))
99fffa8a
LF
7700
7701(define-public python2-configobj
7702 (package-with-python2 python-configobj))
79e8a291
LF
7703
7704(define-public python-configargparse
7705 (package
7706 (name "python-configargparse")
7707 (version "0.10.0")
7708 (source (origin
7709 (method url-fetch)
7710 (uri (string-append
7711 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7712 "ConfigArgParse-" version ".tar.gz"))
7713 (sha256
7714 (base32
7715 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7716 (build-system python-build-system)
7717 (arguments
7718 ;; FIXME: Bug in test suite filed upstream:
7719 ;; https://github.com/bw2/ConfigArgParse/issues/32
7720 '(#:tests? #f))
7721 (synopsis "Replacement for argparse")
7722 (description "A drop-in replacement for argparse that allows options to also
7723be set via config files and/or environment variables.")
7724 (home-page "https://github.com/bw2/ConfigArgParse")
7725 (license license:expat)))
7726
7727(define-public python2-configargparse
7728 (package-with-python2 python-configargparse))
ab41f979
LF
7729
7730(define-public python-ndg-httpsclient
7731 (package
7732 (name "python-ndg-httpsclient")
7733 (version "0.4.0")
7734 (source (origin
7735 (method url-fetch)
7736 (uri (string-append
7737 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7738 "ndg_httpsclient-" version ".tar.gz"))
7739 (sha256
7740 (base32
7741 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7742 (build-system python-build-system)
7743 (propagated-inputs
7744 `(("python-pyopenssl" ,python-pyopenssl)))
7745 (synopsis "HTTPS support for Python's httplib and urllib2")
7746 (description "This is a HTTPS client implementation for httplib and urllib2
7747based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7748over the default provided with Python and importantly enables full verification
7749of the SSL peer.")
7750 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7751 (license license:bsd-3)))
ab41f979
LF
7752
7753;; python2-openssl requires special care, so package-with-python2 is
7754;; insufficient.
7755(define-public python2-ndg-httpsclient
7756 (package (inherit python-ndg-httpsclient)
7757 (name "python2-ndg-httpsclient")
7758 (arguments `(#:python ,python-2))
7759 (propagated-inputs
7760 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7761
7762(define-public python-contextlib2
7763 (package
7764 (name "python-contextlib2")
7765 (version "0.4.0")
7766 (source
7767 (origin
7768 (method url-fetch)
7769 (uri (pypi-uri "contextlib2" version))
7770 (sha256
7771 (base32
7772 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7773 (build-system python-build-system)
7774 (arguments
7775 `(#:phases
7776 (modify-phases %standard-phases
7777 (replace 'check
7778 (lambda _ (zero?
7779 (system*
b3546174 7780 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7781 (home-page "http://contextlib2.readthedocs.org/")
7782 (synopsis "Tools for decorators and context managers")
7783 (description "This module is primarily a backport of the Python
77843.2 contextlib to earlier Python versions. Like contextlib, it
7785provides utilities for common tasks involving decorators and context
7786managers. It also contains additional features that are not part of
7787the standard library.")
3f641af0 7788 (license license:psfl)))
03f964a5
CM
7789
7790(define-public python2-contextlib2
7791 (package-with-python2 python-contextlib2))
210bf497
DT
7792
7793(define-public python-texttable
7794 (package
7795 (name "python-texttable")
7796 (version "0.8.4")
7797 (source
7798 (origin
7799 (method url-fetch)
7800 (uri (pypi-uri "texttable" version))
7801 (sha256
7802 (base32
7803 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7804 (build-system python-build-system)
7805 (arguments '(#:tests? #f)) ; no tests
7806 (home-page "https://github.com/foutaise/texttable/")
7807 (synopsis "Python module for creating simple ASCII tables")
7808 (description "Texttable is a Python module for creating simple ASCII
7809tables.")
3f641af0 7810 (license license:lgpl2.1+)))
210bf497
DT
7811
7812(define-public python2-texttable
7813 (package-with-python2 python-texttable))
67c52bb3
DT
7814
7815(define-public python-websocket-client
7816 (package
7817 (name "python-websocket-client")
6b810897 7818 (version "0.37.0")
67c52bb3
DT
7819 (source
7820 (origin
7821 (method url-fetch)
6b810897 7822 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7823 (sha256
7824 (base32
6b810897 7825 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3
DT
7826 (build-system python-build-system)
7827 (native-inputs
7828 `(("python-six" ,python-six))) ; for tests
7829 (inputs
7830 `(("python-setuptools" ,python-setuptools)))
7831 (home-page "https://github.com/liris/websocket-client")
7832 (synopsis "WebSocket client for Python")
7833 (description "The Websocket-client module provides the low level APIs for
7834WebSocket usage in Python programs.")
3f641af0 7835 (license license:lgpl2.1+)))
67c52bb3
DT
7836
7837(define-public python2-websocket-client
7838 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7839
7840(define-public python-atomicwrites
7841 (package
7842 (name "python-atomicwrites")
4e92d76a 7843 (version "1.1.0")
5c6eea2a
LF
7844 (source (origin
7845 (method url-fetch)
7846 (uri (pypi-uri "atomicwrites" version))
7847 (sha256
7848 (base32
4e92d76a 7849 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7850 (build-system python-build-system)
7851 (synopsis "Atomic file writes in Python")
7852 (description "Library for atomic file writes using platform dependent tools
8f65585b 7853for atomic file system operations.")
5c6eea2a 7854 (home-page "https://github.com/untitaker/python-atomicwrites")
9bb6d184
LF
7855 (license license:expat)
7856 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7857
7858(define-public python2-atomicwrites
7859 (package (inherit (package-with-python2
7860 (strip-python2-variant python-atomicwrites)))
7861 (native-inputs
7862 `(("python2-setuptools" ,python2-setuptools)))))
561bb3cb
LF
7863
7864(define-public python-requests-toolbelt
7865 (package
7866 (name "python-requests-toolbelt")
c02af1c8 7867 (version "0.6.2")
561bb3cb
LF
7868 (source (origin
7869 (method url-fetch)
c02af1c8
LF
7870 (uri (string-append
7871 "https://pypi.python.org/packages/"
7872 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7873 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7874 (sha256
7875 (base32
c02af1c8 7876 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb
LF
7877 (build-system python-build-system)
7878 (propagated-inputs
7879 `(("python-requests" ,python-requests)))
7880 (synopsis "Extensions to python-requests")
7881 (description "This is a toolbelt of useful classes and functions to be used
7882with python-requests.")
7883 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7884 (license license:asl2.0)))
d1deb90b
LF
7885
7886(define-public python-click-threading
7887 (package
7888 (name "python-click-threading")
3d2e0dbc 7889 (version "0.2.0")
d1deb90b
LF
7890 (source (origin
7891 (method url-fetch)
3d2e0dbc
LF
7892 (uri (string-append
7893 "https://pypi.python.org/packages/"
7894 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7895 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7896 (sha256
7897 (base32
3d2e0dbc 7898 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7899 (build-system python-build-system)
7900 (propagated-inputs
7901 `(("python-click" ,python-click)))
7902 (synopsis "Utilities for multithreading in Click")
7903 (description "This package provides utilities for multithreading in Click
7904applications.")
7905 (home-page "https://github.com/click-contrib/click-threading")
7906 (license license:expat)))
7b17cab9
LF
7907
7908(define-public python-click-log
7909 (package
7910 (name "python-click-log")
a9da8fec 7911 (version "0.1.3")
7b17cab9
LF
7912 (source (origin
7913 (method url-fetch)
7914 (uri (pypi-uri "click-log" version))
7915 (sha256
7916 (base32
a9da8fec 7917 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7918 (build-system python-build-system)
7919 (propagated-inputs
7920 `(("python-click" ,python-click)))
7921 (synopsis "Logging for click applications")
7922 (description "This package provides a Python library for logging Click
7923applications.")
7924 (home-page "https://github.com/click-contrib/click-log")
7925 (license license:expat)))
7b3a4ee4
LF
7926
7927(define-public python-apipkg
7928 (package
7929 (name "python-apipkg")
7930 (version "1.4")
7931 (source (origin
7932 (method url-fetch)
7933 (uri (pypi-uri "apipkg" version))
7934 (sha256
7935 (base32
7936 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7937 (build-system python-build-system)
b43bab3c 7938 (inputs
7b3a4ee4
LF
7939 `(("python-pytest" ,python-pytest)))
7940 (synopsis "Namespace control and lazy-import mechanism")
7941 (description "With apipkg you can control the exported namespace of a Python
7942package and greatly reduce the number of imports for your users. It is a small
7943pure Python module that works on virtually all Python versions.")
7944 (home-page "https://bitbucket.org/hpk42/apipkg")
e08739c3
CAW
7945 (license license:expat)
7946 (properties `((python2-variant . ,(delay python2-apipkg))))))
7947
7948(define-public python2-apipkg
7949 (package
7950 (inherit (package-with-python2
7951 (strip-python2-variant python-apipkg)))
7952 (native-inputs
7953 `(("python2-setuptools" ,python2-setuptools)))))
848964fe
LF
7954
7955(define-public python-execnet
7956 (package
7957 (name "python-execnet")
7958 (version "1.4.1")
7959 (source (origin
7960 (method url-fetch)
7961 (uri (pypi-uri "execnet" version))
7962 (sha256
7963 (base32
7964 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7965 (build-system python-build-system)
7966 (native-inputs
7967 `(("python-setuptools-scm" ,python-setuptools-scm)))
584d068f 7968 (inputs
848964fe
LF
7969 `(("python-apipkg" ,python-apipkg)))
7970 (synopsis "Rapid multi-Python deployment")
7971 (description "Execnet provides a share-nothing model with
7972channel-send/receive communication for distributing execution across many
7973Python interpreters across version, platform and network barriers. It has a
7974minimal and fast API targetting the following uses:
7975@enumerate
7976@item distribute tasks to (many) local or remote CPUs
7977@item write and deploy hybrid multi-process applications
7978@item write scripts to administer multiple environments
7979@end enumerate")
7980 (home-page "http://codespeak.net/execnet/")
16c84f90
CAW
7981 (license license:expat)
7982 (properties `((python2-variant . ,(delay python2-execnet))))))
7983
7984(define-public python2-execnet
7985 (let ((execnet (package-with-python2
7986 (strip-python2-variant python-execnet))))
7987 (package
7988 (inherit execnet)
7989 (native-inputs
7990 `(("python2-setuptools" ,python2-setuptools)
7991 ,@(package-native-inputs execnet))))))
6720dbb4
LF
7992
7993;;; The software provided by this package was integrated into pytest 2.8.
7994(define-public python-pytest-cache
7995 (package
7996 (name "python-pytest-cache")
7997 (version "1.0")
7998 (source (origin
7999 (method url-fetch)
8000 (uri (pypi-uri "pytest-cache" version))
8001 (sha256
8002 (base32
8003 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8004 (build-system python-build-system)
630d938f
EF
8005 (inputs
8006 `(("python-apipkg" ,python-apipkg)
8007 ("python-execnet" ,python-execnet)
8008 ("python-py" ,python-py)
8009 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8010 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8011 (description "The pytest-cache plugin provides tools to rerun failures from
8012the last py.test invocation.")
8013 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
0adc21c2
EF
8014 (license license:expat)
8015 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
8016
8017(define-public python2-pytest-cache
8018 (let ((pytest-cache (package-with-python2
8019 (strip-python2-variant python-pytest-cache))))
8020 (package
8021 (inherit pytest-cache)
8022 (native-inputs
8023 `(("python2-setuptools" ,python2-setuptools)
8024 ,@(package-native-inputs pytest-cache))))))
d7e729fe
LF
8025
8026(define-public python-pytest-localserver
8027 (package
8028 (name "python-pytest-localserver")
29f20168 8029 (version "0.3.5")
d7e729fe
LF
8030 (source (origin
8031 (method url-fetch)
29f20168 8032 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8033 (sha256
8034 (base32
29f20168 8035 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8036 (build-system python-build-system)
8037 (arguments
8038 `(#:phases (modify-phases %standard-phases
8039 (replace 'check
8040 (lambda _
8041 (zero? (system* "py.test" "--genscript=runtests.py"))
8042 (zero? (system* "py.test")))))))
8043 (native-inputs
d7e729fe
LF
8044 `(("python-pytest" ,python-pytest)
8045 ("python-requests" ,python-requests)
9ba40f05
EF
8046 ("python-six" ,python-six)))
8047 (inputs
8048 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8049 (synopsis "Py.test plugin to test server connections locally")
8050 (description "Pytest-localserver is a plugin for the pytest testing
8051framework which enables you to test server connections locally.")
8052 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8053 (license license:expat)))
28cecbb7
LF
8054
8055(define-public python-wsgi-intercept
8056 (package
8057 (name "python-wsgi-intercept")
909fbd2b 8058 (version "1.2.2")
28cecbb7
LF
8059 (source (origin
8060 (method url-fetch)
909fbd2b
LF
8061 (uri (string-append
8062 "https://pypi.python.org/packages/"
8063 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8064 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8065 (sha256
8066 (base32
909fbd2b 8067 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7
LF
8068 (build-system python-build-system)
8069 (native-inputs
9d813ec1
EF
8070 `(("python-pytest" ,python-pytest)
8071 ("python-six" ,python-six)))
28cecbb7
LF
8072 (propagated-inputs
8073 `(("python-httplib2" ,python-httplib2)
8074 ("python-requests" ,python-requests)))
8075 (synopsis "Puts a WSGI application in place of a real URI for testing")
8076 (description "Wsgi_intercept installs a WSGI application in place of a real
8077URI for testing. Testing a WSGI application normally involves starting a
8078server at a local host and port, then pointing your test code to that address.
8079Instead, this library lets you intercept calls to any specific host/port
8080combination and redirect them into a WSGI application importable by your test
8081program. Thus, you can avoid spawning multiple processes or threads to test
8082your Web app.")
8083 (home-page "https://github.com/cdent/wsgi-intercept")
8084 (license license:expat)))
89b8a551
LF
8085
8086(define-public python-pytest-xprocess
8087 (package
8088 (name "python-pytest-xprocess")
8089 (version "0.9.1")
8090 (source (origin
8091 (method url-fetch)
8092 (uri (pypi-uri "pytest-xprocess" version))
8093 (sha256
8094 (base32
8095 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8096 (build-system python-build-system)
8097 (propagated-inputs
8098 `(("python-pytest" ,python-pytest)
8099 ("python-pytest-cache" ,python-pytest-cache)
8100 ("python-psutil" ,python-psutil)))
8101 (synopsis "Pytest plugin to manage external processes across test runs")
8102 (description "Pytest-xprocess is an experimental py.test plugin for managing
8103processes across test runs.")
8104 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8105 (license license:expat)))
5c299bf0
LF
8106
8107(define-public python-icalendar
8108 (package
8109 (name "python-icalendar")
f2f53353 8110 (version "3.10")
5c299bf0
LF
8111 (source (origin
8112 (method url-fetch)
8113 (uri (pypi-uri "icalendar" version))
8114 (sha256
8115 (base32
f2f53353 8116 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
5c299bf0
LF
8117 (build-system python-build-system)
8118 (propagated-inputs
8119 `(("python-dateutil-2" ,python-dateutil-2)
8120 ("python-pytz" ,python-pytz)))
8121 (synopsis "Python library for parsing iCalendar files")
8122 (description "The icalendar package is a parser/generator of iCalendar
8123files for use with Python.")
8124 (home-page "https://github.com/collective/icalendar")
3f641af0 8125 (license license:bsd-2)))
6bbbb53e
LF
8126
8127(define-public python-sphinxcontrib-newsfeed
8128 (package
8129 (name "python-sphinxcontrib-newsfeed")
8130 (version "0.1.4")
8131 (source (origin
8132 (method url-fetch)
8133 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8134 (sha256
8135 (base32
8136 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8137 (build-system python-build-system)
8138 (propagated-inputs
8139 `(("python-docutils" ,python-docutils)
8140 ("python-sphinx" ,python-sphinx)))
8141 (synopsis "News Feed extension for Sphinx")
8142 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8143Blog, News or Announcements section to a Sphinx website.")
8144 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8145 (license license:bsd-2)))
2216e15c
SB
8146
8147(define-public python-args
8148 (package
8149 (name "python-args")
8150 (version "0.1.0")
8151 (source (origin
8152 (method url-fetch)
8153 (uri (pypi-uri "args" version))
8154 (sha256
8155 (base32
8156 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8157 (build-system python-build-system)
8158 (inputs
8159 `(("python-setuptools" ,python-setuptools)))
8160 (home-page "https://github.com/kennethreitz/args")
8161 (synopsis "Command-line argument parser")
8162 (description
8163 "This library provides a Python module to parse command-line arguments.")
3f641af0 8164 (license license:bsd-3)))
2216e15c
SB
8165
8166(define-public python2-args
8167 (package-with-python2 python-args))
c06a3de9
SB
8168
8169(define-public python-clint
8170 (package
8171 (name "python-clint")
8172 (version "0.5.1")
8173 (source (origin
8174 (method url-fetch)
8175 (uri (pypi-uri "clint" version))
8176 (sha256
8177 (base32
8178 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8179 (build-system python-build-system)
8180 (inputs
8181 `(("python-args" ,python-args)
8182 ("python-setuptools" ,python-setuptools)))
8183 (home-page "https://github.com/kennethreitz/clint")
8184 (synopsis "Command-line interface tools")
8185 (description
8186 "Clint is a Python module filled with a set of tools for developing
8187command-line applications, including tools for colored and indented
8188output, progress bar display, and pipes.")
3f641af0 8189 (license license:isc)))
c06a3de9
SB
8190
8191(define-public python2-clint
8192 (package-with-python2 python-clint))
4ecdeef8
SB
8193
8194(define-public python-astor
8195 (package
8196 (name "python-astor")
8197 (version "0.5")
8198 (source (origin
8199 (method url-fetch)
8200 (uri (pypi-uri "astor" version))
8201 (sha256
8202 (base32
8203 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8204 (build-system python-build-system)
8205 (inputs
8206 `(("python-setuptools" ,python-setuptools)))
8207 (home-page "https://github.com/berkerpeksag/astor")
8208 (synopsis "Read and write Python ASTs")
8209 (description
8210 "Astor is designed to allow easy manipulation of Python source via the
8211Abstract Syntax Tree.")
3f641af0 8212 (license license:bsd-3)))
4ecdeef8
SB
8213
8214(define-public python2-astor
8215 (package-with-python2 python-astor))
e224b7d0
SB
8216
8217(define-public python-rply
8218 (package
8219 (name "python-rply")
8220 (version "0.7.4")
8221 (source (origin
8222 (method url-fetch)
8223 (uri (pypi-uri "rply" version))
8224 (sha256
8225 (base32
8226 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8227 (build-system python-build-system)
8228 (inputs
8229 `(("python-appdirs" ,python-appdirs)
8230 ("python-setuptools" ,python-setuptools)))
8231 (home-page "https://github.com/alex/rply")
8232 (synopsis "Parser generator for Python")
8233 (description
8234 "This package provides a pure Python based parser generator, that also
8235works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8236with a new public API, and RPython support.")
3f641af0 8237 (license license:bsd-3)))
e224b7d0
SB
8238
8239(define-public python2-rply
8240 (package-with-python2 python-rply))
c3e919d7
SB
8241
8242(define-public python-hy
8243 (package
8244 (name "python-hy")
8245 (version "0.11.1")
8246 (source (origin
8247 (method url-fetch)
8248 (uri (pypi-uri "hy" version))
8249 (sha256
8250 (base32
8251 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8252 (build-system python-build-system)
8253 (inputs
8254 `(("python-astor" ,python-astor)
8255 ("python-clint" ,python-clint)
8256 ("python-rply" ,python-rply)
8257 ("python-setuptools" ,python-setuptools)))
8258 (home-page "http://hylang.org/")
8259 (synopsis "Lisp frontend to Python")
8260 (description
8261 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8262its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8263Python at your fingertips, in Lisp form.")
8264 (license license:expat)))
8265
8266(define-public python2-hy
8267 (package-with-python2 python-hy))
7a5b944e 8268
81f7f297
EF
8269(define-public python-rauth
8270 (package
8271 (name "python-rauth")
8272 (version "0.7.2")
8273 (source
8274 (origin
8275 (method url-fetch)
8276 (uri (pypi-uri "rauth" version))
8277 (sha256
8278 (base32
8279 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8280 (build-system python-build-system)
8281 (arguments
8282 `(#:test-target "check"))
0848d8d3 8283 (inputs
81f7f297
EF
8284 `(("python-requests" ,python-requests)))
8285 (home-page "https://github.com/litl/rauth")
8286 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8287 (description
8288 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8289provides service wrappers for convenient connection initialization and
8290authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8291 (license license:expat)
8292 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8293
8294(define-public python2-rauth
0848d8d3
EF
8295 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8296 (package
8297 (inherit base)
8298 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8299 ("python2-unittest2" ,python2-unittest2)
8300 ,@(package-native-inputs base))))))
81f7f297 8301
1abe448d
EF
8302(define-public python2-functools32
8303 (package
8304 (name "python2-functools32")
8305 (version "3.2.3-2")
8306 (source
8307 (origin
8308 (method url-fetch)
8309 (uri (pypi-uri "functools32" version))
8310 (sha256
8311 (base32
8312 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8313 (build-system python-build-system)
8314 (arguments
8315 `(#:python ,python-2
8316 #:tests? #f)) ; no test target
8317 (native-inputs
8318 `(("python2-setuptools" ,python2-setuptools)))
8319 (home-page "https://github.com/MiCHiLU/python-functools32")
8320 (synopsis
8321 "Backport of the functools module from Python 3.2.3")
8322 (description
8323 "This package is a backport of the @code{functools} module from Python
83243.2.3 for use with older versions of Python and PyPy.")
8325 (license license:expat)))
8326
877889f3 8327(define-public python2-futures
7a5b944e 8328 (package
877889f3 8329 (name "python2-futures")
7a5b944e
EF
8330 (version "3.0.3")
8331 (source
8332 (origin
8333 (method url-fetch)
8334 (uri (pypi-uri "futures" version))
8335 (sha256
8336 (base32
8337 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8338 (build-system python-build-system)
877889f3 8339 (arguments `(#:python ,python-2))
7a5b944e 8340 (native-inputs
877889f3 8341 `(("python2-setuptools" ,python2-setuptools)))
7a5b944e
EF
8342 (home-page "https://github.com/agronholm/pythonfutures")
8343 (synopsis
8344 "Backport of the concurrent.futures package from Python 3.2")
8345 (description
8346 "The concurrent.futures module provides a high-level interface for
8347asynchronously executing callables. This package backports the
8348concurrent.futures package from Python 3.2")
3f641af0 8349 (license license:bsd-3)))
7a5b944e 8350
5cb2fe44
EF
8351(define-public python-promise
8352 (package
8353 (name "python-promise")
8354 (version "0.4.2")
8355 (source
8356 (origin
8357 (method url-fetch)
8358 (uri (pypi-uri "promise" version))
8359 (sha256
8360 (base32
8361 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8362 (build-system python-build-system)
8363 ;; Tests wants python-futures, which is a python2 only program, and
8364 ;; can't be found by python-promise at test time.
8365 (arguments `(#:tests? #f))
8366 (home-page "https://github.com/syrusakbary/promise")
8367 (synopsis "Promises/A+ implementation for Python")
8368 (description
8369 "Promises/A+ implementation for Python")
8370 (properties `((python2-variant . ,(delay python2-promise))))
8371 (license license:expat)))
8372
8373(define-public python2-promise
8374 (let ((promise (package-with-python2
8375 (strip-python2-variant python-promise))))
8376 (package (inherit promise)
8377 (arguments (substitute-keyword-arguments (package-arguments promise)
8378 ((#:tests? _) #t)))
8379 (native-inputs
8380 `(("python2-futures" ,python2-futures)
8381 ("python2-pytest" ,python2-pytest)
8382 ("python2-setuptools" ,python2-setuptools)
8383 ,@(package-native-inputs promise))))))
8384
c18f6368
EF
8385(define-public python-urllib3
8386 (package
8387 (name "python-urllib3")
6178274d 8388 (version "1.18.1")
c18f6368
EF
8389 (source
8390 (origin
8391 (method url-fetch)
8392 (uri (pypi-uri "urllib3" version))
8393 (sha256
8394 (base32
6178274d 8395 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8396 (build-system python-build-system)
8397 (arguments `(#:tests? #f))
8398 (native-inputs
8399 `(("python-setuptools" ,python-setuptools)
8400 ;; some packages for tests
8401 ("python-nose" ,python-nose)
8402 ("python-mock" ,python-mock)
8403 ("python-tornado" ,python-tornado)))
8404 (propagated-inputs
8405 `(;; packages for https security
8406 ("python-certifi" ,python-certifi)
8407 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8408 ("python-pyasn1" ,python-pyasn1)
8409 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8410 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8411 (synopsis "HTTP library with thread-safe connection pooling")
8412 (description
8413 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8414can reuse the same socket connection for multiple requests, it can POST files,
8415supports url redirection and retries, and also gzip and deflate decoding.")
8416 (license license:expat)))
8417
8418(define-public python2-urllib3
8419 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8420
8421(define-public python-colorama
8422 (package
8423 (name "python-colorama")
8424 (version "0.3.3")
8425 (source
8426 (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "colorama" version))
8429 (sha256
8430 (base32
8431 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8432 (build-system python-build-system)
8433 (inputs
8434 `(("python-setuptools" ,python-setuptools)))
8435 (synopsis "colored terminal text rendering for Python")
8436 (description "Colorama is a Python library for rendering colored terminal
8437text.")
8438 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8439 (license license:bsd-3)))
2b2f2fc1
DT
8440
8441(define-public python2-colorama
8442 (package-with-python2 python-colorama))
f5bcec6e
DT
8443
8444(define-public python-rsa
8445 (package
8446 (name "python-rsa")
ecd68c53 8447 (version "3.4.2")
f5bcec6e
DT
8448 (source
8449 (origin
8450 (method url-fetch)
8451 (uri (pypi-uri "rsa" version))
8452 (sha256
8453 (base32
ecd68c53 8454 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e
DT
8455 (build-system python-build-system)
8456 (inputs
8457 `(("python-pyasn1" ,python-pyasn1)
8458 ("python-setuptools" ,python-setuptools)))
8459 (synopsis "Pure-Python RSA implementation")
8460 (description "Python-RSA is a pure-Python RSA implementation. It supports
8461encryption and decryption, signing and verifying signatures, and key
8462generation according to PKCS#1 version 1.5. It can be used as a Python
8463library as well as on the command line.")
8464 (home-page "http://stuvel.eu/rsa")
3f641af0 8465 (license license:asl2.0)))
f5bcec6e
DT
8466
8467(define-public python2-rsa
8468 (package-with-python2 python-rsa))
c0aacfa5
DT
8469
8470(define-public python-pluggy
8471 (package
8472 (name "python-pluggy")
8473 (version "0.3.1")
8474 (source
8475 (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "pluggy" version))
8478 (sha256
8479 (base32
8480 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8481 (build-system python-build-system)
8482 (inputs
8483 `(("python-setuptools" ,python-setuptools)))
8484 (synopsis "Plugin and hook calling mechanism for Python")
8485 (description "Pluggy is an extraction of the plugin manager as used by
8486Pytest but stripped of Pytest specific details.")
8487 (home-page "https://pypi.python.org/pypi/pluggy")
8488 (license license:expat)))
8489
8490(define-public python2-pluggy
8491 (package-with-python2 python-pluggy))
a4af21ca
DT
8492
8493(define-public python-tox
8494 (package
8495 (name "python-tox")
8496 (version "2.3.1")
8497 (source
8498 (origin
8499 (method url-fetch)
8500 (uri (pypi-uri "tox" version))
8501 (sha256
8502 (base32
8503 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8504 (build-system python-build-system)
8505 (arguments
8506 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8507 ;; pytest breaks other packages.
8508 '(#:tests? #f))
8509 (inputs
8510 `(("python-setuptools" ,python-setuptools)
8511 ("python-pluggy" ,python-pluggy)
8512 ("python-py" ,python-py)
8513 ("python-virtualenv" ,python-virtualenv)
8514 ("python-pytest" ,python-pytest)))
8515 (home-page "http://tox.testrun.org/")
8516 (synopsis "Virtualenv-based automation of test activities")
8517 (description "Tox is a generic virtualenv management and test command line
8518tool. It can be used to check that a package installs correctly with
8519different Python versions and interpreters, or run tests in each type of
8520supported environment, or act as a frontend to continuous integration
8521servers.")
8522 (license license:expat)))
8523
8524(define-public python2-tox
8525 (package-with-python2 python-tox))
ba9da248
DT
8526
8527(define-public python-jmespath
8528 (package
8529 (name "python-jmespath")
8530 (version "0.9.0")
8531 (source
8532 (origin
8533 (method url-fetch)
8534 (uri (pypi-uri "jmespath" version))
8535 (sha256
8536 (base32
8537 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8538 (build-system python-build-system)
8539 (inputs
8540 `(("python-setuptools" ,python-setuptools)))
8541 (synopsis "JSON Matching Expressions")
8542 (description "JMESPath (pronounced “james path”) is a Python library that
8543allows one to declaratively specify how to extract elements from a JSON
8544document.")
8545 (home-page "https://github.com/jmespath/jmespath.py")
8546 (license license:expat)))
8547
8548(define-public python2-jmespath
8549 (package-with-python2 python-jmespath))
935fcd5c
DT
8550
8551(define-public python-botocore
8552 (package
8553 (name "python-botocore")
e09f952d 8554 (version "1.4.62")
935fcd5c
DT
8555 (source
8556 (origin
8557 (method url-fetch)
8558 (uri (pypi-uri "botocore" version))
8559 (sha256
8560 (base32
e09f952d 8561 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c
DT
8562 (build-system python-build-system)
8563 (inputs
8564 `(("python-dateutil" ,python-dateutil-2)
8565 ("python-docutils" ,python-docutils)
8566 ("python-mock" ,python-mock)
8567 ("python-nose" ,python-nose)
8568 ("python-setuptools" ,python-setuptools)
8569 ("python-tox" ,python-tox)
8570 ("python-wheel" ,python-wheel)
8571 ("python-jmespath" ,python-jmespath)))
8572 (home-page "https://github.com/boto/botocore")
8573 (synopsis "Low-level interface to AWS")
8574 (description "Botocore is a Python library that provides a low-level
8575interface to the Amazon Web Services (AWS) API.")
3f641af0 8576 (license license:asl2.0)))
935fcd5c
DT
8577
8578(define-public python2-botocore
8579 (package-with-python2 python-botocore))
f861b8b8
DT
8580
8581(define-public awscli
8582 (package
8583 (name "awscli")
d5ccf71e 8584 (version "1.11.5")
f861b8b8
DT
8585 (source
8586 (origin
8587 (method url-fetch)
d5ccf71e 8588 (uri (pypi-uri name version))
f861b8b8
DT
8589 (sha256
8590 (base32
d5ccf71e 8591 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8
DT
8592 (build-system python-build-system)
8593 (inputs
8594 `(("python-colorama" ,python-colorama)
8595 ("python-docutils" ,python-docutils)
8596 ("python-mock" ,python-mock)
8597 ("python-nose" ,python-nose)
8598 ("python-rsa" ,python-rsa)
8599 ("python-setuptools" ,python-setuptools)
8600 ("python-sphinx" ,python-sphinx)
8601 ("python-tox" ,python-tox)
8602 ("python-wheel" ,python-wheel)
d5ccf71e
LF
8603 ("python-botocore" ,python-botocore)
8604 ("python-s3transfer" ,python-s3transfer)))
f861b8b8
DT
8605 (home-page "http://aws.amazon.com/cli/")
8606 (synopsis "Command line client for AWS")
8607 (description "AWS CLI provides a unified command line interface to the
8608Amazon Web Services (AWS) API.")
3f641af0 8609 (license license:asl2.0)))
6a44697d
LF
8610
8611(define-public python-hypothesis
8612 (package
8613 (name "python-hypothesis")
bea6d94d 8614 (version "3.1.0")
6a44697d
LF
8615 (source (origin
8616 (method url-fetch)
8617 (uri (pypi-uri "hypothesis" version))
8618 (sha256
8619 (base32
bea6d94d 8620 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8621 (build-system python-build-system)
6a44697d
LF
8622 (propagated-inputs
8623 `(("python-flake8" ,python-flake8)
8624 ("python-pytest" ,python-pytest)))
8625 (synopsis "Library for property based testing")
8626 (description "Hypothesis is a library for testing your Python code against a
8627much larger range of examples than you would ever want to write by hand. It’s
8628based on the Haskell library, Quickcheck, and is designed to integrate
8629seamlessly into your existing Python unit testing work flow.")
8630 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8631 (license license:mpl2.0)
6f068e08 8632 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8633
8634(define-public python2-hypothesis
6f068e08
EF
8635 (let ((hypothesis (package-with-python2
8636 (strip-python2-variant python-hypothesis))))
8637 (package (inherit hypothesis)
8638 (native-inputs
8639 `(("python2-enum34" ,python2-enum34)
8640 ("python2-setuptools" ,python2-setuptools))))))
7517e73c
LF
8641
8642(define-public python-pytest-subtesthack
8643 (package
8644 (name "python-pytest-subtesthack")
8645 (version "0.1.1")
8646 (source (origin
8647 (method url-fetch)
8648 (uri (pypi-uri "pytest-subtesthack" version))
8649 (sha256
8650 (base32
8651 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8652 (build-system python-build-system)
8653 (native-inputs
8654 `(;; setuptools required for python-2 variant
8655 ("python-setuptools" ,python-setuptools)))
8656 (propagated-inputs
8657 `(("python-pytest" ,python-pytest)))
8658 (synopsis "Set-up and tear-down fixtures for unit tests")
8659 (description "This plugin allows you to set up and tear down fixtures within
8660unit test functions that use @code{py.test}. This is useful for using
8661@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8662function multiple times, without setting up or tearing down fixture state as is
8663normally the case.")
8664 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8665 (license license:unlicense)))
7517e73c
LF
8666
8667(define-public python2-pytest-subtesthack
8668 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8669
8670(define-public python2-xdo
8671 (package
8672 (name "python2-xdo")
8673 (version "0.2")
8674 (source (origin
8675 (method url-fetch)
8676 (uri (string-append
8677 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8678 "python-xdo_" version ".orig.tar.gz"))
8679 (sha256
8680 (base32
8681 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8682 (build-system python-build-system)
8683 (arguments
8684 `(#:python ,python-2
8685 #:tests? #f)) ; no tests provided
8686 (inputs
8687 `(("xdotool" ,xdotool)
8688 ("libX11" ,libx11)))
8689 (home-page "https://tracker.debian.org/pkg/python-xdo")
8690 (synopsis "Python library for simulating X11 keyboard/mouse input")
8691 (description "Provides bindings to libxdo for manipulating X11 via simulated
8692input. (Note that this is mostly a legacy library; you may wish to look at
8693python-xdo for newer bindings.)")
3f641af0 8694 (license license:bsd-3)))
0bdc1671 8695
cb34dc6c
CAW
8696(define-public python-wtforms
8697 (package
8698 (name "python-wtforms")
8699 (version "2.1")
8700 (source
8701 (origin
8702 (method url-fetch)
8703 (uri (pypi-uri "WTForms" version ".zip"))
8704 (sha256
8705 (base32
8706 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8707 (build-system python-build-system)
8708 (native-inputs
8709 `(("unzip" ,unzip)))
8710 (home-page "http://wtforms.simplecodes.com/")
8711 (synopsis
8712 "Form validation and rendering library for Python web development")
8713 (description
8714 "WTForms is a flexible forms validation and rendering library
8715for Python web development. It is very similar to the web form API
8716available in Django, but is a standalone package.")
3f641af0 8717 (license license:bsd-3)
cb34dc6c
CAW
8718 (properties `((python2-variant . ,(delay python2-wtforms))))))
8719
8720(define-public python2-wtforms
8721 (package
8722 (inherit (package-with-python2
8723 (strip-python2-variant python-wtforms)))
8724 (inputs `(("python2-setuptools" ,python2-setuptools)))))
50aaec25
DT
8725
8726(define-public python-mako
8727 (package
8728 (name "python-mako")
8729 (version "1.0.3")
8730 (source
8731 (origin
8732 (method url-fetch)
8733 (uri (pypi-uri "Mako" version))
8734 (sha256
8735 (base32
8736 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8737 (build-system python-build-system)
8738 (native-inputs
8739 `(("python-markupsafe" ,python-markupsafe)
8740 ("python-mock" ,python-mock)
8741 ("python-nose" ,python-nose)))
8742 (home-page "http://www.makotemplates.org/")
8743 (synopsis "Templating language for Python")
8744 (description "Mako is a templating language for Python that compiles
8745templates into Python modules.")
8746 (license license:expat)
8747 (properties `((python2-variant . ,(delay python2-mako))))))
8748
8749(define-public python2-mako
8750 (let ((base (package-with-python2
8751 (strip-python2-variant python-mako))))
8752 (package
8753 (inherit base)
8754 (native-inputs
8755 (cons `("python2-setuptools" ,python2-setuptools)
8756 (package-native-inputs base))))))
ae00a41f
CAW
8757
8758(define-public python-waitress
8759 (package
8760 (name "python-waitress")
8761 (version "0.8.10")
8762 (source
8763 (origin
8764 (method url-fetch)
8765 (uri (pypi-uri "waitress" version))
8766 (sha256
8767 (base32
8768 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8769 (build-system python-build-system)
8770 (home-page "https://github.com/Pylons/waitress")
8771 (synopsis "Waitress WSGI server")
8772 (description "Waitress is meant to be a production-quality pure-Python WSGI
8773server with very acceptable performance.")
3f641af0 8774 (license license:zpl2.1)
ae00a41f
CAW
8775 (properties `((python2-variant . ,(delay python2-waitress))))))
8776
8777(define-public python2-waitress
8778 (package
8779 (inherit (package-with-python2
8780 (strip-python2-variant python-waitress)))
8781 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
778a284b
CAW
8782
8783(define-public python-wsgiproxy2
8784 (package
8785 (name "python-wsgiproxy2")
8786 (version "0.4.2")
8787 (source
8788 (origin
8789 (method url-fetch)
8790 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8791 (sha256
8792 (base32
8793 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8794 (build-system python-build-system)
e359b31a
LF
8795 (arguments
8796 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8797 ;; support Python 3:
8798 ;; https://github.com/benoitc/restkit/issues/140
8799 #:tests? #f))
778a284b
CAW
8800 (native-inputs
8801 `(("unzip" ,unzip)
8802 ("python-nose" ,python-nose)
8803 ("python-coverage" ,python-coverage)))
8804 (propagated-inputs
8805 `(("python-six" ,python-six)
8806 ("python-webob" ,python-webob)))
8807 (home-page
8808 "https://github.com/gawel/WSGIProxy2/")
8809 (synopsis "WSGI Proxy with various http client backends")
8810 (description "WSGI turns HTTP requests into WSGI function calls.
8811WSGIProxy turns WSGI function calls into HTTP requests.
8812It also includes code to sign requests and pass private data,
8813and to spawn subprocesses to handle requests.")
8814 (license license:expat)
8815 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8816
8817(define-public python2-wsgiproxy2
8818 (let ((wsgiproxy2 (package-with-python2
8819 (strip-python2-variant python-wsgiproxy2))))
8820 (package
8821 (inherit wsgiproxy2)
8822 (inputs `(("python2-setuptools" ,python2-setuptools)
8823 ,@(package-inputs wsgiproxy2))))))
bb7518b1
CAW
8824
8825(define-public python-pastedeploy
8826 (package
8827 (name "python-pastedeploy")
8828 (version "1.5.2")
8829 (source
8830 (origin
8831 (method url-fetch)
8832 (uri (pypi-uri "PasteDeploy" version))
8833 (sha256
8834 (base32
8835 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8836 (build-system python-build-system)
8837 (native-inputs
8838 `(("python-nose" ,python-nose)))
8839 (propagated-inputs
8840 ;; This package uses pkg_resources, part of setuptools, during runtime,
8841 ;; hence why not a native-input.
8842 `(("python-setuptools" ,python-setuptools)))
8843 (home-page "http://pythonpaste.org/deploy/")
8844 (synopsis
8845 "Load, configure, and compose WSGI applications and servers")
8846 (description
8847 "This tool provides code to load WSGI applications and servers from URIs;
8848these URIs can refer to Python Eggs for INI-style configuration files. Paste
8849Script provides commands to serve applications based on this configuration
8850file.")
8851 (license license:expat)))
8852
8853(define-public python2-pastedeploy
8854 (package-with-python2 python-pastedeploy))
1cf53652 8855
c4a7904c
CAW
8856(define-public python-paste
8857 (package
8858 (name "python-paste")
8859 (version "2.0.2")
8860 (source
8861 (origin
8862 (method url-fetch)
8863 (uri (pypi-uri "Paste" version))
8864 (sha256
8865 (base32
8866 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8867 (patches (search-patches "python-paste-remove-website-test.patch"
8868 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8869 (build-system python-build-system)
8870 (native-inputs
8871 `(("python-nose" ,python-nose)))
8872 (propagated-inputs
8873 `(;; Uses pkg_resources provided by setuptools internally.
8874 ("python-setuptools" ,python-setuptools)
8875 ("python-six" ,python-six)))
8876 (arguments
8877 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8878 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8879 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8880 ;; still... things should be better by the next Paste release.)
8881 #:tests? #f))
8882 (home-page "http://pythonpaste.org")
8883 (synopsis
8884 "Python web development tools, focusing on WSGI")
8885 (description
8886 "Paste provides a variety of web development tools and middleware which
8887can be nested together to build web applications. Paste's design closely
8888follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8889 (license license:expat)
8890 (properties `((python2-variant . ,(delay python2-paste))))))
8891
8892(define-public python2-paste
8893 (let ((paste (package-with-python2
8894 (strip-python2-variant python-paste))))
8895 (package
8896 (inherit paste)
8897 (arguments
8898 ;; Tests are back for Python 2!
8899 `(#:tests? #t
8900 ,@(package-arguments paste))))))
8901
a8f20f63
CAW
8902(define-public python-pastescript
8903 (package
8904 (name "python-pastescript")
8905 (version "2.0.2")
8906 (source
8907 (origin
8908 (method url-fetch)
8909 (uri (pypi-uri "PasteScript" version))
8910 (sha256
8911 (base32
8912 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8913 (build-system python-build-system)
8914 (native-inputs
8915 `(("python-nose" ,python-nose)))
8916 (propagated-inputs
8917 `(;; Uses pkg_resources provided by setuptools internally.
8918 ("python-setuptools" ,python-setuptools)
8919 ("python-paste" ,python-paste)
8920 ("python-pastedeploy" ,python-pastedeploy)))
8921 (home-page "http://pythonpaste.org/script/")
8922 (arguments
8923 '(;; Unfortunately, this requires the latest unittest2,
8924 ;; but that requires traceback2 which requires linecache2 which requires
8925 ;; unittest2. So we're skipping tests for now.
8926 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8927 ;; so in theory we could get around this situation somehow.)
8928 #:tests? #f))
8929 (synopsis
8930 "Pluggable command line tool for serving web applications and more")
8931 (description
8932 "PasteScript is a plugin-friendly command line tool which provides a
8933variety of features, from launching web applications to bootstrapping project
8934layouts.")
8935 (license license:expat)))
8936
8937(define-public python2-pastescript
8938 (package-with-python2 python-pastescript))
8939
1cf53652
CAW
8940(define-public python-pyquery
8941 (package
8942 (name "python-pyquery")
aab76e80 8943 (version "1.2.13")
1cf53652
CAW
8944 (source
8945 (origin
8946 (method url-fetch)
8947 (uri (pypi-uri "pyquery" version))
8948 (sha256
8949 (base32
aab76e80 8950 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8951 (build-system python-build-system)
2ddbfa8c
LF
8952 (native-inputs
8953 `(("python-webob" ,python-webob)
8954 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8955 (propagated-inputs
8956 `(("python-lxml" ,python-lxml)
8957 ("python-cssselect" ,python-cssselect)))
8958 (home-page "https://github.com/gawel/pyquery")
8959 (synopsis "Make jQuery-like queries on xml documents")
8960 (description "pyquery allows you to make jQuery queries on xml documents.
8961The API is as much as possible the similar to jQuery. pyquery uses lxml for
8962fast xml and html manipulation.")
3f641af0 8963 (license license:bsd-3)
1cf53652
CAW
8964 (properties `((python2-variant . ,(delay python2-pyquery))))))
8965
8966(define-public python2-pyquery
8967 (let ((pyquery (package-with-python2
8968 (strip-python2-variant python-pyquery))))
8969 (package
8970 (inherit pyquery)
2ddbfa8c
LF
8971 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8972 ,@(package-native-inputs pyquery))))))
aa6313d6
CAW
8973
8974(define-public python-webtest
8975 (package
8976 (name "python-webtest")
8977 (version "2.0.20")
8978 (source
8979 (origin
8980 (method url-fetch)
8981 (uri (pypi-uri "WebTest" version))
8982 (sha256
8983 (base32
8984 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8985 (build-system python-build-system)
8986 (arguments
8987 `(;; Unfortunately we have to disable tests!
8988 ;; This release of WebTest is pinned to python-nose < 1.3,
8989 ;; but older versions of python-nose are plagued with the following
8990 ;; bug(s), which rears its ugly head during test execution:
8991 ;; https://github.com/nose-devs/nose/issues/759
8992 ;; https://github.com/nose-devs/nose/pull/811
8993 #:tests? #f))
8994 ;; Commented out code is no good, but in this case, once tests
8995 ;; are ready to be enabled again, we should put the following
8996 ;; in place:
8997 ;; (native-inputs
8998 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8999 ;; ; but see above comment
9000 ;; ("python-coverage" ,python-coverage)
9001 ;; ("python-mock" ,python-mock)
9002 ;; ("python-pastedeploy" ,python-pastedeploy)
9003 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9004 ;; ("python-pyquery" ,python-pyquery)))
9005 (propagated-inputs
9006 `(("python-waitress" ,python-waitress)
9007 ("python-webob" ,python-webob)
9008 ("python-six" ,python-six)
9009 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9010 (home-page "http://webtest.pythonpaste.org/")
9011 (synopsis "Helper to test WSGI applications")
9012 (description "Webtest allows you to test your Python web applications
9013without starting an HTTP server. It supports anything that supports the
9014minimum of WSGI.")
9015 (license license:expat)
9016 (properties `((python2-variant . ,(delay python2-webtest))))))
9017
9018(define-public python2-webtest
9019 (let ((webtest (package-with-python2
9020 (strip-python2-variant python-webtest))))
9021 (package
9022 (inherit webtest)
9023 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9024 ,@(package-native-inputs webtest))))))
4cb122cd
CAW
9025
9026(define-public python-anyjson
9027 (package
9028 (name "python-anyjson")
9029 (version "0.3.3")
9030 (source
9031 (origin
9032 (method url-fetch)
9033 (uri (pypi-uri "anyjson" version))
9034 (sha256
9035 (base32
9036 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9037 (build-system python-build-system)
9038 (arguments
9039 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9040 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9041 ;; whatever) so this transformation needs to be done before the tests
9042 ;; can be run. Maybe we could add a build step to transform beforehand
9043 ;; but it could be annoying/difficult.
9044 ;; We can enable tests for the Python 2 version, though, and do below.
9045 #:tests? #f))
9046 (home-page "http://bitbucket.org/runeh/anyjson/")
9047 (synopsis
9048 "Wraps best available JSON implementation in a common interface")
9049 (description
9050 "Anyjson loads whichever is the fastest JSON module installed
9051and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9052 (license license:bsd-3)
4cb122cd
CAW
9053 (properties `((python2-variant . ,(delay python2-anyjson))))))
9054
9055(define-public python2-anyjson
9056 (let ((anyjson (package-with-python2
9057 (strip-python2-variant python-anyjson))))
9058 (package
9059 (inherit anyjson)
9060 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9061 #:tests? #t
9062 ,@(package-arguments anyjson)))
9063 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9064 ("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9065
9066(define-public python-amqp
9067 (package
9068 (name "python-amqp")
9069 (version "1.4.9")
9070 (source
9071 (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "amqp" version))
9074 (sha256
9075 (base32
9076 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9077 (build-system python-build-system)
9078 (native-inputs
9079 `(("python-nose" ,python-nose)
9080 ("python-mock" ,python-mock)))
9081 (home-page "http://github.com/celery/py-amqp")
9082 (synopsis
9083 "Low-level AMQP client for Python (fork of amqplib)")
9084 (description
9085 "This is a fork of amqplib which was originally written by Barry Pederson.
9086It is maintained by the Celery project, and used by kombu as a pure python
9087alternative when librabbitmq is not available.")
3f641af0 9088 (license license:lgpl2.1+)
8dfceab7
CAW
9089 (properties `((python2-variant . ,(delay python2-amqp))))))
9090
9091(define-public python2-amqp
9092 (let ((amqp (package-with-python2
9093 (strip-python2-variant python-amqp))))
9094 (package
9095 (inherit amqp)
9096 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9097 ;; unmaintained. Weirdly, does not do this on the python 3
9098 ;; version?
9099 #:tests? #f
9100 ,@(package-arguments amqp)))
9101 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9102 ,@(package-native-inputs amqp))))))
7d387305
CAW
9103
9104(define-public python-kombu
9105 (package
9106 (name "python-kombu")
9107 (version "3.0.33")
9108 (source
9109 (origin
9110 (method url-fetch)
9111 (uri (pypi-uri "kombu" version))
9112 (sha256
9113 (base32
9114 "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5"))))
9115 (build-system python-build-system)
9116 (native-inputs
9117 `(("python-mock" ,python-mock)
9118 ("python-nose" ,python-nose)))
9119 (propagated-inputs
9120 `(("python-anyjson" ,python-anyjson)
9121 ("python-amqp" ,python-amqp)))
9122 (home-page "http://kombu.readthedocs.org")
9123 (synopsis "Message passing library for Python")
9124 (description "The aim of Kombu is to make messaging in Python as easy as
9125possible by providing an idiomatic high-level interface for the AMQ protocol,
9126and also provide proven and tested solutions to common messaging problems.
9127AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9128message orientation, queuing, routing, reliability and security, for which the
9129RabbitMQ messaging server is the most popular implementation.")
3f641af0 9130 (license license:bsd-3)
7d387305
CAW
9131 (properties `((python2-variant . ,(delay python2-kombu))))))
9132
9133(define-public python2-kombu
9134 (let ((kombu (package-with-python2
9135 (strip-python2-variant python-kombu))))
9136 (package
9137 (inherit kombu)
9138 (inputs `(("python2-setuptools" ,python2-setuptools)
9139 ("python2-unittest2" ,python2-unittest2)
9140 ,@(package-inputs kombu))))))
b6f0b9fb
CAW
9141
9142(define-public python-billiard
9143 (package
9144 (name "python-billiard")
9145 (version "3.3.0.22")
9146 (source
9147 (origin
9148 (method url-fetch)
9149 (uri (pypi-uri "billiard" version))
9150 (sha256
9151 (base32
9152 "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj"))))
9153 (build-system python-build-system)
9154 (native-inputs
9155 `(("python-nose" ,python-nose)))
9156 (home-page "http://github.com/celery/billiard")
9157 (synopsis
9158 "Python multiprocessing fork with improvements and bugfixes")
9159 (description
9160 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9161multiprocessing package itself is a renamed and updated version of R Oudkerk's
9162pyprocessing package. This standalone variant is intended to be compatible with
9163Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9164 (license license:bsd-3)
b6f0b9fb
CAW
9165 (properties `((python2-variant . ,(delay python2-billiard))))))
9166
9167(define-public python2-billiard
9168 (let ((billiard (package-with-python2
9169 (strip-python2-variant python-billiard))))
9170 (package
9171 (inherit billiard)
9172 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9173 ("python2-unittest2" ,python2-unittest2)
9174 ("python2-mock" ,python2-mock)
9175 ,@(package-native-inputs billiard))))))
22df6419
CAW
9176
9177(define-public python-celery
9178 (package
9179 (name "python-celery")
9180 (version "3.1.20")
9181 (source
9182 (origin
9183 (method url-fetch)
9184 (uri (pypi-uri "celery" version))
9185 (sha256
9186 (base32
9187 "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh"))))
9188 (build-system python-build-system)
9189 (native-inputs
9190 `(("python-nose" ,python-nose)))
a64cbb6f 9191 (inputs
22df6419 9192 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
9193 ("python-amqp" ,python-amqp)
9194 ("python-anyjson" ,python-anyjson)
22df6419
CAW
9195 ("python-billiard" ,python-billiard)
9196 ("python-kombu" ,python-kombu)))
9197 (home-page "http://celeryproject.org")
9198 (synopsis "Distributed Task Queue")
9199 (description "Celery is an asynchronous task queue/job queue based on
9200distributed message passing. It is focused on real-time operation, but
9201supports scheduling as well. The execution units, called tasks, are executed
9202concurrently on a single or more worker servers using multiprocessing,
9203Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9204synchronously (wait until ready).")
3f641af0 9205 (license license:bsd-3)
22df6419
CAW
9206 (properties `((python2-variant . ,(delay python2-celery))))))
9207
9208(define-public python2-celery
9209 (let ((celery (package-with-python2
9210 (strip-python2-variant python-celery))))
9211 (package
9212 (inherit celery)
9213 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9214 ("python2-unittest2" ,python2-unittest2)
9215 ("python2-mock" ,python2-mock)
9216 ,@(package-native-inputs celery))))))
97e32948
CAW
9217
9218(define-public python-translitcodec
9219 (package
9220 (name "python-translitcodec")
9221 (version "0.4.0")
9222 (source
9223 (origin
9224 (method url-fetch)
9225 (uri (pypi-uri "translitcodec" version))
9226 (sha256
9227 (base32
9228 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9229 (build-system python-build-system)
9230 (arguments
9231 `(#:tests? #f)) ; no tests provided
9232 (home-page
9233 "https://github.com/claudep/translitcodec")
9234 (synopsis
9235 "Unicode to 8-bit charset transliteration codec")
9236 (description
9237 "This package contains codecs for transliterating ISO 10646 texts into
9238best-effort representations using smaller coded character sets (ASCII,
9239ISO 8859, etc.).")
9240 (license license:expat)
9241 (properties `((python2-variant . ,(delay python2-translitcodec))))))
9242
9243(define-public python2-translitcodec
9244 (package
9245 (inherit (package-with-python2
9246 (strip-python2-variant python-translitcodec)))
9247 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0c3b90d4
CAW
9248
9249(define-public python-editor
9250 (package
9251 (name "python-editor")
9252 (version "0.5")
9253 (source
9254 (origin
9255 (method url-fetch)
9256 (uri (pypi-uri "python-editor" version))
9257 (sha256
9258 (base32
9259 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9260 (build-system python-build-system)
9261 (home-page
9262 "https://github.com/fmoo/python-editor")
9263 (synopsis
9264 "Programmatically open an editor, capture the result")
9265 (description
9266 "python-editor is a library that provides the editor module for
9267programmatically interfacing with your system's $EDITOR.")
3f641af0 9268 (license license:asl2.0)
0c3b90d4
CAW
9269 (properties `((python2-variant . ,(delay python2-editor))))))
9270
9271(define-public python2-editor
9272 (package
9273 (inherit (package-with-python2
9274 (strip-python2-variant python-editor)))
9275 (inputs `(("python2-setuptools" ,python2-setuptools)))))
3276517c
LF
9276
9277(define-public python-sphinxcontrib-programoutput
9278 (package
9279 (name "python-sphinxcontrib-programoutput")
9280 (version "0.8")
9281 (source (origin
9282 (method url-fetch)
9283 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9284 (sha256
9285 (base32
9286 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9287 (build-system python-build-system)
9288 (propagated-inputs
9289 `(("python-docutils" ,python-docutils)
9290 ("python-sphinx" ,python-sphinx)))
9291 (synopsis "Sphinx extension to include program output")
9292 (description "A Sphinx extension to literally insert the output of arbitrary
9293commands into documents, helping you to keep your command examples up to date.")
9294 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
3f641af0 9295 (license license:bsd-2)
3276517c
LF
9296 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
9297
9298(define-public python2-sphinxcontrib-programoutput
9299 (package
9300 (inherit (package-with-python2
9301 (strip-python2-variant python-sphinxcontrib-programoutput)))
9302 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
548d7165
LF
9303
9304(define-public python-sphinx-repoze-autointerface
9305 (package
9306 (name "python-sphinx-repoze-autointerface")
328ae341 9307 (version "0.8")
548d7165
LF
9308 (source (origin
9309 (method url-fetch)
9310 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9311 (sha256
9312 (base32
328ae341 9313 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9314 (build-system python-build-system)
9315 (propagated-inputs
9316 `(("python-docutils" ,python-docutils)
9317 ("python-sphinx" ,python-sphinx)
9318 ("python-zope-interface" ,python-zope-interface)))
9319 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9320 (description "This package defines an extension for the Sphinx documentation
9321system. The extension allows generation of API documentation by
9322introspection of @code{zope.interface} instances in code.")
9323 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9324 (license license:repoze)))
548d7165
LF
9325
9326(define-public python2-sphinx-repoze-autointerface
9327 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9328
9329(define-public python-psycopg2
9330 (package
9331 (name "python-psycopg2")
9332 (version "2.6.1")
9333 (source
9334 (origin
9335 (method url-fetch)
9336 (uri (pypi-uri "psycopg2" version))
9337 (sha256
9338 (base32
9339 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9340 (build-system python-build-system)
9341 (arguments
9342 ;; Tests would require a postgresql database "psycopg2_test"
9343 ;; and a running postgresql database management service.
9344 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9345 (inputs
9346 `(("postgresql" ,postgresql))) ; libpq
9347 (home-page "http://initd.org/psycopg/")
9348 (synopsis "Python PostgreSQL adapter")
9349 (description
9350 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
3f641af0 9351 (license license:lgpl3+)
b31fbea5
DM
9352 (properties `((python2-variant . ,(delay python2-psycopg2))))))
9353
9354(define-public python2-psycopg2
9355 (package
9356 (inherit (package-with-python2
9357 (strip-python2-variant python-psycopg2)))
9358 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
eed1a61f
LF
9359
9360(define-public python-vobject
9361 (package
9362 (name "python-vobject")
9bed9b15 9363 (version "0.9.2")
eed1a61f
LF
9364 (source (origin
9365 (method url-fetch)
9366 (uri (pypi-uri "vobject" version))
9367 (sha256
9368 (base32
9bed9b15 9369 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f
LF
9370 (build-system python-build-system)
9371 (inputs
9372 `(("python-dateutil-2" ,python-dateutil-2)
9373 ("python-pyicu" ,python-pyicu)))
9374 (synopsis "Parse and generate vCard and vCalendar files")
9375 (description "Vobject is intended to be a full featured Python package for
9376parsing and generating vCard and vCalendar files. Currently, iCalendar files
9377are supported and well tested. vCard 3.0 files are supported, and all data
9378should be imported, but only a few components are understood in a sophisticated
9379way.")
9380 (home-page "http://eventable.github.io/vobject/")
3f641af0 9381 (license license:asl2.0)
eed1a61f
LF
9382 (properties `((python2-variant . ,(delay python2-vobject))))))
9383
9384(define-public python2-vobject
9385 (package
9386 (inherit (package-with-python2
9387 (strip-python2-variant python-vobject)))
9388 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cedac813
LF
9389
9390(define-public python-munkres
9391 (package
9392 (name "python-munkres")
9393 (version "1.0.7")
9394 (source (origin
9395 (method url-fetch)
9396 (uri (pypi-uri "munkres" version))
9397 (sha256
9398 (base32
9399 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9400 (build-system python-build-system)
9401 (arguments
9402 '(#:tests? #f)) ; no test suite
9403 (home-page "http://software.clapper.org/munkres/")
9404 (synopsis "Implementation of the Munkres algorithm")
9405 (description "The Munkres module provides an implementation of the Munkres
9406algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9407useful for solving the Assignment Problem.")
3f641af0 9408 (license license:bsd-3)))
cedac813
LF
9409
9410(define-public python2-munkres
9411 (package-with-python2 python-munkres))
f3b3d78f
LF
9412
9413(define-public python-flask
9414 (package
9415 (name "python-flask")
9416 (version "0.10.1")
9417 (source (origin
9418 (method url-fetch)
9419 (uri (pypi-uri "Flask" version))
9420 (sha256
9421 (base32
9422 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9423 (build-system python-build-system)
9424 (propagated-inputs
9425 `(("python-itsdangerous" ,python-itsdangerous)
9426 ("python-jinja2" ,python-jinja2)
9427 ("python-werkzeug" ,python-werkzeug)))
9428 (home-page "https://github.com/mitsuhiko/flask/")
9429 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9430 (description "Flask is a micro web framework based on the Werkzeug toolkit
9431and Jinja2 template engine. It is called a micro framework because it does not
9432presume or force a developer to use a particular tool or library.")
3f641af0 9433 (license license:bsd-3)
f3b3d78f
LF
9434 (properties `((python2-variant . ,(delay python2-flask))))))
9435
9436(define-public python2-flask
9437 (package (inherit (package-with-python2
9438 (strip-python2-variant python-flask)))
9439 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
603d665b
LF
9440
9441(define-public python-cookies
9442 (package
9443 (name "python-cookies")
9444 (version "2.2.1")
9445 (source (origin
9446 (method url-fetch)
9447 (uri (pypi-uri "cookies" version))
9448 (sha256
9449 (base32
9450 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9451 (build-system python-build-system)
9452 (arguments
9453 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9454 #:tests? #f))
9455 (native-inputs
9456 `(("python-pytest" ,python2-pytest)))
9457 (synopsis "HTTP cookie parser and renderer")
9458 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9459Python.")
9460 (home-page "https://gitlab.com/sashahart/cookies")
9461 (license license:expat)
9462 (properties `((python2-variant . ,(delay python2-cookies))))))
9463
9464(define-public python2-cookies
9465 (let ((cookies (package-with-python2
9466 (strip-python2-variant python-cookies))))
9467 (package (inherit cookies)
9468 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9469 ,@(package-native-inputs cookies))))))
0efde7d6
LF
9470
9471(define-public python-responses
9472 (package
9473 (name "python-responses")
9474 (version "0.5.1")
9475 (source (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "responses" version))
9478 (sha256
9479 (base32
9480 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9481 (build-system python-build-system)
9482 (arguments
9483 `(;; Test suite is not distributed:
9484 ;; https://github.com/getsentry/responses/issues/38
9485 #:tests? #f))
9486 (native-inputs
9487 `(("python-cookies" ,python-cookies)
9488 ("python-mock" ,python-mock)))
9489 (propagated-inputs
9490 `(("python-requests" ,python-requests)
9491 ("python-six" ,python-six)))
9492 (home-page "https://github.com/getsentry/responses")
9493 (synopsis "Utility for mocking out the `requests` Python library")
9494 (description "A utility library for mocking out the `requests` Python
9495library.")
3f641af0 9496 (license license:asl2.0)
0efde7d6
LF
9497 (properties `((python2-variant . ,(delay python2-responses))))))
9498
9499(define-public python2-responses
9500 (let ((responses (package-with-python2
9501 (strip-python2-variant python-responses))))
9502 (package (inherit responses)
9503 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9504 ,@(package-native-inputs responses))))))
76b94885 9505
b7afd018
RW
9506(define-public python-whoosh
9507 (package
9508 (name "python-whoosh")
9509 (version "2.7.4")
9510 (source
9511 (origin
9512 (method url-fetch)
9513 (uri (pypi-uri "Whoosh" version))
9514 (sha256
9515 (base32
9516 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9517 (build-system python-build-system)
9518 (native-inputs
9519 `(("python-setuptools" ,python-setuptools)
9520 ("python-pytest" ,python-pytest)))
9521 (home-page "http://bitbucket.org/mchaput/whoosh")
9522 (synopsis "Full text indexing, search, and spell checking library")
9523 (description
9524 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9525checking library.")
9526 (license license:bsd-2)))
9527
9528(define-public python2-whoosh
9529 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9530 (package (inherit whoosh)
9531 (propagated-inputs
9532 `(("python2-backport-ssl-match-hostname"
9533 ,python2-backport-ssl-match-hostname)
9534 ,@(package-propagated-inputs whoosh))))))
9535
76b94885
LF
9536(define-public python-pathlib
9537 (package
9538 (name "python-pathlib")
9539 (version "1.0.1")
9540 (source (origin
9541 (method url-fetch)
9542 (uri (pypi-uri "pathlib" version))
9543 (sha256
9544 (base32
9545 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9546 (build-system python-build-system)
92a312dc
RW
9547 ;; The tests depend on the internal "test" module, which does not provide
9548 ;; a stable interface.
9549 (arguments `(#:tests? #f))
76b94885 9550 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9551 (synopsis "Object-oriented file system paths")
9552 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9553It offers the following advantages over using string objects:
9554
9555@enumerate
9556@item No more cumbersome use of os and os.path functions. Everything can
9557be done easily through operators, attribute accesses, and method calls.
9558@item Embodies the semantics of different path types. For example,
9559comparing Windows paths ignores casing.
9560@item Well-defined semantics, eliminating any inconsistencies or
9561ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9562@end enumerate
9563
9564Note: In Python 3.4, pathlib is now part of the standard library. For other
9565Python versions please consider python-pathlib2 instead, which tracks the
9566standard library module. This module (python-pathlib) isn't maintained
9567anymore.")
76b94885
LF
9568 (license license:expat)))
9569
9570(define-public python2-pathlib
9571 (package-with-python2 python-pathlib))
25a7db0a 9572
b7703c81
HG
9573(define-public python2-pathlib2
9574 (package
9575 (name "python2-pathlib2")
9576 (version "2.1.0")
9577 (source (origin
9578 (method url-fetch)
9579 (uri (pypi-uri "pathlib2" version))
9580 (sha256
9581 (base32
9582 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9583 (build-system python-build-system)
49a531f5
HG
9584 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9585 ;; version is 3.4 which already includes this package as part of the
9586 ;; standard library.
b7703c81
HG
9587 (arguments
9588 `(#:python ,python-2))
9589 (native-inputs
9590 `(("python2-setuptools" ,python2-setuptools)
9591 ("python2-six" ,python2-six)))
9592 (home-page "http://pypi.python.org/pypi/pathlib2/")
9593 (synopsis "Object-oriented file system paths - backport of standard
9594pathlib module")
9595 (description "The goal of pathlib2 is to provide a backport of standard
9596pathlib module which tracks the standard library module, so all the newest
9597features of the standard pathlib can be used also on older Python versions.
9598
9599Pathlib offers a set of classes to handle file system paths. It offers the
9600following advantages over using string objects:
9601
9602@enumerate
9603@item No more cumbersome use of os and os.path functions. Everything can
9604be done easily through operators, attribute accesses, and method calls.
9605@item Embodies the semantics of different path types. For example,
9606comparing Windows paths ignores casing.
9607@item Well-defined semantics, eliminating any inconsistencies or
9608ambiguities (forward vs. backward slashes, etc.).
9609@end enumerate")
9610 (license license:expat)))
9611
25a7db0a
LF
9612(define-public python-jellyfish
9613 (package
9614 (name "python-jellyfish")
9615 (version "0.5.3")
9616 (source (origin
9617 (method url-fetch)
9618 (uri (pypi-uri "jellyfish" version))
9619 (sha256
9620 (base32
9621 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9622 (build-system python-build-system)
9623 (native-inputs
9624 `(("python-pytest" ,python-pytest)))
9625 (home-page "https://github.com/jamesturk/jellyfish")
9626 (synopsis "Approximate and phonetic matching of strings")
9627 (description "Jellyfish uses a variety of string comparison and phonetic
9628encoding algorithms to do fuzzy string matching.")
3f641af0 9629 (license license:bsd-2)
25a7db0a
LF
9630 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9631
9632(define-public python2-jellyfish
9633 (let ((jellyfish (package-with-python2
9634 (strip-python2-variant python-jellyfish))))
9635 (package (inherit jellyfish)
9636 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9637 ("python2-unicodecsv" ,python2-unicodecsv)
9638 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9639
9640(define-public python2-unicodecsv
9641 (package
9642 (name "python2-unicodecsv")
9643 (version "0.14.1")
9644 (source (origin
9645 (method url-fetch)
9646 ;; The test suite is not included in the PyPi release.
9647 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9648 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9649 "archive/" version ".tar.gz"))
9650 (file-name (string-append name "-" version ".tar.gz"))
9651 (sha256
9652 (base32
9653 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9654 (build-system python-build-system)
9655 (arguments
9656 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9657 #:python ,python-2))
9658 (native-inputs
9659 `(("python2-setuptools" ,python2-setuptools)
9660 ("python2-unittest2" ,python2-unittest2)))
9661 (home-page "https://github.com/jdunck/python-unicodecsv")
9662 (synopsis "Unicode CSV module for Python 2")
9663 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9664module, adding support for Unicode strings.")
3f641af0 9665 (license license:bsd-2)))
064503aa
LF
9666
9667(define-public python-rarfile
9668 (package
9669 (name "python-rarfile")
9670 (version "2.7")
9671 (source (origin
9672 (method url-fetch)
9673 (uri (pypi-uri "rarfile" version))
9674 (sha256
9675 (base32
9676 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9677 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 9678 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
9679 (build-system python-build-system)
9680 (arguments
9681 '(#:phases
9682 (modify-phases %standard-phases
9683 (replace 'check
9684 ;; Many tests fail, but the installation proceeds.
9685 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9686 (native-inputs
9687 `(("which" ,which))) ; required for tests
9688 (propagated-inputs
9689 `(("libarchive" ,libarchive)))
9690 (home-page "https://github.com/markokr/rarfile")
9691 (synopsis "RAR archive reader for Python")
9692 (description "This is Python module for RAR archive reading. The interface
9693is made as zipfile like as possible.")
3f641af0 9694 (license license:isc)))
064503aa
LF
9695
9696(define-public python2-rarfile
9697 (package-with-python2 python-rarfile))
daeeea71
CM
9698
9699(define-public python-magic
9700 (package
9701 (name "python-magic")
9702 (version "0.4.3")
9703 (source
9704 (origin
9705 (method url-fetch)
9706 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9707 version ".tar.gz"))
9708 (sha256
9709 (base32
9710 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9711 (file-name (string-append name "-" version "-checkout"))))
9712 (build-system python-build-system)
9713 (arguments
9714 ;; The tests are unreliable, so don't run them. The tests fail
9715 ;; under Python3 because they were written for Python2 and
9716 ;; contain import statements that do not work in Python3. One of
9717 ;; the tests fails under Python2 because its assertions are
9718 ;; overly stringent; it relies on comparing output strings which
9719 ;; are brittle and can change depending on the version of
9720 ;; libmagic being used and the system on which the test is
9721 ;; running. In my case, under GuixSD 0.10.0, only one test
9722 ;; failed, and it seems to have failed only because the version
9723 ;; of libmagic that is packaged in Guix outputs a slightly
9724 ;; different (but not wrong) string than the one that the test
9725 ;; expected.
9726 '(#:tests? #f
9727 #:phases (modify-phases %standard-phases
9728 ;; Replace a specific method call with a hard-coded
9729 ;; path to the necessary libmagic.so file in the
9730 ;; store. If we don't do this, then the method call
9731 ;; will fail to find the libmagic.so file, which in
9732 ;; turn will cause any application using
9733 ;; python-magic to fail.
9734 (add-before 'build 'hard-code-path-to-libmagic
9735 (lambda* (#:key inputs #:allow-other-keys)
9736 (let ((file (assoc-ref inputs "file")))
9737 (substitute* "magic.py"
9738 (("ctypes.util.find_library\\('magic'\\)")
9739 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9740 #t)))
9741 (add-before 'install 'disable-egg-compression
9742 (lambda _
9743 (let ((port (open-file "setup.cfg" "a")))
9744 (display "\n[easy_install]\nzip_ok = 0\n"
9745 port)
9746 (close-port port)
9747 #t))))))
daeeea71
CM
9748 (native-inputs
9749 `(("python-setuptools" ,python-setuptools)))
9750 (inputs
9751 ;; python-magic needs to be able to find libmagic.so.
9752 `(("file" ,file)))
9753 (home-page "https://github.com/ahupp/python-magic")
9754 (synopsis "File type identification using libmagic")
9755 (description
9756 "This module uses ctypes to access the libmagic file type
9757identification library. It makes use of the local magic database and
9758supports both textual and MIME-type output. Note that this module and
9759the python-file module both provide a \"magic.py\" file; these two
9760modules, which are different and were developed separately, both serve
9761the same purpose: to provide Python bindings for libmagic.")
9762 (license license:expat)))
9763
9764(define-public python2-magic
9765 (package-with-python2 python-magic))
12af303f
CM
9766
9767(define-public python2-s3cmd
9768 (package
9769 (name "python2-s3cmd")
9770 (version "1.6.1")
9771 (source
9772 (origin
9773 (method url-fetch)
de67e922 9774 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9775 "s3cmd-" version ".tar.gz"))
9776 (sha256
9777 (base32
9778 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9779 (build-system python-build-system)
9780 (arguments
9781 ;; s3cmd is written for python2 only and contains no tests.
9782 `(#:python ,python-2
9783 #:tests? #f))
9784 (native-inputs
9785 `(("python2-setuptools" ,python2-setuptools)))
9786 (inputs
9787 `(("python2-dateutil" ,python2-dateutil)
9788 ;; The python-file package also provides a magic.py module.
9789 ;; This is an unfortunate state of affairs; however, s3cmd
9790 ;; fails to install if it cannot find specifically the
9791 ;; python-magic package. Thus we include it, instead of using
9792 ;; python-file. Ironically, s3cmd sometimes works better
9793 ;; without libmagic bindings at all:
9794 ;; https://github.com/s3tools/s3cmd/issues/198
9795 ("python2-magic" ,python2-magic)))
9796 (home-page "http://s3tools.org/s3cmd")
9797 (synopsis "Command line tool for S3-compatible storage services")
9798 (description
9799 "S3cmd is a command line tool for uploading, retrieving and managing data
9800in storage services that are compatible with the Amazon Simple Storage
9801Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9802GnuPG encryption, and more. It also supports management of Amazon's
9803CloudFront content delivery network.")
3f641af0 9804 (license license:gpl2+)))
4323a5f0
AE
9805
9806(define-public python-pkgconfig
9807 (package
9808 (name "python-pkgconfig")
9809 (version "1.1.0")
9810 (source
9811 (origin
9812 (method url-fetch)
9813 (uri (pypi-uri "pkgconfig" version))
9814 (sha256
9815 (base32
9816 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9817 (build-system python-build-system)
9818 (native-inputs
9819 `(("python-nose" ,python-nose)
9820 ("python-setuptools" ,python-setuptools)))
9821 (inputs
9822 `(("pkg-config" ,pkg-config)))
9823 (arguments
9824 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9825 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9826 #:tests? #f
9827 ;; Prevent creation of the egg. This works around
9828 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9829 #:configure-flags '("--single-version-externally-managed" "--root=/")
9830 ;; Hard-code the path to pkg-config.
9831 #:phases
9832 (modify-phases %standard-phases
9833 (add-before
9834 'build 'patch
9835 (lambda _
9836 (substitute* "pkgconfig/pkgconfig.py"
9837 (("cmd = 'pkg-config")
9838 (string-append "cmd = '" (which "pkg-config"))))
9839 #t)))))
9840 (home-page "http://github.com/matze/pkgconfig")
9841 (synopsis "Python interface for pkg-config")
9842 (description "This module provides a Python interface to pkg-config. It
9843can be used to find all pkg-config packages, check if a package exists,
9844check if a package meets certain version requirements, query CFLAGS and
9845LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9846 (license license:expat)))
4323a5f0
AE
9847
9848(define-public python2-pkgconfig
9849 (package-with-python2 python-pkgconfig))
9850
2e697322
BW
9851(define-public python-bz2file
9852 (package
9853 (name "python-bz2file")
9854 (version "0.98")
9855 (source
9856 (origin
9857 (method url-fetch)
9858 (uri (pypi-uri "bz2file" version))
9859 (sha256
9860 (base32
9861 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9862 (build-system python-build-system)
9863 (arguments
124df723 9864 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9865 (home-page "https://github.com/nvawda/bz2file")
9866 (synopsis "Read and write bzip2-compressed files")
9867 (description
9868 "Bz2file is a Python library for reading and writing bzip2-compressed
9869files. It contains a drop-in replacement for the I/O interface in the
9870standard library's @code{bz2} module, including features from the latest
9871development version of CPython that are not available in older releases.")
3f641af0 9872 (license license:asl2.0)
2e697322
BW
9873 (properties `((python2-variant . ,(delay python2-bz2file))))))
9874
9875(define-public python2-bz2file
9876 (let ((base (package-with-python2
9877 (strip-python2-variant python-bz2file))))
9878 (package
9879 (inherit base)
9880 (native-inputs
124df723
BW
9881 `(("python2-setuptools" ,python2-setuptools)))
9882 (arguments
752bb447
BW
9883 `(#:python ,python-2
9884 #:phases
124df723
BW
9885 (modify-phases %standard-phases
9886 ;; 'python setup.py test' does not work as of 0.98.
9887 ;; There is only the one test file, so we run it directly.
9888 (replace 'check
9889 (lambda _ (zero? (system* "python"
9890 "test_bz2file.py"))))))))))
2e697322 9891
da4ac1aa
BW
9892(define-public python-future
9893 (package
9894 (name "python-future")
9895 (version "0.15.2")
9896 (source
9897 (origin
9898 (method url-fetch)
9899 (uri (pypi-uri "future" version))
9900 (sha256
9901 (base32
9902 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9903 (build-system python-build-system)
9904 ;; Many tests connect to the network or are otherwise flawed.
9905 ;; https://github.com/PythonCharmers/python-future/issues/210
9906 (arguments
9907 `(#:tests? #f))
9908 (home-page "http://python-future.org")
9909 (synopsis "Single-source support for Python 3 and 2")
9910 (description
9911 "@code{python-future} is the missing compatibility layer between Python 2 and
9912Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9913to support both Python 2 and Python 3 with minimal overhead.")
9914 (license license:expat)
9915 (properties `((python2-variant . ,(delay python2-future))))))
9916
9917(define-public python2-future
9918 (let ((base (package-with-python2
9919 (strip-python2-variant python-future))))
9920 (package
9921 (inherit base)
9922 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9923
8e451885
AE
9924(define-public python-cysignals
9925 (package
9926 (name "python-cysignals")
9927 (version "1.1.0")
9928 (source
9929 (origin
9930 (method url-fetch)
9931 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9932 (sha256
9933 (base32
9934 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9935 (build-system python-build-system)
9936 (native-inputs
9937 `(("python-cython" ,python-cython)
9938 ("python-setuptools" ,python-setuptools)
9939 ("python-sphinx" ,python-sphinx)))
9940 (inputs
9941 `(("pari-gp" ,pari-gp)))
9942 (arguments
9943 `(#:modules ((guix build python-build-system)
9944 ((guix build gnu-build-system) #:prefix gnu:)
9945 (guix build utils))
9946 ;; FIXME: Tests are executed after installation and currently fail
9947 ;; when not installing into standard locations; the author is working
9948 ;; on a fix.
9949 #:tests? #f
9950 #:phases
9951 (modify-phases %standard-phases
9952 (add-before
9953 'build 'configure
9954 (assoc-ref gnu:%standard-phases 'configure)))))
9955 (home-page
9956 "https://github.com/sagemath/cysignals")
9957 (synopsis
9958 "Handling of interrupts and signals for Cython")
9959 (description
9960 "The cysignals package provides mechanisms to handle interrupts (and
9961other signals and errors) in Cython code, using two related approaches,
9962for mixed Cython/Python code or external C libraries and pure Cython code,
9963respectively.")
3f641af0 9964 (license license:lgpl3+)))
8e451885
AE
9965
9966(define-public python2-cysignals
9967 (package-with-python2 python-cysignals))
9968
63bcec71
DM
9969(define-public python2-shedskin
9970 (package
9971 (name "python2-shedskin")
9972 (version "0.9.4")
9973 (source
9974 (origin
9975 (method url-fetch)
9976 (uri (string-append "https://github.com/shedskin/shedskin/"
9977 "releases/download/v" version
9978 "/shedskin-" version ".tgz"))
9979 (sha256
9980 (base32
9981 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9982 (build-system python-build-system)
9983 (arguments
9984 `(#:python ,python-2
9985 #:phases (modify-phases %standard-phases
9986 (add-after 'unpack 'fix-resulting-include-libs
9987 (lambda* (#:key inputs #:allow-other-keys)
9988 (let ((libgc (assoc-ref inputs "libgc"))
9989 (pcre (assoc-ref inputs "pcre")))
9990 (substitute* "shedskin/makefile.py"
9991 (("variable == 'CCFLAGS':[ ]*")
9992 (string-append "variable == 'CCFLAGS':\n"
9993 " line += ' -I " pcre "/include"
9994 " -I " libgc "/include'"))
9995 (("variable == 'LFLAGS':[ ]*")
9996 (string-append "variable == 'LFLAGS':\n"
9997 " line += ' -L" pcre "/lib"
9998 " -L " libgc "/lib'")))
9999 #t))))))
10000 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
10001 (inputs `(("pcre" ,pcre)
10002 ("libgc" ,libgc)))
10003 (home-page "https://shedskin.github.io/")
10004 (synopsis "Experimental Python-2 to C++ Compiler")
10005 (description (string-append "This is an experimental compiler for a subset of
10006Python. It generates C++ code and a Makefile."))
3f641af0 10007 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10008
10009(define-public python2-rope
10010 (package
10011 (name "python2-rope")
10012 (version "0.10.3")
10013 (source
10014 (origin
10015 (method url-fetch)
10016 (uri (pypi-uri "rope" version))
10017 (sha256
10018 (base32
10019 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10020 (arguments
10021 ;; Rope is currently python-2 only.
10022 ;; https://github.com/python-rope/rope/issues/57
10023 `(#:python ,python-2))
10024 (build-system python-build-system)
10025 (native-inputs
10026 `(("python2-unittest2" ,python2-unittest2)
10027 ("python2-setuptools" ,python2-setuptools)))
10028 (home-page "https://github.com/python-rope/rope")
10029 (synopsis "Refactoring library for Python")
10030 (description "Rope is a refactoring library for Python. It facilitates
10031the renaming, moving and extracting of attributes, functions, modules, fields
10032and parameters in Python 2 source code. These refactorings can also be applied
10033to occurences in strings and comments.")
3f641af0 10034 (license license:gpl2)))
6ba8ca17
10035
10036(define-public python-py3status
10037 (package
10038 (name "python-py3status")
d2262d70 10039 (version "3.1")
6ba8ca17
10040 (source
10041 (origin
10042 (method url-fetch)
10043 (uri (pypi-uri "py3status" version))
10044 (sha256
10045 (base32
d2262d70 10046 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17
10047 (build-system python-build-system)
10048 (native-inputs
10049 `(("python-setuptools" ,python-setuptools)))
10050 (home-page "https://github.com/ultrabug/py3status")
10051 (synopsis "Extensible i3status wrapper written in Python")
10052 (description "py3status is an i3status wrapper which extends i3status
10053functionality in a modular way, allowing you to extend your panel with your
10054own code, responding to click events and updating clock every second.")
3f641af0 10055 (license license:bsd-3)))
b8fdbca3
HG
10056
10057(define-public python-tblib
10058 (package
10059 (name "python-tblib")
10060 (version "1.3.0")
10061 (source (origin
10062 (method url-fetch)
10063 (uri (pypi-uri "tblib" version))
10064 (sha256 (base32
10065 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10066 (build-system python-build-system)
10067 (arguments
10068 `(#:phases
10069 (modify-phases %standard-phases
10070 (replace 'check
10071 (lambda _
10072 ;; Upstream runs tests after installation and the package itself
10073 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10074 ;; found.
10075 (setenv "PYTHONPATH"
10076 (string-append (getcwd) "/build/lib:"
10077 (getenv "PYTHONPATH")))
10078 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10079 (native-inputs
10080 `(("python-pytest" ,python-pytest)
10081 ("python-setuptools" ,python-setuptools)
10082 ("python-six" ,python-six)))
10083 (home-page "https://github.com/ionelmc/python-tblib")
10084 (synopsis "Traceback serialization library")
10085 (description
10086 "Traceback serialization allows you to:
10087
10088@enumerate
10089@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10090different processes. This allows better error handling when running code over
10091multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10092
10093@item Parse traceback strings and raise with the parsed tracebacks.
10094@end itemize")
3f641af0 10095 (license license:bsd-3)))
b8fdbca3
HG
10096
10097(define-public python2-tblib
10098 (package-with-python2 python-tblib))
1a024de4
HG
10099
10100(define-public python-sqlparse
10101 (package
10102 (name "python-sqlparse")
10103 (version "0.1.19")
10104 (source (origin
10105 (method url-fetch)
10106 (uri (pypi-uri "sqlparse" version))
10107 (sha256
10108 (base32
10109 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10110 (build-system python-build-system)
10111 (arguments
10112 `(#:phases
10113 (modify-phases %standard-phases
10114 (replace 'check
10115 (lambda* _
10116 ;; setup.py-integrated 2to3 only affects the build files, but
10117 ;; py.test is using the source files. So we need to convert them
10118 ;; manually.
10119 (when (zero? (system* "python3"))
10120 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10121 (zero? (system* "py.test")))))))
10122 (native-inputs
10123 `(("python-pytest" ,python-pytest)
10124 ("python-setuptools" ,python-setuptools)))
10125 (home-page "https://github.com/andialbrecht/sqlparse")
10126 (synopsis "Non-validating SQL parser")
10127 (description "Sqlparse is a non-validating SQL parser for Python. It
10128provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10129 (license license:bsd-3)))
1a024de4
HG
10130
10131(define-public python2-sqlparse
10132 (package-with-python2 python-sqlparse))
68b9d242
SB
10133
10134(define-public python-greenlet
10135 (package
10136 (name "python-greenlet")
10137 (version "0.4.9")
10138 (source (origin
10139 (method url-fetch)
10140 (uri (pypi-uri "greenlet" version))
10141 (sha256
10142 (base32
10143 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
10144 (build-system python-build-system)
10145 (native-inputs
10146 `(("python-setuptools" ,python-setuptools)))
10147 (home-page "https://greenlet.readthedocs.io/")
10148 (synopsis "Lightweight in-process concurrent programming")
10149 (description
10150 "Greenlet package is a spin-off of Stackless, a version of CPython
10151that supports micro-threads called \"tasklets\". Tasklets run
10152pseudo-concurrently (typically in a single or a few OS-level threads) and
10153are synchronized with data exchanges on \"channels\".")
3f641af0 10154 (license (list license:psfl license:expat))))
68b9d242
SB
10155
10156(define-public python2-greenlet
10157 (package-with-python2 python-greenlet))
d79a343b
SB
10158
10159(define-public python-gevent
10160 (package
10161 (name "python-gevent")
10162 (version "1.1.1")
10163 (source (origin
10164 (method url-fetch)
10165 (uri (pypi-uri "gevent" version))
10166 (sha256
10167 (base32
10168 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10169 (modules '((guix build utils)))
10170 (snippet
10171 '(begin
10172 ;; unbunding libev and c-ares
10173 (for-each delete-file-recursively '("libev" "c-ares"))
10174 ;; fixing testsuite
10175 (call-with-output-file "greentest/__init__.py" noop)
10176 (substitute* "greentest/testrunner.py"
10177 (("import util") "from . import util")
10178 (("from util import log") "from .util import log"))))))
10179 (build-system python-build-system)
10180 (propagated-inputs
10181 `(("python-greenlet" ,python-greenlet)))
10182 (native-inputs
10183 `(("python-setuptools" ,python-setuptools)
10184 ("python-six" ,python-six)))
10185 (inputs
10186 `(("c-ares" ,c-ares)
10187 ("libev" ,libev)))
10188 (home-page "http://www.gevent.org/")
10189 (synopsis "Coroutine-based network library")
10190 (description
10191 "gevent is a coroutine-based Python networking library that uses greenlet
10192to provide a high-level synchronous API on top of the libev event loop.")
10193 (license license:expat)))
10194
10195(define-public python2-gevent
10196 (package-with-python2 python-gevent))
da3aeeb6
SB
10197
10198(define-public python-twisted
10199 (package
10200 (name "python-twisted")
10201 (version "16.2.0")
10202 (source (origin
10203 (method url-fetch)
8ea8e8d3 10204 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10205 (sha256
10206 (base32
10207 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10208 (build-system python-build-system)
10209 (native-inputs
45912170
SB
10210 `(("python-setuptools" ,python-setuptools)))
10211 (propagated-inputs
10212 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10213 (home-page "https://twistedmatrix.com/")
10214 (synopsis "Asynchronous networking framework written in Python")
10215 (description
10216 "Twisted is an extensible framework for Python programming, with special
10217focus on event-based network programming and multiprotocol integration.")
10218 (license license:expat)))
10219
10220(define-public python2-twisted
10221 (package-with-python2 python-twisted))
d0b6fed6 10222
4d3fa5a4
EF
10223(define-public python-pika
10224 (package
10225 (name "python-pika")
10226 (version "0.10.0")
10227 (source
10228 (origin
10229 (method url-fetch)
10230 (uri (pypi-uri "pika" version))
10231 (sha256
10232 (base32
10233 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10234 (build-system python-build-system)
10235 (native-inputs
269d9172
LF
10236 `(("python-pyev" ,python-pyev)
10237 ("python-tornado" ,python-tornado)
10238 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10239 (home-page "https://pika.readthedocs.org")
10240 (synopsis "Pure Python AMQP Client Library")
10241 (description
10242 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10243Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10244network support library.")
10245 (license license:bsd-3)))
10246
10247(define-public python2-pika
10248 (package-with-python2 python-pika))
10249
d0b6fed6
DM
10250(define-public python-ply
10251 (package
10252 (name "python-ply")
10253 (version "3.8")
10254 (source
10255 (origin
10256 (method url-fetch)
10257 (uri (string-append
10258 "https://pypi.python.org/packages/"
10259 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10260 "/ply-" version ".tar.gz"))
10261 (sha256
10262 (base32
10263 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10264 (build-system python-build-system)
10265 (home-page "http://www.dabeaz.com/ply/")
10266 (synopsis "Python Lex & Yacc")
10267 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10268It uses LR parsing and does extensive error checking.")
3f641af0 10269 (license license:bsd-3)
d0b6fed6
DM
10270 (properties `((python2-variant . ,(delay python2-ply))))))
10271
10272(define-public python2-ply
10273 (package
10274 (inherit (package-with-python2
10275 (strip-python2-variant python-ply)))
10276 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
d951bd54
SB
10277
10278(define-public python-tabulate
10279 (package
10280 (name "python-tabulate")
10281 (version "0.7.5")
10282 (source (origin
10283 (method url-fetch)
10284 (uri (pypi-uri "tabulate" version))
10285 (sha256
10286 (base32
10287 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10288 ;; Fix tests
10289 (modules '((guix build utils)))
10290 (snippet '(substitute* '("test/test_cli.py"
10291 "test/test_input.py"
10292 "test/test_output.py"
10293 "test/test_regression.py")
10294 (("from common") "from nose.tools")))))
10295 (build-system python-build-system)
10296 (native-inputs
10297 `(("python-setuptools" ,python-setuptools)
10298 ;; For testing
10299 ("python-nose" ,python-nose)))
10300 (home-page "https://bitbucket.org/astanin/python-tabulate")
10301 (synopsis "Pretty-print tabular data")
10302 (description
10303 "Tabulate is a library and command-line utility to pretty-print tabular
10304data in Python.")
10305 (license license:expat)))
10306
10307(define-public python2-tabulate
10308 (package-with-python2 python-tabulate))
1c4c8a33
SB
10309
10310(define-public python-kazoo
10311 (package
10312 (name "python-kazoo")
10313 (version "2.2.1")
10314 (source
10315 (origin
10316 (method url-fetch)
10317 (uri (pypi-uri "kazoo" version))
10318 (sha256
10319 (base32
10320 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10321 (build-system python-build-system)
10322 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10323 (native-inputs
c18899e8
SB
10324 `(("python-setuptools" ,python-setuptools)))
10325 (propagated-inputs
10326 `(("python-six" ,python-six)))
1c4c8a33
SB
10327 (home-page "https://kazoo.readthedocs.org")
10328 (synopsis "High-level Zookeeper client library")
10329 (description
10330 "Kazoo is a Python client library for the Apache Zookeeper distributed
10331application service. It is designed to be easy to use and to avoid common
10332programming errors.")
3f641af0 10333 (license license:asl2.0)))
1c4c8a33
SB
10334
10335(define-public python2-kazoo
10336 (package-with-python2 python-kazoo))
45dda35e
SB
10337
10338(define-public python-pykafka
10339 (package
10340 (name "python-pykafka")
10341 (version "2.4.0")
10342 (source (origin
10343 (method url-fetch)
c6bccf71
EF
10344 (uri (string-append
10345 "https://pypi.python.org/packages/8b/3e/"
10346 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10347 "pykafka-" version ".tar.gz"))
45dda35e
SB
10348 (sha256
10349 (base32
10350 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10351 (build-system python-build-system)
10352 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10353 (native-inputs
c8fa3d9b
SB
10354 `(("python-setuptools" ,python-setuptools)))
10355 (propagated-inputs
45dda35e
SB
10356 `(("python-gevent" ,python-gevent)
10357 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10358 ("python-tabulate" ,python-tabulate)))
10359 (inputs
10360 `(("librdkafka" ,librdkafka)))
10361 (home-page "https://pykafka.readthedocs.io/")
10362 (synopsis "Apache Kafka client for Python")
10363 (description
10364 "PyKafka is a client for the Apache Kafka distributed messaging system.
10365It includes Python implementations of Kafka producers and consumers, which
10366are optionally backed by a C extension built on librdkafka.")
3f641af0 10367 (license license:asl2.0)))
45dda35e
SB
10368
10369(define-public python2-pykafka
10370 (package-with-python2 python-pykafka))
a44fd439
DM
10371
10372(define-public python-wcwidth
10373 (package
10374 (name "python-wcwidth")
10375 (version "0.1.6")
10376 (source
10377 (origin
10378 (method url-fetch)
10379 (uri (string-append
10380 "https://pypi.python.org/packages/"
10381 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10382 "wcwidth-" version ".tar.gz"))
10383 (sha256
10384 (base32
10385 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10386 (build-system python-build-system)
10387 (home-page "https://github.com/jquast/wcwidth")
66e07664 10388 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10389 (description "Wcwidth measures the number of terminal column cells of
10390wide-character codes. It is useful for those implementing a terminal emulator,
10391or programs that carefully produce output to be interpreted by one. It is a
10392Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10393specified in POSIX.1-2001 and POSIX.1-2008.")
e4875826
LF
10394 (license license:expat)
10395 (properties `((python2-variant . ,(delay python2-wcwidth))))))
a44fd439
DM
10396
10397(define-public python2-wcwidth
10398 (package
10399 (inherit (package-with-python2
10400 (strip-python2-variant python-wcwidth)))
10401 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0de78c95
DP
10402
10403(define-public python2-jsonrpclib
10404 (package
10405 (name "python2-jsonrpclib")
10406 (version "0.1.7")
10407 (source (origin
10408 (method url-fetch)
10409 (uri (string-append
10410 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10411 "jsonrpclib-" version ".tar.gz"))
10412 (sha256
10413 (base32
10414 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10415 (build-system python-build-system)
10416 (native-inputs
10417 `(("python2-setuptools" ,python2-setuptools)))
10418 (arguments
10419 `(#:tests? #f
10420 #:python ,python-2))
10421 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10422 (synopsis "Implementation of JSON-RPC specification for Python")
10423 (description
10424 "This library is an implementation of the JSON-RPC specification.
10425It supports both the original 1.0 specification, as well as the
10426new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10427etc.")
3f641af0 10428 (license license:asl2.0)))
9250b0f3
SB
10429
10430(define-public python-chai
10431 (package
10432 (name "python-chai")
10433 (version "1.1.1")
10434 (source (origin
10435 (method url-fetch)
10436 (uri (pypi-uri "chai" version))
10437 (sha256
10438 (base32
10439 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10440 (build-system python-build-system)
10441 (native-inputs
10442 `(("python-setuptools" ,python-setuptools)))
10443 (home-page "https://github.com/agoragames/chai")
10444 (synopsis "Mocking framework for Python")
10445 (description
10446 "Chai provides an api for mocking, stubbing and spying your python
10447objects, patterned after the Mocha library for Ruby.")
3f641af0 10448 (license license:bsd-3)))
9250b0f3
SB
10449
10450(define-public python2-chai
10451 (package-with-python2 python-chai))
10452
ae43baa8
SB
10453(define-public python-arrow
10454 (package
10455 (name "python-arrow")
10456 (version "0.8.0")
10457 (source (origin
10458 (method url-fetch)
10459 (uri (pypi-uri "arrow" version))
10460 (sha256
10461 (base32
10462 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10463 (build-system python-build-system)
10464 (native-inputs
10465 `(("python-setuptools" ,python-setuptools)
ae43baa8
SB
10466 ;; For testing
10467 ("python-chai" ,python-chai)
10468 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10469 (propagated-inputs
10470 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10471 (home-page "https://github.com/crsmithdev/arrow/")
10472 (synopsis "Dates and times for Python")
10473 (description
10474 "Arrow is a Python library to creating, manipulating, formatting and
10475converting dates, times, and timestamps. It implements and updates the
10476datetime type.")
3f641af0 10477 (license license:asl2.0)))
ae43baa8
SB
10478
10479(define-public python2-arrow
10480 (package-with-python2 python-arrow))
10481
1f2b62a4
SB
10482(define-public python-inflection
10483 (package
10484 (name "python-inflection")
10485 (version "0.3.1")
10486 (source
10487 (origin (method url-fetch)
10488 (uri (pypi-uri "inflection" version))
10489 (sha256
10490 (base32
10491 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10492 (build-system python-build-system)
10493 (native-inputs
10494 `(("python-setuptools" ,python-setuptools)))
10495 (home-page "http://github.com/jpvanhal/inflection")
10496 (synopsis "Python string transformation library")
10497 (description
10498 "Inflection is a string transformation library. It singularizes
10499and pluralizes English words, and transforms strings from CamelCase to
10500underscored string.")
10501 (license license:expat)))
10502
10503(define-public python2-inflection
10504 (package-with-python2 python-inflection))
10505
18995566
SB
10506(define-public python-pylev
10507 (package
10508 (name "python-pylev")
10509 (version "1.3.0")
10510 (source (origin
10511 (method url-fetch)
10512 (uri (pypi-uri "pylev" version))
10513 (sha256
10514 (base32
10515 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10516 (build-system python-build-system)
10517 (native-inputs
10518 `(("python-setuptools" ,python-setuptools)))
10519 (home-page "http://github.com/toastdriven/pylev")
10520 (synopsis "Levenshtein distance implementation in Python")
10521 (description "Pure Python Levenshtein implementation, based off the
10522Wikipedia code samples at
10523@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10524 (license license:bsd-3)))
18995566
SB
10525
10526(define-public python2-pylev
10527 (package-with-python2 python-pylev))
10528
f5deff7a
SB
10529(define-public python-cleo
10530 (package
10531 (name "python-cleo")
10532 (version "0.4.1")
10533 (source (origin
10534 (method url-fetch)
10535 (uri (pypi-uri "cleo" version))
10536 (sha256
10537 (base32
10538 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10539 (build-system python-build-system)
10540 (native-inputs
9403150a 10541 `(("python-setuptools" ,python-setuptools)
f5deff7a
SB
10542 ;; For testing
10543 ("python-mock" ,python-mock)
10544 ("python-pytest" ,python-pytest)))
9403150a
SB
10545 (propagated-inputs
10546 `(("python-psutil" ,python-psutil)
10547 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10548 (home-page "https://github.com/sdispater/cleo")
10549 (synopsis "Command-line arguments library for Python")
10550 (description
10551 "Cleo allows you to create command-line commands with signature in
10552docstring and colored output.")
10553 (license license:expat)))
10554
10555(define-public python2-cleo
10556 (package-with-python2 python-cleo))
10557
77cadb43
SB
10558(define-public python-lazy-object-proxy
10559 (package
10560 (name "python-lazy-object-proxy")
10561 (version "1.2.2")
10562 (source (origin
10563 (method url-fetch)
10564 (uri (pypi-uri "lazy-object-proxy" version))
10565 (sha256
10566 (base32
10567 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10568 (build-system python-build-system)
10569 (native-inputs
10570 `(("python-setuptools" ,python-setuptools)))
10571 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10572 (synopsis "Lazy object proxy for python")
10573 (description
10574 "Lazy object proxy is an object that wraps a callable but defers the call
10575until the object is actually required, and caches the result of said call.")
3f641af0 10576 (license license:bsd-2)))
77cadb43
SB
10577
10578(define-public python2-lazy-object-proxy
10579 (package-with-python2 python-lazy-object-proxy))
10580
5477e05f
SB
10581(define-public python-dnspython
10582 (package
10583 (name "python-dnspython")
6c514128 10584 (version "1.15.0")
5477e05f
SB
10585 (source (origin
10586 (method url-fetch)
10587 (uri (string-append "http://www.dnspython.org/kits/"
10588 version "/dnspython-" version ".tar.gz"))
10589 (sha256
10590 (base32
6c514128 10591 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10592 (build-system python-build-system)
10593 (arguments '(#:tests? #f)) ; XXX: requires internet access
10594 (native-inputs
10595 `(("python-setuptools" ,python-setuptools)))
10596 (home-page "http://www.dnspython.org")
10597 (synopsis "DNS toolkit for Python")
10598 (description
10599 "dnspython is a DNS toolkit for Python. It supports almost all record
10600types. It can be used for queries, zone transfers, and dynamic updates.
10601It supports TSIG authenticated messages and EDNS0.")
10602 (license license:expat)))
10603
10604(define-public python2-dnspython
10605 (package-with-python2 python-dnspython))
10606
22711e25
SB
10607(define-public python-email-validator
10608 (package
10609 (name "python-email-validator")
10610 (version "1.0.1")
10611 (source
10612 (origin (method url-fetch)
10613 (uri (pypi-uri "email_validator" version))
10614 (sha256
10615 (base32
10616 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10617 (build-system python-build-system)
10618 (arguments
10619 '(#:phases
10620 (modify-phases %standard-phases
10621 (add-before 'build 'use-dnspython
10622 (lambda _
10623 (substitute* "setup.py"
10624 (("dnspython3") "dnspython"))
10625 #t)))))
10626 (native-inputs
d42560bd
SB
10627 `(("python-setuptools" ,python-setuptools)))
10628 (propagated-inputs
22711e25 10629 `(("python-dnspython" ,python-dnspython)
d42560bd 10630 ("python-idna" ,python-idna)))
22711e25
SB
10631 (home-page "https://github.com/JoshData/python-email-validator")
10632 (synopsis "Email address validation library for Python")
10633 (description
10634 "This library validates email address syntax and deliverability.")
3f641af0 10635 (license license:cc0)))
22711e25
SB
10636
10637(define-public python2-email-validator
10638 (package-with-python2 python-email-validator))
10639
8987d91e
SB
10640(define-public python-ukpostcodeparser
10641 (package
10642 (name "python-ukpostcodeparser")
10643 (version "1.0.3")
10644 (source (origin
10645 (method url-fetch)
10646 (uri (pypi-uri "UkPostcodeParser" version))
10647 (sha256
10648 (base32
10649 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10650 (build-system python-build-system)
10651 (native-inputs
10652 `(("python-setuptools" ,python-setuptools)))
10653 (home-page "https://github.com/hamstah/ukpostcodeparser")
10654 (synopsis "UK Postcode parser for Python")
10655 (description
10656 "This library provides the @code{parse_uk_postcode} function for
10657parsing UK postcodes.")
10658 (license license:expat)))
10659
10660(define-public python2-ukpostcodeparser
10661 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10662
10663(define-public python-fake-factory
10664 (package
10665 (name "python-fake-factory")
7adc698f 10666 (version "0.7.2")
ea92ae01
SB
10667 (source (origin
10668 (method url-fetch)
10669 (uri (pypi-uri "fake-factory" version))
10670 (sha256
10671 (base32
7adc698f 10672 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10673 (build-system python-build-system)
ea92ae01 10674 (native-inputs
bbcd7297 10675 `(("python-setuptools" ,python-setuptools)
ea92ae01
SB
10676 ;; For testing
10677 ("python-email-validator" ,python-email-validator)
10678 ("python-mock" ,python-mock)
10679 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10680 (propagated-inputs
10681 `(("python-dateutil" ,python-dateutil-2)
10682 ("python-six" ,python-six)))
7adc698f 10683 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10684 (synopsis "Python package that generates fake data")
10685 (description
10686 "Faker is a Python package that generates fake data such as names,
10687addresses, and phone numbers.")
10688 (license license:expat)
10689 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10690
10691(define-public python2-fake-factory
10692 (let ((base (package-with-python2 (strip-python2-variant
10693 python-fake-factory))))
10694 (package
10695 (inherit base)
24c9aa18 10696 (propagated-inputs
ea92ae01 10697 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10698 ,@(package-propagated-inputs base))))))
ea92ae01 10699
b49504fd
SB
10700(define-public python-pyaml
10701 (package
10702 (name "python-pyaml")
10703 (version "15.8.2")
10704 (source (origin
10705 (method url-fetch)
10706 (uri (pypi-uri "pyaml" version))
10707 (sha256
10708 (base32
10709 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10710 (build-system python-build-system)
10711 (native-inputs
10712 `(("python-setuptools" ,python-setuptools)))
10713 (propagated-inputs
10714 `(("python-pyyaml" ,python-pyyaml)))
10715 (home-page "https://github.com/mk-fg/pretty-yaml")
10716 (synopsis "YAML pretty-print library for Python")
10717 (description
10718 "pyaml is a PyYAML based python module to produce pretty and readable
10719YAML-serialized data.")
3f641af0 10720 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10721
10722(define-public python2-pyaml
10723 (package-with-python2 python-pyaml))
10724
347175a2
SB
10725(define-public python-flexmock
10726 (package
10727 (name "python-flexmock")
10728 (version "0.10.2")
10729 (source (origin
10730 (method url-fetch)
10731 (uri (pypi-uri "flexmock" version))
10732 (sha256
10733 (base32
10734 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10735 (build-system python-build-system)
10736 (native-inputs
10737 `(("python-setuptools" ,python-setuptools)))
10738 (home-page "https://flexmock.readthedocs.org")
10739 (synopsis "Testing library for Python")
10740 (description
10741 "flexmock is a testing library for Python that makes it easy to create
10742mocks, stubs and fakes.")
3f641af0 10743 (license license:bsd-3)))
347175a2
SB
10744
10745(define-public python2-flexmock
10746 (package-with-python2 python-flexmock))
10747
5a744191
SB
10748(define-public python-orator
10749 (package
10750 (name "python-orator")
10751 (version "0.8.2")
10752 (source (origin
10753 (method url-fetch)
10754 (uri (pypi-uri "orator" version))
10755 (sha256
10756 (base32
10757 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10758 (build-system python-build-system)
10759 (arguments '(#:tests? #f)) ; no tests
10760 (native-inputs
b2676030
SB
10761 `(("python-setuptools" ,python-setuptools)))
10762 (propagated-inputs
5a744191
SB
10763 `(("python-arrow" ,python-arrow)
10764 ("python-blinker" ,python-blinker)
10765 ("python-cleo" ,python-cleo)
10766 ("python-fake-factory" ,python-fake-factory)
10767 ("python-inflection" ,python-inflection)
10768 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10769 ("python-pyaml" ,python-pyaml)
5a744191
SB
10770 ("python-simplejson" ,python-simplejson)
10771 ("python-wrapt" ,python-wrapt)))
10772 (home-page "https://orator-orm.com/")
10773 (synopsis "ActiveRecord ORM for Python")
10774 (description
10775 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10776implementation for Python.")
10777 (license license:expat)
10778 (properties `((python2-variant . ,(delay python2-orator))))))
10779
10780(define-public python2-orator
10781 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10782 (package
10783 (inherit base)
06961617 10784 (propagated-inputs
5a744191 10785 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10786 ,@(package-propagated-inputs base))))))
f4155188
DM
10787
10788(define-public python-prompt-toolkit
10789 (package
10790 (name "python-prompt-toolkit")
d15e2ef0 10791 (version "1.0.7")
f4155188
DM
10792 (source
10793 (origin
10794 (method url-fetch)
d15e2ef0 10795 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10796 (sha256
10797 (base32
d15e2ef0 10798 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10799 (build-system python-build-system)
bae18710
LF
10800 (arguments
10801 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f4155188
DM
10802 (inputs `(("python-wcwidth" ,python-wcwidth)
10803 ("python-pygments" ,python-pygments)))
10804 (native-inputs `(("python-six" ,python-six)))
10805 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10806 (synopsis "Library for building command line interfaces in Python")
10807 (description
10808 "Prompt-Toolkit is a library for building interactive command line
10809interfaces in Python. It's like GNU Readline but it also features syntax
10810highlighting while typing, out-of-the-box multi-line input editing, advanced
10811code completion, incremental search, support for Chinese double-width
10812characters, mouse support, and auto suggestions.")
3f641af0 10813 (license license:bsd-3)
f4155188
DM
10814 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10815
10816(define-public python2-prompt-toolkit
10817 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10818 (package
10819 (inherit base)
10820 (native-inputs
10821 `(("python2-setuptools" ,python2-setuptools)
10822 ,@(package-native-inputs base))))))
a502dfbf
DM
10823
10824(define-public python-jedi
10825 (package
10826 (name "python-jedi")
10827 (version "0.9.0")
10828 (source
10829 (origin
10830 (method url-fetch)
10831 (uri (pypi-uri "jedi" version))
10832 (sha256
10833 (base32
10834 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10835 (build-system python-build-system)
10836 (home-page "https://github.com/davidhalter/jedi")
10837 (synopsis
10838 "Autocompletion for Python that can be used for text editors")
10839 (description
10840 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10841 (license license:expat)
10842 (properties `((python2-variant . ,(delay python2-jedi))))))
10843
10844(define-public python2-jedi
10845 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10846 (package
10847 (inherit base)
10848 (native-inputs
10849 `(("python2-setuptools" ,python2-setuptools)
10850 ,@(package-native-inputs base))))))
c2f0dc6e
DM
10851
10852(define-public ptpython
10853 (package
10854 (name "ptpython")
10855 (version "0.34")
10856 (source (origin
10857 (method url-fetch)
10858 (uri (pypi-uri "ptpython" version))
10859 (sha256
10860 (base32
10861 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10862 (build-system python-build-system)
10863 (inputs
10864 `(("python-docopt" ,python-docopt)
10865 ("python-jedi" ,python-jedi)
10866 ("python-prompt-toolkit" ,python-prompt-toolkit)
10867 ("python-pygments" ,python-pygments)
10868 ("python-setuptools" ,python-setuptools)))
10869 (home-page "https://github.com/jonathanslenders/ptpython")
10870 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10871 (description
10872 "ptpython is a Python read-eval-print loop with IDE-like features.
10873It supports syntax highlighting, multiline editing, autocompletion, mouse,
10874color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10875etc.")
3f641af0 10876 (license license:bsd-3)
c2f0dc6e
DM
10877 (properties `((python2-variant . ,(delay ptpython-2))))))
10878
10879(define-public ptpython-2
10880 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10881 (package
10882 (inherit base)
10883 (name "ptpython2"))))
b227f0be 10884
b04a52a6
DJ
10885(define-public python-requests-oauthlib
10886 (package
10887 (name "python-requests-oauthlib")
10888 (version "0.6.2")
10889 (source
10890 (origin
10891 (method url-fetch)
10892 (uri (pypi-uri "requests-oauthlib" version))
10893 (sha256
10894 (base32
10895 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10896 (build-system python-build-system)
10897 (arguments
10898 `(#:phases
10899 (modify-phases %standard-phases
10900 ;; removes tests that require network access
10901 (add-before 'check 'pre-check
10902 (lambda _
10903 (delete-file "tests/test_core.py")
10904 #t)))))
10905 (native-inputs
10906 `(("python-requests-mock" ,python-requests-mock)
10907 ("python-mock" ,python-mock)))
10908 (inputs
10909 `(("python-oauthlib" ,python-oauthlib)
10910 ("python-requests" ,python-requests)))
10911 (home-page
10912 "https://github.com/requests/requests-oauthlib")
10913 (synopsis
10914 "OAuthlib authentication support for Requests")
10915 (description
10916 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10917provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10918 (license license:isc)
10919 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10920
10921(define-public python2-requests-oauthlib
10922 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10923 (package
10924 (inherit base)
10925 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10926 ,@(package-native-inputs base))))))
10927
b227f0be 10928(define-public python-stem
10929 (package
10930 (name "python-stem")
10931 (version "1.4.1b")
10932 (source
10933 (origin
10934 (method url-fetch)
10935 (uri (pypi-uri "stem" version ".tar.bz2"))
10936 (sha256
10937 (base32
10938 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10939 (build-system python-build-system)
10940 (arguments
10941 `(#:phases
10942 (modify-phases %standard-phases
10943 (replace 'check
10944 (lambda _
10945 (zero? (system* "./run_tests.py" "--unit")))))))
10946 (native-inputs
10947 `(("python-mock" ,python-mock)
10948 ("python-pep8" ,python-pep8)
10949 ("python-pyflakes" ,python-pyflakes)))
10950 (inputs
10951 `(("python-pycrypto" ,python-pycrypto)))
10952 (home-page "https://stem.torproject.org/")
10953 (synopsis
10954 "Python controller library that allows applications to interact with Tor")
10955 (description
10956 "Stem is a Python controller library for Tor. With it you can use Tor's
10957control protocol to script against the Tor process and read descriptor data
10958relays publish about themselves.")
3f641af0 10959 (license license:lgpl3)))
b227f0be 10960
10961(define-public python2-stem
10962 (package-with-python2 python-stem))
517a6c0c
DM
10963
10964(define-public python-pyserial
10965 (package
10966 (name "python-pyserial")
10967 (version "3.1.1")
10968 (source
10969 (origin
10970 (method url-fetch)
10971 (uri (pypi-uri "pyserial" version))
10972 (sha256
10973 (base32
10974 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10975 (build-system python-build-system)
10976 (home-page
10977 "https://github.com/pyserial/pyserial")
10978 (synopsis "Python Serial Port Bindings")
10979 (description "@code{pyserial} provide serial port bindings for Python. It
10980supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10981and/or Xon/Xoff. The port is accessed in RAW mode.")
3f641af0 10982 (license license:bsd-3)
517a6c0c
DM
10983 (properties `((python2-variant . ,(delay python2-pyserial))))))
10984
10985(define-public python2-pyserial
10986 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10987 (package
10988 (inherit base)
10989 (native-inputs
10990 `(("python2-setuptools" ,python2-setuptools)
10991 ,@(package-native-inputs base))))))
6eb7af2a
DJ
10992
10993(define-public python-kivy
10994 (package
10995 (name "python-kivy")
10996 (version "1.9.1")
10997 (source
10998 (origin
10999 (method url-fetch)
11000 (uri (pypi-uri "kivy" version))
11001 (file-name (string-append name "-" version ".tar.gz"))
11002 (sha256
11003 (base32
11004 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11005 (build-system python-build-system)
11006 (arguments
11007 `(#:tests? #f ; Tests require many optional packages
11008 #:phases
11009 (modify-phases %standard-phases
11010 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11011 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11012 (lambda* (#:key inputs #:allow-other-keys)
11013 (setenv "KIVY_SDL2_PATH"
11014 (string-append (assoc-ref inputs "sdl-union")
11015 "/include/SDL2"))
11016 #t)))))
11017 (native-inputs
11018 `(("pkg-config" ,pkg-config)))
11019 (inputs
11020 `(("python-cython" ,python-cython)
11021 ("gstreamer" ,gstreamer)
11022 ("mesa" ,mesa)
11023 ("sdl-union"
11024 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11025 (home-page "http://kivy.org")
11026 (synopsis
11027 "Multitouch application framework")
11028 (description
11029 "A software library for rapid development of
11030hardware-accelerated multitouch applications.")
11031 (license license:expat)))
11032
11033(define-public python2-kivy
11034 (package-with-python2 python-kivy))
11035
11036(define-public python-kivy-next
11037 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11038 (revision "1"))
11039 (package (inherit python-kivy)
11040 (name "python-kivy-next")
d80a71eb 11041 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
11042 (string-take commit 7)))
11043 (source
11044 (origin
11045 (method git-fetch)
11046 (uri (git-reference
11047 (url "https://github.com/kivy/kivy")
11048 (commit commit)))
11049 (file-name (string-append name "-" version "-checkout"))
11050 (sha256
11051 (base32
11052 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11053
11054(define-public python2-kivy-next
11055 (package-with-python2 python-kivy-next))
8794bd8b
DC
11056
11057(define-public python-binaryornot
11058 (package
11059 (name "python-binaryornot")
11060 (version "0.4.0")
11061 (source (origin
11062 (method url-fetch)
11063 (uri (pypi-uri "binaryornot" version))
11064 (sha256
11065 (base32
11066 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11067 (build-system python-build-system)
11068 (inputs
11069 `(("python-chardet" ,python-chardet)
11070 ("python-hypothesis" ,python-hypothesis)))
11071 (home-page "https://github.com/audreyr/binaryornot")
11072 (synopsis "Package to check if a file is binary or text")
11073 (description "Ultra-lightweight pure Python package to check if a file is
11074binary or text.")
11075 (license license:bsd-3)
11076 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11077
11078(define-public python2-binaryornot
11079 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11080 (package (inherit base)
11081 (native-inputs
11082 `(("python2-setuptools" ,python2-setuptools)
11083 ,@(package-native-inputs base)))
11084 (inputs
11085 `(("python2-enum34" ,python2-enum34)
11086 ,@(package-inputs base))))))
a9ac982a
DC
11087
11088(define-public python-nltk
11089 (package
11090 (name "python-nltk")
11091 (version "3.2.1")
11092 (source (origin
11093 (method url-fetch)
11094 (uri (pypi-uri "nltk" version))
11095 (sha256
11096 (base32
11097 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11098 (build-system python-build-system)
59f12985
LF
11099 (arguments
11100 '(;; The tests require some extra resources to be downloaded.
11101 ;; TODO Try packaging these resources.
11102 #:tests? #f))
a9ac982a
DC
11103 (home-page "http://nltk.org/")
11104 (synopsis "Natural Language Toolkit")
11105 (description "It provides interfaces to over 50 corpora and lexical
11106resources such as WordNet, along with a suite of text processing libraries
11107for classification, tokenization, stemming, tagging, parsing, and semantic
11108reasoning, wrappers for natural language processing libraries.")
11109 (license license:asl2.0)
11110 (properties `((python2-variant . ,(delay python2-nltk))))))
11111
11112(define-public python2-nltk
11113 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
11114 (package (inherit base)
11115 (native-inputs
11116 `(("python2-setuptools" ,python2-setuptools)
11117 ,@(package-native-inputs base))))))
691cd90d
DC
11118
11119(define-public python-pymongo
11120 (package
11121 (name "python-pymongo")
11122 (version "3.3.0")
11123 (source (origin
11124 (method url-fetch)
11125 (uri (pypi-uri "pymongo" version))
11126 (sha256
11127 (base32
11128 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11129 (build-system python-build-system)
11130 (inputs
11131 `(("python-certifi" ,python-certifi)))
11132 (home-page "http://github.com/mongodb/mongo-python-driver")
11133 (synopsis "Python driver for MongoDB")
11134 (description "Python driver for MongoDB.")
11135 (license license:asl2.0)
11136 (properties `((python2-variant . ,(delay python2-pymongo))))))
11137
11138(define-public python2-pymongo
11139 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
11140 (package (inherit base)
11141 (native-inputs
11142 `(("python2-setuptools" ,python2-setuptools)
11143 ,@(package-native-inputs base))))))
6a6c9d43
DC
11144
11145(define-public python-sh
11146 (package
11147 (name "python-sh")
11148 (version "1.11")
11149 (source (origin
11150 (method url-fetch)
11151 (uri (pypi-uri "sh" version))
11152 (sha256
11153 (base32
11154 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11155 (build-system python-build-system)
11156 (arguments
11157 `(#:tests? #f)) ; no tests
11158 (home-page "https://github.com/amoffat/sh")
11159 (synopsis "Python subprocess interface")
11160 (description "Abstracts process invocation by providing a function
11161interface for programs.")
11162 (license license:expat)
11163 (properties `((python2-variant . ,(delay python2-sh))))))
11164
11165(define-public python2-sh
11166 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
11167 (package (inherit base)
11168 (native-inputs
11169 `(("python2-setuptools" ,python2-setuptools)
11170 ,@(package-native-inputs base))))))
05b59190 11171
25702397
EF
11172(define-public python-consul
11173 (package
11174 (name "python-consul")
11175 (version "0.6.1")
11176 (source
11177 (origin
11178 (method url-fetch)
11179 (uri (pypi-uri "python-consul" version))
11180 (sha256
11181 (base32
11182 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11183 (build-system python-build-system)
11184 (native-inputs
11185 `(("python-pytest" ,python-pytest)
11186 ("python-requests" ,python-requests)
11187 ("python-six" ,python-six)))
11188 (home-page "https://github.com/cablehead/python-consul")
11189 (synopsis "Python client for Consul")
11190 (description
11191 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11192discovery, monitoring and configuration.")
11193 (license license:expat)))
11194
11195(define-public python2-consul
11196 (let ((consul (package-with-python2 python-consul)))
11197 (package (inherit consul)
11198 (native-inputs
11199 `(("python2-setuptools" ,python2-setuptools)
11200 ,@(package-native-inputs consul))))))
11201
05b59190
DC
11202(define-public python-schematics
11203 (package
11204 (name "python-schematics")
11205 (version "1.1.1")
11206 (source
11207 (origin
11208 (method url-fetch)
11209 (uri (string-append
11210 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11211 (file-name (string-append name "-" version ".tar.gz"))
11212 (sha256
11213 (base32
11214 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11215 (build-system python-build-system)
11216 (inputs
11217 `(("python-six" ,python-six)))
11218 (arguments
11219 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11220 ; version requirements (eg python-coveralls)
11221 (home-page "https://github.com/schematics/schematics")
11222 (synopsis "Python Data Structures for Humans")
11223 (description "Python Data Structures for Humans.")
11224 (license license:bsd-3)
11225 (properties `((python2-variant . ,(delay python2-schematics))))))
11226
11227(define-public python2-schematics
11228 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
11229 (package (inherit base)
11230 (native-inputs
11231 `(("python2-setuptools" ,python2-setuptools)
11232 ,@(package-native-inputs base))))))
d6907ff7
DC
11233
11234(define-public python-publicsuffix
11235 (package
11236 (name "python-publicsuffix")
11237 (version "1.1.0")
11238 (source (origin
11239 (method url-fetch)
11240 (uri (pypi-uri "publicsuffix" version))
11241 (sha256
11242 (base32
11243 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11244 (build-system python-build-system)
11245 (arguments
11246 `(#:tests? #f)) ; tests use the internet
11247 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11248 (synopsis "Get suffix for a domain name")
11249 (description "Get a public suffix for a domain name using the Public Suffix
11250List.")
11251 (license license:expat)
11252 (properties `((python2-variant . ,(delay python2-nltk))))))
11253
11254(define-public python2-publicsuffix
11255 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
11256 (package (inherit base)
11257 (native-inputs
11258 `(("python2-setuptools" ,python2-setuptools)
11259 ,@(package-native-inputs base))))))
b2319996
DC
11260
11261(define-public python-publicsuffix2
11262 (package
11263 (name "python-publicsuffix2")
11264 (version "2.20160621")
11265 (source
11266 (origin
11267 (method url-fetch)
11268 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11269 (sha256
11270 (base32
11271 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11272 (build-system python-build-system)
10797a0a
LF
11273 (arguments
11274 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11275 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11276 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11277 (description "Get a public suffix for a domain name using the Public Suffix
11278List. Forked from and using the same API as the publicsuffix package.")
11279 (license (list license:expat license:mpl2.0))
11280 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
11281
11282(define-public python2-publicsuffix2
11283 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
11284 (package (inherit base)
11285 (native-inputs
11286 `(("python2-setuptools" ,python2-setuptools)
11287 ,@(package-native-inputs base))))))
81f1515d
DC
11288
11289(define-public python-url
11290 (package
11291 (name "python-url")
11292 (version "0.2.0")
11293 (source (origin
11294 (method url-fetch)
11295 (uri (pypi-uri "url" version))
11296 (sha256
11297 (base32
11298 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11299 (build-system python-build-system)
11300 (inputs
11301 `(("python-publicsuffix" ,python-publicsuffix)))
11302 (native-inputs
11303 `(("python-coverage" ,python-coverage)
11304 ("python-nose" ,python-nose)))
11305 (arguments
11306 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11307 (home-page "http://github.com/seomoz/url-py")
11308 (synopsis "URL Parsing")
11309 (description "Library for parsing urls.")
11310 (license license:expat)
11311 (properties `((python2-variant . ,(delay python2-url))))))
11312
11313(define-public python2-url
11314 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11315 (package (inherit base)
11316 (inputs
11317 `(("python2-publicsuffix" ,python2-publicsuffix)))
11318 (native-inputs
11319 `(("python2-setuptools" ,python2-setuptools)
11320 ,@(package-native-inputs base))))))
974ee2c1
TS
11321
11322(define-public python-freezegun
11323 (package
11324 (name "python-freezegun")
11325 (version "0.3.7")
11326 (source
11327 (origin
11328 (method url-fetch)
11329 (uri (pypi-uri "freezegun" version))
11330 (sha256
11331 (base32
11332 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11333 (build-system python-build-system)
11334 (native-inputs
11335 `(("python-mock" ,python-mock)
11336 ("python-nose" ,python-nose)
11337 ("python-coverage" ,python-coverage)
11338 ("python-dateutil-2" ,python-dateutil-2)))
11339 (inputs
11340 `(("python-six" ,python-six)))
11341 (arguments
11342 `(#:phases (modify-phases %standard-phases
11343 ;; The tests are normally executed via `make test`, but the PyPi
11344 ;; package does not include the Makefile.
11345 (replace 'check
11346 (lambda _
11347 (zero? (system* "nosetests" "./tests/")))))))
11348 (home-page "https://github.com/spulec/freezegun")
11349 (synopsis "Test utility for mocking the datetime module")
11350 (description
11351 "FreezeGun is a library that allows your python tests to travel through
11352time by mocking the datetime module.")
11353 (license license:asl2.0)))
11354
11355(define-public python2-freezegun
11356 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
11357 (package (inherit base)
11358 (native-inputs
11359 `(("python2-setuptools" ,python2-setuptools)
11360 ,@(package-native-inputs base))))))
dddcb25c
MB
11361
11362(define-public python-odfpy
11363 (package
11364 (name "python-odfpy")
11365 (version "1.3.3")
11366 (source (origin
11367 (method url-fetch)
11368 (uri (pypi-uri "odfpy" version))
11369 (sha256
11370 (base32
11371 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11372 (arguments
11373 `(#:modules ((srfi srfi-1)
11374 (guix build python-build-system)
11375 (guix build utils))
11376 #:phases
11377 (modify-phases %standard-phases
11378 (replace 'check
11379 ;; The test runner invokes python2 and python3 for test*.py.
11380 ;; To avoid having both in inputs, we replicate it here.
11381 (lambda _
11382 (every (lambda (test-file)
11383 (zero? (system* "python" test-file)))
11384 (find-files "tests" "^test.*\\.py$")))))))
11385 (build-system python-build-system)
11386 (home-page "https://github.com/eea/odfpy")
11387 (synopsis "Python API and tools to manipulate OpenDocument files")
11388 (description "Collection of libraries and utility programs written in
11389Python to manipulate OpenDocument 1.2 files.")
11390 (license
11391 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11392 ;; number of files with other licenses.
11393 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11394
11395(define-public python2-odfpy
11396 (package-with-python2 python-odfpy))
b30565bd
MB
11397
11398(define-public python-cachecontrol
11399 (package
11400 (name "python-cachecontrol")
11401 (version "0.11.6")
11402 (source
11403 (origin
11404 (method url-fetch)
11405 ;; Pypi does not have tests.
11406 (uri (string-append
11407 "https://github.com/ionrock/cachecontrol/archive/v"
11408 version ".tar.gz"))
11409 (file-name (string-append name "-" version ".tar.gz"))
11410 (sha256
11411 (base32
11412 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11413 (build-system python-build-system)
11414 (arguments
11415 `(#:phases
11416 (modify-phases %standard-phases
11417 (replace 'check
11418 (lambda _
11419 ;; Drop test that requires internet access.
11420 (delete-file "tests/test_regressions.py")
11421 (setenv "PYTHONPATH"
11422 (string-append (getcwd) "/build/lib:"
11423 (getenv "PYTHONPATH")))
11424 (zero? (system* "py.test" "-vv")))))))
11425 (native-inputs
11426 `(("python-pytest" ,python-pytest)
11427 ("python-redis" ,python-redis)
11428 ("python-webtest" ,python-webtest)
11429 ("python-mock" ,python-mock)))
11430 (propagated-inputs
11431 `(("python-requests" ,python-requests)
11432 ("python-lockfile" ,python-lockfile)))
11433 (home-page "https://github.com/ionrock/cachecontrol")
11434 (synopsis "The httplib2 caching algorithms for use with requests")
11435 (description "CacheControl is a port of the caching algorithms in
11436@code{httplib2} for use with @code{requests} session objects.")
11437 (license license:asl2.0)
dd447621 11438 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
b30565bd
MB
11439
11440(define-public python2-cachecontrol
11441 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
11442 (package (inherit base)
11443 (native-inputs
11444 `(("python2-setuptools" ,python2-setuptools)
11445 ,@(package-native-inputs base))))))
243db824
DM
11446
11447(define-public python-lit
11448 (package
11449 (name "python-lit")
11450 (version "0.5.0")
11451 (source
11452 (origin
11453 (method url-fetch)
11454 (uri (pypi-uri "lit" version))
11455 (sha256
11456 (base32
11457 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11458 (build-system python-build-system)
11459 (home-page "http://llvm.org/")
11460 (synopsis "LLVM Software Testing Tool")
11461 (description "@code{lit} is a portable tool for executing LLVM and Clang
11462style test suites, summarizing their results, and providing indication of
11463failures.")
11464 (license license:ncsa)
11465 (properties `((python2-variant . ,(delay python2-lit))))))
11466
11467(define-public python2-lit
11468 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
11469 (package
11470 (inherit base)
11471 (native-inputs
11472 `(("python2-setuptools" ,python2-setuptools)
11473 ,@(package-native-inputs base))))))
66f95b20
MB
11474
11475(define-public python-pytest-pep8
11476 (package
11477 (name "python-pytest-pep8")
11478 (version "1.0.6")
11479 (source (origin
11480 (method url-fetch)
11481 (uri (pypi-uri "pytest-pep8" version))
11482 (sha256
11483 (base32
11484 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11485 (build-system python-build-system)
11486 (arguments
11487 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
11488 ;; Prevent creation of the egg. This works around
11489 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
11490 #:configure-flags '("--single-version-externally-managed" "--root=/")))
11491 (native-inputs
11492 `(("python-pytest" ,python-pytest)))
11493 (propagated-inputs
11494 `(("python-pep8" ,python-pep8)))
11495 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11496 (synopsis "Py.test plugin to check PEP8 requirements")
11497 (description "Pytest plugin for checking PEP8 compliance.")
11498 (license license:expat)
11499 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
11500
11501(define-public python2-pytest-pep8
11502 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
11503 (package (inherit base)
11504 (native-inputs
11505 `(("python2-setuptools" ,python2-setuptools)
11506 ,@(package-native-inputs base))))))
df94a6b5
MB
11507
11508(define-public python-pytest-flakes
11509 (package
11510 (name "python-pytest-flakes")
11511 (version "1.0.1")
11512 (source (origin
11513 (method url-fetch)
11514 (uri (pypi-uri "pytest-flakes" version))
11515 (sha256
11516 (base32
11517 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11518 (build-system python-build-system)
11519 (arguments
11520 `(;; Prevent creation of the egg. This works around
11521 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
11522 #:configure-flags '("--single-version-externally-managed" "--root=/")
11523 #:phases
11524 (modify-phases %standard-phases
11525 (delete 'check)
11526 (add-after 'install 'check
11527 (lambda _ ; It's easier to run tests after install.
11528 (zero? (system* "py.test" "-vv")))))))
11529 (native-inputs
11530 `(("python-coverage" ,python-coverage)
11531 ("python-pytest" ,python-pytest)
11532 ("python-pytest-cache" ,python-pytest-cache)
11533 ("python-pytest-pep8" ,python-pytest-pep8)))
11534 (propagated-inputs
11535 `(("python-pyflakes" ,python-pyflakes)))
11536 (home-page "https://github.com/fschulze/pytest-flakes")
11537 (synopsis "Py.test plugin to check source code with pyflakes")
11538 (description "Pytest plugin for checking Python source code with pyflakes.")
11539 (license license:expat)
11540 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
11541
11542(define-public python2-pytest-flakes
11543 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
11544 (package (inherit base)
11545 (native-inputs
11546 `(("python2-setuptools" ,python2-setuptools)
11547 ,@(package-native-inputs base))))))
5467ea62
MB
11548
11549(define-public python-natsort
11550 (package
11551 (name "python-natsort")
11552 (version "5.0.1")
11553 (source (origin
11554 (method url-fetch)
11555 (uri (pypi-uri "natsort" version))
11556 (sha256
11557 (base32
11558 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11559 (build-system python-build-system)
11560 (arguments
11561 `(#:phases
11562 (modify-phases %standard-phases
11563 (add-before 'check 'set-cachedir
11564 ;; Tests require write access to $HOME by default
11565 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11566 (native-inputs
11567 `(("python-hypothesis" ,python-hypothesis)
11568 ("python-pytest-cache" ,python-pytest-cache)
11569 ("python-pytest-cov" ,python-pytest-cov)
11570 ("python-pytest-flakes" ,python-pytest-flakes)
11571 ("python-pytest-pep8" ,python-pytest-pep8)))
11572 (propagated-inputs ; TODO: Add python-fastnumbers.
11573 `(("python-pyicu" ,python-pyicu)))
11574 (home-page "https://github.com/SethMMorton/natsort")
11575 (synopsis "Natural sorting for python and shell")
11576 (description
11577 "Natsort lets you apply natural sorting on lists instead of
11578lexicographical. If you use the built-in @code{sorted} method in python
11579on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11580returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11581function @code{natsorted} that identifies numbers and sorts them separately
11582from strings. It can also sort version numbers, real numbers, mixed types
11583and more, and comes with a shell command @command{natsort} that exposes this
11584functionality in the command line.")
11585 (license license:expat)
11586 (properties `((python2-variant . ,(delay python2-natsort))))))
11587
11588(define-public python2-natsort
11589 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11590 (package (inherit base)
11591 (native-inputs
11592 `(("python2-setuptools" ,python2-setuptools)
11593 ("python2-pathlib" ,python2-pathlib)
11594 ("python2-mock" ,python2-mock)
11595 ("python2-enum34" ,python2-enum34)
11596 ,@(package-native-inputs base))))))
4efb9c54
SR
11597
11598(define-public python-glances
11599 (package
11600 (name "python-glances")
11601 (version "2.7.1")
11602 (source
11603 (origin
11604 (method url-fetch)
11605 (uri (pypi-uri "Glances" version))
11606 (sha256
11607 (base32
11608 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11609 (build-system python-build-system)
11610 (inputs
11611 `(("python-psutil" ,python-psutil)))
11612 (home-page
11613 "https://github.com/nicolargo/glances")
11614 (synopsis
11615 "A cross-platform curses-based monitoring tool")
11616 (description
11617 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11618Glances uses the PsUtil library to get information from your system. It monitors
11619CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11620 (license license:lgpl3+)
11621 (properties `((python2-variant . ,(delay python2-glances))))))
11622
11623(define-public python2-glances
11624 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
11625 (package
11626 (inherit base)
11627 (native-inputs
11628 `(("python2-setuptools" ,python2-setuptools)
11629 ,@(package-native-inputs base))))))
05b7a593
EF
11630
11631(define-public python-graphql-core
11632 (package
11633 (name "python-graphql-core")
11634 (version "0.5.3")
11635 (source
11636 (origin
11637 (method url-fetch)
11638 (uri (pypi-uri "graphql-core" version))
11639 (sha256
11640 (base32
11641 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11642 (build-system python-build-system)
11643 (arguments
11644 `(#:phases
11645 (modify-phases %standard-phases
11646 (add-after 'unpack 'patch-hardcoded-version
11647 (lambda _ (substitute*
11648 "setup.py"
11649 (("'gevent==1.1rc1'") "'gevent'"))
11650 #t)))))
11651 (native-inputs
11652 `(("python-gevent" ,python-gevent)
11653 ("python-mock" ,python-mock)
11654 ("python-pytest-mock" ,python-pytest-mock)))
11655 (inputs
11656 `(("python-promise" ,python-promise)
11657 ("python-six" ,python-six)))
11658 (home-page "https://github.com/graphql-python/graphql-core")
11659 (synopsis "GraphQL implementation for Python")
11660 (description
11661 "GraphQL implementation for Python. GraphQL is a data query language and
11662runtime designed and used to request and deliver data to mobile and web apps.
11663This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11664to Python.")
11665 (properties `((python2-variant . ,(delay python2-graphql-core))))
11666 (license license:expat)))
11667
11668(define-public python2-graphql-core
11669 (let ((base (package-with-python2
11670 (strip-python2-variant python-graphql-core))))
11671 (package (inherit base)
11672 (native-inputs
11673 `(("python2-setuptools" ,python2-setuptools)
11674 ,@(package-native-inputs base))))))
7ee51575
EF
11675
11676(define-public python-graphql-relay
11677 (package
11678 (name "python-graphql-relay")
11679 (version "0.4.4")
11680 (source
11681 (origin
11682 (method url-fetch)
11683 (uri (pypi-uri "graphql-relay" version))
11684 (sha256
11685 (base32
11686 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11687 (build-system python-build-system)
11688 (native-inputs
11689 `(("python-pytest" ,python-pytest)))
11690 (inputs
11691 `(("python-graphql-core" ,python-graphql-core)
11692 ("python-promise" ,python-promise)
11693 ("python-six" ,python-six)))
11694 (home-page "https://github.com/graphql-python/graphql-relay-py")
11695 (synopsis "Relay implementation for Python")
11696 (description
11697 "This is a library to allow the easy creation of Relay-compliant servers
11698using the GraphQL Python reference implementation of a GraphQL server. It
11699should be noted that the code is a exact port of the original
11700@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11701from Facebook.")
11702 (properties `((python2-variant . ,(delay python2-graphql-relay))))
11703 (license license:expat)))
11704
11705(define-public python2-graphql-relay
11706 (let ((base (package-with-python2
11707 (strip-python2-variant python-graphql-relay))))
11708 (package (inherit base)
11709 (native-inputs
11710 `(("python2-setuptools" ,python2-setuptools)
11711 ,@(package-native-inputs base))))))
ddc63a56
EF
11712
11713(define-public python-graphene
11714 (package
11715 (name "python-graphene")
11716 (version "0.10.2")
11717 (source
11718 (origin
11719 (method url-fetch)
11720 (uri (pypi-uri "graphene" version))
11721 (sha256
11722 (base32
11723 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11724 (build-system python-build-system)
11725 (native-inputs
11726 `(("python-django-filter" ,python-django-filter)
11727 ("python-mock" ,python-mock)
11728 ("python-psycopg2" ,python-psycopg2)
11729 ("python-pytest-django" ,python-pytest-django)
11730 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11731 (inputs
11732 `(("python-graphql-core" ,python-graphql-core)
11733 ("python-graphql-relay" ,python-graphql-relay)
11734 ("python-iso8601" ,python-iso8601)
11735 ("python-promise" ,python-promise)
11736 ("python-six" ,python-six)))
11737 (home-page "http://graphene-python.org/")
11738 (synopsis "GraphQL Framework for Python")
11739 (description
11740 "Graphene is a Python library for building GraphQL schemas/types.
11741A GraphQL schema describes your data model, and provides a GraphQL server
11742with an associated set of resolve methods that know how to fetch data.")
11743 (properties `((python2-variant . ,(delay python2-graphene))))
11744 (license license:expat)))
11745
11746(define-public python2-graphene
11747 (let ((base (package-with-python2
11748 (strip-python2-variant python-graphene))))
11749 (package (inherit base)
11750 (native-inputs
11751 `(("python2-setuptools" ,python2-setuptools)
11752 ("python2-sqlalchemy" ,python2-sqlalchemy)
11753 ,@(package-native-inputs base))))))
d488d5d6
EF
11754
11755(define-public python-nautilus
11756 (package
11757 (name "python-nautilus")
11758 (version "0.4.9")
11759 (source
11760 (origin
11761 (method url-fetch)
11762 (uri (pypi-uri "nautilus" version))
11763 (sha256
11764 (base32
11765 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11766 (build-system python-build-system)
11767 (arguments `(#:tests? #f)) ; fails to import test modules
11768 (native-inputs
11769 `(("python-setuptools" ,python-setuptools)))
11770 (inputs
11771 `(("python-bcrypt" ,python-bcrypt)
11772 ("python-click" ,python-click)
11773 ("python-consul" ,python-consul)
11774 ("python-graphql-core" ,python-graphql-core)
11775 ("python-graphql-relay" ,python-graphql-relay)
11776 ("python-graphene" ,python-graphene)
11777 ("python-jinja2" ,python-jinja2)
11778 ("python-nose2" ,python-nose2)
11779 ("python-peewee" ,python-peewee)
11780 ("python-pika" ,python-pika)
11781 ("python-pycparser" ,python-pycparser)
11782 ("python-requests" ,python-requests)
11783 ("python-tornado" ,python-tornado)
11784 ("python-wtforms" ,python-wtforms)))
11785 (home-page "https://github.com/AlecAivazis/nautilus")
11786 (synopsis "Library for creating microservice applications")
11787 (description
11788 "Nautilus is a framework for flux based microservices that looks to
11789provide extendible implementations of common aspects of a cloud so that you can
11790focus on building massively scalable web applications.")
11791 (license license:expat)))
94cffc63
LF
11792
11793(define-public python-s3transfer
11794 (package
11795 (name "python-s3transfer")
11796 (version "0.1.8")
11797 (source (origin
11798 (method url-fetch)
11799 (uri (pypi-uri "s3transfer" version))
11800 (sha256
11801 (base32
11802 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11803 (build-system python-build-system)
11804 (native-inputs
11805 `(("python-docutils" ,python-docutils)))
11806 (inputs
11807 `(("python-botocore" ,python-botocore)))
11808 (synopsis "Amazon S3 Transfer Manager")
11809 (description "S3transfer is a Python library for managing Amazon S3
11810transfers.")
11811 (home-page "https://github.com/boto/s3transfer")
11812 (license license:asl2.0)
11813 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11814
11815(define-public python2-s3transfer
11816 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11817 (package
11818 (inherit base)
11819 (native-inputs
11820 `(("python2-futures" ,python2-futures)
11821 ("python2-setuptools" ,python2-setuptools)
11822 ,@(package-native-inputs base))))))
8ab59181
HG
11823
11824(define-public python-setproctitle
11825(package
11826 (name "python-setproctitle")
11827 (version "1.1.10")
11828 (source
11829 (origin
11830 (method url-fetch)
11831 (uri (pypi-uri "setproctitle" version))
11832 (sha256
11833 (base32
11834 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11835 (build-system python-build-system)
11836 (arguments
11837 '(#:phases
11838 (modify-phases %standard-phases
11839 (add-before 'check 'patch-Makefile
11840 ;; Stricly this is only required for the python2 variant.
11841 ;; But adding a phase in an inherited package seems to be
11842 ;; cumbersum. So we patch even for python3.
11843 (lambda _
11844 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11845 (when nose
11846 (substitute* "Makefile"
11847 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11848 (string-append nose "/bin/nosetests "))))
11849 #t)))
11850 (replace 'check
11851 (lambda _
11852 (setenv "PYTHON" (or (which "python3") (which "python")))
11853 (setenv "PYCONFIG" (or (which "python3-config")
11854 (which "python-config")))
11855 (setenv "CC" "gcc")
11856 ;; No need to extend PYTHONPATH to find the built package, since
11857 ;; the Makefile will build anyway
11858 (zero? (system* "make" "check")))))))
11859 (native-inputs
11860 `(("procps" ,procps))) ; required for tests
11861 (home-page
11862 "https://github.com/dvarrazzo/py-setproctitle")
11863 (synopsis
11864 "Setproctitle implementation for Python to customize the process title")
11865 (description "The library allows a process to change its title (as displayed
11866by system tools such as ps and top).
11867
11868Changing the title is mostly useful in multi-process systems, for
11869example when a master process is forked: changing the children's title
11870allows to identify the task each process is busy with. The technique
11871is used by PostgreSQL and the OpenSSH Server for example.")
11872 (license license:bsd-3)
11873 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11874
11875(define-public python2-setproctitle
11876 (let ((base (package-with-python2
11877 (strip-python2-variant python-setproctitle))))
11878 (package
11879 (inherit base)
11880 (native-inputs `(("python2-nose" ,python2-nose)
11881 ,@(package-native-inputs base))))))
162e42d8
HG
11882
11883(define-public python-validictory
11884 (package
11885 (name "python-validictory")
11886 (version "1.0.1")
11887 (source
11888 (origin
11889 (method url-fetch)
11890 (uri (pypi-uri "validictory" version))
11891 (sha256
11892 (base32
11893 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11894 (build-system python-build-system)
11895 (arguments
11896 '(#:phases
11897 (modify-phases %standard-phases
11898 (add-after 'unpack 'bootstrap
11899 ;; Move the tests out of the package directory to avoid
11900 ;; packaging them.
11901 (lambda* _
11902 (rename-file "validictory/tests" "tests")
11903 (delete-file "tests/__init__.py")))
11904 (replace 'check
11905 (lambda _
11906 ;; Extend PYTHONPATH so the built package will be found.
11907 (setenv "PYTHONPATH"
11908 (string-append (getcwd) "/build/lib:"
11909 (getenv "PYTHONPATH")))
11910 (zero? (system* "py.test" "-vv" )))))))
11911 (native-inputs
11912 `(("python-pytest" ,python-pytest)))
11913 (home-page
11914 "https://github.com/jamesturk/validictory")
11915 (synopsis "General purpose Python data validator")
11916 (description "It allows validation of arbitrary Python data structures.
11917
11918The schema format is based on the JSON Schema
11919proposal (http://json-schema.org), so combined with json the library is also
11920useful as a validator for JSON data.")
7ca68304
EF
11921 (license license:expat)
11922 (properties `((python2-variant . ,(delay python2-validictory))))))
162e42d8
HG
11923
11924(define-public python2-validictory
7ca68304
EF
11925 (let ((base (package-with-python2
11926 (strip-python2-variant python-validictory))))
11927 (package
11928 (inherit base)
11929 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11930 ,@(package-native-inputs base))))))
0990edfe
DM
11931
11932(define-public python-aniso8601
11933 (package
11934 (name "python-aniso8601")
11935 (version "1.1.0")
11936 (source
11937 (origin
11938 (method url-fetch)
11939 (uri (pypi-uri "aniso8601" version))
11940 (sha256
11941 (base32
11942 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11943 (build-system python-build-system)
11944 (propagated-inputs
11945 `(("python-dateutil-2" ,python-dateutil-2)))
11946 (home-page
11947 "https://bitbucket.org/nielsenb/aniso8601")
11948 (synopsis
11949 "Python library for parsing ISO 8601 strings")
11950 (description
11951 "This package contains a library for parsing ISO 8601 datetime strings.")
11952 (license license:bsd-3)))
999d964d
DM
11953
11954(define-public python-flask-restful
11955 (package
11956 (name "python-flask-restful")
11957 (version "0.3.5")
11958 (source
11959 (origin
11960 (method url-fetch)
11961 (uri (pypi-uri "Flask-RESTful" version))
11962 (sha256
11963 (base32
11964 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11965 (build-system python-build-system)
11966 (propagated-inputs
11967 `(("python-aniso8601" ,python-aniso8601)
11968 ("python-flask" ,python-flask)
11969 ("python-pycrypto" ,python-pycrypto)
11970 ("python-pytz" ,python-pytz)))
11971 (native-inputs
11972 `(;; Optional dependency of Flask. Tests need it.
11973 ("python-blinker" ,python-blinker)
11974 ("python-mock" ,python-mock) ; For tests
11975 ("python-nose" ,python-nose) ; For tests
11976 ("python-sphinx" ,python-sphinx)))
11977 (home-page
11978 "https://www.github.com/flask-restful/flask-restful/")
11979 (synopsis
11980 "Flask module for creating REST APIs")
11981 (description
11982 "This package contains a Flask module for creating REST APIs.")
11983 (license license:bsd-3)))
31288222
DM
11984
11985(define-public python-flask-basicauth
11986 (package
11987 (name "python-flask-basicauth")
11988 (version "0.2.0")
11989 (source
11990 (origin
11991 (method url-fetch)
11992 (uri (pypi-uri "Flask-BasicAuth" version))
11993 (sha256
11994 (base32
11995 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11996 (build-system python-build-system)
11997 (propagated-inputs
11998 `(("python-flask" ,python-flask)))
11999 (home-page
12000 "https://github.com/jpvanhal/flask-basicauth")
12001 (synopsis
12002 "HTTP basic access authentication for Flask")
12003 (description
12004 "This package provides HTTP basic access authentication for Flask.")
12005 (license license:bsd-3)))
903276d0
DM
12006
12007(define-public python-flask-sqlalchemy
12008 (package
12009 (name "python-flask-sqlalchemy")
12010 (version "2.1")
12011 (source
12012 (origin
12013 (method url-fetch)
12014 (uri (pypi-uri "Flask-SQLAlchemy" version))
12015 (sha256
12016 (base32
12017 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12018 (build-system python-build-system)
12019 (propagated-inputs
12020 `(("python-flask" ,python-flask)
12021 ("python-sqlalchemy" ,python-sqlalchemy)))
12022 (home-page
12023 "http://github.com/mitsuhiko/flask-sqlalchemy")
12024 (synopsis
12025 "Module adding SQLAlchemy support to your Flask application")
12026 (description
12027 "This package adds SQLAlchemy support to your Flask application.")
12028 (license license:bsd-3)))
329b4b3b
LF
12029
12030(define-public python-pyev
12031 (package
12032 (name "python-pyev")
12033 (version "0.9.0")
12034 (source
12035 (origin
12036 (method url-fetch)
12037 (uri (pypi-uri "pyev" version))
12038 (sha256
12039 (base32
12040 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12041 (build-system python-build-system)
12042 (arguments
12043 `(#:tests? #f ; no test suite
12044 #:phases
12045 (modify-phases %standard-phases
12046 (add-after 'unpack 'patch
12047 (lambda* (#:key inputs #:allow-other-keys)
12048 (let ((libev (string-append (assoc-ref inputs "libev")
12049 "/lib/libev.so.4")))
12050 (substitute* "setup.py"
12051 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12052 (string-append "libev_dll_name = \"" libev "\"")))))))))
12053 (inputs
12054 `(("libev" ,libev)))
12055 (home-page "http://pythonhosted.org/pyev/")
12056 (synopsis "Python libev interface")
12057 (description "Pyev provides a Python interface to libev.")
12058 (license license:gpl3)))
12059
12060(define-public python2-pyev
12061 (package-with-python2 python-pyev))
45b4f127
DM
12062
12063(define-public python-imagesize
12064 (package
12065 (name "python-imagesize")
12066 (version "0.7.1")
12067 (source
12068 (origin
12069 (method url-fetch)
12070 (uri (pypi-uri "imagesize" version))
12071 (sha256
12072 (base32
12073 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12074 (build-system python-build-system)
12075 (home-page "https://github.com/shibukawa/imagesize_py")
12076 (synopsis "Gets image size of files in variaous formats in Python")
12077 (description
12078 "This package allows determination of image size from
12079PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12080 (license license:expat)
12081 (properties `((python2-variant . ,(delay python2-imagesize))))))
12082
12083(define-public python2-imagesize
12084 (let ((base (package-with-python2 (strip-python2-variant python-imagesize))))
12085 (package
12086 (inherit base)
12087 (native-inputs `(("python2-setuptools" ,python2-setuptools)
12088 ,@(package-native-inputs base))))))
2f6dd9cd
AI
12089
12090(define-public python-axolotl-curve25519
12091 (package
12092 (name "python-axolotl-curve25519")
12093 (version "0.1")
12094 (source
12095 (origin
12096 (method git-fetch)
12097 (uri (git-reference
12098 (url "git://github.com/tgalal/python-axolotl-curve25519")
12099 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12100 (file-name (string-append name "-" version "-checkout"))
12101 (sha256
12102 (base32
12103 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12104 (build-system python-build-system)
12105 (arguments
12106 `(;; Prevent creation of the egg. This works around
12107 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12108 #:configure-flags '("--root=/")))
12109 (native-inputs
12110 `(("python-setuptools" ,python-setuptools)))
12111 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12112 (synopsis "Python wrapper for curve25519 library")
12113 (description "This is a python wrapper for the curve25519 library
12114with ed25519 signatures. The C code was pulled from
12115libaxolotl-android. At the moment this wrapper is meant for use by
12116python-axolotl.")
12117 (license (list license:gpl3 ; Most files
683cdbf5 12118 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
12119
12120(define-public python2-axolotl-curve25519
12121 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
12122
12123(define-public python-axolotl
12124 (package
12125 (name "python-axolotl")
12126 (version "0.1.35")
12127 (source
12128 (origin
12129 (method url-fetch)
12130 (uri (string-append
12131 "https://github.com/tgalal/python-axolotl/archive/"
12132 version ".tar.gz"))
12133 (file-name (string-append name "-" version ".tar.gz"))
12134 (sha256
12135 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12136 (build-system python-build-system)
12137 (arguments
12138 `(#:phases
12139 (modify-phases %standard-phases
12140 ;; Don't install tests
12141 (add-before 'install 'remove-tests
12142 (lambda _
12143 (for-each delete-file-recursively
12144 '("axolotl/tests" "build/lib/axolotl/tests"))
12145 #t)))
12146 ;; Prevent creation of the egg. This works around
12147 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12148 #:configure-flags '("--root=/")))
12149 (native-inputs
12150 `(("python-setuptools" ,python-setuptools)))
12151 (propagated-inputs
12152 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12153 ("python-dateutil" ,python-dateutil)
12154 ("python-protobuf" ,python-protobuf)
12155 ("python-pycrypto" ,python-pycrypto)))
12156 (home-page "https://github.com/tgalal/python-axolotl")
12157 (synopsis "Python port of libaxolotl-android")
12158 (description "This is a python port of libaxolotl-android. This
12159is a ratcheting forward secrecy protocol that works in synchronous and
12160asynchronous messaging environments.")
12161 (license license:gpl3)))
12162
12163(define-public python2-axolotl
12164 (package-with-python2 python-axolotl))