gnu: Add python-widgetsnbextension.
[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>
a01b6da7
NK
33;;;
34;;; This file is part of GNU Guix.
35;;;
36;;; GNU Guix is free software; you can redistribute it and/or modify it
37;;; under the terms of the GNU General Public License as published by
38;;; the Free Software Foundation; either version 3 of the License, or (at
39;;; your option) any later version.
40;;;
41;;; GNU Guix is distributed in the hope that it will be useful, but
42;;; WITHOUT ANY WARRANTY; without even the implied warranty of
43;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44;;; GNU General Public License for more details.
45;;;
46;;; You should have received a copy of the GNU General Public License
47;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
48
1ffa7090 49(define-module (gnu packages python)
3f641af0 50 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 51 #:use-module (gnu packages)
8e451885 52 #:use-module (gnu packages algebra)
d79a343b 53 #:use-module (gnu packages adns)
89b2e0b0 54 #:use-module (gnu packages attr)
d96034ed 55 #:use-module (gnu packages backup)
1ffa7090 56 #:use-module (gnu packages compression)
4ed20663 57 #:use-module (gnu packages databases)
ddc63a56 58 #:use-module (gnu packages django)
5e1c9367 59 #:use-module (gnu packages file)
4ed20663 60 #:use-module (gnu packages fontutils)
4ed20663
AE
61 #:use-module (gnu packages gcc)
62 #:use-module (gnu packages ghostscript)
6eb7af2a 63 #:use-module (gnu packages gl)
4ed20663 64 #:use-module (gnu packages glib)
6eb7af2a 65 #:use-module (gnu packages gstreamer)
4ed20663 66 #:use-module (gnu packages gtk)
421a80a2 67 #:use-module (gnu packages icu4c)
c937562e 68 #:use-module (gnu packages image)
4ed20663 69 #:use-module (gnu packages imagemagick)
d79a343b 70 #:use-module (gnu packages libevent)
b10ab723 71 #:use-module (gnu packages libffi)
89b2e0b0 72 #:use-module (gnu packages linux)
0da98533 73 #:use-module (gnu packages maths)
4ed20663 74 #:use-module (gnu packages multiprecision)
45203542 75 #:use-module (gnu packages networking)
be7134bf 76 #:use-module (gnu packages ncurses)
b04a52a6 77 #:use-module (gnu packages openstack)
d488d5d6 78 #:use-module (gnu packages password-utils)
c9b1b4f9 79 #:use-module (gnu packages pcre)
4ed20663 80 #:use-module (gnu packages perl)
b10ab723 81 #:use-module (gnu packages pkg-config)
4ed20663 82 #:use-module (gnu packages readline)
6eb7af2a 83 #:use-module (gnu packages sdl)
c9b1b4f9 84 #:use-module (gnu packages statistics)
8f9ac901 85 #:use-module (gnu packages tex)
1c65314c 86 #:use-module (gnu packages texinfo)
cc2b77df 87 #:use-module (gnu packages tls)
e25f0174 88 #:use-module (gnu packages version-control)
8d12be1e 89 #:use-module (gnu packages web)
ce0614dd 90 #:use-module (gnu packages base)
26b307e2 91 #:use-module (gnu packages xml)
6fa14469 92 #:use-module (gnu packages xorg)
0bdc1671 93 #:use-module (gnu packages xdisorg)
4ed20663 94 #:use-module (gnu packages zip)
afa181ff 95 #:use-module (gnu packages tcl)
63bcec71 96 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
97 #:use-module (guix packages)
98 #:use-module (guix download)
ea5456c8 99 #:use-module (guix git-download)
11bb85a1 100 #:use-module (guix utils)
acc26ff1 101 #:use-module (guix build-system gnu)
d8c4998f 102 #:use-module (guix build-system cmake)
898238b9 103 #:use-module (guix build-system python)
1c65314c
FB
104 #:use-module (guix build-system trivial)
105 #:use-module (srfi srfi-1))
a01b6da7 106
45848023 107(define-public python-2.7
a01b6da7
NK
108 (package
109 (name "python")
e7e7a1eb 110 (version "2.7.11")
a01b6da7
NK
111 (source
112 (origin
113 (method url-fetch)
9b43a0ff 114 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
115 version "/Python-" version ".tar.xz"))
116 (sha256
117 (base32
e7e7a1eb 118 "0iiz844riiznsyhhyy962710pz228gmhv8qi3yk4w4jhmx2lqawn"))
c3052d6b
ML
119 (patches (search-patches "python-2.7-search-paths.patch"
120 "python-2-deterministic-build-info.patch"
121 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
122 (modules '((guix build utils)))
123 ;; suboptimal to delete failing tests here, but if we delete them in the
124 ;; arguments then we need to make sure to strip out that phase when it
125 ;; gets inherited by python and python-minimal.
126 (snippet
127 '(begin
128 (for-each delete-file
129 '("Lib/test/test_compileall.py"
130 "Lib/test/test_distutils.py"
131 "Lib/test/test_import.py"
132 "Lib/test/test_shutil.py"
133 "Lib/test/test_socket.py"
1bb163b0 134 "Lib/test/test_subprocess.py"))
10a42aa2 135 #t))))
02f0c3b2
LC
136 (outputs '("out"
137 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 138 (build-system gnu-build-system)
3fdc99da 139 (arguments
10a42aa2 140 `(;; 356 tests OK.
e7e7a1eb
EF
141 ;; 6 tests failed:
142 ;; test_compileall test_distutils test_import test_shutil test_socket
143 ;; test_subprocess
144 ;; 39 tests skipped:
ff6f33cf
ED
145 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
146 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
147 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
148 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
149 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
150 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
151 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
152 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
153 ;; test_winreg test_winsound test_zipfile64
154 ;; 4 skips unexpected on linux2:
155 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 156 #:test-target "test"
3fdc99da 157 #:configure-flags
6a20289d
LC
158 (list "--enable-shared" ;allow embedding
159 "--with-system-ffi" ;build ctypes
160 (string-append "LDFLAGS=-Wl,-rpath="
161 (assoc-ref %outputs "out") "/lib"))
fd982732 162
d2cc9c7c
LC
163 #:modules ((ice-9 ftw) (ice-9 match)
164 (guix build utils) (guix build gnu-build-system))
fd982732 165 #:phases
46472ecd
MW
166 (modify-phases %standard-phases
167 (add-before
168 'configure 'patch-lib-shells
169 (lambda _
170 ;; Filter for existing files, since some may not exist in all
171 ;; versions of python that are built with this recipe.
172 (substitute* (filter file-exists?
173 '("Lib/subprocess.py"
174 "Lib/popen2.py"
175 "Lib/distutils/tests/test_spawn.py"
176 "Lib/test/test_subprocess.py"))
177 (("/bin/sh") (which "sh")))
dedc8320
LC
178
179 ;; Use zero as the timestamp in .pyc files so that builds are
180 ;; deterministic. TODO: Remove it when this variable is set in
181 ;; gnu-build-system.scm.
a665996f 182 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 183 #t))
5b4e2791
LC
184 (add-before 'configure 'do-not-record-configure-flags
185 (lambda* (#:key configure-flags #:allow-other-keys)
186 ;; Remove configure flags from the installed '_sysconfigdata.py'
187 ;; and 'Makefile' so we don't end up keeping references to the
188 ;; build tools.
189 ;;
190 ;; Preserve at least '--with-system-ffi' since otherwise the
191 ;; thing tries to build libffi, fails, and we end up with a
192 ;; Python that lacks ctypes.
193 (substitute* "configure"
194 (("^CONFIG_ARGS=.*$")
195 (format #f "CONFIG_ARGS='~a'\n"
196 (if (member "--with-system-ffi" configure-flags)
197 "--with-system-ffi"
198 ""))))
199 #t))
46472ecd
MW
200 (add-before
201 'check 'pre-check
202 (lambda _
203 ;; 'Lib/test/test_site.py' needs a valid $HOME
204 (setenv "HOME" (getcwd))
1bb163b0
LC
205 ,@(if (string-prefix? "mips64el" (%current-system))
206
207 ;; XXX: The following test fails on mips64el.
208 '((false-if-exception
209 (delete-file "Lib/test/test_ctypes.py")))
210
211 '())
46472ecd
MW
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
02f0c3b2 224 #t)))
9ffe61b0
LC
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
216c283b
LC
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
02f0c3b2
LC
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
a01b6da7 277 (inputs
3fdc99da
CR
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
b10ab723 280 ("libffi" ,libffi) ; for ctypes
b88e1b0a 281 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 282 ("openssl" ,openssl)
3fdc99da 283 ("readline" ,readline)
afa181ff
LC
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
b10ab723
CR
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
af070955 292 (files '("lib/python2.7/site-packages")))))
a01b6da7 293 (home-page "http://python.org")
afa181ff 294 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297is used in a wide variety of application domains. Some of its key
298distinguishing features include: clear, readable syntax; strong
299introspection capabilities; intuitive object orientation; natural
300expression of procedural code; full modularity, supporting hierarchical
301packages; exception-based error handling; and very high level dynamic
302data types.")
3f641af0 303 (license license:psfl)))
acc26ff1 304
45848023
HG
305;; Current 2.x version.
306(define-public python-2 python-2.7)
307
308(define-public python-3.4
b24d1cfc 309 (package (inherit python-2)
08c04509 310 (version "3.4.3")
717003e3
LC
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
fc1adab1
AK
315 (patches (search-patches
316 "python-fix-tests.patch"
317 ;; XXX Try removing this patch for python > 3.4.3
318 "python-disable-ssl-test.patch"
319 "python-3-deterministic-build-info.patch"
320 "python-3-search-paths.patch"))
717003e3
LC
321 (patch-flags '("-p0"))
322 (sha256
323 (base32
08c04509 324 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
325 (arguments (substitute-keyword-arguments (package-arguments python-2)
326 ((#:tests? _) #t)))
1aebc0cb
AE
327 (native-search-paths
328 (list (search-path-specification
329 (variable "PYTHONPATH")
0e05d01e
SB
330 (files (list (string-append "lib/python"
331 (version-major+minor version)
332 "/site-packages"))))))))
f26a77ff 333
45848023
HG
334;; Current 3.x version.
335(define-public python-3 python-3.4)
336
337;; Current major version.
338(define-public python python-3)
339
95288fcc
LC
340;; Minimal variants of Python, mostly used to break the cycle between Tk and
341;; Python (Tk -> libxcb -> Python.)
342
343(define-public python2-minimal
344 (package (inherit python-2)
345 (name "python-minimal")
02f0c3b2 346 (outputs '("out"))
95288fcc
LC
347 (arguments
348 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
349 ((#:configure-flags cf)
350 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
351 (inputs '()))) ;none of the optional dependencies
352
353(define-public python-minimal
898238b9 354 (package (inherit python)
95288fcc 355 (name "python-minimal")
02f0c3b2 356 (outputs '("out"))
95288fcc
LC
357 (arguments
358 (substitute-keyword-arguments (package-arguments python)
c5a05e31
LC
359 ((#:configure-flags cf)
360 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
361
362 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
363 ;; zlib is required by 'zipimport', used by pip.
364 (inputs `(("openssl" ,openssl)
365 ("zlib" ,zlib)))))
366
64cb064c
LC
367(define* (wrap-python3 python
368 #:optional
369 (name (string-append (package-name python) "-wrapper")))
898238b9 370 (package (inherit python)
95288fcc 371 (name name)
898238b9
AE
372 (source #f)
373 (build-system trivial-build-system)
02f0c3b2 374 (outputs '("out"))
3c0f2329 375 (propagated-inputs `(("python" ,python)))
898238b9
AE
376 (arguments
377 `(#:modules ((guix build utils))
378 #:builder
379 (begin
380 (use-modules (guix build utils))
381 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
382 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
383 (mkdir-p bin)
384 (for-each
385 (lambda (old new)
386 (symlink (string-append python old)
387 (string-append bin "/" new)))
187e9094
LF
388 '("python3" "pydoc3" "idle3")
389 '("python" "pydoc" "idle"))))))
0d56e3e1
LC
390 (synopsis "Wrapper for the Python 3 commands")
391 (description
392 "This package provides wrappers for the commands of Python@tie{}3.x such
393that they can be invoked under their usual name---e.g., @command{python}
394instead of @command{python3}.")))
395
95288fcc
LC
396(define-public python-wrapper (wrap-python3 python))
397(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 398
aaf625b8
RW
399(define-public python-psutil
400 (package
401 (name "python-psutil")
88535a44 402 (version "4.3.0")
aaf625b8
RW
403 (source
404 (origin
405 (method url-fetch)
f56777be 406 (uri (pypi-uri "psutil" version))
aaf625b8
RW
407 (sha256
408 (base32
88535a44 409 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8
RW
410 (build-system python-build-system)
411 (native-inputs
412 `(("python-setuptools" ,python-setuptools)))
88535a44 413 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
414 (synopsis "Library for retrieving information on running processes")
415 (description
416 "psutil (Python system and process utilities) is a library for retrieving
417information on running processes and system utilization (CPU, memory, disks,
418network) in Python. It is useful mainly for system monitoring, profiling and
419limiting process resources and management of running processes. It implements
420many functionalities offered by command line tools such as: ps, top, lsof,
421netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
422pidof, tty, taskset, pmap.")
3f641af0 423 (license license:bsd-3)))
aaf625b8
RW
424
425(define-public python2-psutil
426 (package-with-python2 python-psutil))
898238b9 427
f9da1d8a
ED
428(define-public python-passlib
429 (package
430 (name "python-passlib")
690e8c66 431 (version "1.6.5")
f9da1d8a
ED
432 (source
433 (origin
434 (method url-fetch)
690e8c66 435 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
436 (sha256
437 (base32
690e8c66 438 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
439 (build-system python-build-system)
440 (native-inputs
441 `(("python-nose" ,python-nose)
442 ("python-setuptools" ,python-setuptools)))
443 (inputs
444 `(("python-py-bcrypt" ,python-py-bcrypt)))
445 (arguments
446 `(#:phases
447 (alist-cons-before
448 'check 'set-PYTHON_EGG_CACHE
449 ;; some tests require access to "$HOME/.cython"
450 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
451 %standard-phases)))
452 (home-page "https://bitbucket.org/ecollins/passlib")
453 (synopsis
454 "Comprehensive password hashing framework")
455 (description
456 "Passlib is a password hashing library for Python 2 & 3, which provides
457cross-platform implementations of over 30 password hashing algorithms, as well
458as a framework for managing existing password hashes. It's designed to be
459useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
460to providing full-strength password hashing for multi-user application.")
3f641af0 461 (license license:bsd-3)))
f9da1d8a
ED
462
463(define-public python2-passlib
464 (package-with-python2 python-passlib))
465
feb0d9c3
ED
466(define-public python-py-bcrypt
467 (package
468 (name "python-py-bcrypt")
469 (version "0.4")
470 (source
471 (origin
472 (method url-fetch)
473 (uri (string-append
474 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
475 version
476 ".tar.gz"))
477 (sha256
478 (base32
479 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
480 (build-system python-build-system)
481 (native-inputs
482 `(("python-setuptools" ,python-setuptools)))
483 (home-page "https://code.google.com/p/py-bcrypt")
484 (synopsis
485 "Bcrypt password hashing and key derivation")
486 (description
487 "A python wrapper of OpenBSD's Blowfish password hashing code. This
488system hashes passwords using a version of Bruce Schneier's Blowfish block
489cipher with modifications designed to raise the cost of off-line password
490cracking and frustrate fast hardware implementation. The computation cost of
491the algorithm is parametised, so it can be increased as computers get faster.
492The intent is to make a compromise of a password database less likely to
493result in an attacker gaining knowledge of the plaintext passwords (e.g. using
494John the Ripper).")
495 ;; "sha2.c" is under BSD-3;
496 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
497 ;; the rest is under ISC.
3f641af0 498 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
499
500(define-public python2-py-bcrypt
501 (package-with-python2 python-py-bcrypt))
502
503
429fdea1
ED
504(define-public python-paramiko
505 (package
506 (name "python-paramiko")
81b9bbbd 507 (version "1.16.0")
429fdea1
ED
508 (source
509 (origin
510 (method url-fetch)
81b9bbbd 511 (uri (pypi-uri "paramiko" version))
429fdea1
ED
512 (sha256
513 (base32
81b9bbbd 514 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1
ED
515 (build-system python-build-system)
516 (native-inputs
517 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
518 (propagated-inputs
519 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 520 (inputs
a3fc12da 521 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
522 (home-page "http://www.paramiko.org/")
523 (synopsis "SSHv2 protocol library")
524 (description "Paramiko is a python implementation of the SSHv2 protocol,
525providing both client and server functionality. While it leverages a Python C
526extension for low level cryptography (PyCrypto), Paramiko itself is a pure
527Python interface around SSH networking concepts.")
3f641af0 528 (license license:lgpl2.1+)))
429fdea1
ED
529
530(define-public python2-paramiko
531 (package-with-python2 python-paramiko))
532
533
de73dbf6
ED
534(define-public python-httplib2
535 (package
536 (name "python-httplib2")
286f1bac 537 (version "0.9.2")
de73dbf6
ED
538 (source
539 (origin
540 (method url-fetch)
286f1bac 541 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
542 (sha256
543 (base32
286f1bac 544 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6
ED
545 (build-system python-build-system)
546 (native-inputs
547 `(("python-setuptools" ,python-setuptools)))
286f1bac 548 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
549 (synopsis "Comprehensive HTTP client library")
550 (description
551 "A comprehensive HTTP client library supporting many features left out of
552other HTTP libraries.")
553 (license license:expat)))
554
555(define-public python2-httplib2
556 (package-with-python2 python-httplib2))
557
67039875
ED
558(define-public python-ecdsa
559 (package
560 (name "python-ecdsa")
561 (version "0.13")
562 (source
563 (origin
564 (method url-fetch)
565 (uri (string-append
566 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
567 version
568 ".tar.gz"))
569 (sha256
570 (base32
571 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
572 (build-system python-build-system)
573 (native-inputs
574 `(("python-setuptools" ,python-setuptools)))
575 (inputs
576 `(("openssl" ,openssl)))
577 (home-page
578 "http://github.com/warner/python-ecdsa")
579 (synopsis
580 "ECDSA cryptographic signature library (pure python)")
581 (description
582 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
583Curve Digital Signature Algorithm), implemented purely in Python. With this
584library, you can quickly create keypairs (signing key and verifying key), sign
585messages, and verify the signatures. The keys and signatures are very short,
586making them easy to handle and incorporate into other protocols.")
587 (license license:expat)))
588
589(define-public python2-ecdsa
590 (package-with-python2 python-ecdsa))
591
52323f32
ED
592(define-public python-ccm
593 (package
594 (name "python-ccm")
db5567f7 595 (version "2.1.6")
52323f32
ED
596 (source
597 (origin
598 (method url-fetch)
db5567f7 599 (uri (pypi-uri "ccm" version))
52323f32
ED
600 (sha256
601 (base32
db5567f7 602 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32
ED
603 (build-system python-build-system)
604 (native-inputs
605 `(("python-setuptools" ,python-setuptools)))
606 (inputs
607 `(("python-pyyaml" ,python-pyyaml)
608 ("python-six" ,python-six)))
609 (home-page "https://github.com/pcmanus/ccm")
610 (synopsis "Cassandra Cluster Manager")
611 (description "A script/library to create, launch and remove an Apache
612Cassandra cluster on localhost.")
3f641af0 613 (license license:asl2.0)))
52323f32
ED
614
615(define-public python2-ccm
616 (package-with-python2 python-ccm))
617
89114f39 618(define-public python-pytz
acc26ff1 619 (package
89114f39 620 (name "python-pytz")
61c9babb 621 (version "2016.3")
acc26ff1
CR
622 (source
623 (origin
624 (method url-fetch)
61c9babb 625 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
626 (sha256
627 (base32
61c9babb 628 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 629 (build-system python-build-system)
8498b8cf 630 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 631 (home-page "http://pythonhosted.org/pytz")
9e771e3b 632 (synopsis "Python timezone library")
acc26ff1
CR
633 (description
634 "This library allows accurate and cross platform timezone calculations
635using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 636 (license license:expat)))
5ace6e2f 637
89114f39 638(define-public python2-pytz
11bb85a1 639 (package-with-python2 python-pytz))
89114f39 640
fc50e9c6 641
89114f39 642(define-public python-babel
5ace6e2f 643 (package
89114f39 644 (name "python-babel")
3f37db6b 645 (version "2.3.2")
5ace6e2f
CR
646 (source
647 (origin
648 (method url-fetch)
b850a6d8 649 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
650 (sha256
651 (base32
3f37db6b 652 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f
CR
653 (build-system python-build-system)
654 (inputs
e1804763
AE
655 `(("python-pytz" ,python-pytz)
656 ("python-setuptools" ,python-setuptools)))
8498b8cf 657 (arguments `(#:tests? #f)) ; no test target
e1804763 658 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
659 (synopsis
660 "Tools for internationalizing Python applications")
661 (description
662 "Babel is composed of two major parts:
663- tools to build and work with gettext message catalogs
664- a Python interface to the CLDR (Common Locale Data Repository), providing
665access to various locale display names, localized number and date formatting,
666etc. ")
3f641af0 667 (license license:bsd-3)))
89114f39
AE
668
669(define-public python2-babel
11bb85a1 670 (package-with-python2 python-babel))
73adf220 671
ed377cc6
RW
672(define-public python2-backport-ssl-match-hostname
673 (package
674 (name "python2-backport-ssl-match-hostname")
f2d06d46 675 (version "3.5.0.1")
ed377cc6
RW
676 (source
677 (origin
678 (method url-fetch)
679 (uri (string-append
680 "https://pypi.python.org/packages/source/b/"
681 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
682 version ".tar.gz"))
683 (sha256
684 (base32
f2d06d46 685 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 686 (build-system python-build-system)
f2d06d46
EF
687 (arguments
688 `(#:python ,python-2
689 #:tests? #f)) ; no test target
ed377cc6
RW
690 (inputs
691 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
692 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
693 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
694 (description
695 "This backport brings the ssl.match_hostname() function to users of
696earlier versions of Python. The function checks the hostname in the
697certificate returned by the server to which a connection has been established,
698and verifies that it matches the intended target hostname.")
3f641af0 699 (license license:psfl)))
ed377cc6 700
ef5cbf9b
RW
701(define-public python-h5py
702 (package
703 (name "python-h5py")
fe147c41 704 (version "2.6.0")
ef5cbf9b
RW
705 (source
706 (origin
707 (method url-fetch)
fe147c41 708 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
709 (sha256
710 (base32
fe147c41 711 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 712 (build-system python-build-system)
797e1401
RW
713 (arguments
714 `(#:tests? #f ; no test target
715 #:phases
716 (modify-phases %standard-phases
717 (add-after 'unpack 'fix-hdf5-paths
718 (lambda* (#:key inputs #:allow-other-keys)
719 (let ((prefix (assoc-ref inputs "hdf5")))
720 (substitute* "setup_build.py"
721 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
722 (string-append "['" prefix "/lib" "']"))
723 (("'/opt/local/include', '/usr/local/include'")
724 (string-append "'" prefix "/include" "'")))
725 (substitute* "setup_configure.py"
726 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
727 (string-append "['" prefix "/lib" "']")))
728 #t))))))
3c4010b1
RW
729 (propagated-inputs
730 `(("python-numpy" ,python-numpy)))
ef5cbf9b 731 (inputs
fe147c41
EF
732 `(("hdf5" ,hdf5)
733 ("python-six" ,python-six)))
ef5cbf9b 734 (native-inputs
fe147c41
EF
735 `(("python-cython" ,python-cython)
736 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
737 (home-page "http://www.h5py.org/")
738 (synopsis "Read and write HDF5 files from Python")
739 (description
740 "The h5py package provides both a high- and low-level interface to the
741HDF5 library from Python. The low-level interface is intended to be a
742complete wrapping of the HDF5 API, while the high-level component supports
743access to HDF5 files, datasets and groups using established Python and NumPy
744concepts.")
3f641af0 745 (license license:bsd-3)
fe147c41 746 (properties `((python2-variant . ,(delay python2-h5py))))))
ef5cbf9b
RW
747
748(define-public python2-h5py
fe147c41 749 (package-with-python2 (strip-python2-variant python-h5py)))
ef5cbf9b 750
c1448c69
EB
751(define-public python-lockfile
752 (package
753 (name "python-lockfile")
692add53 754 (version "0.12.2")
c1448c69
EB
755 (source
756 (origin
757 (method url-fetch)
758 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
759 "lockfile-" version ".tar.gz"))
760 (sha256
761 (base32
692add53 762 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
763 (build-system python-build-system)
764 (arguments '(#:test-target "check"))
692add53
BW
765 (native-inputs
766 `(("python-pbr" ,python-pbr)))
6a8f26a4 767 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
768 (synopsis "Platform-independent file locking module")
769 (description
770 "The lockfile package exports a LockFile class which provides a simple
771API for locking files.")
1804527a
BW
772 (license license:expat)
773 (properties `((python2-variant . ,(delay python2-lockfile))))))
c1448c69
EB
774
775(define-public python2-lockfile
1804527a
BW
776 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
777 (package
692add53
BW
778 (inherit base)
779 (native-inputs `(("python2-setuptools" ,python2-setuptools)
780 ,@(package-native-inputs base))))))
c1448c69 781
5a1a4bf6
EB
782(define-public python-mock
783 (package
784 (name "python-mock")
785 (version "1.0.1")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
790 "mock-" version ".tar.gz"))
791 (sha256
792 (base32
793 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
794 (build-system python-build-system)
795 (arguments '(#:test-target "check"))
07af3e5e 796 (home-page "http://code.google.com/p/mock/")
9e771e3b 797 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
798 (description
799 "Mock is a library for testing in Python. It allows you to replace parts
800of your system under test with mock objects and make assertions about how they
801have been used.")
bd3fa666 802 (license license:expat)))
5a1a4bf6
EB
803
804(define-public python2-mock
805 (package-with-python2 python-mock))
806
fc50e9c6 807
73adf220
AE
808(define-public python-setuptools
809 (package
810 (name "python-setuptools")
62a9a23b 811 (version "18.3.1")
73adf220
AE
812 (source
813 (origin
814 (method url-fetch)
815 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
816 version ".tar.gz"))
817 (sha256
818 (base32
62a9a23b 819 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 820 (build-system python-build-system)
d3d656c5
AE
821 ;; FIXME: Tests require pytest, which itself relies on setuptools.
822 ;; One could bootstrap with an internal untested setuptools.
73adf220 823 (arguments
824af8ca 824 `(#:tests? #f))
73adf220
AE
825 (home-page "https://pypi.python.org/pypi/setuptools")
826 (synopsis
827 "Library designed to facilitate packaging Python projects")
828 (description
829 "Setuptools is a fully-featured, stable library designed to facilitate
830packaging Python projects, where packaging includes:
831Python package and module definitions,
832distribution package metadata,
833test hooks,
834project installation,
835platform-specific details,
836Python 3 support.")
3f641af0 837 (license license:psfl)))
73adf220
AE
838
839(define-public python2-setuptools
840 (package-with-python2 python-setuptools))
fc50e9c6
AE
841
842
cafc3f5a
EB
843(define-public python-pycrypto
844 (package
845 (name "python-pycrypto")
846 (version "2.6.1")
847 (source
848 (origin
849 (method url-fetch)
850 (uri (string-append "https://pypi.python.org/packages/source/p/"
851 "pycrypto/pycrypto-" version ".tar.gz"))
852 (sha256
853 (base32
854 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
855 (build-system python-build-system)
856 (native-inputs
857 `(("python-setuptools" ,python-setuptools)))
858 (inputs
859 `(("python" ,python)
860 ("gmp" ,gmp)))
861 (arguments
862 `(#:phases
863 (alist-cons-before
864 'build 'set-build-env
865 ;; pycrypto runs an autoconf configure script behind the scenes
866 (lambda _
867 (setenv "CONFIG_SHELL" (which "bash")))
868 %standard-phases)))
869 (home-page "http://www.pycrypto.org/")
870 (synopsis "Cryptographic modules for Python")
871 (description
872 "Pycrypto is a collection of both secure hash functions (such as SHA256
873and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 874etc.). The package is structured to make adding new modules easy.")
3f641af0 875 (license license:public-domain)))
cafc3f5a 876
345f0611 877(define-public python2-pycrypto
1c0059da
EF
878 (let ((pycrypto (package-with-python2 python-pycrypto)))
879 (package (inherit pycrypto)
880 (inputs
881 `(("python" ,python-2)
882 ,@(alist-delete
883 "python"
884 (package-inputs pycrypto)))))))
345f0611 885
cafc3f5a
EB
886(define-public python-keyring
887 (package
888 (name "python-keyring")
13f3ff35 889 (version "8.7")
cafc3f5a
EB
890 (source
891 (origin
892 (method url-fetch)
664e6c3a 893 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
894 (sha256
895 (base32
13f3ff35 896 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
897 (build-system python-build-system)
898 (native-inputs
13f3ff35 899 `(("python-setuptools-scm" ,python-setuptools-scm)))
cafc3f5a
EB
900 (inputs
901 `(("python-pycrypto" ,python-pycrypto)))
902 (arguments
664e6c3a 903 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 904 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
905 (synopsis "Store and access your passwords safely")
906 (description
907 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 908service from python. It can be used in any application that needs safe
cafc3f5a
EB
909password storage.")
910 ;; "MIT" and PSF dual license
3f641af0 911 (license license:x11)
13f3ff35 912 (properties `((python2-variant . ,(delay python2-keyring))))))
cafc3f5a 913
d7af1069 914(define-public python2-keyring
13f3ff35
EF
915 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
916 (package
917 (inherit base)
918 (native-inputs `(("python2-setuptools" ,python2-setuptools)
919 ,@(package-native-inputs base))))))
d7af1069 920
a480bc41
EB
921(define-public python-six
922 (package
923 (name "python-six")
b6ab89ef 924 (version "1.10.0")
a480bc41
EB
925 (source
926 (origin
927 (method url-fetch)
b6ab89ef 928 (uri (pypi-uri "six" version))
a480bc41
EB
929 (sha256
930 (base32
b6ab89ef 931 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
932 (build-system python-build-system)
933 (inputs
934 `(("python-setuptools" ,python-setuptools)))
935 (home-page "http://pypi.python.org/pypi/six/")
936 (synopsis "Python 2 and 3 compatibility utilities")
937 (description
35b9e423 938 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
939functions for smoothing over the differences between the Python versions with
940the goal of writing Python code that is compatible on both Python versions.
35b9e423 941Six supports every Python version since 2.5. It is contained in only one
a480bc41 942Python file, so it can be easily copied into your project.")
3f641af0 943 (license license:x11)))
a480bc41 944
0c20025c
AE
945(define-public python2-six
946 (package-with-python2 python-six))
947
cafc3f5a
EB
948(define-public python-dateutil-2
949 (package
950 (name "python-dateutil")
394b8060 951 (version "2.5.2")
cafc3f5a
EB
952 (source
953 (origin
954 (method url-fetch)
394b8060 955 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
956 (sha256
957 (base32
394b8060 958 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a
EB
959 (build-system python-build-system)
960 (inputs
394b8060 961 `(("python-six" ,python-six)))
b5a5fb19 962 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
963 (synopsis "Extensions to the standard datetime module")
964 (description
965 "The dateutil module provides powerful extensions to the standard
966datetime module, available in Python 2.3+.")
3f641af0 967 (license license:bsd-3)
394b8060 968 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
cafc3f5a
EB
969
970(define-public python2-dateutil-2
394b8060
EF
971 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
972 (package
973 (inherit base)
974 (inputs `(("python2-setuptools" ,python2-setuptools)
975 ,@(package-inputs base))))))
cafc3f5a 976
fc50e9c6
AE
977(define-public python-dateutil
978 (package
979 (name "python-dateutil")
980 (version "1.5") ; last version for python < 3
981 (source
982 (origin
983 (method url-fetch)
cafc3f5a
EB
984 (uri (string-append "http://labix.org/download/python-dateutil/"
985 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
986 (sha256
987 (base32
988 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
989 (build-system python-build-system)
990 (inputs
991 `(("python-setuptools" ,python-setuptools)))
b5a5fb19 992 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 993 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
994 (description
995 "The dateutil module provides powerful extensions to the standard
996datetime module, available in Python 2.3+.")
3f641af0 997 (license license:psfl)))
fc50e9c6
AE
998
999(define-public python2-dateutil
1000 (package-with-python2 python-dateutil))
1d08c01f 1001
cafc3f5a
EB
1002(define-public python-parsedatetime
1003 (package
1004 (name "python-parsedatetime")
eebf6f01 1005 (version "2.1")
cafc3f5a
EB
1006 (source
1007 (origin
1008 (method url-fetch)
eebf6f01 1009 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1010 (sha256
1011 (base32
eebf6f01 1012 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1013 (build-system python-build-system)
1014 (native-inputs
eebf6f01
EF
1015 `(("python-nose" ,python-nose)
1016 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1017 (home-page "http://github.com/bear/parsedatetime/")
1018 (synopsis
1019 "Parse human-readable date/time text")
1020 (description
e881752c 1021 "Parse human-readable date/time text.")
3f641af0 1022 (license license:asl2.0)
eebf6f01 1023 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
cafc3f5a 1024
38b8f9b2 1025(define-public python2-parsedatetime
eebf6f01
EF
1026 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1027 (package
1028 (inherit base)
1029 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1030 ,@(package-native-inputs base))))))
38b8f9b2 1031
d072efcb
RW
1032(define-public python-pandas
1033 (package
1034 (name "python-pandas")
7d0c3c8d 1035 (version "0.18.1")
d072efcb
RW
1036 (source
1037 (origin
1b96f069 1038 (method url-fetch)
7d0c3c8d
EF
1039 (uri (string-append
1040 "https://pypi.python.org/packages/11/09/"
1041 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1042 "pandas-" version ".tar.gz"))
1b96f069 1043 (sha256
7d0c3c8d 1044 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1045 (build-system python-build-system)
d072efcb 1046 (propagated-inputs
42603726
EF
1047 `(("python-numpy" ,python-numpy)))
1048 (inputs
1049 `(("python-pytz" ,python-pytz)
d072efcb
RW
1050 ("python-dateutil" ,python-dateutil-2)))
1051 (native-inputs
7d0c3c8d 1052 `(("python-nose" ,python-nose)))
d072efcb
RW
1053 (home-page "http://pandas.pydata.org")
1054 (synopsis "Data structures for data analysis, time series, and statistics")
1055 (description
1056 "Pandas is a Python package providing fast, flexible, and expressive data
1057structures designed to make working with structured (tabular,
1058multidimensional, potentially heterogeneous) and time series data both easy
1059and intuitive. It aims to be the fundamental high-level building block for
1060doing practical, real world data analysis in Python.")
3f641af0 1061 (license license:bsd-3)
7d0c3c8d 1062 (properties `((python2-variant . ,(delay python2-pandas))))))
d072efcb
RW
1063
1064(define-public python2-pandas
7d0c3c8d
EF
1065 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1066 (package
1067 (inherit base)
1068 (native-inputs `(("python2-setuptools" ,python2-setuptools)
dbd40ac1 1069 ,@(package-native-inputs base))))))
d072efcb 1070
cafc3f5a
EB
1071(define-public python-tzlocal
1072 (package
1073 (name "python-tzlocal")
ed80839b 1074 (version "1.2.2")
cafc3f5a
EB
1075 (source
1076 (origin
1077 (method url-fetch)
226d3331 1078 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1079 (sha256
1080 (base32
ed80839b 1081 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1082 (build-system python-build-system)
ed80839b 1083 (inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1084 (home-page "https://github.com/regebro/tzlocal")
1085 (synopsis
35b9e423 1086 "Local timezone information for Python")
cafc3f5a
EB
1087 (description
1088 "Tzlocal returns a tzinfo object with the local timezone information.
1089This module attempts to fix a glaring hole in pytz, that there is no way to
1090get the local timezone information, unless you know the zoneinfo name, and
1091under several distributions that's hard or impossible to figure out.")
3f641af0 1092 (license license:cc0)))
cafc3f5a 1093
1d08c01f
AE
1094(define-public python2-pysqlite
1095 (package
1096 (name "python2-pysqlite")
fe476868 1097 (version "2.8.1")
1d08c01f
AE
1098 (source
1099 (origin
1100 (method url-fetch)
fe476868 1101 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1102 (sha256
1103 (base32
fe476868 1104 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1105 (build-system python-build-system)
1106 (inputs
1107 `(("sqlite" ,sqlite)))
1108 (arguments
1109 `(#:python ,python-2 ; incompatible with Python 3
1110 #:tests? #f)) ; no test target
fe476868 1111 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1112 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1113 (description
1114 "Pysqlite provides SQLite bindings for Python that comply to the
1115Database API 2.0T.")
ed0cdf83 1116 (license license:zlib)))
1d08c01f 1117
2875caf5
AE
1118
1119(define-public python2-mechanize
1120 (package
1121 (name "python2-mechanize")
1122 (version "0.2.5")
1123 (source
1124 (origin
1125 (method url-fetch)
1126 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1127 version ".tar.gz"))
1128 (sha256
1129 (base32
1130 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1131 (build-system python-build-system)
1132 (inputs
1133 `(("python2-setuptools" ,python2-setuptools)))
1134 (arguments
1135 `(#:python ,python-2 ; apparently incompatible with Python 3
1136 #:tests? #f))
1137 ;; test fails with message
1138 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1139 ;; (python-3.3.2) or
1140 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1141 ;; (python-2.7.5).
1142 ;; The source code is from March 2011 and probably not up-to-date
1143 ;; with respect to python unit tests.
1144 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1145 (synopsis
1146 "Stateful programmatic web browsing in Python")
1147 (description
1148 "Mechanize implements stateful programmatic web browsing in Python,
1149after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1150 (license (license:non-copyleft
1151 "file://COPYING"
1152 "See COPYING in the distribution."))))
2875caf5 1153
0352532e
AE
1154
1155(define-public python-simplejson
1156 (package
1157 (name "python-simplejson")
988d1bad 1158 (version "3.8.2")
0352532e
AE
1159 (source
1160 (origin
1161 (method url-fetch)
988d1bad 1162 (uri (pypi-uri "simplejson" version))
0352532e
AE
1163 (sha256
1164 (base32
988d1bad 1165 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
0352532e
AE
1166 (build-system python-build-system)
1167 (home-page "http://simplejson.readthedocs.org/en/latest/")
1168 (synopsis
1169 "Json library for Python")
1170 (description
e881752c
AK
1171 "JSON (JavaScript Object Notation) is a subset of JavaScript
1172syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1173format.
0352532e
AE
1174
1175Simplejson exposes an API familiar to users of the standard library marshal
1176and pickle modules. It is the externally maintained version of the json
1177library contained in Python 2.6, but maintains compatibility with Python 2.5
1178and (currently) has significant performance advantages, even without using
1179the optional C extension for speedups. Simplejson is also supported on
1180Python 3.3+.")
3f641af0 1181 (license license:x11)))
0352532e
AE
1182
1183(define-public python2-simplejson
1184 (package-with-python2 python-simplejson))
421a80a2
AE
1185
1186
ed07b08d 1187(define-public python-pyicu
421a80a2 1188 (package
ed07b08d 1189 (name "python-pyicu")
d3b29319 1190 (version "1.9.2")
421a80a2
AE
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1195 version ".tar.gz"))
1196 (sha256
1197 (base32
d3b29319 1198 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1199 (build-system python-build-system)
1200 (inputs
1201 `(("icu4c" ,icu4c)))
421a80a2 1202 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1203 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1204 (description
1205 "PyICU is a python extension wrapping the ICU C++ API.")
3f641af0 1206 (license license:x11)
ed07b08d
LF
1207 (properties `((python2-variant . ,(delay python2-pyicu))))))
1208
1209(define-public python2-pyicu
1210 (package
1211 (inherit (package-with-python2
1212 (strip-python2-variant python-pyicu)))
1213 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cc20a22a
LC
1214
1215(define-public python2-dogtail
1216 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1217 ;; spaces in indentation" with Python 3.
1218 (package
1219 (name "python2-dogtail")
1220 (version "0.8.2")
1221 (source (origin
1222 (method url-fetch)
1223 (uri (string-append
1224 "https://fedorahosted.org/released/dogtail/dogtail-"
1225 version ".tar.gz"))
1226 (sha256
1227 (base32
1228 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1229 (build-system python-build-system)
1230 (arguments `(#:python ,python-2
1231 #:tests? #f)) ; invalid command "test"
1232 (home-page "https://fedorahosted.org/dogtail/")
1233 (synopsis "GUI test tool and automation framework written in ​Python")
1234 (description
35b9e423 1235 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1236It uses Accessibility (a11y) technologies to communicate with desktop
1237applications. dogtail scripts are written in Python and executed like any
1238other Python program.")
3f641af0 1239 (license license:gpl2+)))
515e6878 1240
011b18c3
LC
1241(define-public python2-empy
1242 (package
1243 (name "python2-empy")
1244 (version "3.3")
1245 (source (origin
1246 (method url-fetch)
1247 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1248 version ".tar.gz"))
1249 (sha256
1250 (base32
1251 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1252 (build-system python-build-system)
1253 (arguments
1254 `(#:python ,python-2
1255 #:phases (alist-replace
1256 'check
1257 (lambda _
1258 (zero? (system* "./test.sh")))
1259 %standard-phases)))
1260 (home-page "http://www.alcyone.com/software/empy/")
1261 (synopsis "Templating system for Python")
1262 (description
1263 "EmPy is a system for embedding Python expressions and statements in
1264template text; it takes an EmPy source file, processes it, and produces
1265output. This is accomplished via expansions, which are special signals to the
1cd4027c 1266EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1267EmPy can expand arbitrary Python expressions and statements in this way, as
1268well as a variety of special forms. Textual data not explicitly delimited in
1269this way is sent unaffected to the output, allowing Python to be used in
1270effect as a markup language. Also supported are callbacks via hooks,
1271recording and playback via diversions, and dynamic, chainable filters. The
1272system is highly configurable via command line options and embedded
1273commands.")
3f641af0 1274 (license license:lgpl2.1+)))
011b18c3 1275
8deeda0c
LC
1276(define-public python2-element-tree
1277 (package
1278 (name "python2-element-tree")
1279 (version "1.2.6")
1280 (source (origin
1281 (method url-fetch)
1282 (uri (string-append
1283 "http://effbot.org/media/downloads/elementtree-"
1284 version "-20050316.tar.gz"))
1285 (sha256
1286 (base32
1287 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1288 (build-system python-build-system)
1289 (arguments
1290 `(#:python ,python-2 ; seems to be part of Python 3
1291 #:tests? #f)) ; no 'test' sub-command
1292 (synopsis "Toolkit for XML processing in Python")
1293 (description
1294 "ElementTree is a Python library supporting lightweight XML processing.")
1295 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1296 (license (license:x11-style
1297 "http://docs.python.org/2/license.html"
1298 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1299
1300(define-public python2-pybugz
1301 (package
1302 (name "python2-pybugz")
1303 (version "0.6.11")
1304 (source (origin
1305 (method url-fetch)
1306 (uri (string-append
1307 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1308 version ".tar.gz"))
1309 (sha256
1310 (base32
6f194a1e 1311 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1312 (patches (search-patches "pybugz-stty.patch"
1313 "pybugz-encode-error.patch"))))
8deeda0c
LC
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:python ,python-2 ; SyntaxError with Python 3
1317 #:tests? #f)) ; no 'test' sub-command
1318 (inputs `(("element-tree" ,python2-element-tree)))
1319 (synopsis "Python and command-line interface to Bugzilla")
1320 (description
1321 "PyBugz is a Python library and command-line tool to query the Bugzilla
1322bug tracking system. It is meant as an aid to speed up interaction with the
1323bug tracker.")
1324 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1325 (license license:gpl2)))
8deeda0c 1326
a480bc41
EB
1327(define-public python-enum34
1328 (package
1329 (name "python-enum34")
d39ae1e5 1330 (version "1.1.0")
a480bc41
EB
1331 (source
1332 (origin
1333 (method url-fetch)
d39ae1e5 1334 (uri (pypi-uri "enum34" version))
a480bc41
EB
1335 (sha256
1336 (base32
d39ae1e5 1337 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1338 (build-system python-build-system)
a480bc41
EB
1339 (arguments
1340 `(#:phases
1341 (alist-replace
1342 'check
1343 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1344 %standard-phases)))
1345 (home-page "https://pypi.python.org/pypi/enum34")
1346 (synopsis "Backported Python 3.4 Enum")
1347 (description
1348 "Enum34 is the new Python stdlib enum module available in Python 3.4
1349backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1350 (license license:bsd-3)))
a480bc41 1351
820acd1b
LF
1352(define-public python2-enum34
1353 (package-with-python2 python-enum34))
1354
a480bc41
EB
1355(define-public python-parse-type
1356 (package
1357 (name "python-parse-type")
1358 (version "0.3.4")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (string-append "https://pypi.python.org/packages/source/p/"
1363 "parse_type/parse_type-" version ".tar.gz"))
1364 (sha256
1365 (base32
1366 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1367 (build-system python-build-system)
1368 (inputs
1369 `(("python-setuptools" ,python-setuptools)
1370 ("python-six" ,python-six)
68f1cdec 1371 ("python-parse" ,python-parse)))
a480bc41
EB
1372 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1373 (home-page "https://github.com/jenisys/parse_type")
1374 (synopsis "Extended parse module")
1375 (description
1376 "Parse_type extends the python parse module.")
3f641af0 1377 (license license:bsd-3)))
a480bc41
EB
1378
1379(define-public python-parse
1380 (package
1381 (name "python-parse")
eb3d3503 1382 (version "1.6.6")
a480bc41
EB
1383 (source
1384 (origin
1385 (method url-fetch)
eb3d3503 1386 (uri (pypi-uri "parse" version))
a480bc41
EB
1387 (sha256
1388 (base32
eb3d3503 1389 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
a480bc41
EB
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:phases
1393 (alist-replace
1394 'check
1395 (lambda _ (zero? (system* "python" "test_parse.py")))
1396 %standard-phases)))
1397 (home-page "https://github.com/r1chardj0n3s/parse")
1398 (synopsis "Parse strings")
1399 (description
1400 "Parse strings using a specification based on the Python format()
1401syntax.")
3f641af0 1402 (license license:x11)))
a480bc41
EB
1403
1404
515e6878
LC
1405(define-public scons
1406 (package
1407 (name "scons")
a3f61425 1408 (version "2.3.4")
515e6878
LC
1409 (source (origin
1410 (method url-fetch)
de67e922
LF
1411 (uri (string-append "mirror://sourceforge/scons/scons/" version
1412 "/scons-" version ".tar.gz"))
515e6878
LC
1413 (sha256
1414 (base32
a3f61425 1415 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1416 (build-system python-build-system)
1417 (arguments
1418 ;; With Python 3.x, fails to build with a syntax error.
1419 `(#:python ,python-2
1420 #:tests? #f)) ; no 'python setup.py test' command
1421 (home-page "http://scons.org/")
1422 (synopsis "Software construction tool written in Python")
1423 (description
1424 "SCons is a software construction tool. Think of SCons as an improved,
1425cross-platform substitute for the classic Make utility with integrated
1426functionality similar to autoconf/automake and compiler caches such as ccache.
1427In short, SCons is an easier, more reliable and faster way to build
1428software.")
3f641af0 1429 (license license:x11)))
011b18c3 1430
c15a5c0e
DT
1431(define-public python-extras
1432 (package
1433 (name "python-extras")
1434 (version "0.0.3")
1435 (source
1436 (origin
1437 (method url-fetch)
1438 (uri (string-append
1439 "https://pypi.python.org/packages/source/e/extras/extras-"
1440 version ".tar.gz"))
1441 (sha256
1442 (base32
1443 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1444 (build-system python-build-system)
1445 (inputs
1446 `(("python-setuptools" ,python-setuptools)))
1447 (arguments
1448 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1449 '(#:tests? #f))
1450 (home-page "https://github.com/testing-cabal/extras")
1451 (synopsis "Useful extensions to the Python standard library")
1452 (description
1453 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1454 (license license:expat)))
c15a5c0e
DT
1455
1456(define-public python2-extras
1457 (package-with-python2 python-extras))
1458
56ea0efd
DT
1459(define-public python-mimeparse
1460 (package
1461 (name "python-mimeparse")
1462 (version "0.1.4")
1463 (source
1464 (origin
1465 (method url-fetch)
1466 (uri (string-append
1467 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1468 version ".tar.gz"))
1469 (sha256
1470 (base32
1471 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1472 (build-system python-build-system)
1473 (inputs
1474 `(("python-setuptools" ,python-setuptools)))
1475 (arguments
1476 '(#:tests? #f)) ; no setup.py test command
1477 (home-page
1478 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1479 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1480 (description
1481 "Mimeparse provides basic functions for parsing MIME type names and
1482matching them against a list of media-ranges.")
bd3fa666 1483 (license license:expat)))
56ea0efd
DT
1484
1485(define-public python2-mimeparse
1486 (package-with-python2 python-mimeparse))
1487
4435427e
DT
1488(define-public python-nose
1489 (package
1490 (name "python-nose")
f7cb9841 1491 (version "1.3.7")
4435427e
DT
1492 (source
1493 (origin
1494 (method url-fetch)
f7cb9841 1495 (uri (pypi-uri "nose" version))
4435427e
DT
1496 (sha256
1497 (base32
f7cb9841 1498 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1499 (build-system python-build-system)
1500 (inputs
1501 `(("python-setuptools" ,python-setuptools)))
1502 (arguments
1503 '(#:tests? #f)) ; FIXME: test suite fails
1504 (home-page "http://readthedocs.org/docs/nose/")
1505 (synopsis "Python testing library")
1506 (description
1507 "Nose extends the unittest library to make testing easier.")
3f641af0 1508 (license license:lgpl2.0+)))
4435427e
DT
1509
1510(define-public python2-nose
1511 (package-with-python2 python-nose))
1512
0aea283a
EF
1513(define-public python-nose2
1514 (package
1515 (name "python-nose2")
1516 (version "0.6.5")
1517 (source
1518 (origin
1519 (method url-fetch)
1520 (uri (pypi-uri "nose2" version))
1521 (sha256
1522 (base32
1523 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1524 (build-system python-build-system)
1525 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1526 (native-inputs
1527 `(("python-setuptools" ,python-setuptools)))
1528 (inputs
1529 `(("python-cov-core" ,python-cov-core)
1530 ("python-pytest-cov" ,python-pytest-cov)
1531 ("python-six" ,python-six)))
1532 (home-page "https://github.com/nose-devs/nose2")
1533 (synopsis "Next generation of nicer testing for Python")
1534 (description
1535 "Nose2 is the next generation of nicer testing for Python, based on the
1536plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1537better plugin api, being easier for users to configure, and simplifying internal
1538interfaces and processes.")
1539 (license license:bsd-2)))
1540
1541(define-public python2-nose2
1542 (package-with-python2 python-nose2))
1543
6cd9c356
DT
1544(define-public python-unittest2
1545 (package
1546 (name "python-unittest2")
1547 (version "0.5.1")
1548 (source
1549 (origin
1550 (method url-fetch)
1551 (uri (string-append
1552 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1553 version ".tar.gz"))
1554 (sha256
1555 (base32
1556 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1557 (build-system python-build-system)
1558 (inputs
1559 `(("python-setuptools" ,python-setuptools)))
1560 (home-page "http://pypi.python.org/pypi/unittest2")
1561 (synopsis "Python unit testing library")
1562 (description
1563 "Unittest2 is a replacement for the unittest module in the Python
1564standard library.")
3f641af0 1565 (license license:psfl)))
6cd9c356
DT
1566
1567(define-public python2-unittest2
1568 (package (inherit python-unittest2)
1569 (name "python2-unittest2")
1570 (version "0.5.1")
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (string-append
1575 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1576 version ".tar.gz"))
1577 (sha256
1578 (base32
1579 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1580 (inputs
7957fe6c 1581 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1582 (arguments
1583 `(#:python ,python-2
1584 #:tests? #f)))) ; no setup.py test command
1585
542ad60f
DT
1586(define-public python-py
1587 (package
1588 (name "python-py")
71c8a804 1589 (version "1.4.31")
542ad60f
DT
1590 (source
1591 (origin
1592 (method url-fetch)
71c8a804 1593 (uri (pypi-uri "py" version))
542ad60f
DT
1594 (sha256
1595 (base32
71c8a804 1596 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1597 (build-system python-build-system)
1598 (inputs
1599 `(("python-setuptools" ,python-setuptools)))
1600 (home-page "http://pylib.readthedocs.org/")
1601 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1602 (description
1603 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1604code introspection, and logging.")
bd3fa666 1605 (license license:expat)))
542ad60f
DT
1606
1607(define-public python2-py
1608 (package-with-python2 python-py))
1609
855d4761
DT
1610(define-public python-pytest
1611 (package
1612 (name "python-pytest")
61a4332d 1613 (version "2.7.3")
855d4761
DT
1614 (source
1615 (origin
1616 (method url-fetch)
1617 (uri (string-append
1618 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1619 version ".tar.gz"))
1620 (sha256
1621 (base32
61a4332d 1622 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1623 (modules '((guix build utils)))
1624 (snippet
1625 ;; One of the tests involves the /usr directory, so it fails.
1626 '(substitute* "testing/test_argcomplete.py"
1627 (("def test_remove_dir_prefix\\(self\\):")
1628 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1629 (build-system python-build-system)
1630 (inputs
1631 `(("python-setuptools" ,python-setuptools)
1632 ("python-py" ,python-py)
1633 ("python-nose" ,python-nose)
1634 ("python-mock" ,python-mock)))
1635 (home-page "http://pytest.org")
1636 (synopsis "Python testing library")
1637 (description
1638 "Pytest is a testing tool that provides auto-discovery of test modules
1639and functions, detailed info on failing assert statements, modular fixtures,
1640and many external plugins.")
bd3fa666 1641 (license license:expat)))
855d4761
DT
1642
1643(define-public python2-pytest
1644 (package-with-python2 python-pytest))
1645
358c3d61
EF
1646(define-public python-pytest-cov
1647 (package
1648 (name "python-pytest-cov")
545f4a1c 1649 (version "2.2.1")
358c3d61
EF
1650 (source
1651 (origin
1652 (method url-fetch)
1653 (uri (pypi-uri "pytest-cov" version))
1654 (sha256
545f4a1c
EF
1655 (base32
1656 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1657 (build-system python-build-system)
545f4a1c 1658 (inputs
10468636
EF
1659 `(("python-coverage" ,python-coverage)
1660 ("python-pytest" ,python-pytest)))
10468636
EF
1661 (home-page "https://github.com/pytest-dev/pytest-cov")
1662 (synopsis "Pytest plugin for measuring coverage")
1663 (description
1664 "Pytest-cov produces coverage reports. It supports centralised testing and
1665distributed testing in both @code{load} and @code{each} modes. It also
1666supports coverage of subprocesses.")
545f4a1c
EF
1667 (license license:expat)
1668 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
358c3d61
EF
1669
1670(define-public python2-pytest-cov
545f4a1c
EF
1671 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1672 (package
1673 (inherit base)
1674 (inputs `(("python2-setuptools" ,python2-setuptools)
1675 ,@(package-inputs base))))))
358c3d61 1676
6784f2e3
RW
1677(define-public python-pytest-runner
1678 (package
1679 (name "python-pytest-runner")
1680 (version "2.6.2")
1681 (source
1682 (origin
1683 (method url-fetch)
54cd239b 1684 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1685 (sha256
1686 (base32
1687 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1688 (build-system python-build-system)
1689 (arguments
1690 `(#:phases
1691 (modify-phases %standard-phases
1692 ;; The fancy way of setting the version with setuptools_scm does not
1693 ;; seem to work here.
1694 (add-after 'unpack 'set-version
1695 (lambda _
1696 (substitute* "docs/conf.py"
1697 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1698 (string-append "version = \"" ,version "\"")))
1699 #t)))))
1700 (native-inputs
1701 `(("python-pytest" ,python-pytest)
1702 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1703 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1704 (synopsis "Invoke py.test as a distutils command")
1705 (description
1706 "This package provides a @command{pytest-runner} command that
1707@file{setup.py} files can use to run tests.")
54cd239b
EF
1708 (license license:expat)
1709 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1710
1711(define-public python2-pytest-runner
1712 (let ((base (package-with-python2
1713 (strip-python2-variant python-pytest-runner))))
1714 (package
1715 (inherit base)
1716 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1717 ,@(package-native-inputs base))))))
6784f2e3 1718
44547e51
EF
1719(define-public python-pytest-mock
1720 (package
1721 (name "python-pytest-mock")
1722 (version "1.2")
1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "pytest-mock" version ".zip"))
1727 (sha256
1728 (base32
1729 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1730 (build-system python-build-system)
1731 (native-inputs
1732 `(("unzip" ,unzip)))
1733 (inputs
1734 `(("python-py" ,python-py)
1735 ("python-pytest" ,python-pytest)))
1736 (home-page "https://github.com/pytest-dev/pytest-mock/")
1737 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1738 (description
1739 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1740around the patching API provided by the @code{mock} package, but with the
1741benefit of not having to worry about undoing patches at the end of a test.
1742The mocker fixture has the same API as @code{mock.patch}, supporting the
1743same arguments.")
1744 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1745 (license license:expat)))
1746
1747(define-public python2-pytest-mock
1748 (let ((base (package-with-python2
1749 (strip-python2-variant python-pytest-mock))))
1750 (package (inherit base)
1751 (native-inputs
1752 `(("python2-setuptools" ,python2-setuptools)
1753 ,@(package-native-inputs base)))
1754 (inputs
1755 `(("python2-mock" ,python2-mock)
1756 ,@(package-inputs base))))))
1757
8fa58fc9
CAW
1758(define-public python-pytest-xdist
1759 (package
1760 (name "python-pytest-xdist")
1761 (version "1.14")
1762 (source
1763 (origin
1764 (method url-fetch)
1765 (uri (pypi-uri "pytest-xdist" version ".zip"))
1766 (sha256
1767 (base32
de585a7e
HG
1768 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1769 (modules '((guix build utils)))
1770 (snippet
1771 '(begin
1772 ;; Remove pre-compiled .pyc files from source.
1773 (for-each delete-file-recursively
1774 (find-files "." "__pycache__" #:directories? #t))
1775 (for-each delete-file (find-files "." "\\.pyc$"))
1776 #t))))
8fa58fc9
CAW
1777 (build-system python-build-system)
1778 (native-inputs
1779 `(("unzip" ,unzip)
8fa58fc9 1780 ("python-setuptools-scm" ,python-setuptools-scm)))
fbe9abcc
EF
1781 (inputs
1782 `(("python-apipkg" ,python-apipkg)
1783 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1784 ("python-pytest" ,python-pytest)
1785 ("python-py" ,python-py)))
1786 (home-page
1787 "https://github.com/pytest-dev/pytest-xdist")
1788 (synopsis
1789 "Plugin for py.test with distributed testing and loop-on-failing modes")
1790 (description
1791 "The pytest-xdist plugin extends py.test with some unique test execution
1792modes: parallelization, running tests in boxed subprocesses, the ability
1793to run tests repeatedly when failed, and the ability to run tests on multiple
1794Python interpreters or platforms. It uses rsync to copy the existing
1795program code to a remote location, executes there, and then syncs the
1796result back.")
fbe9abcc
EF
1797 (license license:expat)
1798 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
8fa58fc9
CAW
1799
1800(define-public python2-pytest-xdist
fbe9abcc
EF
1801 (let ((base (package-with-python2
1802 (strip-python2-variant python-pytest-xdist))))
1803 (package
1804 (inherit base)
1805 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1806 ,@(package-native-inputs base))))))
8fa58fc9 1807
84d24017
DT
1808(define-public python-scripttest
1809 (package
1810 (name "python-scripttest")
1811 (version "1.3")
1812 (source
1813 (origin
1814 (method url-fetch)
1815 (uri (string-append
1816 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1817 version ".tar.gz"))
1818 (sha256
1819 (base32
1820 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1821 (build-system python-build-system)
1822 (inputs
1823 `(("python-setuptools" ,python-setuptools)
1824 ("python-pytest" ,python-pytest)))
1825 (home-page "http://pythonpaste.org/scripttest/")
1826 (synopsis "Python library to test command-line scripts")
1827 (description "Scripttest is a Python helper library for testing
1828interactive command-line applications. With it you can run a script in a
1829subprocess and see the output as well as any file modifications.")
bd3fa666 1830 (license license:expat)))
84d24017
DT
1831
1832(define-public python2-scripttest
1833 (package-with-python2 python-scripttest))
1834
d8fa80e1
DT
1835(define-public python-testtools
1836 (package
1837 (name "python-testtools")
1838 (version "1.0.0")
1839 (source
1840 (origin
1841 (method url-fetch)
1842 (uri (string-append
1843 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1844 version ".tar.gz"))
1845 (sha256
1846 (base32
1847 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1848 (build-system python-build-system)
0e88cbf8
CR
1849 (propagated-inputs
1850 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1851 (inputs
1852 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1853 ("python-extras" ,python-extras)))
1854 (home-page "https://github.com/testing-cabal/testtools")
1855 (synopsis
1856 "Extensions to the Python standard library unit testing framework")
1857 (description
1858 "Testtools extends the Python standard library unit testing framework to
1859provide matchers, more debugging information, and cross-Python
1860compatibility.")
3f641af0 1861 (license license:psfl)))
d8fa80e1
DT
1862
1863(define-public python2-testtools
1864 (package-with-python2 python-testtools))
1865
5bf3afea
DT
1866(define-public python-testscenarios
1867 (package
1868 (name "python-testscenarios")
1869 (version "0.4")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (string-append
1874 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1875 version ".tar.gz"))
1876 (sha256
1877 (base32
1878 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1879 (build-system python-build-system)
1880 (inputs
1881 `(("python-setuptools" ,python-setuptools)
1882 ("python-testtools" ,python-testtools)
1883 ("python-mimeparse" ,python-mimeparse)))
1884 (home-page "https://launchpad.net/testscenarios")
1885 (synopsis "Pyunit extension for dependency injection")
1886 (description
1887 "Testscenarios provides clean dependency injection for Python unittest
1888style tests.")
3f641af0 1889 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1890
1891(define-public python2-testscenarios
1892 (package-with-python2 python-testscenarios))
1893
dac79ecc
DT
1894(define-public python-testresources
1895 (package
1896 (name "python-testresources")
1897 (version "0.2.7")
1898 (source
1899 (origin
1900 (method url-fetch)
1901 (uri (string-append
1902 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1903 version ".tar.gz"))
1904 (sha256
1905 (base32
1906 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1907 (build-system python-build-system)
1908 (inputs
1909 `(("python-setuptools" ,python-setuptools)))
1910 (home-page "https://launchpad.net/testresources")
1911 (synopsis
1912 "Pyunit extension for managing test resources")
1913 (description
1914 "Testresources is an extension to Python's unittest to allow declarative
1915use of resources by test cases.")
3f641af0 1916 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1917
1918(define-public python2-testresources
1919 (package-with-python2 python-testresources))
1920
070ab058
DT
1921(define-public python-subunit
1922 (package
1923 (name "python-subunit")
1924 (version "0.0.21")
1925 (source
1926 (origin
1927 (method url-fetch)
1928 (uri (string-append
1929 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1930 version ".tar.gz"))
1931 (sha256
1932 (base32
1933 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1934 (build-system python-build-system)
1935 (inputs
1936 `(("python-setuptools" ,python-setuptools)
1937 ("python-testtools" ,python-testtools)
1938 ("python-mimeparse" ,python-mimeparse)
1939 ("python-testscenarios" ,python-testscenarios)))
1940 (home-page "http://launchpad.net/subunit")
1941 (synopsis "Python implementation of the subunit protocol")
1942 (description
1943 "Python-subunit is a Python implementation of the subunit test streaming
1944protocol.")
3f641af0 1945 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1946
1947(define-public python2-subunit
1948 (package-with-python2 python-subunit))
1949
7787ef76
CR
1950;; Recent versions of python-fixtures need a recent version of python-pbr,
1951;; which needs a recent version of python-fixtures. To fix this circular
1952;; dependency, we keep old versions of python-fixtures and python-pbr to
1953;; bootstrap the whole thing:
1954;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1955;; - python-pbr-0.11 is used to build python-fixtures
1956;; - python-fixtures is used to build python-pbr
1957(define-public python-fixtures-0.3.16
cd49454b
DT
1958 (package
1959 (name "python-fixtures")
1960 (version "0.3.16")
1961 (source
1962 (origin
1963 (method url-fetch)
1964 (uri (string-append
1965 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1966 version ".tar.gz"))
1967 (sha256
1968 (base32
1969 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1970 (build-system python-build-system)
1971 (inputs
1972 `(("python-setuptools" ,python-setuptools)))
1973 (arguments
1974 '(#:tests? #f)) ; no setup.py test command
1975 (home-page "https://launchpad.net/python-fixtures")
1976 (synopsis "Python test fixture library")
1977 (description
1978 "Fixtures provides a way to create reusable state, useful when writing
1979Python tests.")
3f641af0 1980 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
cd49454b 1981
7787ef76
CR
1982(define-public python2-fixtures-0.3.16
1983 (package-with-python2 python-fixtures-0.3.16))
1984
1985(define-public python-pbr-0.11
1986 (package
1987 (name "python-pbr")
1988 (version "0.11.0")
1989 (source
1990 (origin
1991 (method url-fetch)
1992 (uri (string-append
1993 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1994 version ".tar.gz"))
1995 (sha256
1996 (base32
1997 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1998 (build-system python-build-system)
1999 (arguments
2000 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2001 (inputs
2002 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2003 ("python-pip" ,python-pip)
2004 ("python-setuptools" ,python-setuptools)))
2005 (home-page "https://launchpad.net/pbr")
2006 (synopsis "Change the default behavior of Python’s setuptools")
2007 (description
2008 "Python Build Reasonableness (PBR) is a library that injects some useful
2009and sensible default behaviors into your setuptools run.")
3f641af0 2010 (license license:asl2.0)))
7787ef76
CR
2011
2012(define-public python2-pbr-0.11
2013 (package-with-python2 python-pbr-0.11))
2014
1ef09c0c 2015(define-public python-pbr
e25f0174
BW
2016 (package
2017 (name "python-pbr")
1ef09c0c
BW
2018 (version "1.8.1")
2019 (source
e25f0174
BW
2020 (origin
2021 (method url-fetch)
2022 (uri (string-append
2023 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2024 version
2025 ".tar.gz"))
2026 (sha256
2027 (base32
2028 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1ef09c0c 2029 (build-system python-build-system)
e25f0174
BW
2030 (arguments
2031 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2032 (propagated-inputs
2033 `(("python-testrepository" ,python-testrepository)
2034 ("git" ,git))) ;; pbr actually uses the "git" binary.
1ef09c0c 2035 (inputs
e25f0174
BW
2036 `(("python-fixtures" ,python-fixtures)
2037 ("python-mimeparse" ,python-mimeparse)
2038 ("python-mock" ,python-mock)
2039 ("python-setuptools" ,python-setuptools)
2040 ("python-six" ,python-six)
2041 ("python-sphinx" ,python-sphinx)
2042 ("python-testrepository" ,python-testrepository)
2043 ("python-testresources" ,python-testresources)
2044 ("python-testscenarios" ,python-testscenarios)
2045 ("python-testtools" ,python-testtools)
2046 ("python-virtualenv" ,python-virtualenv)))
2047 (home-page "https://launchpad.net/pbr")
2048 (synopsis "Change the default behavior of Python’s setuptools")
2049 (description
2050 "Python Build Reasonableness (PBR) is a library that injects some useful
2051and sensible default behaviors into your setuptools run.")
3f641af0 2052 (license license:asl2.0)))
1ef09c0c
BW
2053
2054(define-public python2-pbr
e25f0174 2055 (package-with-python2 python-pbr))
1ef09c0c 2056
7787ef76
CR
2057(define-public python-fixtures
2058 (package
2059 (name "python-fixtures")
13fcc6df 2060 (version "1.4.0")
7787ef76
CR
2061 (source
2062 (origin
2063 (method url-fetch)
13fcc6df 2064 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2065 (sha256
2066 (base32
13fcc6df 2067 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2068 (build-system python-build-system)
2069 (propagated-inputs
2070 `(("python-six" ,python-six)
2071 ("python-pbr-0.11" ,python-pbr-0.11)))
2072 (inputs
2073 `(("python-pip" ,python-pip)
2074 ("python-setuptools" ,python-setuptools)
2075 ;; Tests
2076 ("python-testtools" ,python-testtools)))
2077 (arguments
2078 '(#:tests? #f)) ; no setup.py test command
2079 (home-page "https://launchpad.net/python-fixtures")
2080 (synopsis "Python test fixture library")
2081 (description
2082 "Fixtures provides a way to create reusable state, useful when writing
2083Python tests.")
3f641af0 2084 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2085
cd49454b
DT
2086(define-public python2-fixtures
2087 (package-with-python2 python-fixtures))
2088
b24a0c00
DT
2089(define-public python-testrepository
2090 (package
2091 (name "python-testrepository")
2092 (version "0.0.20")
2093 (source
2094 (origin
2095 (method url-fetch)
2096 (uri (string-append
2097 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2098 version ".tar.gz"))
2099 (sha256
2100 (base32
2101 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2102 (build-system python-build-system)
05de40c5 2103 (propagated-inputs
7787ef76 2104 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 2105 ("python-testtools" ,python-testtools)))
b24a0c00
DT
2106 (inputs
2107 `(("python-setuptools" ,python-setuptools)
b24a0c00 2108 ("python-subunit" ,python-subunit)
b24a0c00
DT
2109 ("python-mimeparse" ,python-mimeparse)))
2110 (home-page "https://launchpad.net/testrepository")
2111 (synopsis "Database for Python test results")
2112 (description "Testrepository provides a database of test results which can
2113be used as part of a developer's workflow to check things such as what tests
2114have failed since the last commit or what tests are currently failing.")
3f641af0 2115 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2116
2117(define-public python2-testrepository
2118 (package-with-python2 python-testrepository))
2119
243a009a
DT
2120(define-public python-coverage
2121 (package
2122 (name "python-coverage")
4d4cf3dd 2123 (version "4.1")
243a009a
DT
2124 (source
2125 (origin
2126 (method url-fetch)
82a3c582 2127 (uri (pypi-uri "coverage" version))
243a009a
DT
2128 (sha256
2129 (base32
4d4cf3dd 2130 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a
DT
2131 (build-system python-build-system)
2132 (inputs
2133 `(("python-setuptools" ,python-setuptools)))
2134 (home-page "http://nedbatchelder.com/code/coverage")
2135 (synopsis "Code coverage measurement for Python")
2136 (description
2137 "Coverage measures code coverage, typically during test execution. It
2138uses the code analysis tools and tracing hooks provided in the Python standard
2139library to determine which lines are executable, and which have been
2140executed.")
3f641af0 2141 (license license:bsd-3)))
243a009a
DT
2142
2143(define-public python2-coverage
2144 (package-with-python2 python-coverage))
2145
12f839fd
EF
2146(define-public python-cov-core
2147 (package
2148 (name "python-cov-core")
2149 (version "1.15.0")
2150 (source
2151 (origin
2152 (method url-fetch)
2153 (uri (pypi-uri "cov-core" version))
2154 (sha256
2155 (base32
2156 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2157 (build-system python-build-system)
2158 (native-inputs
2159 `(("python-coverage" ,python-coverage)))
2160 (home-page "https://github.com/schlamar/cov-core")
2161 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2162 (description
2163 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2164It is useful for developing coverage plugins for these testing frameworks.")
8120205c
EF
2165 (license license:expat)
2166 (properties `((python2-variant . ,(delay python2-cov-core))))))
12f839fd
EF
2167
2168(define-public python2-cov-core
8120205c 2169 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
12f839fd
EF
2170 (package (inherit cov-core)
2171 (native-inputs
2172 `(("python2-setuptools" ,python2-setuptools)
2173 ,@(package-native-inputs cov-core))))))
2174
041358fb
DT
2175(define-public python-discover
2176 (package
2177 (name "python-discover")
2178 (version "0.4.0")
2179 (source
2180 (origin
2181 (method url-fetch)
2182 (uri (string-append
2183 "https://pypi.python.org/packages/source/d/discover/discover-"
2184 version ".tar.gz"))
2185 (sha256
2186 (base32
2187 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2188 (build-system python-build-system)
2189 (inputs
2190 `(("python-setuptools" ,python-setuptools)))
2191 (home-page "http://pypi.python.org/pypi/discover/")
2192 (synopsis
2193 "Python test discovery for unittest")
2194 (description
2195 "Discover provides test discovery for unittest, a feature that has been
e881752c 2196backported from Python 2.7 for Python 2.4+.")
3f641af0 2197 (license license:bsd-3)))
041358fb
DT
2198
2199(define-public python2-discover
2200 (package-with-python2 python-discover))
2201
a480bc41
EB
2202(define-public behave
2203 (package
2204 (name "behave")
287cfd1a 2205 (version "1.2.5")
a480bc41
EB
2206 (source (origin
2207 (method url-fetch)
287cfd1a 2208 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2209 (sha256
2210 (base32
287cfd1a 2211 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41
EB
2212 (build-system python-build-system)
2213 (inputs
2214 `(("python-setuptools" ,python-setuptools)
2215 ("python-six" ,python-six)
a480bc41
EB
2216 ("python-parse" ,python-parse)
2217 ("python-parse-type" ,python-parse-type)))
2218 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2219 ;PyHamcrest>=1.8
2220 (home-page "http://github.com/behave/behave")
2221 (synopsis "Python behavior-driven development")
2222 (description
2223 "Behave is a tool for behavior-driven development in python.
2224Behavior-driven development (or BDD) is an agile software development
2225technique that encourages collaboration between developers, QA and
2226non-technical or business participants in a software project. Behave uses
2227tests written in a natural language style, backed up by Python code.")
3f641af0 2228 (license license:x11)))
c7303d3c
DT
2229
2230(define-public python-exif-read
2231 (package
2232 (name "python-exif-read")
2a2d0981 2233 (version "2.1.2")
c7303d3c
DT
2234 (source (origin
2235 (method url-fetch)
2a2d0981 2236 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2237 (sha256
2238 (base32
2a2d0981 2239 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2240 (build-system python-build-system)
2241 (inputs
2242 `(("python-setuptools" ,python-setuptools)))
2243 (arguments `(#:tests? #f)) ; no tests
2244 (home-page "https://github.com/ianare/exif-py")
2245 (synopsis "Python library to extract EXIF data from image files")
2246 (description
2247 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2248files.")
3f641af0 2249 (license license:bsd-3)))
c7303d3c
DT
2250
2251(define-public python2-exif-read
2252 (package-with-python2 python-exif-read))
d5f89b22
DT
2253
2254(define-public python-pyld
2255 (package
2256 (name "python-pyld")
af1ab773 2257 (version "0.6.8")
d5f89b22
DT
2258 (source (origin
2259 (method url-fetch)
af1ab773 2260 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2261 (sha256
2262 (base32
af1ab773 2263 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2264 (build-system python-build-system)
2265 (inputs
2266 `(("python-setuptools" ,python-setuptools)))
2267 (arguments `(#:tests? #f)) ; no tests
2268 (home-page "http://github.com/digitalbazaar/pyld")
2269 (synopsis "Python implementation of the JSON-LD specification")
2270 (description
2271 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2272 (license license:bsd-3)))
d5f89b22
DT
2273
2274(define-public python2-pyld
2275 (package-with-python2 python-pyld))
3a1f9a68
DT
2276
2277(define-public python-certifi
2278 (package
2279 (name "python-certifi")
b2a2232c 2280 (version "2016.8.31")
3a1f9a68
DT
2281 (source (origin
2282 (method url-fetch)
9a41f443 2283 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2284 (sha256
2285 (base32
b2a2232c 2286 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68
DT
2287 (build-system python-build-system)
2288 (inputs
2289 `(("python-setuptools" ,python-setuptools)))
2290 (arguments `(#:tests? #f)) ; no tests
2291 (home-page "http://python-requests.org/")
2292 (synopsis "Python CA certificate bundle")
2293 (description
2294 "Certifi is a Python library that contains a CA certificate bundle, which
2295is used by the Requests library to verify HTTPS requests.")
3f641af0 2296 (license license:asl2.0)))
3a1f9a68
DT
2297
2298(define-public python2-certifi
2299 (package-with-python2 python-certifi))
e6cfbd36 2300
12c270dd
RW
2301(define-public python-click
2302 (package
2303 (name "python-click")
43accb58 2304 (version "6.6")
12c270dd
RW
2305 (source
2306 (origin
2307 (method url-fetch)
375f224b 2308 (uri (pypi-uri "click" version))
12c270dd 2309 (sha256
43accb58
LF
2310 (base32
2311 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2312 (build-system python-build-system)
e2ab5a09
BW
2313 (arguments
2314 `(#:phases
2315 (modify-phases %standard-phases
2316 (add-after 'unpack 'fix-paths
2317 (lambda* (#:key inputs #:allow-other-keys)
2318 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2319 "cross-libc" "libc"))))
2320 (substitute* "click/_unicodefun.py"
2321 (("'locale'")
2322 (string-append "'" glibc "/bin/locale'"))))
2323 #t)))))
12c270dd
RW
2324 (native-inputs
2325 `(("python-setuptools" ,python-setuptools)))
2326 (home-page "http://click.pocoo.org")
2327 (synopsis "Command line library for Python")
2328 (description
2329 "Click is a Python package for creating command line interfaces in a
2330composable way with as little code as necessary. Its name stands for
2331\"Command Line Interface Creation Kit\". It's highly configurable but comes
2332with sensible defaults out of the box.")
3f641af0 2333 (license license:bsd-3)))
12c270dd
RW
2334
2335(define-public python2-click
2336 (package-with-python2 python-click))
2337
addc808d
EF
2338(define-public python-wheel
2339 (package
2340 (name "python-wheel")
40981b5c 2341 (version "0.29.0")
e1ba0749
EF
2342 (source
2343 (origin
2344 (method url-fetch)
2345 (uri (pypi-uri "wheel" version))
2346 (sha256
2347 (base32
40981b5c 2348 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2349 (build-system python-build-system)
2350 (native-inputs
2351 `(("python-setuptools" ,python-setuptools)
2352 ("python-jsonschema" ,python-jsonschema)
2353 ("python-pytest-cov" ,python-pytest-cov)))
2354 (home-page "https://bitbucket.org/pypa/wheel/")
2355 (synopsis "Format for built Python packages")
2356 (description
2357 "A wheel is a ZIP-format archive with a specially formatted filename and
2358the @code{.whl} extension. It is designed to contain all the files for a PEP
2359376 compatible install in a way that is very close to the on-disk format. Many
2360packages will be properly installed with only the @code{Unpack} step and the
2361unpacked archive preserves enough information to @code{Spread} (copy data and
2362scripts to their final locations) at any later time. Wheel files can be
2363installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2364 (license license:expat)
2365 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2366
2367(define-public python2-wheel
8ad4ae20
LF
2368 (let ((wheel (package-with-python2
2369 (strip-python2-variant python-wheel))))
264ae686 2370 (package (inherit wheel)
8ad4ae20
LF
2371 (native-inputs `(("python2-functools32" ,python2-functools32)
2372 ,@(package-native-inputs wheel))))))
2373
addc808d 2374
ae641128 2375(define-public python-requests
e6cfbd36 2376 (package
ae641128 2377 (name "python-requests")
74a066f9 2378 (version "2.9.1")
e6cfbd36
DT
2379 (source (origin
2380 (method url-fetch)
5d691657 2381 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2382 (sha256
2383 (base32
74a066f9 2384 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2385 (build-system python-build-system)
5d691657 2386 (native-inputs
6a308947
EF
2387 `(("python-setuptools" ,python-setuptools)
2388 ("python-py" ,python-py)
5d691657
EF
2389 ("python-pytest" ,python-pytest)
2390 ("python-pytest-cov" ,python-pytest-cov)
2391 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2392 (home-page "http://python-requests.org/")
2393 (synopsis "Python HTTP library")
2394 (description
2395 "Requests is a Python HTTP client library. It aims to be easier to use
2396than Python’s urllib2 library.")
3f641af0 2397 (license license:asl2.0)))
864b5211 2398
e9005180
DT
2399;; Some software requires an older version of Requests, notably Docker
2400;; Compose.
2401(define-public python-requests-2.7
2402 (package (inherit python-requests)
2403 (version "2.7.0")
2404 (source (origin
2405 (method url-fetch)
2406 (uri (pypi-uri "requests" version))
2407 (sha256
2408 (base32
2409 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2410
ae641128 2411(define-public python2-requests
8ad4ae20 2412 (package-with-python2 python-requests))
ae641128 2413
ea521b42
DT
2414(define-public python-vcversioner
2415 (package
2416 (name "python-vcversioner")
2417 (version "2.14.0.0")
2418 (source
2419 (origin
2420 (method url-fetch)
2421 (uri (pypi-uri "vcversioner" version))
2422 (sha256
2423 (base32
2424 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2425 (build-system python-build-system)
2426 (inputs
2427 `(("python-setuptools" ,python-setuptools)))
2428 (synopsis "Python library for version number discovery")
2429 (description "Vcversioner is a Python library that inspects tagging
2430information in a variety of version control systems in order to discover
2431version numbers.")
2432 (home-page "https://github.com/habnabit/vcversioner")
3f641af0 2433 (license license:isc)))
ea521b42
DT
2434
2435(define-public python2-vcversioner
2436 (package-with-python2 python-vcversioner))
ae641128 2437
864b5211
DT
2438(define-public python-jsonschema
2439 (package
2440 (name "python-jsonschema")
b3667afb 2441 (version "2.5.1")
864b5211
DT
2442 (source (origin
2443 (method url-fetch)
2444 (uri
2445 (string-append
2446 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2447 version ".tar.gz"))
2448 (sha256
2449 (base32
b3667afb 2450 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2451 (build-system python-build-system)
2452 (inputs
b3667afb
DT
2453 `(("python-setuptools" ,python-setuptools)
2454 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2455 (home-page "http://github.com/Julian/jsonschema")
2456 (synopsis "Implementation of JSON Schema for Python")
2457 (description
2458 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2459 (license license:expat)
2460 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2461
2462(define-public python2-jsonschema
a14600ec
LF
2463 (let ((jsonschema (package-with-python2
2464 (strip-python2-variant python-jsonschema))))
264ae686
EF
2465 (package (inherit jsonschema)
2466 (inputs
2467 `(("python2-functools32" ,python2-functools32)
2468 ,@(package-inputs jsonschema))))))
850189b8
DT
2469
2470(define-public python-unidecode
2471 (package
2472 (name "python-unidecode")
8925d4f3 2473 (version "0.04.18")
850189b8
DT
2474 (source (origin
2475 (method url-fetch)
8925d4f3 2476 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2477 (sha256
2478 (base32
8925d4f3 2479 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2480 (build-system python-build-system)
2481 (inputs
2482 `(("python-setuptools" ,python-setuptools)))
2483 (home-page "https://pypi.python.org/pypi/Unidecode")
2484 (synopsis "ASCII transliterations of Unicode text")
2485 (description
2486 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2487useful when integrating with legacy code that doesn't support Unicode, or for
2488ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2489machine identifiers from human-readable Unicode strings that should still be
2490somewhat intelligeble.")
3f641af0 2491 (license license:gpl2+)))
850189b8
DT
2492
2493(define-public python2-unidecode
2494 (package-with-python2 python-unidecode))
6d45fef4
DT
2495
2496(define-public python-pyjwt
2497 (package
2498 (name "python-pyjwt")
eb31d4b4 2499 (version "1.4.0")
6d45fef4
DT
2500 (source
2501 (origin
2502 (method url-fetch)
eb31d4b4 2503 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2504 (sha256
2505 (base32
eb31d4b4 2506 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2507 (build-system python-build-system)
eb31d4b4
EF
2508 (native-inputs
2509 `(("python-setuptools" ,python-setuptools)
2510 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2511 (arguments
2512 '(#:tests? #f)) ; test suite doesn't work
2513 (home-page "http://github.com/progrium/pyjwt")
2514 (synopsis "JSON Web Token implementation in Python")
2515 (description
2516 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2517 (license license:expat)))
6d45fef4
DT
2518
2519(define-public python2-pyjwt
2520 (package-with-python2 python-pyjwt))
2521
2cec1f6f
DT
2522(define-public python-oauthlib
2523 (package
2524 (name "python-oauthlib")
bde2171d 2525 (version "1.0.3")
2cec1f6f
DT
2526 (source (origin
2527 (method url-fetch)
bde2171d 2528 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2529 (sha256
2530 (base32
bde2171d 2531 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2532 (build-system python-build-system)
bde2171d 2533 (native-inputs
59f151ec 2534 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2535 ("python-nose" ,python-nose)
2536 ("python-mock" ,python-mock)))
bde2171d
EF
2537 (inputs
2538 `(("python-blinker" ,python-blinker)
2539 ("python-cryptography" ,python-cryptography)
2540 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2541 (home-page "https://github.com/idan/oauthlib")
2542 (synopsis "OAuth implementation for Python")
2543 (description
2544 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2545OAuth request-signing logic.")
3f641af0 2546 (license license:bsd-3)
59f151ec 2547 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2548
2549(define-public python2-oauthlib
59f151ec 2550 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2551 (package
2552 (inherit base)
59f151ec
EF
2553 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2554 ("python2-unittest2" ,python2-unittest2)
2555 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2556
2557(define-public python-itsdangerous
2558 (package
2559 (name "python-itsdangerous")
2560 (version "0.24")
2561 (source
2562 (origin
2563 (method url-fetch)
2564 (uri (string-append
2565 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2566 version ".tar.gz"))
2567 (sha256
2568 (base32
2569 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2570 (build-system python-build-system)
ec5dbb5c
DT
2571 (home-page "http://github.com/mitsuhiko/itsdangerous")
2572 (synopsis "Python library for passing data to/from untrusted environments")
2573 (description
2574 "Itsdangerous provides various helpers to pass trusted data to untrusted
2575environments and back.")
3f641af0 2576 (license license:bsd-3)
194d0d98 2577 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
ec5dbb5c
DT
2578
2579(define-public python2-itsdangerous
194d0d98
EF
2580 (let ((base (package-with-python2
2581 (strip-python2-variant python-itsdangerous))))
2582 (package
2583 (inherit base)
2584 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2585 ,@(package-native-inputs base))))))
5731cae3 2586
8d12be1e
RW
2587(define-public python-pyyaml
2588 (package
2589 (name "python-pyyaml")
2590 (version "3.11")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (string-append
2595 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2596 version ".tar.gz"))
2597 (sha256
2598 (base32
2599 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2600 (build-system python-build-system)
2601 (inputs
2602 `(("libyaml" ,libyaml)))
2603 (native-inputs
2604 `(("python-setuptools" ,python-setuptools)))
2605 (home-page "http://pyyaml.org/wiki/PyYAML")
2606 (synopsis "YAML parser and emitter for Python")
2607 (description
2608 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2609complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2610API, and sensible error messages. PyYAML supports standard YAML tags and
2611provides Python-specific tags that allow to represent an arbitrary Python
2612object.")
2613 (license license:expat)))
2614
2615(define-public python2-pyyaml
2616 (package-with-python2 python-pyyaml))
2617
5731cae3
DT
2618(define-public python-virtualenv
2619 (package
2620 (name "python-virtualenv")
58d04dba 2621 (version "15.0.3")
5731cae3
DT
2622 (source
2623 (origin
2624 (method url-fetch)
17804240 2625 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2626 (sha256
2627 (base32
58d04dba 2628 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2629 (build-system python-build-system)
17804240
EF
2630 (arguments
2631 `(#:phases
2632 (modify-phases %standard-phases
58d04dba
RW
2633 (replace 'check
2634 (lambda _
2635 ;; Disable failing test. See upstream bug report
2636 ;; https://github.com/pypa/virtualenv/issues/957
2637 (substitute* "tests/test_virtualenv.py"
2638 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2639 (zero? (system* "py.test")))))))
5731cae3
DT
2640 (inputs
2641 `(("python-setuptools" ,python-setuptools)
2642 ("python-mock" ,python-mock)
17804240 2643 ("python-pytest" ,python-pytest)))
5731cae3
DT
2644 (home-page "https://virtualenv.pypa.io/")
2645 (synopsis "Virtual Python environment builder")
2646 (description
2647 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2648 (license license:expat)))
5731cae3
DT
2649
2650(define-public python2-virtualenv
2651 (package-with-python2 python-virtualenv))
8176d4d5
DT
2652
2653(define-public python-markupsafe
2654 (package
2655 (name "python-markupsafe")
2656 (version "0.23")
2657 (source
2658 (origin
2659 (method url-fetch)
2660 (uri (string-append
2661 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2662 version ".tar.gz"))
2663 (sha256
2664 (base32
2665 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2666 (build-system python-build-system)
2667 (inputs
2668 `(("python-setuptools" ,python-setuptools)))
2669 (home-page "http://github.com/mitsuhiko/markupsafe")
2670 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2671 (description
2672 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2673for Python.")
3f641af0 2674 (license license:bsd-3)))
8176d4d5
DT
2675
2676(define-public python2-markupsafe
2677 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2678
2679(define-public python-jinja2
2680 (package
2681 (name "python-jinja2")
e98149b3 2682 (version "2.8")
fe34f0d1
DT
2683 (source
2684 (origin
2685 (method url-fetch)
e98149b3 2686 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2687 (sha256
2688 (base32
e98149b3 2689 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2690 (build-system python-build-system)
2691 (inputs
2692 `(("python-setuptools" ,python-setuptools)
2693 ("python-markupsafe" ,python-markupsafe)))
2694 (home-page "http://jinja.pocoo.org/")
2695 (synopsis "Python template engine")
2696 (description
2697 "Jinja2 is a small but fast and easy to use stand-alone template engine
2698written in pure Python.")
3f641af0 2699 (license license:bsd-3)))
fe34f0d1
DT
2700
2701(define-public python2-jinja2
2702 (package-with-python2 python-jinja2))
3580ab8b 2703
f7d17ac7
EE
2704(define-public python-pystache
2705 (package
2706 (name "python-pystache")
2707 (version "0.5.4")
2708 (source (origin
2709 (method url-fetch)
2710 (uri (pypi-uri "pystache" version))
2711 (sha256
2712 (base32
2713 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2714 (build-system python-build-system)
2715 (native-inputs
2716 `(("python-setuptools" ,python-setuptools)))
2717 (home-page "http://defunkt.io/pystache/")
2718 (synopsis "Python logic-less template engine")
2719 (description
2720 "Pystache is a Python implementation of the framework agnostic,
2721logic-free templating system Mustache.")
2722 (license license:expat)))
2723
2724(define-public python2-pystache
2725 (package-with-python2 python-pystache))
2726
1285119b
RW
2727(define-public python-joblib
2728 (package
2729 (name "python-joblib")
2730 (version "0.9.0b4")
2731 (source (origin
2732 (method url-fetch)
2733 (uri (string-append "https://pypi.python.org/packages/source/"
2734 "j/joblib/joblib-" version ".tar.gz"))
2735 (sha256
2736 (base32
2737 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2738 (build-system python-build-system)
2739 (native-inputs
2740 `(("python-setuptools" ,python-setuptools)
2741 ("python-nose" ,python-nose)))
2742 (home-page "http://pythonhosted.org/joblib/")
2743 (synopsis "Using Python functions as pipeline jobs")
2744 (description
2745 "Joblib is a set of tools to provide lightweight pipelining in Python.
2746In particular, joblib offers: transparent disk-caching of the output values
2747and lazy re-evaluation (memoize pattern), easy simple parallel computing
2748logging and tracing of the execution.")
3f641af0 2749 (license license:bsd-3)))
1285119b
RW
2750
2751(define-public python2-joblib
2752 (package-with-python2 python-joblib))
2753
3580ab8b
DT
2754(define-public python-docutils
2755 (package
2756 (name "python-docutils")
2757 (version "0.12")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (string-append
2762 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2763 version ".tar.gz"))
2764 (sha256
2765 (base32
2766 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2767 (build-system python-build-system)
2768 (inputs
2769 `(("python-setuptools" ,python-setuptools)))
2770 (arguments
2771 '(#:tests? #f)) ; no setup.py test command
2772 (home-page "http://docutils.sourceforge.net/")
2773 (synopsis "Python Documentation Utilities")
2774 (description
2775 "Docutils is a modular system for processing documentation into useful
2776formats, such as HTML, XML, and LaTeX. For input Docutils supports
2777reStructuredText.")
2778 ;; Most of the source code is public domain, but some source files are
2779 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2780 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2781
2782(define-public python2-docutils
2783 (package-with-python2 python-docutils))
fb35b7c0
DT
2784
2785(define-public python-pygments
2786 (package
2787 (name "python-pygments")
9f442285 2788 (version "2.0.2")
fb35b7c0
DT
2789 (source
2790 (origin
2791 (method url-fetch)
9f442285 2792 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2793 (sha256
2794 (base32
9f442285 2795 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2796 (build-system python-build-system)
2797 (inputs
2798 `(("python-setuptools" ,python-setuptools)))
2799 (home-page "http://pygments.org/")
2800 (synopsis "Syntax highlighting")
2801 (description
2802 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2803 (license license:bsd-2)))
fb35b7c0
DT
2804
2805(define-public python2-pygments
2806 (package-with-python2 python-pygments))
9dd6078d
DT
2807
2808(define-public python-sphinx
2809 (package
2810 (name "python-sphinx")
2811 (version "1.2.3")
2812 (source
2813 (origin
2814 (method url-fetch)
2815 (uri (string-append
2816 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2817 version ".tar.gz"))
2818 (sha256
2819 (base32
2820 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2821 (build-system python-build-system)
2822 (inputs
2823 `(("python-setuptools" ,python-setuptools)
2824 ("python-jinja2" ,python-jinja2)
2825 ("python-docutils" ,python-docutils)
2826 ("python-pygments" ,python-pygments)))
2827 (home-page "http://sphinx-doc.org/")
2828 (synopsis "Python documentation generator")
2829 (description "Sphinx is a tool that makes it easy to create documentation
2830for Python projects or other documents consisting of multiple reStructuredText
2831sources.")
3f641af0 2832 (license license:bsd-3)))
9dd6078d
DT
2833
2834(define-public python2-sphinx
2835 (package-with-python2 python-sphinx))
6888830b 2836
ad320b20
RW
2837(define-public python-sphinx-rtd-theme
2838 (package
2839 (name "python-sphinx-rtd-theme")
2840 (version "0.1.6")
2841 (source
2842 (origin
2843 (method url-fetch)
2844 (uri (string-append "https://pypi.python.org/packages/source/s/"
2845 "sphinx_rtd_theme/sphinx_rtd_theme-"
2846 version ".tar.gz"))
2847 (sha256
2848 (base32
2849 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2850 (build-system python-build-system)
2851 (arguments
2852 `(;; With standard flags, the install phase attempts to create a zip'd
2853 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2854 ;; before 1980'
2855 #:configure-flags '("--single-version-externally-managed"
2856 "--record=sphinx-rtd-theme.txt")))
2857 (native-inputs
2858 `(("python-setuptools" ,python-setuptools)))
2859 (inputs
2860 `(("python-docutils" ,python-docutils)
2861 ("python-sphinx" ,python-sphinx)))
2862 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2863 (synopsis "ReadTheDocs.org theme for Sphinx")
2864 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2865 (license license:expat)))
ad320b20
RW
2866
2867(define-public python2-sphinx-rtd-theme
2868 (package-with-python2 python-sphinx-rtd-theme))
2869
f4de5b3b
CAW
2870(define-public python-feedgenerator
2871 (package
2872 (name "python-feedgenerator")
f0412aa2 2873 (version "1.8")
f4de5b3b 2874 (source
f4de5b3b 2875 (origin
f0412aa2
EF
2876 (method url-fetch)
2877 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2878 (sha256
2879 (base32
f0412aa2 2880 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 2881 (build-system python-build-system)
f0412aa2 2882 (native-inputs
f4de5b3b
CAW
2883 `(("python-setuptools" ,python-setuptools)
2884 ("python-pytz" ,python-pytz)
2885 ("python-six" ,python-six)))
f0412aa2 2886 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2887 (synopsis
2888 "Standalone version of Django's Atom/RSS feed generator")
2889 (description
2890 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2891which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2892 (license license:bsd-3)))
f4de5b3b
CAW
2893
2894(define-public python2-feedgenerator
2895 (package-with-python2 python-feedgenerator))
2896
59ad30e3
CAW
2897(define-public python-blinker
2898 (package
2899 (name "python-blinker")
7fb9ff4d 2900 (version "1.4")
59ad30e3
CAW
2901 (source
2902 (origin
2903 (method url-fetch)
7fb9ff4d 2904 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2905 (sha256
2906 (base32
7fb9ff4d 2907 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2908 (build-system python-build-system)
2909 (native-inputs
2910 `(("python-setuptools" ,python-setuptools)))
2911 ;; No "test" command supplied to setuptools, so unless there's another way
2912 ;; to run tests, we're skipping them!
2913 (arguments '(#:tests? #f))
2914 (home-page "http://pythonhosted.org/blinker/")
2915 (synopsis "Fast, simple object-to-object and broadcast signaling")
2916 (description
2917 "Blinker provides a fast dispatching system that allows any number of
2918interested parties to subscribe to events, or \"signals\".")
2919 (license license:expat)))
2920
2921(define-public python2-blinker
2922 (package-with-python2 python-blinker))
2923
b8050e71
CAW
2924(define-public pelican
2925 (package
2926 (name "pelican")
11f97c27 2927 (version "3.6.3")
b8050e71
CAW
2928 (source
2929 (origin
2930 (method url-fetch)
11f97c27 2931 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2932 (sha256
2933 (base32
11f97c27 2934 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2935 (build-system python-build-system)
d9f2dece 2936 (inputs
b8050e71
CAW
2937 `(("python-feedgenerator" ,python-feedgenerator)
2938 ("python-jinja2" ,python-jinja2)
2939 ("python-pygments" ,python-pygments)
2940 ("python-docutils" ,python-docutils)
2941 ("python-pytz" ,python-pytz)
2942 ("python-blinker" ,python-blinker)
2943 ("python-unidecode" ,python-unidecode)
2944 ("python-six" ,python-six)
2945 ("python-dateutil-2" ,python-dateutil-2)))
2946 (home-page "http://getpelican.com/")
2947 (arguments
2948 `(;; XXX Requires a lot more packages to do unit tests :P
2949 #:tests? #f
2950 #:phases (modify-phases %standard-phases
2951 (add-before
2952 'install 'adjust-requires
2953 ;; Since feedgenerator is installed from git, it doesn't
2954 ;; conform to the version requirements.
2955 ;;
2956 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2957 ;; version requirement so setuptools doesn't get confused.
2958 (lambda _
2959 (substitute* "setup.py"
2960 (("['\"]feedgenerator.*?['\"]")
2961 "'feedgenerator'")))))))
2962 (synopsis "Python-based static site publishing system")
2963 (description
2964 "Pelican is a tool to generate a static blog from reStructuredText,
2965Markdown input files, and more. Pelican uses Jinja2 for templating
2966and is very extensible.")
3f641af0 2967 (license license:agpl3+)))
b8050e71 2968
240ca4aa
RW
2969(define-public python-scikit-learn
2970 (package
2971 (name "python-scikit-learn")
be0a4c26 2972 (version "0.16.1")
240ca4aa
RW
2973 (source
2974 (origin
2975 (method url-fetch)
2976 (uri (string-append
2977 "https://github.com/scikit-learn/scikit-learn/archive/"
2978 version ".tar.gz"))
7e21b9fb 2979 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
2980 (sha256
2981 (base32
be0a4c26 2982 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2983 (build-system python-build-system)
2984 (arguments
2985 `(#:phases
2986 (alist-cons-before
2f6b3d2e
RW
2987 'check 'set-HOME
2988 ;; some tests require access to "$HOME"
2989 (lambda _ (setenv "HOME" "/tmp"))
2990 ;; Tests can only be run after the library has been installed and not
2991 ;; within the source directory.
2992 (alist-cons-after
2993 'install 'check
2994 (lambda _
2995 (with-directory-excursion "/tmp"
2996 ;; With Python 3 one test of 3334 fails
2997 ;; (sklearn.tests.test_common.test_transformers); see
2998 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2999 (system* "nosetests" "-v" "sklearn")))
3000 (alist-delete 'check %standard-phases)))))
240ca4aa 3001 (inputs
2f6b3d2e 3002 `(("openblas" ,openblas)
240ca4aa
RW
3003 ("python-nose" ,python-nose)))
3004 (propagated-inputs
3005 `(("python-numpy" ,python-numpy)
3006 ("python-scipy" ,python-scipy)))
3007 (home-page "http://scikit-learn.org/")
3008 (synopsis "Machine Learning in Python")
3009 (description
3010 "Scikit-learn provides simple and efficient tools for data
3011mining and data analysis.")
25a2f81f
EF
3012 (license license:bsd-3)
3013 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
240ca4aa
RW
3014
3015(define-public python2-scikit-learn
25a2f81f 3016 (package-with-python2 (strip-python2-variant python-scikit-learn)))
240ca4aa 3017
12f8f9bb
RW
3018(define-public python-scikit-image
3019 (package
3020 (name "python-scikit-image")
3021 (version "0.11.3")
3022 (source
3023 (origin
3024 (method url-fetch)
3025 (uri (string-append
3026 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3027 version ".tar.gz"))
3028 (sha256
3029 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3030 (build-system python-build-system)
3031 (propagated-inputs
3032 `(("python-matplotlib" ,python-matplotlib)
3033 ("python-networkx" ,python-networkx)
3034 ("python-numpy" ,python-numpy)
3035 ("python-scipy" ,python-scipy)
3036 ("python-six" ,python-six)
3037 ("python-pillow" ,python-pillow)))
3038 (native-inputs
3039 `(("python-cython" ,python-cython)
3040 ("python-setuptools" ,python-setuptools)))
3041 (home-page "http://scikit-image.org/")
3042 (synopsis "Image processing in Python")
3043 (description
e881752c 3044 "Scikit-image is a collection of algorithms for image processing.")
2b031d3f
EF
3045 (license license:bsd-3)
3046 (properties `((python2-variant . ,(delay python2-scikit-image))))))
12f8f9bb
RW
3047
3048(define-public python2-scikit-image
2b031d3f
EF
3049 (let ((scikit-image (package-with-python2
3050 (strip-python2-variant python-scikit-image))))
12f8f9bb
RW
3051 (package (inherit scikit-image)
3052 (native-inputs
3053 `(("python2-mock" ,python2-mock)
3054 ,@(package-native-inputs scikit-image)))
3055 (propagated-inputs
3056 `(("python2-pytz" ,python2-pytz)
2b031d3f 3057 ,@(package-propagated-inputs scikit-image))))))
12f8f9bb 3058
5394a6a6
RW
3059(define-public python-redis
3060 (package
3061 (name "python-redis")
3062 (version "2.10.3")
3063 (source
3064 (origin
3065 (method url-fetch)
3066 (uri (string-append
3067 "https://pypi.python.org/packages/source/r/redis/redis-"
3068 version ".tar.gz"))
3069 (sha256
3070 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3071 (build-system python-build-system)
3072 ;; Tests require a running Redis server
3073 (arguments '(#:tests? #f))
3074 (native-inputs
3075 `(("python-setuptools" ,python-setuptools)
3076 ("python-pytest" ,python-pytest)))
3077 (home-page "https://github.com/andymccurdy/redis-py")
3078 (synopsis "Redis Python client")
3079 (description
3080 "This package provides a Python interface to the Redis key-value store.")
3081 (license license:expat)))
3082
3083(define-public python2-redis
3084 (package-with-python2 python-redis))
3085
748cef5b
RW
3086(define-public python-rq
3087 (package
3088 (name "python-rq")
3089 (version "0.5.2")
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (string-append
3094 "https://pypi.python.org/packages/source/r/rq/rq-"
3095 version ".tar.gz"))
3096 (sha256
3097 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3098 (build-system python-build-system)
3099 (propagated-inputs
3100 `(("python-click" ,python-click)
3101 ("python-redis" ,python-redis)))
3102 (native-inputs
3103 `(("python-setuptools" ,python-setuptools)))
3104 (home-page "http://python-rq.org/")
3105 (synopsis "Simple job queues for Python")
3106 (description
3107 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3108processing them in the background with workers. It is backed by Redis and it
3109is designed to have a low barrier to entry.")
3f641af0 3110 (license license:bsd-2)))
748cef5b
RW
3111
3112(define-public python2-rq
3113 (package-with-python2 python-rq))
3114
6888830b
FB
3115(define-public python-cython
3116 (package
3117 (name "python-cython")
dd22efef 3118 (version "0.24.1")
6888830b
FB
3119 (source
3120 (origin
3121 (method url-fetch)
56918e26 3122 (uri (pypi-uri "Cython" version))
6888830b
FB
3123 (sha256
3124 (base32
dd22efef 3125 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3126 (build-system python-build-system)
3127 ;; we need the full python package and not just the python-wrapper
3128 ;; because we need libpython3.3m.so
3129 (inputs
3130 `(("python" ,python)))
3131 (arguments
3132 `(#:phases
b92f651b
EF
3133 (modify-phases %standard-phases
3134 (add-before 'check 'set-HOME
3135 ;; some tests require access to "$HOME/.cython"
3136 (lambda _ (setenv "HOME" "/tmp")))
3137 (replace 'check
3138 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3139 (home-page "http://cython.org/")
3140 (synopsis "C extensions for Python")
3141 (description "Cython is an optimising static compiler for both the Python
3142programming language and the extended Cython programming language. It makes
3143writing C extensions for Python as easy as Python itself.")
3f641af0 3144 (license license:asl2.0)
48b311b1 3145 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3146
3147(define-public python2-cython
48b311b1
LC
3148 (package (inherit (package-with-python2
3149 (strip-python2-variant python-cython)))
6888830b
FB
3150 (name "python2-cython")
3151 (inputs
3152 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3153
ee5fb7ee
AV
3154;; The RPython toolchain currently does not support Python 3.
3155(define-public python2-rpython
3156 (package
3157 (name "python2-rpython")
3158 (version "0.1.4")
3159 (source
3160 (origin
3161 (method url-fetch)
3162 (uri (pypi-uri "rpython" version))
3163 (sha256
3164 (base32
3165 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3166 (build-system python-build-system)
3167 (arguments `(#:python ,python-2))
3168 (native-inputs
3169 `(("python2-pytest" ,python2-pytest) ; needed for running tests
3170 ("python2-setuptools" ,python2-setuptools)))
3171 (home-page "https://rpython.readthedocs.org")
3172 (synopsis "Framework for implementing interpreters and virtual machines")
3173 (description "RPython is a translation and support framework for
3174producing implementations of dynamic languages, emphasizing a clean separation
3175between language specification and implementation aspects.")
3176 (license license:expat)))
3177
0da98533
FB
3178;; This version of numpy is missing the documentation and is only used to
3179;; build matplotlib which is required to build numpy's documentation.
3180(define python-numpy-bootstrap
3181 (package
3182 (name "python-numpy-bootstrap")
ef9b4c04 3183 (version "1.10.4")
0da98533
FB
3184 (source
3185 (origin
3186 (method url-fetch)
de67e922 3187 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3188 "/numpy-" version ".tar.gz"))
3189 (sha256
3190 (base32
ef9b4c04 3191 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3192 (build-system python-build-system)
3193 (inputs
3194 `(("python-nose" ,python-nose)
cba256f8
RW
3195 ("openblas" ,openblas)
3196 ("lapack" ,lapack)))
0da98533 3197 (native-inputs
19afbea1 3198 `(("gfortran" ,gfortran)))
0da98533
FB
3199 (arguments
3200 `(#:phases
3201 (alist-cons-before
3202 'build 'set-environment-variables
3203 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3204 (call-with-output-file "site.cfg"
3205 (lambda (port)
cba256f8
RW
3206 (format port
3207 "[openblas]
dbdfe515
RW
3208libraries = openblas
3209library_dirs = ~a/lib
3210include_dirs = ~a/include
cba256f8
RW
3211
3212[lapack]
3213lapack_libs = lapack
3214library_dirs = ~a/lib
3215include_dirs = ~a/include
3216"
3217 (assoc-ref inputs "openblas")
3218 (assoc-ref inputs "openblas")
3219 (assoc-ref inputs "lapack")
3220 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3221 ;; Use "gcc" executable, not "cc".
3222 (substitute* "numpy/distutils/system_info.py"
3223 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3224 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3225 #t)
6a843168
FB
3226 ;; Tests can only be run after the library has been installed and not
3227 ;; within the source directory.
3228 (alist-cons-after
3229 'install 'check
89b5c60e 3230 (lambda _
6a843168 3231 (with-directory-excursion "/tmp"
89b5c60e 3232 (zero? (system* "python" "-c"
6a843168 3233 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3234 (alist-delete
3235 'check
6a843168 3236 %standard-phases)))))
0da98533
FB
3237 (home-page "http://www.numpy.org/")
3238 (synopsis "Fundamental package for scientific computing with Python")
3239 (description "NumPy is the fundamental package for scientific computing
e881752c 3240with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3241object, sophisticated (broadcasting) functions, tools for integrating C/C++
3242and Fortran code, useful linear algebra, Fourier transform, and random number
3243capabilities.")
3f641af0 3244 (license license:bsd-3)))
0da98533
FB
3245
3246(define python2-numpy-bootstrap
3247 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3248
3a1bfe18
RW
3249(define-public python2-fastlmm
3250 (package
3251 (name "python2-fastlmm")
b074e7d4 3252 (version "0.2.21")
3a1bfe18
RW
3253 (source
3254 (origin
3255 (method url-fetch)
b074e7d4 3256 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3257 (sha256
3258 (base32
b074e7d4 3259 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3260 (build-system python-build-system)
3261 (arguments
3262 `(#:python ,python-2)) ; only Python 2.7 is supported
3263 (propagated-inputs
3264 `(("python2-numpy" ,python2-numpy)
3265 ("python2-scipy" ,python2-scipy)
3266 ("python2-matplotlib" ,python2-matplotlib)
3267 ("python2-pandas" ,python2-pandas)
3268 ("python2-scikit-learn" ,python2-scikit-learn)
3269 ("python2-cython" ,python2-cython)
3270 ("python2-pysnptools" ,python2-pysnptools)))
3271 (native-inputs
3272 `(("unzip" ,unzip)
3273 ("python2-mock" ,python2-mock)
3274 ("python2-setuptools" ,python2-setuptools)))
3275 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3276 (synopsis "Perform genome-wide association studies on large data sets")
3277 (description
3278 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3279Models, is a program for performing both single-SNP and SNP-set genome-wide
3280association studies (GWAS) on extremely large data sets.")
3f641af0 3281 (license license:asl2.0)))
3a1bfe18 3282
2ee8869a
FB
3283(define-public python-numpy
3284 (package (inherit python-numpy-bootstrap)
3285 (name "python-numpy")
3286 (outputs '("out" "doc"))
89b5c60e 3287 (inputs
2ee8869a
FB
3288 `(("which" ,which)
3289 ("python-setuptools" ,python-setuptools)
3290 ("python-matplotlib" ,python-matplotlib)
3291 ("python-sphinx" ,python-sphinx)
3292 ("python-pyparsing" ,python-pyparsing)
3293 ("python-numpydoc" ,python-numpydoc)
3294 ,@(package-inputs python-numpy-bootstrap)))
3295 (native-inputs
3296 `(("pkg-config" ,pkg-config)
3297 ("texlive" ,texlive)
3298 ("texinfo" ,texinfo)
3299 ("perl" ,perl)
3300 ,@(package-native-inputs python-numpy-bootstrap)))
3301 (arguments
89b5c60e 3302 `(,@(substitute-keyword-arguments
2ee8869a
FB
3303 (package-arguments python-numpy-bootstrap)
3304 ((#:phases phases)
3305 `(alist-cons-after
3306 'install 'install-doc
3307 (lambda* (#:key outputs #:allow-other-keys)
3308 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3309 (doc (string-append
3310 data "/doc/" ,name "-"
2ee8869a
FB
3311 ,(package-version python-numpy-bootstrap)))
3312 (info (string-append data "/info"))
3313 (html (string-append doc "/html"))
3314 (pyver ,(string-append "PYVER=")))
3315 (with-directory-excursion "doc"
3316 (mkdir-p html)
3317 (system* "make" "html" pyver)
3318 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3319 (system* "make" "-C" "build/latex"
2ee8869a
FB
3320 "all-pdf" "PAPER=a4" pyver)
3321 ;; FIXME: Generation of the info file fails.
3322 ;; (system* "make" "info" pyver)
3323 ;; (mkdir-p info)
3324 ;; (copy-file "build/texinfo/numpy.info"
3325 ;; (string-append info "/numpy.info"))
3326 (for-each (lambda (file)
3327 (copy-file (string-append "build/latex" file)
3328 (string-append doc file)))
3329 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3330 (with-directory-excursion "build/html"
3331 (for-each (lambda (file)
3332 (let* ((dir (dirname file))
3333 (tgt-dir (string-append html "/" dir)))
3334 (unless (equal? "." dir)
3335 (mkdir-p tgt-dir))
96c46210 3336 (install-file file html)))
2ee8869a
FB
3337 (find-files "." ".*"))))))
3338 ,phases)))))))
3339
764c077b 3340(define-public python2-numpy
57b7b8cd 3341 (package-with-python2 python-numpy))
2ee8869a 3342
15bfe6d6
FB
3343(define-public python-pyparsing
3344 (package
3345 (name "python-pyparsing")
e0669289 3346 (version "2.0.3")
15bfe6d6
FB
3347 (source
3348 (origin
3349 (method url-fetch)
de67e922
LF
3350 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3351 "/pyparsing-" version
15bfe6d6
FB
3352 "/pyparsing-" version ".tar.gz"))
3353 (sha256
3354 (base32
e0669289 3355 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3356 (build-system python-build-system)
3357 (outputs '("out" "doc"))
3358 (arguments
3359 `(#:tests? #f ; no test target
3360 #:modules ((guix build python-build-system)
3361 (guix build utils))
3362 #:phases
3363 (alist-cons-after
3364 'install 'install-doc
3365 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3366 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3367 "/share/doc/" ,name "-" ,version))
3368 (html-doc (string-append doc "/html"))
3369 (examples (string-append doc "/examples")))
3370 (mkdir-p html-doc)
3371 (mkdir-p examples)
89b5c60e 3372 (for-each
15bfe6d6 3373 (lambda (dir tgt)
89b5c60e 3374 (map (lambda (file)
96c46210 3375 (install-file file tgt))
15bfe6d6
FB
3376 (find-files dir ".*")))
3377 (list "docs" "htmldoc" "examples")
3378 (list doc html-doc examples))))
3379 %standard-phases)))
3380 (home-page "http://pyparsing.wikispaces.com")
3381 (synopsis "Python parsing class library")
3382 (description
3383 "The pyparsing module is an alternative approach to creating and
3384executing simple grammars, vs. the traditional lex/yacc approach, or the use
3385of regular expressions. The pyparsing module provides a library of classes
3386that client code uses to construct the grammar directly in Python code.")
bd3fa666 3387 (license license:expat)))
15bfe6d6
FB
3388
3389(define-public python2-pyparsing
3390 (package-with-python2 python-pyparsing))
3391
ec00de35
FB
3392(define-public python-numpydoc
3393 (package
3394 (name "python-numpydoc")
3395 (version "0.5")
3396 (source
3397 (origin
3398 (method url-fetch)
89b5c60e 3399 (uri (string-append
ec00de35
FB
3400 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3401 version ".tar.gz"))
3402 (sha256
3403 (base32
5e4d8f67
AE
3404 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3405 (modules '((guix build utils)))
3406 (snippet
3407 '(begin
3408 ;; Drop a test requiring matplotlib, which we cannot add as an
3409 ;; input since it would create a circular dependency: Extend the
3410 ;; test for Python 3, where it is already dropped, to Python 2.
3411 (substitute* "numpydoc/tests/test_plot_directive.py"
3412 (("3") "2"))))))
ec00de35
FB
3413 (build-system python-build-system)
3414 (inputs
3415 `(("python-setuptools" ,python-setuptools)
3416 ("python-docutils" ,python-docutils)
3417 ("python-sphinx" ,python-sphinx)
3418 ("python-nose" ,python-nose)))
3419 (home-page "https://pypi.python.org/pypi/numpydoc")
3420 (synopsis
3421 "Numpy's Sphinx extensions")
3422 (description
3423 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3424 (license license:bsd-2)))
ec00de35
FB
3425
3426(define-public python2-numpydoc
5e4d8f67 3427 (package-with-python2 python-numpydoc))
1c65314c 3428
1e656049
RW
3429(define-public python-numexpr
3430 (package
3431 (name "python-numexpr")
26112c0a 3432 (version "2.6.0")
1e656049
RW
3433 (source
3434 (origin
3435 (method url-fetch)
26112c0a 3436 (uri (pypi-uri "numexpr" version))
1e656049
RW
3437 (sha256
3438 (base32
26112c0a 3439 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3440 (build-system python-build-system)
3441 (arguments `(#:tests? #f)) ; no tests included
3442 (propagated-inputs
3443 `(("python-numpy" ,python-numpy)))
3444 (home-page "https://github.com/pydata/numexpr")
3445 (synopsis "Fast numerical expression evaluator for NumPy")
3446 (description
3447 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3448expressions that operate on arrays are accelerated and use less memory than
3449doing the same calculation in Python. In addition, its multi-threaded
3450capabilities can make use of all your cores, which may accelerate
3451computations, most specially if they are not memory-bounded (e.g. those using
3452transcendental functions).")
fc1a170e
EF
3453 (license license:expat)
3454 (properties `((python2-variant . ,(delay python2-numexpr))))))
1e656049
RW
3455
3456(define-public python2-numexpr
fc1a170e 3457 (package-with-python2 (strip-python2-variant python-numexpr)))
1e656049 3458
1c65314c
FB
3459(define-public python-matplotlib
3460 (package
3461 (name "python-matplotlib")
1bbc659f 3462 (version "1.4.3")
1c65314c
FB
3463 (source
3464 (origin
3465 (method url-fetch)
de67e922
LF
3466 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3467 "/matplotlib-" version
1c65314c
FB
3468 "/matplotlib-" version ".tar.gz"))
3469 (sha256
3470 (base32
1bbc659f 3471 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3472 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3473 (build-system python-build-system)
3474 (outputs '("out" "doc"))
25f9a068
FB
3475 (propagated-inputs ; the following packages are all needed at run time
3476 `(("python-pyparsing" ,python-pyparsing)
3477 ("python-pygobject" ,python-pygobject)
3478 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3479 ("python-tkinter" ,python "tk")
25f9a068
FB
3480 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3481 ;; from 'gtk+') provides the required 'typelib' files used by
3482 ;; 'gobject-introspection'. The location of these files is set with the
3483 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3484 ;; is done automatically by a 'native-search-path' procedure. However,
3485 ;; at run-time the user must set this variable as follows:
3486 ;;
3487 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3488 ("gtk+" ,gtk+)
3489 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3490 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3491 ;; object. For this reason we need to import both libraries.
3492 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3493 ("python-pycairo" ,python-pycairo)
3494 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3495 (inputs
3496 `(("python-setuptools" ,python-setuptools)
3497 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3498 ("python-six" ,python-six)
3499 ("python-pytz" ,python-pytz)
3500 ("python-numpy" ,python-numpy-bootstrap)
3501 ("python-sphinx" ,python-sphinx)
3502 ("python-numpydoc" ,python-numpydoc)
3503 ("python-nose" ,python-nose)
3504 ("python-mock" ,python-mock)
3505 ("libpng" ,libpng)
3506 ("imagemagick" ,imagemagick)
3507 ("freetype" ,freetype)
25f9a068
FB
3508 ("cairo" ,cairo)
3509 ("glib" ,glib)
4e7a137a 3510 ("python-pillow" ,python-pillow)
1c65314c 3511 ;; FIXME: Add backends when available.
1c65314c
FB
3512 ;("python-wxpython" ,python-wxpython)
3513 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3514 ("tcl" ,tcl)
3515 ("tk" ,tk)))
1c65314c
FB
3516 (native-inputs
3517 `(("pkg-config" ,pkg-config)
3518 ("texlive" ,texlive)
3519 ("texinfo" ,texinfo)))
3520 (arguments
3521 `(#:phases
25f9a068
FB
3522 (alist-cons-before
3523 'build 'configure-environment
3524 (lambda* (#:key outputs inputs #:allow-other-keys)
3525 (let ((cairo (assoc-ref inputs "cairo"))
3526 (gtk+ (assoc-ref inputs "gtk+")))
3527 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3528 ;; has not effect.
25f9a068
FB
3529 (setenv "LD_LIBRARY_PATH"
3530 (string-append cairo "/lib:" gtk+ "/lib"))
3531 (setenv "HOME" (getcwd))
3532 (call-with-output-file "setup.cfg"
3533 (lambda (port)
1bbc659f
FB
3534 (format port "[directories]~%
3535basedirlist = ~a,~a~%
57b7b8cd 3536 [rc_options]~%
1bbc659f
FB
3537backend = TkAgg~%"
3538 (assoc-ref inputs "tcl")
3539 (assoc-ref inputs "tk"))))))
25f9a068
FB
3540 (alist-cons-after
3541 'install 'install-doc
3542 (lambda* (#:key outputs #:allow-other-keys)
3543 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3544 (doc (string-append data "/doc/" ,name "-" ,version))
3545 (info (string-append data "/info"))
3546 (html (string-append doc "/html")))
3547 (with-directory-excursion "doc"
25f9a068
FB
3548 ;; Produce pdf in 'A4' format.
3549 (substitute* (find-files "." "conf\\.py")
3550 (("latex_paper_size = 'letter'")
3551 "latex_paper_size = 'a4'"))
3552 (mkdir-p html)
3553 (mkdir-p info)
3554 ;; The doc recommends to run the 'html' target twice.
3555 (system* "python" "make.py" "html")
3556 (system* "python" "make.py" "html")
18b31516 3557 (copy-recursively "build/html" html)
25f9a068
FB
3558 (system* "python" "make.py" "latex")
3559 (system* "python" "make.py" "texinfo")
18b31516
FB
3560 (symlink (string-append html "/_images")
3561 (string-append info "/matplotlib-figures"))
3562 (with-directory-excursion "build/texinfo"
3563 (substitute* "matplotlib.texi"
3564 (("@image\\{([^,]*)" all file)
3565 (string-append "@image{matplotlib-figures/" file)))
3566 (symlink (string-append html "/_images")
3567 "./matplotlib-figures")
3568 (system* "makeinfo" "--no-split"
3569 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3570 (copy-file "build/texinfo/matplotlib.info"
3571 (string-append info "/matplotlib.info"))
3572 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3573 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3574 %standard-phases))))
1c65314c
FB
3575 (home-page "http://matplotlib.org")
3576 (synopsis "2D plotting library for Python")
3577 (description
3578 "Matplotlib is a Python 2D plotting library which produces publication
3579quality figures in a variety of hardcopy formats and interactive environments
3580across platforms. Matplotlib can be used in Python scripts, the python and
3581ipython shell, web application servers, and six graphical user interface
3582toolkits.")
3f641af0 3583 (license license:psfl)
57b7b8cd 3584 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3585
764c077b 3586(define-public python2-matplotlib
57b7b8cd
LC
3587 (let ((matplotlib (package-with-python2
3588 (strip-python2-variant python-matplotlib))))
764c077b 3589 (package (inherit matplotlib)
88c26834
AE
3590 ;; Make sure to use special packages for Python 2 instead
3591 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3592 (propagated-inputs
7ca0dbc3 3593 `(("python2-pycairo" ,python2-pycairo)
764c077b 3594 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3595 ("python2-tkinter" ,python-2 "tk")
3596 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3597 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3598
0dde6232
RW
3599(define-public python2-pysnptools
3600 (package
3601 (name "python2-pysnptools")
a800018e 3602 (version "0.3.9")
0dde6232
RW
3603 (source
3604 (origin
3605 (method url-fetch)
3f2e9675 3606 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3607 (sha256
3608 (base32
a800018e 3609 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3610 (build-system python-build-system)
3611 (arguments
3612 `(#:python ,python-2)) ; only Python 2.7 is supported
3613 (propagated-inputs
3614 `(("python2-numpy" ,python2-numpy)
3615 ("python2-scipy" ,python2-scipy)
a800018e 3616 ("python2-pytz" ,python2-pytz)
0dde6232 3617 ("python2-cython" ,python2-cython)))
a800018e
EF
3618 (inputs
3619 `(("python2-dateutil-2" ,python2-dateutil-2)
3620 ("python2-pandas" ,python2-pandas)
3621 ("python2-six" ,python2-six)))
0dde6232
RW
3622 (native-inputs
3623 `(("unzip" ,unzip)
3624 ("python2-setuptools" ,python2-setuptools)))
3625 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3626 (synopsis "Library for reading and manipulating genetic data")
3627 (description
3628 "PySnpTools is a library for reading and manipulating genetic data. It
3629can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3630those files. It can also efficiently manipulate ranges of integers using set
3631operators such as union, intersection, and difference.")
3f641af0 3632 (license license:asl2.0)))
0dde6232 3633
c9b1b4f9
RW
3634(define-public python-rpy2
3635 (package
3636 (name "python-rpy2")
ec3bcbc7 3637 (version "2.7.6")
c9b1b4f9
RW
3638 (source
3639 (origin
3640 (method url-fetch)
ec3bcbc7 3641 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3642 (sha256
3643 (base32
ec3bcbc7 3644 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3645 (build-system python-build-system)
3646 (inputs
3647 `(("python-six" ,python-six)
3648 ("readline" ,readline)
3649 ("icu4c" ,icu4c)
3650 ("pcre" ,pcre)
3651 ("r" ,r)))
3652 (native-inputs
5ff6575b
RW
3653 `(("python-setuptools" ,python-setuptools)
3654 ("zlib" ,zlib)))
c9b1b4f9
RW
3655 (home-page "http://rpy.sourceforge.net/")
3656 (synopsis "Python interface to the R language")
3657 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3658low-level interface to R from Python, a proposed high-level interface,
3659including wrappers to graphical libraries, as well as R-like structures and
3660functions.")
3f641af0 3661 (license license:gpl3+)))
c9b1b4f9
RW
3662
3663(define-public python2-rpy2
3664 (let ((rpy2 (package-with-python2 python-rpy2)))
3665 (package (inherit rpy2)
3666 (native-inputs
3667 `(("python2-singledispatch" ,python2-singledispatch)
3668 ,@(package-native-inputs rpy2))))))
3669
bb986599
FB
3670(define-public python-scipy
3671 (package
3672 (name "python-scipy")
ba8a0824 3673 (version "0.16.0")
bb986599
FB
3674 (source
3675 (origin
3676 (method url-fetch)
de67e922
LF
3677; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3678 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3679 "/scipy-" version ".tar.xz"))
bb986599
FB
3680 (sha256
3681 (base32
ba8a0824 3682 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3683 (build-system python-build-system)
dd86c0d1 3684 (propagated-inputs
bb986599
FB
3685 `(("python-numpy" ,python-numpy)
3686 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3687 ("python-pyparsing" ,python-pyparsing)))
3688 (inputs
3689 `(("lapack" ,lapack)
719b01c1 3690 ("openblas" ,openblas)))
bb986599 3691 (native-inputs
dd86c0d1
RW
3692 `(("python-nose" ,python-nose)
3693 ("python-sphinx" ,python-sphinx)
5248d49e 3694 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3695 ("gfortran" ,gfortran)
bb986599
FB
3696 ("texlive" ,texlive)
3697 ("perl" ,perl)))
3698 (outputs '("out" "doc"))
3699 (arguments
3700 `(#:phases
3701 (alist-cons-before
719b01c1 3702 'build 'configure-openblas
bb986599 3703 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3704 (call-with-output-file "site.cfg"
3705 (lambda (port)
3706 (format port
3707 "[blas]
3708libraries = openblas
3709library_dirs = ~a/lib
3710include_dirs = ~a/include
3711[atlas]
3712library_dirs = ~a/lib
3713atlas_libs = openblas
3714"
3715 (assoc-ref inputs "openblas")
3716 (assoc-ref inputs "openblas")
3717 (assoc-ref inputs "openblas"))))
3718 #t)
bb986599
FB
3719 (alist-cons-after
3720 'install 'install-doc
3721 (lambda* (#:key outputs #:allow-other-keys)
3722 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3723 (doc (string-append data "/doc/" ,name "-" ,version))
3724 (html (string-append doc "/html"))
3725 (pyver ,(string-append "PYVER=")))
3726 (with-directory-excursion "doc"
bb986599
FB
3727 ;; Fix generation of images for mathematical expressions.
3728 (substitute* (find-files "source" "conf\\.py")
3729 (("pngmath_use_preview = True")
3730 "pngmath_use_preview = False"))
3731 (mkdir-p html)
3732 (system* "make" "html" pyver)
3733 (system* "make" "latex" "PAPER=a4" pyver)
3734 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3735 (copy-file "build/latex/scipy-ref.pdf"
3736 (string-append doc "/scipy-ref.pdf"))
3737 (with-directory-excursion "build/html"
3738 (for-each (lambda (file)
3739 (let* ((dir (dirname file))
3740 (tgt-dir (string-append html "/" dir)))
96c46210 3741 (install-file file html)))
bb986599
FB
3742 (find-files "." ".*"))))))
3743 ;; Tests can only be run after the library has been installed and not
3744 ;; within the source directory.
3745 (alist-cons-after
3746 'install 'check
89b5c60e 3747 (lambda _
bb986599
FB
3748 (with-directory-excursion "/tmp"
3749 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3750 (alist-delete
3751 'check
4f9ff21e
RW
3752 (alist-cons-after
3753 'unpack 'fix-tests
3754 (lambda _
3755 (substitute* "scipy/integrate/tests/test_quadpack.py"
3756 (("libm.so") "libm.so.6"))
3757 #t)
3758 %standard-phases)))))))
bb986599
FB
3759 (home-page "http://www.scipy.org/")
3760 (synopsis "The Scipy library provides efficient numerical routines")
3761 (description "The SciPy library is one of the core packages that make up
3762the SciPy stack. It provides many user-friendly and efficient numerical
3763routines such as routines for numerical integration and optimization.")
3f641af0 3764 (license license:bsd-3)))
bb986599 3765
764c077b 3766(define-public python2-scipy
57b7b8cd 3767 (package-with-python2 python-scipy))
bb986599 3768
73acc193 3769(define-public python-socksipy-branch
3770 (package
3771 (name "python-socksipy-branch")
3772 (version "1.01")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "SocksiPy-branch" version))
3777 (sha256
3778 (base32
3779 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3780 (build-system python-build-system)
3781 (arguments
3782 `(#:tests? #f)) ; There are no tests
3783 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3784 (synopsis "Python SOCKS module")
3785 (description
3786 "SocksiPy - A Python SOCKS client module. It provides a
3787socket-like interface that supports connections to any TCP
3788service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3789The original version was developed by Dan Haim, this is a
3790branch created by Mario Vilas to address some open issues,
3791as the original project seems to have been abandoned circa 2007.")
3792 (license license:bsd-3)))
3793
3794(define-public python2-socksipy-branch
3795 (package-with-python2 python-socksipy-branch))
3796
94914805
EB
3797(define-public python-sqlalchemy
3798 (package
3799 (name "python-sqlalchemy")
a4ba286b 3800 (version "1.0.12")
94914805
EB
3801 (source
3802 (origin
3803 (method url-fetch)
3804 (uri (string-append "https://pypi.python.org/packages/source/S/"
3805 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3806 (sha256
3807 (base32
a4ba286b 3808 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3809 (build-system python-build-system)
3810 (native-inputs
3811 `(("python-cython" ,python-cython) ;for c extensions
3812 ("python-pytest" ,python-pytest)
3813 ("python-mock" ,python-mock))) ;for tests
3814 (arguments
3815 `(#:phases (alist-replace
3816 'check
3817 (lambda _ (zero? (system* "py.test")))
3818 %standard-phases)))
3819 (home-page "http://www.sqlalchemy.org")
3820 (synopsis "Database abstraction library")
3821 (description
3822 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3823gives application developers the full power and flexibility of SQL. It
3824provides a full suite of well known enterprise-level persistence patterns,
3825designed for efficient and high-performing database access, adapted into a
3826simple and Pythonic domain language.")
3f641af0 3827 (license license:x11)))
94914805
EB
3828
3829(define-public python2-sqlalchemy
3830 (package-with-python2 python-sqlalchemy))
c937562e 3831
de2966cf
EF
3832(define-public python-sqlalchemy-utils
3833 (package
3834 (name "python-sqlalchemy-utils")
3835 (version "0.32.9")
3836 (source
3837 (origin
3838 (method url-fetch)
3839 (uri (pypi-uri "SQLAlchemy-Utils" version))
3840 (sha256
3841 (base32
3842 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3843 (build-system python-build-system)
3844 (inputs
3845 `(("python-six" ,python-six)
3846 ("python-sqlalchemy" ,python-sqlalchemy)))
3847 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3848 (synopsis "Various utility functions for SQLAlchemy")
3849 (description
3850 "SQLAlchemy-utils provides various utility functions and custom data types
3851for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.")
3852 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
3853 (license license:bsd-3)))
3854
3855(define-public python2-sqlalchemy-utils
3856 (let ((base (package-with-python2
3857 (strip-python2-variant python-sqlalchemy-utils))))
3858 (package (inherit base)
3859 (native-inputs
3860 `(("python2-setuptools" ,python2-setuptools)
3861 ,@(package-native-inputs base))))))
3862
af5a4602
CAW
3863(define-public python-alembic
3864 (package
3865 (name "python-alembic")
bb484529 3866 (version "0.8.7")
af5a4602
CAW
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "alembic" version))
3871 (sha256
3872 (base32
bb484529 3873 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
3874 (build-system python-build-system)
3875 (native-inputs
3876 `(("python-mock" ,python-mock)
3877 ("python-pytest-cov" ,python-pytest-cov)))
3878 (propagated-inputs
3879 `(("python-sqlalchemy" ,python-sqlalchemy)
3880 ("python-mako" ,python-mako)
3881 ("python-editor" ,python-editor)))
3882 (home-page "http://bitbucket.org/zzzeek/alembic")
3883 (synopsis
3884 "Database migration tool for SQLAlchemy")
3885 (description
3886 "Alembic is a lightweight database migration tool for usage with the
3887SQLAlchemy Database Toolkit for Python.")
3888 (license license:expat)
3889 (properties `((python2-variant . ,(delay python2-alembic))))))
3890
3891(define-public python2-alembic
3892 (let ((alembic (package-with-python2
3893 (strip-python2-variant python-alembic))))
3894 (package
3895 (inherit alembic)
3896 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3897 ,@(package-native-inputs alembic))))))
3898
1671c07c
EB
3899(define-public python-distutils-extra
3900 (package
3901 (name "python-distutils-extra")
3902 (version "2.38")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3907 version "/+download/python-distutils-extra-"
3908 version ".tar.gz"))
3909 (sha256
3910 (base32
3911 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3912 (build-system python-build-system)
3913 (native-inputs
3914 `(("python-setuptools" ,python-setuptools)))
3915 (home-page "https://launchpad.net/python-distutils-extra/")
3916 (synopsis "Enhancements to Python's distutils")
3917 (description
3918 "The python-distutils-extra module enables you to easily integrate
3919gettext support, themed icons, and scrollkeeper-based documentation into
3920Python's distutils.")
3f641af0 3921 (license license:gpl2)))
1671c07c
EB
3922
3923(define-public python2-distutils-extra
3924 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3925
3926(define-public python2-elib.intl
3927 (package
3928 (name "python2-elib.intl")
3929 (version "0.0.3")
3930 (source
3931 (origin
3932 ;; This project doesn't tag releases or publish tarballs, so we take
3933 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3934 (method git-fetch)
3935 (uri (git-reference
3936 (url "https://github.com/dieterv/elib.intl.git")
3937 (commit "d09997cfef")))
3938 (sha256
3939 (base32
3940 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3941 (build-system python-build-system)
3942 (native-inputs
3943 `(("python2-setuptools" ,python2-setuptools)))
3944 (arguments
3945 ;; incompatible with Python 3 (exception syntax)
3946 `(#:python ,python-2
3947 #:tests? #f
3948 ;; With standard flags, the install phase attempts to create a zip'd
3949 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3950 ;; before 1980'
3951 #:configure-flags '("--single-version-externally-managed"
3952 "--record=elib.txt")))
3953 (home-page "https://github.com/dieterv/elib.intl")
3954 (synopsis "Enhanced internationalization for Python")
3955 (description
3956 "The elib.intl module provides enhanced internationalization (I18N)
3957services for your Python modules and applications.")
3f641af0 3958 (license license:lgpl3+)))
ea5456c8 3959
c937562e
EB
3960(define-public python-pillow
3961 (package
3962 (name "python-pillow")
debf4179 3963 (version "3.3.1")
c937562e
EB
3964 (source
3965 (origin
3966 (method url-fetch)
f1d9231d 3967 (uri (pypi-uri "Pillow" version))
c937562e
EB
3968 (sha256
3969 (base32
debf4179 3970 "1w9x3dfrg8b5lqhpjl0fczfyf9842wbqwgxbjjq4vfpxv5jwm49l"))))
c937562e
EB
3971 (build-system python-build-system)
3972 (native-inputs
3973 `(("python-setuptools" ,python-setuptools)
3974 ("python-nose" ,python-nose)))
3975 (inputs
5ff408d9
SB
3976 `(("freetype" ,freetype)
3977 ("lcms" ,lcms)
c937562e
EB
3978 ("zlib" ,zlib)
3979 ("libjpeg" ,libjpeg)
3980 ("openjpeg" ,openjpeg)
5ff408d9
SB
3981 ("libtiff" ,libtiff)
3982 ("libwebp" ,libwebp)))
c937562e
EB
3983 (propagated-inputs
3984 `(;; Used at runtime for pkg_resources
3985 ("python-setuptools" ,python-setuptools)))
3986 (arguments
e5358a6b
LC
3987 `(#:phases (modify-phases %standard-phases
3988 (add-before
3989 'install 'disable-egg-compression
3990 (lambda _
3991 ;; Leave the .egg uncompressed since compressing it would
3992 ;; prevent the GC from identifying run-time dependencies.
3993 ;; See <http://bugs.gnu.org/20765>.
3994 (let ((port (open-file "setup.cfg" "a")))
3995 (display "\n[easy_install]\nzip_ok = 0\n"
3996 port)
3997 (close-port port)
3998 #t)))
3999 (add-after
4000 'install 'check-installed
4001 (lambda _
4002 (begin
4003 (setenv "HOME" (getcwd))
4004 (and (zero? (system* "python" "selftest.py"
4005 "--installed"))
4006 (zero? (system* "python" "test-installed.py"))))))
4007 (delete 'check))))
c937562e
EB
4008 (home-page "https://pypi.python.org/pypi/Pillow")
4009 (synopsis "Fork of the Python Imaging Library")
4010 (description
4011 "The Python Imaging Library adds image processing capabilities to your
4012Python interpreter. This library provides extensive file format support, an
4013efficient internal representation, and fairly powerful image processing
4014capabilities. The core image library is designed for fast access to data
4015stored in a few basic pixel formats. It should provide a solid foundation for
4016a general image processing tool.")
3f641af0 4017 (license (license:x11-style
c937562e
EB
4018 "http://www.pythonware.com/products/pil/license.htm"
4019 "The PIL Software License"))))
4020
4021(define-public python2-pillow
4022 (package-with-python2 python-pillow))
bb986599 4023
a415f036
FB
4024(define-public python-pycparser
4025 (package
4026 (name "python-pycparser")
38eb6919 4027 (version "2.14")
a415f036
FB
4028 (source
4029 (origin
4030 (method url-fetch)
38eb6919 4031 (uri (pypi-uri "pycparser" version))
a415f036
FB
4032 (sha256
4033 (base32
38eb6919 4034 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4035 (outputs '("out" "doc"))
4036 (build-system python-build-system)
4037 (native-inputs
4038 `(("pkg-config" ,pkg-config)
4039 ("python-setuptools" ,python-setuptools)))
4040 (arguments
89b5c60e 4041 `(#:phases
a415f036
FB
4042 (alist-replace
4043 'check
4044 (lambda _
4045 (with-directory-excursion "tests"
4046 (zero? (system* "python" "all_tests.py"))))
4047 (alist-cons-after
4048 'install 'install-doc
4049 (lambda* (#:key outputs #:allow-other-keys)
4050 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4051 (doc (string-append data "/doc/" ,name "-" ,version))
4052 (examples (string-append doc "/examples")))
4053 (mkdir-p examples)
4054 (for-each (lambda (file)
4055 (copy-file (string-append "." file)
4056 (string-append doc file)))
4057 '("/README.rst" "/CHANGES" "/LICENSE"))
4058 (copy-recursively "examples" examples)))
4059 %standard-phases))))
4060 (home-page "https://github.com/eliben/pycparser")
4061 (synopsis "C parser in Python")
4062 (description
4063 "Pycparser is a complete parser of the C language, written in pure Python
4064using the PLY parsing library. It parses C code into an AST and can serve as
4065a front-end for C compilers or analysis tools.")
3f641af0 4066 (license license:bsd-3)))
a415f036
FB
4067
4068(define-public python2-pycparser
4069 (package-with-python2 python-pycparser))
57c3f716
FB
4070
4071(define-public python-cffi
4072 (package
4073 (name "python-cffi")
2d3a437c 4074 (version "1.4.2")
57c3f716
FB
4075 (source
4076 (origin
4077 (method url-fetch)
2d3a437c 4078 (uri (pypi-uri "cffi" version))
89b5c60e 4079 (sha256
2d3a437c 4080 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4081 (build-system python-build-system)
4082 (outputs '("out" "doc"))
4083 (inputs
4084 `(("libffi" ,libffi)))
4085 (propagated-inputs ; required at run-time
4086 `(("python-pycparser" ,python-pycparser)))
4087 (native-inputs
4088 `(("pkg-config" ,pkg-config)
4089 ("python-sphinx" ,python-sphinx)
4179f952 4090 ("python-pytest" ,python-pytest)
57c3f716
FB
4091 ("python-setuptools" ,python-setuptools)))
4092 (arguments
4179f952 4093 `(#:phases
57c3f716
FB
4094 (alist-cons-after
4095 'install 'install-doc
4096 (lambda* (#:key outputs #:allow-other-keys)
4097 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4098 (doc (string-append data "/doc/" ,name "-" ,version))
4099 (html (string-append doc "/html")))
4100 (with-directory-excursion "doc"
4101 (system* "make" "html")
4102 (mkdir-p html)
4103 (copy-recursively "build/html" html))
4104 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4105 %standard-phases)))
4106 (home-page "http://cffi.readthedocs.org")
4107 (synopsis "Foreign function interface for Python")
4108 (description
4109 "Foreign Function Interface for Python calling C code.")
bd3fa666 4110 (license license:expat)))
57c3f716
FB
4111
4112(define-public python2-cffi
4113 (package-with-python2 python-cffi))
6fa14469
FB
4114
4115(define-public python-xcffib
4116 (package
4117 (name "python-xcffib")
4118 (version "0.1.9")
4119 (source
4120 (origin
4121 (method url-fetch)
4122 (uri (string-append "https://pypi.python.org/packages/source/x/"
4123 "xcffib/xcffib-" version ".tar.gz"))
4124 (sha256
4125 (base32
4126 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4127 (build-system python-build-system)
4128 (inputs
4129 `(("libxcb" ,libxcb)
4130 ("python-six" ,python-six)))
4131 (native-inputs
4132 `(("python-setuptools" ,python-setuptools)))
4133 (propagated-inputs
4134 `(("python-cffi" ,python-cffi))) ; used at run time
4135 (arguments
89b5c60e 4136 `(#:phases
6fa14469
FB
4137 (alist-cons-after
4138 'install 'install-doc
4139 (lambda* (#:key outputs #:allow-other-keys)
4140 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4141 "/doc/" ,name "-" ,version)))
4142 (mkdir-p doc)
4143 (copy-file "README.md"
4144 (string-append doc "/README.md"))))
4145 %standard-phases)))
4146 (home-page "https://github.com/tych0/xcffib")
4147 (synopsis "XCB Python bindings")
4148 (description
4149 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4150support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4151 (license license:expat)))
6fa14469
FB
4152
4153(define-public python2-xcffib
4154 (package-with-python2 python-xcffib))
4155
9e099723
FB
4156(define-public python-cairocffi
4157 (package
4158 (name "python-cairocffi")
4159 (version "0.6")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 ;; The archive on pypi is missing the 'utils' directory!
4164 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4165 version ".tar.gz"))
f586c877 4166 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4167 (sha256
4168 (base32
4169 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4170 (build-system python-build-system)
4171 (outputs '("out" "doc"))
4172 (inputs
4173 `(("gdk-pixbuf" ,gdk-pixbuf)
4174 ("cairo" ,cairo)))
4175 (native-inputs
4176 `(("pkg-config" ,pkg-config)
4177 ("python-sphinx" ,python-sphinx)
4178 ("python-docutils" ,python-docutils)
4179 ("python-setuptools" ,python-setuptools)))
4180 (propagated-inputs
4181 `(("python-xcffib" ,python-xcffib))) ; used at run time
4182 (arguments
89b5c60e 4183 `(#:phases
9e099723
FB
4184 (alist-cons-after
4185 'install 'install-doc
4186 (lambda* (#:key inputs outputs #:allow-other-keys)
4187 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4188 (doc (string-append data "/doc/" ,name "-" ,version))
4189 (html (string-append doc "/html")))
89b5c60e 4190 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4191 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4192 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4193 (setenv "LANG" "en_US.UTF-8")
4194 (mkdir-p html)
4195 (for-each (lambda (file)
4196 (copy-file (string-append "." file)
4197 (string-append doc file)))
4198 '("/README.rst" "/CHANGES" "/LICENSE"))
4199 (system* "python" "setup.py" "build_sphinx")
4200 (copy-recursively "docs/_build/html" html)))
4201 %standard-phases)))
4202 (home-page "https://github.com/SimonSapin/cairocffi")
4203 (synopsis "Python bindings and object-oriented API for Cairo")
4204 (description
4205 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4206Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4207graphics library with support for multiple backends including image buffers,
4208PNG, PostScript, PDF, and SVG file output.")
3f641af0 4209 (license license:bsd-3)))
9e099723
FB
4210
4211(define-public python2-cairocffi
4212 (package-with-python2 python-cairocffi))
4213
3cff95cb
RW
4214(define-public python-decorator
4215 (package
4216 (name "python-decorator")
eb6e2e81 4217 (version "4.0.9")
3cff95cb
RW
4218 (source
4219 (origin
4220 (method url-fetch)
e21338be 4221 (uri (pypi-uri "decorator" version))
3cff95cb 4222 (sha256
eb6e2e81 4223 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4224 (build-system python-build-system)
4225 (arguments '(#:tests? #f)) ; no test target
4226 (native-inputs
4227 `(("python-setuptools" ,python-setuptools)))
eb6e2e81 4228 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4229 (synopsis "Python module to simplify usage of decorators")
4230 (description
4231 "The aim of the decorator module is to simplify the usage of decorators
4232for the average programmer, and to popularize decorators usage giving examples
4233of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4234etc. The core of this module is a decorator factory.")
4235 (license license:expat)))
4236
4237(define-public python2-decorator
4238 (package-with-python2 python-decorator))
4239
2c0499ad
RW
4240(define-public python-drmaa
4241 (package
4242 (name "python-drmaa")
4243 (version "0.7.6")
4244 (source
4245 (origin
4246 (method url-fetch)
4247 (uri (string-append
4248 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4249 version ".tar.gz"))
4250 (sha256
4251 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4252 (build-system python-build-system)
4253 ;; The test suite requires libdrmaa which is provided by the cluster
4254 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4255 ;; should be set to the path of the libdrmaa library.
4256 (arguments '(#:tests? #f))
4257 (native-inputs
4258 `(("python-nose" ,python-nose)
4259 ("python-setuptools" ,python-setuptools)))
4260 (home-page "https://pypi.python.org/pypi/drmaa")
4261 (synopsis "Python bindings for the DRMAA library")
4262 (description
4263 "A Python package for Distributed Resource Management (DRM) job
4264submission and control. This package is an implementation of the DRMAA 1.0
4265Python language binding specification.")
3f641af0 4266 (license license:bsd-3)))
2c0499ad
RW
4267
4268(define-public python2-drmaa
4269 (package-with-python2 python-drmaa))
4270
d05c6da0
RW
4271(define-public python-gridmap
4272 (package
4273 (name "python-gridmap")
4274 (version "0.13.0")
4275 (source
4276 (origin
4277 (method url-fetch)
4278 (uri (string-append
4279 "https://github.com/pygridtools/gridmap/archive/v"
4280 version ".tar.gz"))
4281 (file-name (string-append name "-" version ".tar.gz"))
4282 (sha256
4283 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4284 (build-system python-build-system)
4285 (inputs
4286 `(("python-psutil" ,python-psutil)
4287 ("python-drmaa" ,python-drmaa)
4288 ("python-pyzmq" ,python-pyzmq)))
4289 (native-inputs
4290 `(("python-setuptools" ,python-setuptools)))
4291 (home-page "https://github.com/pygridtools/gridmap")
4292 (synopsis "Create jobs on a cluster directly from Python")
4293 (description
4294 "Gridmap is a Python package to allow you to easily create jobs on the
4295cluster directly from Python. You can directly map Python functions onto the
4296cluster without needing to write any wrapper code yourself.")
3f641af0 4297 (license license:gpl3+)))
d05c6da0
RW
4298
4299(define-public python2-gridmap
4300 (package-with-python2 python-gridmap))
4301
cb6d5c54
RW
4302(define-public python-pexpect
4303 (package
4304 (name "python-pexpect")
4305 (version "3.3")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (string-append "https://pypi.python.org/packages/source/p/"
4310 "pexpect/pexpect-" version ".tar.gz"))
4311 (sha256
4312 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4313 (build-system python-build-system)
4314 (arguments
4315 `(#:phases
4316 (modify-phases %standard-phases
4317 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4318 (native-inputs
4319 `(("python-nose" ,python-nose)))
4320 (home-page "http://pexpect.readthedocs.org/")
4321 (synopsis "Controlling interactive console applications")
4322 (description
4323 "Pexpect is a pure Python module for spawning child applications;
4324controlling them; and responding to expected patterns in their output.
4325Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4326child application and control it as if a human were typing commands.")
3f641af0 4327 (license license:isc)))
cb6d5c54
RW
4328
4329(define-public python2-pexpect
4330 (package-with-python2 python-pexpect))
4331
229ad120
RW
4332(define-public python-setuptools-scm
4333 (package
4334 (name "python-setuptools-scm")
42d6d0d0 4335 (version "1.11.1")
229ad120
RW
4336 (source (origin
4337 (method url-fetch)
383af6b0 4338 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4339 (sha256
4340 (base32
42d6d0d0 4341 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120 4342 (build-system python-build-system)
383af6b0 4343 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4344 (home-page "https://github.com/pypa/setuptools_scm/")
4345 (synopsis "Manage Python package versions in SCM metadata")
4346 (description
383af6b0 4347 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4348@dfn{software configuration management} (SCM) metadata instead of declaring
4349them as the version argument or in a SCM managed file.")
4350 (license license:expat)))
4351
4352(define-public python2-setuptools-scm
4353 (package-with-python2 python-setuptools-scm))
4354
b74270ee
RW
4355(define-public python-pathpy
4356 (package
4357 (name "python-pathpy")
4358 (version "8.1.1")
4359 (source
4360 (origin
4361 (method url-fetch)
4362 (uri (string-append "https://pypi.python.org/packages/source/p/"
4363 "path.py/path.py-" version ".tar.gz"))
4364 (sha256
4365 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4366 (build-system python-build-system)
4367 (propagated-inputs
4368 `(("python-appdirs" ,python-appdirs)))
4369 (native-inputs
553b709b
EF
4370 `(("python-setuptools" ,python-setuptools)
4371 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4372 ("python-pytest" ,python-pytest)
4373 ("python-pytest-runner" ,python-pytest-runner)))
4374 (home-page "http://github.com/jaraco/path.py")
4375 (synopsis "Python module wrapper for built-in os.path")
4376 (description
4377 "@code{path.py} implements path objects as first-class entities, allowing
4378common operations on files to be invoked on those path objects directly.")
4379 (license license:expat)))
4380
4381(define-public python2-pathpy
4382 (package-with-python2 python-pathpy))
4383
0d34e01b
RW
4384(define-public python-pickleshare
4385 (package
4386 (name "python-pickleshare")
4387 (version "0.5")
4388 (source
4389 (origin
4390 (method url-fetch)
4391 (uri (string-append "https://pypi.python.org/packages/source/p/"
4392 "pickleshare/pickleshare-" version ".tar.gz"))
4393 (sha256
4394 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4395 (build-system python-build-system)
4396 (propagated-inputs
4397 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4398 (native-inputs
4399 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4400 (home-page "https://github.com/vivainio/pickleshare")
4401 (synopsis "Tiny key value database with concurrency support")
4402 (description
4403 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4404Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4405shelve, many processes can access the database simultaneously. Changing a
4406value in database is immediately visible to other processes accessing the same
4407database. Concurrency is possible because the values are stored in separate
4408files. Hence the “database” is a directory where all files are governed by
4409PickleShare.")
4410 (license license:expat)))
4411
4412(define-public python2-pickleshare
4413 (package-with-python2 python-pickleshare))
4414
cd6e5189
RW
4415(define-public python-simplegeneric
4416 (package
4417 (name "python-simplegeneric")
4418 (version "0.8.1")
4419 (source
4420 (origin
4421 (method url-fetch)
4422 (uri (string-append "https://pypi.python.org/packages/source/s/"
4423 "simplegeneric/simplegeneric-" version ".zip"))
4424 (sha256
4425 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4426 (build-system python-build-system)
4427 (native-inputs
69b96e5e
RW
4428 `(("python-setuptools" ,python-setuptools)
4429 ("unzip" ,unzip)))
cd6e5189
RW
4430 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4431 (synopsis "Python module for simple generic functions")
4432 (description
4433 "The simplegeneric module lets you define simple single-dispatch generic
4434functions, akin to Python’s built-in generic functions like @code{len()},
4435@code{iter()} and so on. However, instead of using specially-named methods,
4436these generic functions use simple lookup tables, akin to those used by
4437e.g. @code{pickle.dump()} and other generic functions found in the Python
4438standard library.")
3f641af0 4439 (license license:zpl2.1)))
cd6e5189
RW
4440
4441(define-public python2-simplegeneric
4442 (package-with-python2 python-simplegeneric))
4443
ddc7d8ed
RW
4444(define-public python-ipython-genutils
4445 (package
4446 (name "python-ipython-genutils")
4447 (version "0.1.0")
4448 (source
4449 (origin
4450 (method url-fetch)
4451 (uri (string-append "https://pypi.python.org/packages/source/i/"
4452 "ipython_genutils/ipython_genutils-"
4453 version ".tar.gz"))
4454 (sha256
4455 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4456 (build-system python-build-system)
4457 (arguments `(#:tests? #f)) ; no tests
4458 (home-page "http://ipython.org")
4459 (synopsis "Vestigial utilities from IPython")
4460 (description
4461 "This package provides retired utilities from IPython.")
3f641af0 4462 (license license:bsd-3)))
ddc7d8ed
RW
4463
4464(define-public python2-ipython-genutils
4465 (package-with-python2 python-ipython-genutils))
4466
2b10eb48
RW
4467(define-public python-traitlets
4468 (package
4469 (name "python-traitlets")
a5ba1481 4470 (version "4.2.0")
2b10eb48
RW
4471 (source
4472 (origin
4473 (method url-fetch)
cc0c4fde 4474 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4475 (sha256
4476 (base32
a5ba1481 4477 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4478 (build-system python-build-system)
4479 (arguments
4480 `(#:phases
4481 (modify-phases %standard-phases
4482 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4483 (propagated-inputs
4484 `(("python-ipython-genutils" ,python-ipython-genutils)
4485 ("python-decorator" ,python-decorator)))
4486 (native-inputs
cc0c4fde
EF
4487 `(("python-mock" ,python-mock)
4488 ("python-nose" ,python-nose)))
2b10eb48
RW
4489 (home-page "http://ipython.org")
4490 (synopsis "Configuration system for Python applications")
4491 (description
4492 "Traitlets is a framework that lets Python classes have attributes with
4493type checking, dynamically calculated default values, and ‘on change’
4494callbacks. The package also includes a mechanism to use traitlets for
4495configuration, loading values from files or from command line arguments. This
4496is a distinct layer on top of traitlets, so you can use traitlets in your code
4497without using the configuration machinery.")
3f641af0 4498 (license license:bsd-3)))
2b10eb48
RW
4499
4500(define-public python2-traitlets
4501 (package-with-python2 python-traitlets))
4502
4263b06f
RW
4503(define-public python-jupyter-core
4504 (package
4505 (name "python-jupyter-core")
4506 (version "4.2.0")
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (string-append (pypi-uri "jupyter_core" version)))
4511 (sha256
4512 (base32
4513 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4514 (build-system python-build-system)
4515 ;; FIXME: not sure how to run the tests
4516 (arguments `(#:tests? #f))
4517 (propagated-inputs
4518 `(("python-traitlets" ,python-traitlets)))
4519 (home-page "http://jupyter.org/")
4520 (synopsis "Jupyter base package")
4521 (description
4522 "Jupyter core is the base package on which Jupyter projects rely.")
4523 (license license:bsd-3)))
4524
4525(define-public python2-jupyter-core
4526 (package-with-python2 python-jupyter-core))
4527
9ff01f2d
RW
4528(define-public python-jupyter-client
4529 (package
4530 (name "python-jupyter-client")
4531 (version "4.4.0")
4532 (source
4533 (origin
4534 (method url-fetch)
4535 (uri (pypi-uri "jupyter_client" version))
4536 (sha256
4537 (base32
4538 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4539 (build-system python-build-system)
4540 ;; Tests fail because of missing native python kernel which I assume is
4541 ;; provided by the ipython package, which we cannot use because it would
4542 ;; cause a dependency cycle.
4543 (arguments `(#:tests? #f))
4544 (propagated-inputs
4545 `(("python-pyzmq" ,python-pyzmq)
4546 ("python-traitlets" ,python-traitlets)
4547 ("python-jupyter-core" ,python-jupyter-core)))
4548 (home-page "http://jupyter.org/")
4549 (synopsis "Jupyter protocol implementation and client libraries")
4550 (description
4551 "The @code{jupyter_client} package contains the reference implementation
4552of the Jupyter protocol. It also provides client and kernel management APIs
4553for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4554installing @code{kernelspec}s for use with Jupyter frontends.")
4555 (license license:bsd-3)))
4556
4557(define-public python2-jupyter-client
4558 (package-with-python2 python-jupyter-client))
4559
ab526102
RW
4560(define-public python-ipykernel
4561 (package
4562 (name "python-ipykernel")
4563 (version "4.5.0")
4564 (source
4565 (origin
4566 (method url-fetch)
4567 (uri (pypi-uri "ipykernel" version))
4568 (sha256
4569 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4570 (build-system python-build-system)
4571 ;; The tests load a submodule of IPython. However, IPython itself depends
4572 ;; on ipykernel.
4573 (arguments `(#:tests? #f))
4574 (propagated-inputs
4575 ;; imported at runtime during connect
4576 `(("python-jupyter-client" ,python-jupyter-client)))
4577 (home-page "http://ipython.org")
4578 (synopsis "IPython Kernel for Jupyter")
4579 (description
4580 "This package provides the IPython kernel for Jupyter.")
4581 (license license:bsd-3)))
4582
4583(define-public python2-ipykernel
4584 (package-with-python2 python-ipykernel))
4585
5ff6effc
RW
4586(define-public python-testpath
4587 (package
4588 (name "python-testpath")
4589 (version "0.2")
4590 (source
4591 (origin
4592 (method url-fetch)
4593 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4594 version ".tar.gz"))
4595 (file-name (string-append name "-" version ".tar.gz"))
4596 (sha256
4597 (base32
4598 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4599 (build-system python-build-system)
4600 (arguments
4601 `(#:tests? #f ; this package does not even have a setup.py
4602 #:phases
4603 (modify-phases %standard-phases
4604 (delete 'install)
4605 (replace 'build
4606 (lambda* (#:key inputs outputs #:allow-other-keys)
4607 (let ((dir (string-append
4608 (assoc-ref outputs "out")
4609 "/lib/python"
4610 (string-take (string-take-right
4611 (assoc-ref inputs "python") 5) 3)
4612 "/site-packages/testpath")))
4613 (mkdir-p dir)
4614 (copy-recursively "testpath" dir))
4615 #t)))))
4616 (home-page "https://github.com/takluyver/testpath")
4617 (synopsis "Test utilities for code working with files and commands")
4618 (description
4619 "Testpath is a collection of utilities for Python code working with files
4620and commands. It contains functions to check things on the filesystem, and
4621tools for mocking system commands and recording calls to those.")
4622 (license license:expat)))
4623
4624(define-public python2-testpath
4625 (package-with-python2 python-testpath))
4626
ae1ab9fe
FB
4627(define-public python-ipython
4628 (package
4629 (name "python-ipython")
3a0b1b9a 4630 (version "3.2.1")
ae1ab9fe
FB
4631 (source
4632 (origin
fceac880 4633 (method url-fetch)
fc1adab1 4634 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
fceac880
FB
4635 (uri (string-append "https://pypi.python.org/packages/source/i/"
4636 "ipython/ipython-" version ".tar.gz"))
4637 (sha256
4638 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4639 (build-system python-build-system)
4640 (outputs '("out" "doc"))
3a0b1b9a
FB
4641 (propagated-inputs
4642 `(("python-pyzmq" ,python-pyzmq)
4643 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4644 (inputs
4645 `(("readline" ,readline)
3a0b1b9a 4646 ("which" ,which)
ae1ab9fe 4647 ("python-matplotlib" ,python-matplotlib)
5d26e542 4648 ("python-numpy" ,python-numpy)
ae1ab9fe 4649 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4650 ("python-jinja2" ,python-jinja2)
4651 ("python-mistune" ,python-mistune)
4652 ("python-jsonschema" ,python-jsonschema)
4653 ("python-pygments" ,python-pygments)
4654 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4655 ("python-nose" ,python-nose)))
4656 (native-inputs
4657 `(("pkg-config" ,pkg-config)
4658 ("python-sphinx" ,python-sphinx)
4659 ("texlive" ,texlive)
4660 ("texinfo" ,texinfo)
4661 ("python-setuptools" ,python-setuptools)))
4662 (arguments
89b5c60e 4663 `(#:phases
3a0b1b9a
FB
4664 (modify-phases %standard-phases
4665 (add-after
4666 'install 'install-doc
4667 (lambda* (#:key inputs outputs #:allow-other-keys)
4668 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4669 (doc (string-append data "/doc/" ,name "-" ,version))
4670 (html (string-append doc "/html"))
4671 (man1 (string-append data "/man/man1"))
4672 (info (string-append data "/info"))
4673 (examples (string-append doc "/examples")))
afd3d931 4674 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4675 (with-directory-excursion "docs"
4676 ;; FIXME: html and pdf fail to build
4677 ;; (system* "make" "html")
4678 ;; (system* "make" "pdf" "PAPER=a4")
4679 (system* "make" "info"))
4680 (copy-recursively "docs/man" man1)
4681 (copy-recursively "examples" examples)
4682 ;; (copy-recursively "docs/build/html" html)
4683 ;; (copy-file "docs/build/latex/ipython.pdf"
4684 ;; (string-append doc "/ipython.pdf"))
4685 (mkdir-p info)
4686 (copy-file "docs/build/texinfo/ipython.info"
4687 (string-append info "/ipython.info"))
4688 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4689 ;; Tests can only be run after the library has been installed and not
4690 ;; within the source directory.
4691 (delete 'check)
4692 (add-after
4693 'install 'check
4694 (lambda* (#:key outputs tests? #:allow-other-keys)
4695 (if tests?
4696 (with-directory-excursion "/tmp"
4697 (setenv "HOME" "/tmp/") ;; required by a test
4698 (zero? (system* (string-append (assoc-ref outputs "out")
4699 "/bin/iptest"))))
4700 #t)))
4701 (add-before
4702 'install 'fix-tests
4703 (lambda* (#:key inputs #:allow-other-keys)
4704 (substitute* "./IPython/utils/_process_posix.py"
4705 (("/usr/bin/env', 'which") (which "which")))
4706 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4707 (("#!/usr/bin/env python")
4708 (string-append "#!" (which "python"))))
4709 ;; Disable 1 failing test
4710 (substitute* "./IPython/core/tests/test_magic.py"
4711 (("def test_dirops\\(\\):" all)
4712 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4713 (home-page "http://ipython.org")
4714 (synopsis "IPython is a tool for interactive computing in Python")
4715 (description
4716 "IPython provides a rich architecture for interactive computing with:
4717Powerful interactive shells, a browser-based notebook, support for interactive
4718data visualization, embeddable interpreters and tools for parallel
4719computing.")
135ba811
EF
4720 (license license:bsd-3)
4721 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4722
4723(define-public python2-ipython
135ba811 4724 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4725 (package
4726 (inherit ipython)
4727 ;; FIXME: some tests are failing
4728 (arguments
4729 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4730 ;; FIXME: add pyreadline once available.
89b5c60e 4731 (inputs
135ba811
EF
4732 `(("python2-mock" ,python2-mock)
4733 ,@(package-inputs ipython))))))
03411993
AE
4734
4735(define-public python-isodate
4736 (package
4737 (name "python-isodate")
b6785c2e 4738 (version "0.5.4")
03411993
AE
4739 (source
4740 (origin
4741 (method url-fetch)
b6785c2e 4742 (uri (pypi-uri "isodate" version))
03411993
AE
4743 (sha256
4744 (base32
b6785c2e 4745 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993
AE
4746 (build-system python-build-system)
4747 (inputs
4748 `(("python-setuptools" ,python-setuptools)))
4749 (home-page
4750 "http://cheeseshop.python.org/pypi/isodate")
4751 (synopsis
4752 "Python date parser and formatter")
4753 (description
4754 "Python-isodate is a python module for parsing and formatting
4755ISO 8601 dates, time and duration.")
3f641af0 4756 (license license:bsd-3)))
03411993
AE
4757
4758(define-public python2-isodate
4759 (package-with-python2 python-isodate))
673ab897
AE
4760
4761(define-public python-html5lib
4762 (package
4763 (name "python-html5lib")
fee04c19 4764 (version "1.0b8")
673ab897
AE
4765 (source
4766 (origin
4767 (method url-fetch)
fee04c19 4768 (uri (pypi-uri "html5lib" version))
673ab897
AE
4769 (sha256
4770 (base32
fee04c19 4771 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4772 (build-system python-build-system)
3dd75476
AE
4773 (propagated-inputs
4774 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4775 (inputs
4776 `(("python-setuptools" ,python-setuptools)))
4777 (arguments
4778 `(#:test-target "check"))
4779 (home-page
4780 "https://github.com/html5lib/html5lib-python")
4781 (synopsis
4782 "Python HTML parser based on the WHATWG HTML specifcation")
4783 (description
4784 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4785and written in Python.")
bd3fa666 4786 (license license:expat)))
673ab897
AE
4787
4788(define-public python2-html5lib
4789 (package-with-python2 python-html5lib))
e99f4211 4790
8ee62c97
RW
4791;; Needed for python-bleach, a dependency of python-notebook
4792(define-public python-html5lib-0.9
4793 (package
4794 (inherit python-html5lib)
4795 (version "0.999")
4796 (source
4797 (origin
4798 (method url-fetch)
4799 (uri (pypi-uri "html5lib" version))
4800 (sha256
4801 (base32
4802 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4803
4804(define-public python2-html5lib-0.9
4805 (package-with-python2 python-html5lib-0.9))
4806
e99f4211
MW
4807(define-public python-urwid
4808 (package
4809 (name "python-urwid")
51ff41f6 4810 (version "1.3.1")
e99f4211
MW
4811 (source
4812 (origin
4813 (method url-fetch)
b97c1bfd 4814 (uri (pypi-uri "urwid" version))
e99f4211
MW
4815 (sha256
4816 (base32
51ff41f6 4817 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4818 (build-system python-build-system)
b97c1bfd
LF
4819 (arguments
4820 `(#:phases
4821 (modify-phases %standard-phases
4822 ;; Disable failing test. Bug filed upstream:
4823 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4824 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4825 (add-after 'unpack 'disable-failing-test
4826 (lambda _
4827 (substitute* "urwid/tests/test_event_loops.py"
4828 (("test_remove_watch_file")
4829 "disable_remove_watch_file")))))))
e99f4211
MW
4830 (native-inputs `(("python-setuptools" ,python-setuptools)))
4831 (home-page "http://urwid.org")
4832 (synopsis "Console user interface library for Python")
4833 (description
4834 "Urwid is a curses-based UI/widget library for Python. It includes many
4835features useful for text console applications.")
3f641af0 4836 (license license:lgpl2.1+)))
e99f4211
MW
4837
4838(define-public python2-urwid
4839 (package-with-python2 python-urwid))
d95a56c6 4840
47d0b292
TS
4841(define-public python-urwidtrees
4842 (package
4843 (name "python-urwidtrees")
37ec4623 4844 (version "1.0.2")
47d0b292
TS
4845 (source
4846 (origin
4847 (method url-fetch)
37ec4623
TS
4848 ;; package author intends on distributing via github rather than pypi:
4849 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4850 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4851 version ".tar.gz"))
4852 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
4853 (sha256
4854 (base32
37ec4623 4855 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
4856 (build-system python-build-system)
4857 (arguments
4858 '(#:tests? #f)) ; no tests
4859 (inputs `(("python-urwid" ,python-urwid)))
4860 (home-page "https://github.com/pazz/urwidtrees")
4861 (synopsis "Tree widgets for urwid")
4862 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4863toolkit. Use it to build trees of widgets.")
3f641af0 4864 (license license:gpl3+)))
47d0b292
TS
4865
4866(define-public python2-urwidtrees
4867 (package-with-python2 python-urwidtrees))
4868
d95a56c6
PAR
4869(define-public python-dbus
4870 (package
4871 (name "python-dbus")
4872 (version "1.2.0")
4873 (source
4874 (origin
4875 (method url-fetch)
4876 (uri (string-append
5cc3096c 4877 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
4878 version ".tar.gz"))
4879 (sha256
4880 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4881 (build-system gnu-build-system)
6717c879
SB
4882 (arguments
4883 '(#:phases
4884 (modify-phases %standard-phases
4885 (add-before
4886 'check 'pre-check
4887 (lambda _
4888 ;; XXX: For the missing '/etc/machine-id'.
4889 (substitute* "test/run-test.sh"
4890 (("DBUS_FATAL_WARNINGS=1")
4891 "DBUS_FATAL_WARNINGS=0"))
4892 #t)))))
d95a56c6
PAR
4893 (native-inputs
4894 `(("pkg-config" ,pkg-config)))
4895 (inputs
4896 `(("python" ,python)
2e88d113 4897 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4898 (synopsis "Python bindings for D-bus")
4899 (description "python-dbus provides bindings for libdbus, the reference
4900implementation of D-Bus.")
4901 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4902 (license license:expat)))
b52af02b
MW
4903
4904(define-public python2-dbus
4905 (package (inherit python-dbus)
4906 (name "python2-dbus")
4907 (inputs `(("python" ,python-2)
4908 ,@(alist-delete "python"
4909 (package-inputs python-dbus)
4910 equal?)))
4911 ;; FIXME: on Python 2, the test_utf8 fails with:
4912 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4913 (arguments `(#:tests? #f))))
a6ac8332
AE
4914
4915(define-public python-apsw
4916 (package
4917 (name "python-apsw")
917708c2 4918 (version "3.9.2-r1")
a6ac8332
AE
4919 (source
4920 (origin
4921 (method url-fetch)
917708c2 4922 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4923 (sha256
4924 (base32
917708c2 4925 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4926 (build-system python-build-system)
4927 (inputs
4928 `(("python-setuptools" ,python-setuptools)
4929 ("sqlite" ,sqlite)))
4930 (arguments
4931 `(#:phases
4932 ;; swap check and install phases
4933 (alist-cons-after
4934 'install 'check
4935 (assoc-ref %standard-phases 'check)
4936 (alist-delete
4937 'check
4938 %standard-phases))))
4939 (home-page "https://github.com/rogerbinns/apsw/")
4940 (synopsis "Another Python SQLite Wrapper")
4941 (description "APSW is a Python wrapper for the SQLite
4942embedded relational database engine. In contrast to other wrappers such as
4943pysqlite it focuses on being a minimal layer over SQLite attempting just to
4944translate the complete SQLite API into Python.")
abde5f37 4945 (license license:zlib)))
a6ac8332
AE
4946
4947(define-public python2-apsw
4948 (package-with-python2 python-apsw))
26b307e2
AE
4949
4950(define-public python-lxml
4951 (package
4952 (name "python-lxml")
d58a3203 4953 (version "3.6.0")
26b307e2
AE
4954 (source
4955 (origin
4956 (method url-fetch)
97bbc480 4957 (uri (pypi-uri "lxml" version))
26b307e2 4958 (sha256
d58a3203
EF
4959 (base32
4960 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
4961 (build-system python-build-system)
4962 (inputs
4963 `(("libxml2" ,libxml2)
4964 ("libxslt" ,libxslt)
4965 ("python-setuptools" ,python-setuptools)))
4966 (home-page "http://lxml.de/")
4967 (synopsis
4968 "Python XML processing library")
4969 (description
4970 "The lxml XML toolkit is a Pythonic binding for the C libraries
4971libxml2 and libxslt.")
3f641af0 4972 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
4973
4974(define-public python2-lxml
4975 (package-with-python2 python-lxml))
4ed20663 4976
b32a1e47
CAW
4977;; beautifulsoup4 has a totally different namespace than 3.x,
4978;; and pypi seems to put it under its own name, so I guess we should too
4979(define-public python-beautifulsoup4
4980 (package
4981 (name "python-beautifulsoup4")
67fd4a12 4982 (version "4.5.1")
b32a1e47
CAW
4983 (source
4984 (origin
4985 (method url-fetch)
4986 (uri (pypi-uri "beautifulsoup4" version))
4987 (sha256
4988 (base32
67fd4a12 4989 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 4990 (build-system python-build-system)
5f37f0b6
LF
4991 (arguments
4992 `(#:phases
4993 (modify-phases %standard-phases
4994 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4995 ;; must use this conversion script when building with Python 3. The
4996 ;; conversion script also runs the tests.
4997 ;; For more information, see the file 'convert-py3k' in the source
4998 ;; distribution.
4999 (replace 'check
5000 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5001 (home-page
5002 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5003 (synopsis
5004 "Python screen-scraping library")
5005 (description
5006 "Beautiful Soup is a Python library designed for rapidly setting up
5007screen-scraping projects. It offers Pythonic idioms for navigating,
5008searching, and modifying a parse tree, providing a toolkit for
5009dissecting a document and extracting what you need. It automatically
5010converts incoming documents to Unicode and outgoing documents to UTF-8.")
5011 (license license:expat)
5012 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5013
5014(define-public python2-beautifulsoup4
5015 (package
5016 (inherit (package-with-python2
5017 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6
LF
5018 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
5019 (arguments `(#:python ,python-2))))
b32a1e47 5020
092e86f5
AE
5021(define-public python2-cssutils
5022 (package
5023 (name "python2-cssutils")
58d1d816 5024 (version "1.0.1")
092e86f5
AE
5025 (source
5026 (origin
5027 (method url-fetch)
58d1d816 5028 (uri (pypi-uri "cssutils" version))
092e86f5 5029 (sha256
58d1d816
EF
5030 (base32
5031 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5032 (build-system python-build-system)
5033 (native-inputs
5034 `(("python2-mock" ,python2-mock) ; for the tests
5035 ("unzip" ,unzip))) ; for unpacking the source
5036 (inputs
5037 `(("python2-setuptools" ,python2-setuptools)))
5038 (arguments
5039 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5040 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5041 ))
092e86f5
AE
5042 (home-page "http://cthedot.de/cssutils/")
5043 (synopsis
5044 "CSS Cascading Style Sheets library for Python")
5045 (description
5046 "Cssutils is a Python package for parsing and building CSS
5047Cascading Style Sheets. Currently it provides a DOM only and no rendering
5048options.")
3f641af0 5049 (license license:lgpl3+)))
880ff77c
AE
5050
5051(define-public python-cssselect
5052 (package
5053 (name "python-cssselect")
d5ccd9ab 5054 (version "0.9.2")
880ff77c
AE
5055 (source
5056 (origin
5057 (method url-fetch)
d5ccd9ab 5058 (uri (pypi-uri "cssselect" version))
880ff77c 5059 (sha256
d5ccd9ab
EF
5060 (base32
5061 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c
AE
5062 (build-system python-build-system)
5063 (inputs
5064 `(("python-setuptools" ,python-setuptools)))
5065 (arguments
5066 ;; tests fail with message
5067 ;; AttributeError: 'module' object has no attribute 'tests'
5068 `(#:tests? #f))
5069 (home-page
5070 "https://pythonhosted.org/cssselect/")
5071 (synopsis
5072 "CSS3 selector parser and translator to XPath 1.0")
5073 (description
5074 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5075them to XPath 1.0 expressions. Such expressions can be used in lxml or
5076another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5077 (license license:bsd-3)))
880ff77c
AE
5078
5079(define-public python2-cssselect
5080 (package-with-python2 python-cssselect))
60357f99
AE
5081
5082(define-public python-netifaces
5083 (package
5084 (name "python-netifaces")
5085 (version "0.10.4")
5086 (source
5087 (origin
5088 (method url-fetch)
5089 (uri (string-append
5090 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5091 version
5092 ".tar.gz"))
5093 (sha256
5094 (base32
5095 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5096 (build-system python-build-system)
5097 (inputs
5098 `(("python-setuptools" ,python-setuptools)))
5099 (home-page
5100 "https://bitbucket.org/al45tair/netifaces")
5101 (synopsis
5102 "Python module for portable network interface information")
5103 (description
5104 "Netifaces is a Python module providing information on network
5105interfaces in an easy and portable manner.")
5106 (license license:expat)))
5107
5108(define-public python2-netifaces
5109 (package-with-python2 python-netifaces))
92cb152b 5110
32f77c04
RW
5111(define-public python-networkx
5112 (package
5113 (name "python-networkx")
a4d9609c 5114 (version "1.11")
32f77c04
RW
5115 (source
5116 (origin
5117 (method url-fetch)
a4d9609c 5118 (uri (pypi-uri "networkx" version))
32f77c04 5119 (sha256
a4d9609c 5120 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5121 (build-system python-build-system)
5122 ;; python-decorator is needed at runtime
5123 (propagated-inputs
5124 `(("python-decorator" ,python-decorator)))
5125 (native-inputs
5126 `(("python-setuptools" ,python-setuptools)
5127 ("python-nose" ,python-nose)))
5128 (home-page "http://networkx.github.io/")
5129 (synopsis "Python module for creating and manipulating graphs and networks")
5130 (description
5131 "NetworkX is a Python package for the creation, manipulation, and study
5132of the structure, dynamics, and functions of complex networks.")
3f641af0 5133 (license license:bsd-3)))
32f77c04
RW
5134
5135(define-public python2-networkx
5136 (package-with-python2 python-networkx))
5137
92cb152b
RW
5138(define-public snakemake
5139 (package
5140 (name "snakemake")
5141 (version "3.2.1")
5142 (source
5143 (origin
5144 (method url-fetch)
5145 (uri (string-append
5146 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5147 version ".tar.gz"))
5148 (sha256
5149 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5150 (build-system python-build-system)
5151 (inputs `(("python-setuptools" ,python-setuptools)))
5152 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5153 (synopsis "Python-based execution environment for make-like workflows")
5154 (description
5155 "Snakemake aims to reduce the complexity of creating workflows by
5156providing a clean and modern domain specific specification language (DSL) in
5157Python style, together with a fast and comfortable execution environment.")
5158 (license license:expat)))
a1920bc9 5159
35de1fbd
RW
5160(define-public python-seaborn
5161 (package
5162 (name "python-seaborn")
fc899d4f 5163 (version "0.7.0")
35de1fbd
RW
5164 (source
5165 (origin
5166 (method url-fetch)
fc899d4f 5167 (uri (pypi-uri "seaborn" version))
35de1fbd 5168 (sha256
fc899d4f 5169 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5170 (build-system python-build-system)
5171 (propagated-inputs
5172 `(("python-pandas" ,python-pandas)
5173 ("python-matplotlib" ,python-matplotlib)
5174 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5175 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5176 (synopsis "Statistical data visualization")
5177 (description
5178 "Seaborn is a library for making attractive and informative statistical
5179graphics in Python. It is built on top of matplotlib and tightly integrated
5180with the PyData stack, including support for numpy and pandas data structures
5181and statistical routines from scipy and statsmodels.")
3f641af0 5182 (license license:bsd-3)
fc899d4f 5183 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5184
5185(define-public python2-seaborn
fc899d4f
EF
5186 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5187 (package
5188 (inherit base)
5189 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5190 ,@(package-propagated-inputs base)))
5191 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5192 ,@(package-native-inputs base))))))
35de1fbd 5193
90fc547f
RW
5194(define-public python-sympy
5195 (package
5196 (name "python-sympy")
5197 (version "0.7.6")
5198 (source
5199 (origin
5200 (method url-fetch)
5201 (uri (string-append
5202 "https://github.com/sympy/sympy/releases/download/sympy-"
5203 version "/sympy-" version ".tar.gz"))
5204 (sha256
5205 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5206 (build-system python-build-system)
5207 (native-inputs
5208 `(("python-setuptools" ,python-setuptools)))
5209 (home-page "http://www.sympy.org/")
5210 (synopsis "Python library for symbolic mathematics")
5211 (description
5212 "SymPy is a Python library for symbolic mathematics. It aims to become a
5213full-featured computer algebra system (CAS) while keeping the code as simple
5214as possible in order to be comprehensible and easily extensible.")
3f641af0 5215 (license license:bsd-3)))
90fc547f
RW
5216
5217(define-public python2-sympy
5218 (package-with-python2 python-sympy))
5219
e8c9b010
SR
5220(define-public python-q
5221 (package
5222 (name "python-q")
5223 (version "2.6")
5224 (source
5225 (origin
5226 (method url-fetch)
5227 (uri (pypi-uri "q" version))
5228 (sha256
5229 (base32
5230 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5231 (build-system python-build-system)
5232 (home-page "https://github.com/zestyping/q")
5233 (synopsis "Quick-and-dirty debugging output for tired programmers")
5234 (description
5235 "q is a Python module for \"print\" style of debugging Python code. It
5236provides convenient short API for print out of values, tracebacks, and
5237falling into the Python interpreter.")
5238 (license license:asl2.0)
5239 (properties `((python2-variant . ,(delay python2-q))))))
5240
5241(define-public python2-q
5242 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5243 (package
5244 (inherit base)
5245 (native-inputs
5246 `(("python2-setuptools" ,python2-setuptools)
5247 ,@(package-native-inputs base))))))
5248
a1920bc9
FB
5249(define-public python-testlib
5250 (package
5251 (name "python-testlib")
5252 (version "0.6.5")
5253 (source
5254 (origin
5255 (method url-fetch)
5256 (uri (string-append
5257 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5258 version ".zip"))
5259 (sha256
5260 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5261 (build-system python-build-system)
5262 (inputs
5263 `(("python-setuptools" ,python-setuptools)))
5264 (native-inputs
5265 `(("unzip" ,unzip)))
5266 (arguments
5267 `(#:phases
5268 (alist-replace
5269 'unpack
5270 (lambda* (#:key inputs outputs #:allow-other-keys)
5271 (let ((unzip (string-append (assoc-ref inputs "unzip")
5272 "/bin/unzip"))
5273 (source (assoc-ref inputs "source")))
5274 (and (zero? (system* unzip source))
5275 (chdir (string-append "testlib-" ,version)))))
5276 %standard-phases)))
5277 (synopsis "Python micro test suite harness")
5278 (description "A micro unittest suite harness for Python.")
5279 (home-page "https://github.com/trentm/testlib")
1cb9c006 5280 (license license:expat)))
a1920bc9
FB
5281
5282(define-public python2-testlib
5283 (package-with-python2 python-testlib))
db62afa5
LC
5284
5285(define-public python2-xlib
5286 (package
5287 (name "python2-xlib")
5288 (version "0.14")
5289 (source (origin
5290 (method url-fetch)
de67e922
LF
5291 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5292 "/" version "/"
db62afa5
LC
5293 "python-xlib-" version ".tar.gz"))
5294 (sha256
5295 (base32
5296 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5297 (build-system python-build-system)
5298 (arguments
5299 `(#:python ,python-2 ;Python 2 only
5300 #:tests? #f)) ;no tests
5301 (inputs
5302 `(("python-setuptools" ,python-setuptools)))
5303 (home-page "http://python-xlib.sourceforge.net/")
5304 (synopsis "Python X11 client library")
5305 (description
5306 "The Python X Library is intended to be a fully functional X client
5307library for Python programs. It is useful to implement low-level X clients.
5308It is written entirely in Python.")
3f641af0 5309 (license license:gpl2+)))
0234ca06
DT
5310
5311(define-public python-singledispatch
5312 (package
5313 (name "python-singledispatch")
5314 (version "3.4.0.3")
5315 (source
5316 (origin
5317 (method url-fetch)
bdb67d84 5318 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5319 (sha256
5320 (base32
5321 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5322 (build-system python-build-system)
5323 (native-inputs
5324 `(("python-setuptools" ,python-setuptools)))
bdb67d84 5325 (inputs
0234ca06
DT
5326 `(("python-six" ,python-six)))
5327 (home-page
5328 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5329 (synopsis "Backport of singledispatch feature from Python 3.4")
5330 (description
5331 "This library brings functools.singledispatch from Python 3.4 to Python
53322.6-3.3.")
5333 (license license:expat)))
5334
5335(define-public python2-singledispatch
5336 (package-with-python2 python-singledispatch))
feaae484 5337
310d218f
RW
5338(define-public python-tornado
5339 (package
5340 (name "python-tornado")
a724924b 5341 (version "4.3")
310d218f
RW
5342 (source
5343 (origin
5344 (method url-fetch)
a724924b 5345 (uri (pypi-uri "tornado" version))
310d218f 5346 (sha256
a724924b 5347 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5348 (build-system python-build-system)
310d218f 5349 (native-inputs
b455439b
EF
5350 `(("python-certifi" ,python-certifi)))
5351 (inputs
5352 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5353 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5354 (synopsis "Python web framework and asynchronous networking library")
5355 (description
5356 "Tornado is a Python web framework and asynchronous networking library,
5357originally developed at FriendFeed. By using non-blocking network I/O,
5358Tornado can scale to tens of thousands of open connections, making it ideal
5359for long polling, WebSockets, and other applications that require a long-lived
5360connection to each user.")
3f641af0 5361 (license license:asl2.0)
b455439b 5362 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5363
5364(define-public python2-tornado
b455439b 5365 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f
RW
5366 (package (inherit tornado)
5367 (inputs
5368 `(("python2-backport-ssl-match-hostname"
5369 ,python2-backport-ssl-match-hostname)
b455439b
EF
5370 ("python2-singledispatch" ,python2-singledispatch)
5371 ,@(package-inputs tornado)))
5372 (native-inputs
5373 `(("python2-setuptools" ,python2-setuptools)
5374 ,@(package-native-inputs tornado))))))
310d218f 5375
6b59fc10
EF
5376;; the python- version can be removed with python-3.5
5377(define-public python-backports-abc
5378 (package
5379 (name "python-backports-abc")
5380 (version "0.4")
5381 (source
5382 (origin
5383 (method url-fetch)
5384 (uri (pypi-uri "backports_abc" version))
5385 (sha256
5386 (base32
5387 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5388 (build-system python-build-system)
5389 (inputs
5390 `(("python-setuptools" ,python-setuptools)))
5391 (home-page "https://github.com/cython/backports_abc")
66e07664 5392 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5393 (description
5394 "Python-backports-abc provides a backport of additions to the
5395'collections.abc' module in Python-3.5.")
3f641af0 5396 (license license:psfl)))
6b59fc10
EF
5397
5398(define-public python2-backports-abc
5399 (package-with-python2 python-backports-abc))
5400
feaae484
SB
5401(define-public python-waf
5402 (package
5403 (name "python-waf")
7dd55dfe 5404 (version "1.9.5")
feaae484
SB
5405 (source (origin
5406 (method url-fetch)
bae67829 5407 (uri (string-append "https://waf.io/"
feaae484
SB
5408 "waf-" version ".tar.bz2"))
5409 (sha256
5410 (base32
7dd55dfe 5411 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5412 (build-system python-build-system)
5413 (arguments
5414 '(#:phases
5415 (modify-phases %standard-phases
5416 (replace 'build
7dd55dfe
EF
5417 (lambda _
5418 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5419 (replace 'check
7dd55dfe
EF
5420 (lambda _
5421 (zero? (system* "python" "waf" "--version"))))
feaae484 5422 (replace 'install
7dd55dfe
EF
5423 (lambda _
5424 (copy-file "waf" %output))))))
5425 (home-page "http://waf.io/")
feaae484
SB
5426 (synopsis "Python-based build system")
5427 (description
5428 "Waf is a Python-based framework for configuring, compiling and installing
5429applications.")
3f641af0 5430 (license license:bsd-3)))
feaae484
SB
5431
5432(define-public python2-waf
5433 (package-with-python2 python-waf))
45203542
RW
5434
5435(define-public python-pyzmq
5436 (package
5437 (name "python-pyzmq")
3655ee76 5438 (version "15.1.0")
45203542
RW
5439 (source
5440 (origin
5441 (method url-fetch)
3655ee76 5442 (uri (pypi-uri "pyzmq" version))
45203542 5443 (sha256
3655ee76 5444 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5445 (build-system python-build-system)
5446 (arguments
5447 `(#:configure-flags
5448 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5449 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5450 ;; --inplace' for 'python setup.py test' to work.
5451 #:tests? #f))
5452 (inputs
5453 `(("zeromq" ,zeromq)))
5454 (native-inputs
5455 `(("pkg-config" ,pkg-config)
5456 ("python-nose" ,python-nose)
5457 ("python-setuptools" ,python-setuptools)))
5458 (home-page "http://github.com/zeromq/pyzmq")
5459 (synopsis "Python bindings for 0MQ")
5460 (description
5461 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5462 (license license:bsd-4)))
45203542
RW
5463
5464(define-public python2-pyzmq
5465 (package-with-python2 python-pyzmq))
d889e6c4
CR
5466
5467(define-public python-pep8
5468 (package
5469 (name "python-pep8")
db251311 5470 (version "1.7.0")
d889e6c4
CR
5471 (source
5472 (origin
5473 (method url-fetch)
db251311 5474 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5475 (sha256
5476 (base32
db251311 5477 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4
CR
5478 (build-system python-build-system)
5479 (inputs
5480 `(("python-setuptools" ,python-setuptools)))
5481 (home-page "http://pep8.readthedocs.org/")
5482 (synopsis "Python style guide checker")
5483 (description
5484 "This tools checks Python code against some of the style conventions in
5485PEP 8.")
5486 (license license:expat)))
5487
5488(define-public python2-pep8
5489 (package-with-python2 python-pep8))
e31d7f44
CR
5490
5491(define-public python-pyflakes
5492 (package
5493 (name "python-pyflakes")
2abc3972 5494 (version "1.0.0")
e31d7f44
CR
5495 (source
5496 (origin
5497 (method url-fetch)
2abc3972 5498 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5499 (sha256
5500 (base32
2abc3972 5501 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5502 (build-system python-build-system)
5503 (inputs
5504 `(("python-setuptools" ,python-setuptools)))
5505 (home-page
5506 "https://github.com/pyflakes/pyflakes")
5507 (synopsis "Passive checker of Python programs")
5508 (description
5509 "Pyflakes statically checks Python source code for common errors.")
5510 (license license:expat)))
a59e017c 5511
7261d9eb
CR
5512(define-public python2-pyflakes
5513 (package-with-python2 python-pyflakes))
5514
a59e017c
CR
5515(define-public python-mccabe
5516 (package
5517 (name "python-mccabe")
c6ebd40d 5518 (version "0.4.0")
a59e017c
CR
5519 (source
5520 (origin
5521 (method url-fetch)
c6ebd40d 5522 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5523 (sha256
5524 (base32
c6ebd40d 5525 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c
CR
5526 (build-system python-build-system)
5527 (inputs
c6ebd40d
EF
5528 `(("python-pytest" ,python-pytest)
5529 ("python-pytest-runner" ,python-pytest-runner)
5530 ("python-setuptools" ,python-setuptools)))
a59e017c
CR
5531 (home-page "https://github.com/flintwork/mccabe")
5532 (synopsis "McCabe checker, plugin for flake8")
5533 (description
5534 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5535complexity of Python source code.")
7362371d 5536 (license license:expat)))
a59e017c
CR
5537
5538(define-public python2-mccabe
5539 (package-with-python2 python-mccabe))
e8df8f47 5540
7477fbb1
CR
5541(define-public python-mccabe-0.2.1
5542 (package (inherit python-mccabe)
5543 (version "0.2.1")
5544 (source
5545 (origin
5546 (method url-fetch)
5547 (uri (pypi-uri "mccabe" version))
5548 (sha256
5549 (base32
c6ebd40d 5550 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
b3546174 5551 (inputs `(("python-setuptools" ,python-setuptools)))))
7477fbb1
CR
5552
5553(define-public python2-mccabe-0.2.1
5554 (package-with-python2 python-mccabe-0.2.1))
5555
e8df8f47
CR
5556;; Flake8 2.4.1 requires an older version of pep8.
5557;; This should be removed ASAP.
5558(define-public python-pep8-1.5.7
5559 (package (inherit python-pep8)
5560 (version "1.5.7")
5561 (source
5562 (origin
5563 (method url-fetch)
5564 (uri (string-append
5565 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5566 version
5567 ".tar.gz"))
5568 (sha256
5569 (base32
5570 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5571
5572(define-public python2-pep8-1.5.7
5573 (package-with-python2 python-pep8-1.5.7))
5574
5575;; Flake8 2.4.1 requires an older version of pyflakes.
5576;; This should be removed ASAP.
5577(define-public python-pyflakes-0.8.1
5578 (package (inherit python-pyflakes)
5579 (version "0.8.1")
5580 (source
5581 (origin
5582 (method url-fetch)
5583 (uri (string-append
5584 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5585 version
5586 ".tar.gz"))
5587 (sha256
5588 (base32
5589 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5590
5591(define-public python2-pyflakes-0.8.1
7261d9eb 5592 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5593
5594(define-public python-flake8
5595 (package
5596 (name "python-flake8")
43789136 5597 (version "2.5.4")
e8df8f47
CR
5598 (source
5599 (origin
5600 (method url-fetch)
1b995533 5601 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5602 (sha256
5603 (base32
43789136 5604 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47
CR
5605 (build-system python-build-system)
5606 (inputs
5607 `(("python-setuptools" ,python-setuptools)
43789136
EF
5608 ("python-pep8" ,python-pep8)
5609 ("python-pyflakes" ,python-pyflakes)
e8df8f47
CR
5610 ("python-mccabe" ,python-mccabe)
5611 ("python-mock" ,python-mock)
5612 ("python-nose" ,python-nose)))
5613 (home-page "https://gitlab.com/pycqa/flake8")
5614 (synopsis
5615 "The modular source code checker: pep8, pyflakes and co")
5616 (description
5617 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5618 (license license:expat)))
5619
5620(define-public python2-flake8
5621 (package-with-python2 python-flake8))
61b9ac53 5622
abf21efc
CR
5623;; This will only be needed by the python-hacking package and will not be
5624;; necessary once python-hacking > 0.10.2 is released.
5625(define-public python-flake8-2.2.4
5626 (package (inherit python-flake8)
5627 (inputs
5628 `(("python-setuptools" ,python-setuptools)
5629 ("python-pep8" ,python-pep8-1.5.7)
5630 ("python-pyflakes" ,python-pyflakes-0.8.1)
5631 ("python-mccabe" ,python-mccabe-0.2.1)
5632 ("python-mock" ,python-mock)
5633 ("python-nose" ,python-nose)))
5634 (version "2.2.4")
5635 (source
5636 (origin
5637 (method url-fetch)
5638 (uri (pypi-uri "flake8" version))
5639 (sha256
5640 (base32
5641 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5642
5643(define-public python2-flake8-2.2.4
5644 (package-with-python2 python-flake8-2.2.4))
5645
61b9ac53
FB
5646(define-public python-mistune
5647 (package
5648 (name "python-mistune")
5649 (version "0.7")
5650 (source
5651 (origin
5652 (method url-fetch)
5653 (uri (string-append
5654 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5655 version
5656 ".tar.gz"))
5657 (sha256
5658 (base32
5659 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5660 (build-system python-build-system)
5661 (inputs
5662 `(("python-setuptools" ,python-setuptools)
5663 ("python-nose" ,python-nose)
5664 ("python-cython" ,python-cython)))
5665 (home-page "https://github.com/lepture/mistune")
5666 (synopsis "Markdown parser in pure Python")
5667 (description "This package provides a fast markdown parser in pure
5668Python.")
3f641af0 5669 (license license:bsd-3)))
61b9ac53
FB
5670
5671(define-public python2-mistune
5672 (package-with-python2 python-mistune))
6d992d07 5673
b9893908
EE
5674(define-public python-markdown
5675 (package
5676 (name "python-markdown")
5677 (version "2.6.5")
5678 (source
5679 (origin
5680 (method url-fetch)
5681 (uri (pypi-uri "Markdown" version))
5682 (sha256
5683 (base32
5684 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5685 (build-system python-build-system)
5686 (arguments
5687 `(#:phases
5688 (modify-phases %standard-phases
5689 (replace 'check
5690 (lambda _
5691 (zero? (system* "python" "run-tests.py")))))))
5692 (native-inputs
5693 `(("python-nose" ,python-nose)
5694 ("python-pyyaml" ,python-pyyaml)))
5695 (home-page "https://pythonhosted.org/Markdown/")
5696 (synopsis "Python implementation of Markdown")
5697 (description
5698 "This package provides a Python implementation of John Gruber's
5699Markdown. The library features international input, various Markdown
5700extensions, and several HTML output formats. A command line wrapper
5701markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5702 (license license:bsd-3)))
b9893908
EE
5703
5704(define-public python2-markdown
5705 (package-with-python2 python-markdown))
5706
6d992d07
FB
5707(define-public python-ptyprocess
5708 (package
5709 (name "python-ptyprocess")
5710 (version "0.5")
5711 (source
5712 (origin
5713 (method url-fetch)
5714 (uri (string-append
5715 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5716 version ".tar.gz"))
5717 (sha256
5718 (base32
5719 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5720 (build-system python-build-system)
5721 (inputs
5722 `(("python-setuptools" ,python-setuptools)
5723 ("python-nose" ,python-nose)))
5724 (arguments
5725 `(#:phases
5726 (modify-phases %standard-phases
5727 (replace 'check
5728 (lambda _
5729 (zero? (system* "nosetests")))))))
5730 (home-page "https://github.com/pexpect/ptyprocess")
5731 (synopsis "Run a subprocess in a pseudo terminal")
5732 (description
5733 "This package provides a Python library used to launch a subprocess in a
5734pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5735 (license license:isc)))
6d992d07
FB
5736
5737(define-public python2-ptyprocess
5738 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5739
5740(define-public python-terminado
5741 (package
5742 (name "python-terminado")
783fb0a3 5743 (version "0.6")
4aadb1df
FB
5744 (source
5745 (origin
5746 (method url-fetch)
783fb0a3 5747 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5748 (sha256
5749 (base32
783fb0a3 5750 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5751 (build-system python-build-system)
5752 (propagated-inputs
5753 `(("python-tornado" ,python-tornado)
5754 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5755 (native-inputs
5756 `(("python-nose" ,python-nose)))
4aadb1df
FB
5757 (arguments
5758 `(#:phases
5759 (modify-phases %standard-phases
5760 (replace 'check
5761 (lambda _
5762 (zero? (system* "nosetests")))))))
5763 (home-page "https://github.com/takluyver/terminado")
5764 (synopsis "Terminals served to term.js using Tornado websockets")
5765 (description "This package provides a Tornado websocket backend for the
5766term.js Javascript terminal emulator library.")
3f641af0 5767 (license license:bsd-2)
783fb0a3 5768 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5769
5770(define-public python2-terminado
783fb0a3 5771 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5772 (package (inherit terminado)
783fb0a3
EF
5773 (propagated-inputs
5774 `(("python2-backport-ssl-match-hostname"
5775 ,python2-backport-ssl-match-hostname)
5776 ,@(package-propagated-inputs terminado)))
5777 (native-inputs
5778 `(("python2-setuptools" ,python2-setuptools)
5779 ,@(package-native-inputs terminado))))))
5faa5ce4 5780
d582eaac
SB
5781(define-public python-fonttools
5782 (package
5783 (name "python-fonttools")
5784 (version "2.5")
5785 (source (origin
5786 (method url-fetch)
5787 (uri (string-append
5788 "https://pypi.python.org/packages/source/F/FontTools/"
5789 "fonttools-" version ".tar.gz"))
5790 (sha256
5791 (base32
5792 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5793 (build-system python-build-system)
5794 (arguments '(#:test-target "check"))
5795 (propagated-inputs
5796 ;; XXX: module not found if setuptools is not available.
5797 `(("python-setuptools" ,python-setuptools)))
5798 (home-page "http://github.com/behdad/fonttools")
5799 (synopsis "Tools to manipulate font files")
5800 (description
5801 "FontTools/TTX is a library to manipulate font files from Python. It
5802supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5803of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5804also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5805from an XML-based format.")
3f641af0
DC
5806 (license (license:non-copyleft
5807 "file://LICENSE.txt"
5808 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5809
5810(define-public python2-fonttools
5811 (package-with-python2 python-fonttools))
75710da6 5812
5faa5ce4
RW
5813(define-public python-ly
5814 (package
5815 (name "python-ly")
5135354f 5816 (version "0.9.4")
5faa5ce4
RW
5817 (source
5818 (origin
5819 (method url-fetch)
5135354f
RW
5820 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5821 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5822 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5823 (sha256
5824 (base32
5135354f 5825 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4
RW
5826 (build-system python-build-system)
5827 (native-inputs
5828 `(("python-setuptools" ,python-setuptools)))
5829 (synopsis "Tool and library for manipulating LilyPond files")
5830 (description "This package provides a Python library to parse, manipulate
5831or create documents in LilyPond format. A command line program ly is also
5832provided that can be used to do various manipulations with LilyPond files.")
5833 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5834 (license license:gpl2+)))
7e7b27d9
CR
5835
5836(define-public python-appdirs
5837 (package
5838 (name "python-appdirs")
5839 (version "1.4.0")
5840 (source
5841 (origin
5842 (method url-fetch)
5843 (uri (string-append
5844 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5845 version
5846 ".tar.gz"))
5847 (sha256
5848 (base32
5849 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5850 (build-system python-build-system)
5851 (inputs
5852 `(("python-setuptools" ,python-setuptools)))
5853 (home-page "http://github.com/ActiveState/appdirs")
5854 (synopsis
5855 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5856 (description
5857 "This module provides a portable way of finding out where user data
5858should be stored on various operating systems.")
5859 (license license:expat)))
5860
5861(define-public python2-appdirs
5862 (package-with-python2 python-appdirs))
89b2e0b0
LF
5863
5864(define-public python-llfuse
5865 (package
5866 (name "python-llfuse")
e36ace36 5867 (version "1.1.1")
89b2e0b0
LF
5868 (source (origin
5869 (method url-fetch)
5870 (uri (string-append
5871 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5872 "llfuse-" version ".tar.bz2"))
5873 (sha256
5874 (base32
e36ace36 5875 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
5876 (build-system python-build-system)
5877 (inputs
5878 `(("fuse" ,fuse)
5879 ("attr" ,attr)))
5880 (native-inputs
5881 `(("pkg-config" ,pkg-config)
5882 ("python-setuptools" ,python-setuptools)))
5883 (synopsis "Python bindings for FUSE")
5884 (description
5885 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5886 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 5887 (license license:lgpl2.0+)
cd0569c4 5888 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
5889
5890(define-public python2-llfuse
cd0569c4
LF
5891 (package (inherit (package-with-python2
5892 (strip-python2-variant python-llfuse)))
5893 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5894
5895;; For attic-0.16
5896(define-public python-llfuse-0.41
5897 (package (inherit python-llfuse)
229b3661 5898 (version "0.41.1")
cd0569c4
LF
5899 (source (origin
5900 (method url-fetch)
5901 (uri (string-append
5902 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5903 "llfuse-" version ".tar.bz2"))
5904 (sha256
5905 (base32
229b3661 5906 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
5907 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5908 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 5909 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
5910
5911(define-public python-msgpack
5912 (package
5913 (name "python-msgpack")
aed625bd 5914 (version "0.4.8")
641c9871
LF
5915 (source (origin
5916 (method url-fetch)
ae831df4 5917 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
5918 (sha256
5919 (base32
aed625bd 5920 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 5921 (build-system python-build-system)
641c9871
LF
5922 (synopsis "MessagePack (de)serializer")
5923 (description "MessagePack is a fast, compact binary serialization format,
5924suitable for similar data to JSON. This package provides CPython bindings for
5925reading and writing MessagePack data.")
5926 (home-page "https://pypi.python.org/pypi/msgpack-python/")
3f641af0 5927 (license license:asl2.0)
bd74be7b
LF
5928 (properties `((python2-variant . ,(delay python2-msgpack))))))
5929
5930(define-public python2-msgpack
5931 (package (inherit (package-with-python2
5932 (strip-python2-variant python-msgpack)))
5933 (native-inputs
5934 `(("python2-setuptools" ,python2-setuptools)))))
641c9871 5935
6e5e39f4
CR
5936(define-public python-netaddr
5937 (package
5938 (name "python-netaddr")
5939 (version "0.7.18")
5940 (source
5941 (origin
5942 (method url-fetch)
5943 (uri (string-append
5944 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5945 version
5946 ".tar.gz"))
5947 (sha256
5948 (base32
5949 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5950 (build-system python-build-system)
5951 (arguments `(#:tests? #f)) ;; No tests.
5952 (inputs
5953 `(("python-setuptools" ,python-setuptools)))
5954 (home-page "https://github.com/drkjam/netaddr/")
5955 (synopsis "Pythonic manipulation of network addresses")
5956 (description
5957 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5958and MAC network addresses.")
3f641af0 5959 (license license:bsd-3)))
6e5e39f4
CR
5960
5961(define-public python2-netaddr
5962 (package-with-python2 python-netaddr))
8c692a52
CR
5963
5964(define-public python-wrapt
5965 (package
5966 (name "python-wrapt")
5967 (version "1.10.5")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (string-append
5972 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5973 version
5974 ".tar.gz"))
5975 (sha256
5976 (base32
5977 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5978 (build-system python-build-system)
5979 (arguments
5980 ;; Tests are not included in the tarball, they are only available in the
5981 ;; git repository.
5982 `(#:tests? #f))
5983 (inputs
5984 `(("python-setuptools" ,python-setuptools)))
5985 (home-page "https://github.com/GrahamDumpleton/wrapt")
5986 (synopsis "Module for decorators, wrappers and monkey patching")
5987 (description
5988 "The aim of the wrapt module is to provide a transparent object proxy for
5989 Python, which can be used as the basis for the construction of function
5990 wrappers and decorator functions.")
3f641af0 5991 (license license:bsd-2)))
8c692a52
CR
5992
5993(define-public python2-wrapt
5994 (package-with-python2 python-wrapt))
b85c85be
CR
5995
5996(define-public python-iso8601
5997 (package
5998 (name "python-iso8601")
fe84bc9a 5999 (version "0.1.11")
b85c85be
CR
6000 (source
6001 (origin
6002 (method url-fetch)
fe84bc9a 6003 (uri (pypi-uri "iso8601" version))
b85c85be 6004 (sha256
fe84bc9a
EF
6005 (base32
6006 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be
CR
6007 (build-system python-build-system)
6008 (inputs
6009 `(("python-setuptools" ,python-setuptools)))
6010 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6011 (synopsis "Module to parse ISO 8601 dates")
6012 (description
6013 "This module parses the most common forms of ISO 8601 date strings (e.g.
6014@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6015 (license license:expat)))
6016
6017(define-public python2-iso8601
6018 (package-with-python2 python-iso8601))
5e412b63
CR
6019
6020(define-public python-monotonic
6021 (package
6022 (name "python-monotonic")
6023 (version "0.3")
6024 (source
6025 (origin
6026 (method url-fetch)
6027 (uri (string-append
6028 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6029 version
6030 ".tar.gz"))
6031 (sha256
6032 (base32
6033 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6034 (build-system python-build-system)
6035 (inputs
6036 `(("python-setuptools" ,python-setuptools)))
6037 (home-page "https://github.com/atdt/monotonic")
6038 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6039 (description
6040 "This module provides a monotonic() function which returns the value (in
6041fractional seconds) of a clock which never goes backwards.")
3f641af0 6042 (license license:asl2.0)))
5e412b63
CR
6043
6044(define-public python2-monotonic
6045 (package-with-python2 python-monotonic))
de34afac
CR
6046
6047(define-public python-webob
6048 (package
6049 (name "python-webob")
b8834c21 6050 (version "1.5.1")
de34afac
CR
6051 (source
6052 (origin
6053 (method url-fetch)
b8834c21 6054 (uri (pypi-uri "WebOb" version))
de34afac
CR
6055 (sha256
6056 (base32
b8834c21 6057 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
6058 (build-system python-build-system)
6059 (inputs
6060 `(("python-nose" ,python-nose)
6061 ("python-setuptools" ,python-setuptools)))
6062 (home-page "http://webob.org/")
6063 (synopsis "WSGI request and response object")
6064 (description
6065 "WebOb provides wrappers around the WSGI request environment, and an
6066object to help create WSGI responses.")
6067 (license license:expat)))
6068
6069(define-public python2-webob
6070 (package-with-python2 python-webob))
350ba0a3 6071
02a8a187
BW
6072(define-public python-xlrd
6073 (package
6074 (name "python-xlrd")
c2ad4d70 6075 (version "1.0.0")
02a8a187
BW
6076 (source (origin
6077 (method url-fetch)
e775f48e 6078 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6079 (sha256
6080 (base32
c2ad4d70 6081 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6082 (build-system python-build-system)
6083 (arguments
6084 `(#:phases
6085 (modify-phases %standard-phases
c2ad4d70 6086 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6087 ;; run tests instead for now.
6088 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6089 (native-inputs `(("python-nose" ,python-nose)
6090 ("python-setuptools" ,python-setuptools)))
6091 (home-page "http://www.python-excel.org/")
6092 (synopsis "Library for extracting data from Excel files")
6093 (description "This packages provides a library to extract data from
c598e35c 6094spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6095@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6096Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6097 (license license:bsd-3)))
02a8a187
BW
6098
6099(define-public python2-xlrd
6100 (package-with-python2 python-xlrd))
6101
350ba0a3
CR
6102(define-public python-prettytable
6103 (package
6104 (name "python-prettytable")
6105 (version "0.7.2")
6106 (source
6107 (origin
6108 (method url-fetch)
6109 (uri (string-append
6110 "https://pypi.python.org/packages/source/P/PrettyTable/"
6111 "prettytable-" version ".tar.bz2"))
6112 (sha256
6113 (base32
6114 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6115 (build-system python-build-system)
6116 (inputs
6117 `(("python-setuptools" ,python-setuptools)))
6118 (home-page "http://code.google.com/p/prettytable/")
6119 (synopsis "Display tabular data in an ASCII table format")
6120 (description
6121 "A library designed to represent tabular data in visually appealing ASCII
6122tables. PrettyTable allows for selection of which columns are to be printed,
6123independent alignment of columns (left or right justified or centred) and
6124printing of sub-tables by specifying a row range.")
3f641af0 6125 (license license:bsd-3)))
350ba0a3
CR
6126
6127(define-public python2-prettytable
6128 (package-with-python2 python-prettytable))
7a8ac75a 6129
9f8ee3fe
RW
6130(define-public python-tables
6131 (package
6132 (name "python-tables")
6133 (version "3.2.2")
6134 (source
6135 (origin
6136 (method url-fetch)
6137 (uri (pypi-uri "tables" version))
6138 (sha256
6139 (base32
6140 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6141 (build-system python-build-system)
6142 (arguments
6143 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6144 ;; or "check", so we must override the build and check phases.
6145 #:phases
6146 (modify-phases %standard-phases
6147 (add-after 'unpack 'use-gcc
6148 (lambda _
6149 (substitute* "setup.py"
6150 (("compiler = new_compiler\\(\\)" line)
6151 (string-append line
6152 "\ncompiler.set_executables(compiler='gcc',"
6153 "compiler_so='gcc',"
6154 "linker_exe='gcc',"
6155 "linker_so='gcc -shared')")))
6156 #t))
6157 (replace 'build
6158 (lambda* (#:key inputs #:allow-other-keys)
6159 (zero? (system* "python" "setup.py" "build"
6160 (string-append "--hdf5="
6161 (assoc-ref inputs "hdf5"))))))
6162 (replace 'check
6163 (lambda* (#:key inputs #:allow-other-keys)
6164 (zero? (system* "python" "setup.py" "check"
6165 (string-append "--hdf5="
6166 (assoc-ref inputs "hdf5")))))))))
6167 (propagated-inputs
6168 `(("python-numexpr" ,python-numexpr)
6169 ("python-numpy" ,python-numpy)))
6170 (native-inputs
6171 `(("python-setuptools" ,python-setuptools)
6172 ("python-cython" ,python-cython)
6173 ("pkg-config" ,pkg-config)))
6174 (inputs
6175 `(("hdf5" ,hdf5)
6176 ("bzip2" ,bzip2)
6177 ("zlib" ,zlib)))
6178 (home-page "http://www.pytables.org/")
6179 (synopsis "Hierarchical datasets for Python")
6180 (description "PyTables is a package for managing hierarchical datasets and
6181designed to efficently cope with extremely large amounts of data.")
3f641af0 6182 (license license:bsd-3)))
9f8ee3fe
RW
6183
6184(define-public python2-tables
6185 (package-with-python2 python-tables))
6186
7a8ac75a
RW
6187(define-public python-pyasn1
6188 (package
6189 (name "python-pyasn1")
caa0edb3 6190 (version "0.1.9")
7a8ac75a
RW
6191 (source
6192 (origin
6193 (method url-fetch)
caa0edb3 6194 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6195 (sha256
6196 (base32
caa0edb3 6197 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6198 (build-system python-build-system)
6199 (home-page "http://pyasn1.sourceforge.net/")
6200 (synopsis "ASN.1 types and codecs")
6201 (description
6202 "This is an implementation of ASN.1 types and codecs in Python. It is
6203suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6204 (license license:bsd-2)))
7a8ac75a
RW
6205
6206(define-public python2-pyasn1
6207 (package-with-python2 python-pyasn1))
9a49a535 6208
5988c299
EF
6209(define-public python-pyasn1-modules
6210 (package
6211 (name "python-pyasn1-modules")
6212 (version "0.0.8")
6213 (source
6214 (origin
6215 (method url-fetch)
6216 (uri (pypi-uri "pyasn1-modules" version))
6217 (sha256
6218 (base32
6219 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6220 (build-system python-build-system)
6221 (native-inputs
6222 `(("python-setuptools" ,python-setuptools)))
6223 (propagated-inputs
6224 `(("python-pyasn1" ,python-pyasn1)))
6225 (home-page "http://sourceforge.net/projects/pyasn1/")
6226 (synopsis "ASN.1 codec implementations")
6227 (description
6228 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6229implementations of ASN.1-based codecs and protocols.")
3f641af0 6230 (license license:bsd-3)))
5988c299
EF
6231
6232(define-public python2-pyasn1-modules
6233 (package-with-python2 python-pyasn1-modules))
6234
520af157 6235(define-public python-ipaddress
9a49a535 6236 (package
520af157
DC
6237 (name "python-ipaddress")
6238 (version "1.0.16")
6239 (source (origin
6240 (method url-fetch)
6241 (uri (pypi-uri "ipaddress" version))
6242 (sha256
6243 (base32
6244 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6245 (build-system python-build-system)
9a49a535
RW
6246 (home-page "https://github.com/phihag/ipaddress")
6247 (synopsis "IP address manipulation library")
6248 (description
520af157
DC
6249 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6250 in Python. This library is used to create, poke at, and manipulate IPv4 and
6251 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6252 module to older versions of Python.")
6253 (license license:psfl)
6254 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6255
6256(define-public python2-ipaddress
6257 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6258 (package (inherit base)
6259 (native-inputs
6260 `(("python2-setuptools" ,python2-setuptools)
6261 ,@(package-native-inputs base))))))
3f00e078 6262
4a238186
HG
6263(define-public python2-ipaddr
6264 (package
6265 (name "python2-ipaddr")
6266 (version "2.1.11")
6267 (source
6268 (origin
6269 (method url-fetch)
6270 (uri (pypi-uri "ipaddr" version))
6271 (sha256
6272 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6273 (build-system python-build-system)
6274 (arguments
6275 `(#:python ,python-2 ;version 2 only
6276 #:phases
6277 (modify-phases %standard-phases
6278 (replace 'check
6279 (lambda* _
6280 (zero? (system* "python" "ipaddr_test.py")))))))
6281 (home-page "https://github.com/google/ipaddr-py")
6282 (synopsis "IP address manipulation library")
6283 (description
6284 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6285IPv6 addresses and networks.
6286
6287For new implementations you may prefer to use the standard module
6288@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6289versions of Python.")
3f641af0 6290 (license license:asl2.0)))
4a238186 6291
3f00e078
RW
6292(define-public python-idna
6293 (package
6294 (name "python-idna")
6295 (version "2.0")
6296 (source
6297 (origin
6298 (method url-fetch)
6299 (uri (string-append "https://pypi.python.org/packages/source/i/"
6300 "idna/idna-" version ".tar.gz"))
6301 (sha256
6302 (base32
6303 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6304 (build-system python-build-system)
6305 (native-inputs
6306 `(("python-setuptools" ,python-setuptools)))
6307 (home-page "https://github.com/kjd/idna")
6308 (synopsis "Internationalized domain names in applications")
6309 (description
6310 "This is a library to support the Internationalised Domain Names in
6311Applications (IDNA) protocol as specified in RFC 5891. This version of the
6312protocol is often referred to as “IDNA2008” and can produce different results
6313from the earlier standard from 2003. The library is also intended to act as a
6314suitable drop-in replacement for the “encodings.idna” module that comes with
6315the Python standard library but currently only supports the older 2003
6316specification.")
3f641af0 6317 (license license:bsd-4)))
3f00e078
RW
6318
6319(define-public python2-idna
6320 (package-with-python2 python-idna))
36ebf972
RW
6321
6322(define-public python-pretend
6323 (package
6324 (name "python-pretend")
6325 (version "1.0.8")
6326 (source
6327 (origin
6328 (method url-fetch)
6329 (uri (string-append "https://pypi.python.org/packages/source/p/"
6330 "pretend/pretend-" version ".tar.gz"))
6331 (sha256
6332 (base32
6333 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6334 (build-system python-build-system)
6335 (native-inputs
6336 `(("python-setuptools" ,python-setuptools)))
6337 (home-page "https://github.com/alex/pretend")
6338 (synopsis "Library for stubbing in Python")
6339 (description
6340 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6341technique for writing tests. You may hear the term mixed up with mocks,
6342fakes, or doubles. Basically, a stub is an object that returns pre-canned
6343responses, rather than doing any computation.")
3f641af0 6344 (license license:bsd-3)))
36ebf972
RW
6345
6346(define-public python2-pretend
6347 (package-with-python2 python-pretend))
aa759a51
RW
6348
6349(define-public python-cryptography-vectors
6350 (package
6351 (name "python-cryptography-vectors")
9c509ca9 6352 (version "1.3.4")
aa759a51
RW
6353 (source
6354 (origin
6355 (method url-fetch)
9c509ca9 6356 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6357 (sha256
6358 (base32
9c509ca9 6359 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
aa759a51
RW
6360 (build-system python-build-system)
6361 (native-inputs
6362 `(("python-setuptools" ,python-setuptools)))
6363 (home-page "https://github.com/pyca/cryptography")
66e07664 6364 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6365 (description
6366 "This package contains test vectors for the cryptography package.")
6367 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6368 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6369
6370(define-public python2-cryptography-vectors
6371 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6372
6373(define-public python-cryptography
6374 (package
6375 (name "python-cryptography")
9c509ca9 6376 (version "1.3.4")
88b47cb0
RW
6377 (source
6378 (origin
6379 (method url-fetch)
9c509ca9 6380 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6381 (sha256
6382 (base32
9c509ca9 6383 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
88b47cb0
RW
6384 (build-system python-build-system)
6385 (inputs
6386 `(("openssl" ,openssl)))
6387 (propagated-inputs
6388 `(("python-cffi" ,python-cffi)
6389 ("python-six" ,python-six)
6390 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6391 ("python-idna" ,python-idna)
6392 ("python-iso8601" ,python-iso8601)))
6393 (native-inputs
6394 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6395 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
6396 ("python-setuptools" ,python-setuptools)
6397 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6398 ("python-pyasn1" ,python-pyasn1)
6399 ("python-pyasn1-modules" ,python-pyasn1-modules)
88b47cb0
RW
6400 ("python-pytest" ,python-pytest)))
6401 (home-page "https://github.com/pyca/cryptography")
6402 (synopsis "Cryptographic recipes and primitives for Python")
6403 (description
6404 "cryptography is a package which provides cryptographic recipes and
6405primitives to Python developers. It aims to be the “cryptographic standard
6406library” for Python. The package includes both high level recipes, and low
6407level interfaces to common cryptographic algorithms such as symmetric ciphers,
6408message digests and key derivation functions.")
6409 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6410 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6411 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6412
6413(define-public python2-cryptography
519e2f4f
LF
6414 (let ((crypto (package-with-python2
6415 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6416 (package (inherit crypto)
6417 (propagated-inputs
6418 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6419 ("python2-backport-ssl-match-hostname"
6420 ,python2-backport-ssl-match-hostname)
68f1cdec 6421 ("python2-enum34" ,python2-enum34)
88b47cb0 6422 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6423
6424(define-public python-pyopenssl
6425 (package
6426 (name "python-pyopenssl")
eb68d268 6427 (version "16.1.0")
5af999b8
RW
6428 (source
6429 (origin
6430 (method url-fetch)
eb68d268 6431 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6432 (sha256
6433 (base32
eb68d268 6434 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
5af999b8 6435 (build-system python-build-system)
5af999b8
RW
6436 (propagated-inputs
6437 `(("python-cryptography" ,python-cryptography)
6438 ("python-six" ,python-six)))
6439 (inputs
6440 `(("openssl" ,openssl)))
6441 (native-inputs
6442 `(("python-setuptools" ,python-setuptools)))
6443 (home-page "https://github.com/pyca/pyopenssl")
6444 (synopsis "Python wrapper module around the OpenSSL library")
6445 (description
6446 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6447library.")
3f641af0 6448 (license license:asl2.0)))
5af999b8
RW
6449
6450(define-public python2-pyopenssl
519e2f4f 6451 (package-with-python2 python-pyopenssl))
643725a1
CR
6452
6453(define-public python-pip
6454 (package
6455 (name "python-pip")
6fb54e3b 6456 (version "8.0.2")
643725a1
CR
6457 (source
6458 (origin
6459 (method url-fetch)
6fb54e3b 6460 (uri (pypi-uri "pip" version))
643725a1
CR
6461 (sha256
6462 (base32
6fb54e3b 6463 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6464 (build-system python-build-system)
6465 (inputs
6466 `(("python-setuptools" ,python-setuptools)
6467 ("python-virtualenv" ,python-virtualenv)
6468 ;; Tests
6469 ("python-mock" ,python-mock)
6470 ("python-pytest" ,python-pytest)
6471 ("python-scripttest" ,python-scripttest)))
6472 (home-page "https://pip.pypa.io/")
6473 (synopsis
6474 "Package manager for Python software")
6475 (description
6476 "Pip is a package manager for Python software, that finds packages on the
6477Python Package Index (PyPI).")
6478 (license license:expat)))
6479
6480(define-public python2-pip
6481 (package-with-python2 python-pip))
d8c4998f
LC
6482
6483(define-public python-tlsh
6484 (package
6485 (name "python-tlsh")
99b00dc7 6486 (version "3.4.4")
d8c4998f
LC
6487 (home-page "https://github.com/trendmicro/tlsh")
6488 (source (origin
99b00dc7
EF
6489 (method url-fetch)
6490 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6491 version ".tar.gz"))
d8c4998f
LC
6492 (sha256
6493 (base32
99b00dc7
EF
6494 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6495 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6496 (build-system cmake-build-system)
6497 (arguments
6498 '(#:out-of-source? #f
6499 #:phases (modify-phases %standard-phases
6500 (replace
6501 'install
6502 (lambda* (#:key outputs #:allow-other-keys)
6503 ;; Build and install the Python bindings. The underlying
6504 ;; C++ library is apparently not meant to be installed.
6505 (let ((out (assoc-ref outputs "out")))
6506 (with-directory-excursion "py_ext"
6507 (and (system* "python" "setup.py" "build")
6508 (system* "python" "setup.py" "install"
6509 (string-append "--prefix=" out))))))))))
6510 (inputs `(("python" ,python-wrapper))) ;for the bindings
6511 (synopsis "Fuzzy matching library for Python")
6512 (description
6513 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6514Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6515value which can be used for similarity comparisons. Similar objects have
6516similar hash values, which allows for the detection of similar objects by
6517comparing their hash values. The byte stream should have a sufficient amount
6518of complexity; for example, a byte stream of identical bytes will not generate
6519a hash value.")
3f641af0 6520 (license license:asl2.0)))
d8c4998f
LC
6521
6522(define-public python2-tlsh
6523 (package
6524 (inherit python-tlsh)
6525 (name "python2-tlsh")
6526 (inputs `(("python" ,python-2)))))
d96034ed 6527
67f66812
BW
6528(define-public python-termcolor
6529 (package
6530 (name "python-termcolor")
6531 (version "1.1.0")
6532 (source
6533 (origin
6534 (method url-fetch)
6535 (uri (pypi-uri "python-termcolor" version))
6536 (sha256
6537 (base32
6538 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6539 (build-system python-build-system)
6540 (arguments
6541 ;; There are no tests.
6542 `(#:tests? #f))
6543 (home-page "http://pypi.python.org/pypi/termcolor")
6544 (synopsis "ANSII Color formatting for terminal output")
6545 (description
6546 "This package provides ANSII Color formatting for output in terminals.")
6547 (license license:expat)))
6548
6549(define-public python2-termcolor
6550 (package-with-python2 python-termcolor))
6551
d96034ed
LC
6552(define-public python-libarchive-c
6553 (package
6554 (name "python-libarchive-c")
03fd001c 6555 (version "2.2")
d96034ed
LC
6556 (source (origin
6557 (method url-fetch)
03fd001c 6558 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6559 (sha256
6560 (base32
03fd001c 6561 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6562 (build-system python-build-system)
6563 (arguments
6564 '(#:phases (modify-phases %standard-phases
6565 (add-before
6566 'build 'reference-libarchive
6567 (lambda* (#:key inputs #:allow-other-keys)
6568 ;; Retain the absolute file name of libarchive.so.
6569 (let ((libarchive (assoc-ref inputs "libarchive")))
6570 (substitute* "libarchive/ffi.py"
6571 (("find_library\\('archive'\\)")
6572 (string-append "'" libarchive
6573 "/lib/libarchive.so'"))))
6574
6575 ;; Do not make a compressed egg (see
6576 ;; <http://bugs.gnu.org/20765>).
6577 (let ((port (open-file "setup.cfg" "a")))
6578 (display "\n[easy_install]\nzip_ok = 0\n"
6579 port)
6580 (close-port port)
6581 #t))))))
6582 (inputs
6583 `(("python-setuptools" ,python-setuptools)
6584 ("libarchive" ,libarchive)))
6585 (home-page "https://github.com/Changaco/python-libarchive-c")
6586 (synopsis "Python interface to libarchive")
6587 (description
6588 "This package provides Python bindings to libarchive, a C library to
6589access possibly compressed archives in many different formats. It uses
6590Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6591 (license license:lgpl2.0+)))
d96034ed
LC
6592
6593(define-public python2-libarchive-c
6594 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6595
6596(define-public python-file
6597 (package
6598 (inherit file)
6599 (name "python-file")
6600 (build-system python-build-system)
6601 (arguments
6602 '(#:tests? #f ;no tests
6603 #:phases (modify-phases %standard-phases
6604 (add-before 'build 'change-directory
6605 (lambda _
6606 (chdir "python")
6607 #t))
6608 (add-before 'build 'set-library-file-name
6609 (lambda* (#:key inputs #:allow-other-keys)
6610 (let ((file (assoc-ref inputs "file")))
6611 (substitute* "magic.py"
6612 (("find_library\\('magic'\\)")
6613 (string-append "'" file "/lib/libmagic.so'")))
6614 #t))))))
6615 (inputs `(("file" ,file)))
6616 (self-native-input? #f)
daeeea71
CM
6617 (synopsis "Python bindings to the libmagic file type guesser. Note that
6618this module and the python-magic module both provide a \"magic.py\" file;
6619these two modules, which are different and were developed separately, both
6620serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6621
6622(define-public python2-file
6623 (package-with-python2 python-file))
85d4aeac
LC
6624
6625(define-public python-debian
6626 (package
6627 (name "python-debian")
6628 (version "0.1.23")
6629 (source
6630 (origin
6631 (method url-fetch)
6632 (uri (string-append
6633 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6634 version ".tar.gz"))
6635 (sha256
6636 (base32
6637 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6638 (build-system python-build-system)
6639 (inputs
6640 `(("python-six" ,python-six)))
6641 (native-inputs
6642 `(("python-setuptools" ,python-setuptools)))
6643 (home-page "http://packages.debian.org/sid/python-debian")
6644 (synopsis "Debian package related modules")
6645 (description
5c7bdc9a
LC
6646 ;; XXX: Use @enumerate instead of @itemize to work around
6647 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6648 "This package provides Python modules that abstract many formats of
6649Debian-related files, such as:
6650
5c7bdc9a 6651@enumerate
85d4aeac
LC
6652@item Debtags information;
6653@item @file{debian/changelog} files;
6654@item packages files, pdiffs;
6655@item control files of single or multiple RFC822-style paragraphs---e.g.
6656 @file{debian/control}, @file{.changes}, @file{.dsc};
6657@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6658 contained files and meta-information.
5c7bdc9a 6659@end enumerate\n")
85d4aeac
LC
6660
6661 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6662 (license license:gpl3+)))
85d4aeac
LC
6663
6664(define-public python2-debian
6665 (package-with-python2 python-debian))
816a6538 6666
2d321bb2
RW
6667(define-public python-nbformat
6668 (package
6669 (name "python-nbformat")
6670 (version "4.1.0")
6671 (source
6672 (origin
6673 (method url-fetch)
6674 (uri (pypi-uri "nbformat" version))
6675 (sha256
6676 (base32
6677 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6678 (build-system python-build-system)
6679 (arguments `(#:tests? #f)) ; no test target
6680 (propagated-inputs
6681 `(("python-ipython-genutils" ,python-ipython-genutils)
6682 ("python-jsonschema" ,python-jsonschema)
6683 ("python-jupyter-core" ,python-jupyter-core)
6684 ("python-traitlets" ,python-traitlets)))
6685 (native-inputs
6686 `(("python-setuptools" ,python-setuptools)))
6687 (home-page "http://jupyter.org")
6688 (synopsis "Jupyter Notebook format")
6689 (description "This package provides the reference implementation of the
6690Jupyter Notebook format and Python APIs for working with notebooks.")
6691 (license license:bsd-3)))
6692
6693(define-public python2-nbformat
6694 (package-with-python2 python-nbformat))
6695
55436048
RW
6696(define-public python-bleach
6697 (package
6698 (name "python-bleach")
6699 (version "1.4.3")
6700 (source
6701 (origin
6702 (method url-fetch)
6703 (uri (pypi-uri "bleach" version))
6704 (sha256
6705 (base32
6706 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6707 (build-system python-build-system)
6708 (propagated-inputs
6709 `(("python-html5lib" ,python-html5lib-0.9)
6710 ("python-setuptools" ,python-setuptools)
6711 ("python-six" ,python-six)))
6712 (native-inputs
6713 `(("python-nose" ,python-nose)))
6714 (home-page "http://github.com/jsocol/bleach")
6715 (synopsis "Whitelist-based HTML-sanitizing tool")
6716 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6717 (license license:asl2.0)))
6718
6719(define-public python2-bleach
6720 (package-with-python2 python-bleach))
6721
60590a3a
RW
6722(define-public python-entrypoints
6723 (package
6724 (name "python-entrypoints")
6725 (version "0.2.2")
6726 (source
6727 (origin
6728 (method url-fetch)
6729 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6730 version ".tar.gz"))
6731 (file-name (string-append name "-" version ".tar.gz"))
6732 (sha256
6733 (base32
6734 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6735 (build-system python-build-system)
6736 ;; The package does not come with a setup.py file, so we have to generate
6737 ;; one ourselves.
6738 (arguments
6739 `(#:tests? #f
6740 #:phases
6741 (modify-phases %standard-phases
6742 (add-after 'unpack 'create-setup.py
6743 (lambda _
6744 (call-with-output-file "setup.py"
6745 (lambda (port)
6746 (format port "\
6747from setuptools import setup
6748setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6749" ,version))))))))
6750 (home-page "https://github.com/takluyver/entrypoints")
6751 (synopsis "Discover and load entry points from installed Python packages")
6752 (description "Entry points are a way for Python packages to advertise
6753objects with some common interface. The most common examples are
6754@code{console_scripts} entry points, which define shell commands by
6755identifying a Python function to run. The @code{entrypoints} module contains
6756functions to find and load entry points.")
6757 (license license:expat)))
6758
6759(define-public python2-entrypoints
6760 (package-with-python2 python-entrypoints))
6761
c60898a8
RW
6762(define-public python-nbconvert
6763 (package
6764 (name "python-nbconvert")
6765 (version "5.0.0b1")
6766 (source
6767 (origin
6768 (method url-fetch)
6769 (uri (pypi-uri "nbconvert" version))
6770 (sha256
6771 (base32
6772 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6773 (build-system python-build-system)
6774 ;; The "bdist_egg" target is disabled by default, causing the installation
6775 ;; to fail.
6776 (arguments `(#:configure-flags (list "bdist_egg")))
6777 (propagated-inputs
6778 `(("python-bleach" ,python-bleach)
6779 ("python-entrypoints" ,python-entrypoints)
6780 ("python-jinja2" ,python-jinja2)
6781 ("python-jupyter-core" ,python-jupyter-core)
6782 ("python-mistune" ,python-mistune)
6783 ("python-nbformat" ,python-nbformat)
6784 ("python-pygments" ,python-pygments)
6785 ("python-setuptools" ,python-setuptools)
6786 ("python-traitlets" ,python-traitlets)))
6787 (home-page "http://jupyter.org")
6788 (synopsis "Converting Jupyter Notebooks")
6789 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6790notebooks to various other formats via Jinja templates. It allows you to
6791convert an @code{.ipynb} notebook file into various static formats including:
6792
6793@enumerate
6794@item HTML
6795@item LaTeX
6796@item PDF
6797@item Reveal JS
6798@item Markdown (md)
6799@item ReStructured Text (rst)
6800@item executable script
6801@end enumerate\n")
6802 (license license:bsd-3)))
6803
6804(define-public python2-nbconvert
6805 (package-with-python2 python-nbconvert))
6806
a0d62280
RW
6807(define-public python-notebook
6808 (package
6809 (name "python-notebook")
6810 (version "4.2.3")
6811 (source (origin
6812 (method url-fetch)
6813 (uri (pypi-uri "notebook" version))
6814 (sha256
6815 (base32
6816 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6817 (build-system python-build-system)
6818 (arguments
6819 `(#:phases
6820 (modify-phases %standard-phases
6821 (replace 'check
6822 (lambda _
6823 ;; HOME must be set for tests
6824 (setenv "HOME" "/tmp")
6825 (zero? (system* "nosetests")))))))
6826 (propagated-inputs
6827 `(("python-jupyter-core" ,python-jupyter-core)
6828 ("python-nbformat" ,python-nbformat)
6829 ("python-nbconvert" ,python-nbconvert)
6830 ("python-ipython" ,python-ipython)))
6831 (native-inputs
6832 `(("python-nose" ,python-nose)
6833 ("python-sphinx" ,python-sphinx)
6834 ("python-requests" ,python-requests)))
6835 (home-page "http://jupyter.org/")
6836 (synopsis "Web-based notebook environment for interactive computing")
6837 (description
6838 "The Jupyter HTML notebook is a web-based notebook environment for
6839interactive computing.")
6840 (license license:bsd-3)))
6841
6842(define-public python2-notebook
6843 (package-with-python2 python-notebook))
6844
d55724ed
RW
6845(define-public python-widgetsnbextension
6846 (package
6847 (name "python-widgetsnbextension")
6848 (version "1.2.6")
6849 (source
6850 (origin
6851 (method url-fetch)
6852 (uri (pypi-uri "widgetsnbextension" version))
6853 (sha256
6854 (base32
6855 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6856 (build-system python-build-system)
6857 (propagated-inputs
6858 `(("python-notebook" ,python-notebook)))
6859 (native-inputs
6860 `(("python-nose" ,python-nose)
6861 ("python-setuptools" ,python-setuptools)))
6862 (home-page "http://ipython.org")
6863 (synopsis "IPython HTML widgets for Jupyter")
6864 (description "This package provides interactive HTML widgets for Jupyter
6865notebooks.")
6866 (license license:bsd-3)))
6867
6868(define-public python2-widgetsnbextension
6869 (package-with-python2 python-widgetsnbextension))
6870
816a6538
LC
6871(define-public python-chardet
6872 (package
6873 (name "python-chardet")
6874 (version "2.3.0")
6875 (source
6876 (origin
6877 (method url-fetch)
6878 (uri (string-append
6879 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6880 version
6881 ".tar.gz"))
6882 (sha256
6883 (base32
6884 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6885 (build-system python-build-system)
6886 (native-inputs
6887 `(("python-setuptools" ,python-setuptools)))
6888 (home-page "https://github.com/chardet/chardet")
6889 (synopsis "Universal encoding detector for Python 2 and 3")
6890 (description
6891 "This package provides @code{chardet}, a Python module that can
6892automatically detect a wide range of file encodings.")
3f641af0 6893 (license license:lgpl2.1+)))
816a6538
LC
6894
6895(define-public python2-chardet
6896 (package-with-python2 python-chardet))
2fc5f186 6897
1872f1bb
KM
6898(define-public python-docopt
6899 (package
6900 (name "python-docopt")
6901 (version "0.6.2")
6902 (source
6903 (origin
6904 (method url-fetch)
6905 ;; The release on PyPI does not include tests.
6906 (uri (string-append
6907 "https://github.com/docopt/docopt/archive/"
6908 version ".tar.gz"))
6909 (file-name (string-append name "-" version ".tar.gz"))
6910 (sha256
6911 (base32
6912 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6913 (build-system python-build-system)
6914 (native-inputs
6915 `(("python-pytest" ,python-pytest)
6916 ("python-setuptools" ,python-setuptools)))
6917 (arguments
6918 `(#:phases (alist-replace
6919 'check
6920 (lambda _ (zero? (system* "py.test")))
6921 %standard-phases)))
6922 (home-page "http://docopt.org")
6923 (synopsis "Command-line interface description language for Python")
6924 (description "This library allows the user to define a command-line
6925interface from a program's help message rather than specifying it
6926programatically with command-line parsers like @code{getopt} and
6927@code{argparse}.")
6928 (license license:expat)))
6929
6930(define-public python2-docopt
6931 (package-with-python2 python-docopt))
6932
2fc5f186
LF
6933(define-public python-zope-event
6934 (package
6935 (name "python-zope-event")
6936 (version "4.1.0")
6937 (source
6938 (origin
6939 (method url-fetch)
6940 (uri (string-append "https://pypi.python.org/packages/source/z"
6941 "/zope.event/zope.event-" version ".tar.gz"))
6942 (sha256
6943 (base32
6944 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6945 (build-system python-build-system)
6946 (inputs
6947 `(("python-setuptools" ,python-setuptools)))
6948 (home-page "http://pypi.python.org/pypi/zope.event")
6949 (synopsis "Event publishing system for Python")
6950 (description "Zope.event provides an event publishing API, intended for
6951use by applications which are unaware of any subscribers to their events. It
6952is a simple event-dispatching system on which more sophisticated event
6953dispatching systems can be built.")
3f641af0 6954 (license license:zpl2.1)))
2fc5f186
LF
6955
6956(define-public python2-zope-event
6957 (package-with-python2 python-zope-event))
97abe268
LF
6958
6959(define-public python-zope-interface
6960 (package
6961 (name "python-zope-interface")
6962 (version "4.1.3")
6963 (source
6964 (origin
6965 (method url-fetch)
6966 (uri (string-append "https://pypi.python.org/packages/source/z"
6967 "/zope.interface/zope.interface-" version ".tar.gz"))
6968 (sha256
6969 (base32
6970 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6971 (build-system python-build-system)
6972 (propagated-inputs
6973 `(("python-zope-event" ,python-zope-event)))
6974 (home-page "https://github.com/zopefoundation/zope.interface")
6975 (synopsis "Python implementation of the \"design by contract\"
6976methodology")
6977 (description "Zope.interface provides an implementation of \"object
6978interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6979conforming to a given API or contract.")
3f641af0 6980 (license license:zpl2.1)))
97abe268
LF
6981
6982(define-public python2-zope-interface
6983 (package-with-python2 python-zope-interface))
81f2373c
LF
6984
6985(define-public python-zope-exceptions
6986 (package
6987 (name "python-zope-exceptions")
6988 (version "4.0.8")
6989 (source
6990 (origin
6991 (method url-fetch)
6992 (uri (string-append "https://pypi.python.org/packages/source/z"
6993 "/zope.exceptions/zope.exceptions-"
6994 version ".tar.gz"))
6995 (sha256
6996 (base32
6997 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6998 (build-system python-build-system)
6999 (arguments
7000 '(#:tests? #f)) ; circular dependency with zope.testrunner
7001 (propagated-inputs
7002 `(("python-zope-interface" ,python-zope-interface)))
7003 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7004 (synopsis "Zope exceptions")
7005 (description "Zope.exceptions provides general-purpose exception types
7006that have uses outside of the Zope framework.")
3f641af0 7007 (license license:zpl2.1)))
81f2373c
LF
7008
7009(define-public python2-zope-exceptions
7010 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7011
7012(define-public python-zope-testing
7013 (package
7014 (name "python-zope-testing")
7015 (version "4.5.0")
7016 (source
7017 (origin
7018 (method url-fetch)
7019 (uri (string-append "https://pypi.python.org/packages/source/z"
7020 "/zope.testing/zope.testing-" version ".tar.gz"))
7021 (sha256
7022 (base32
b02f7a21
HG
7023 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7024 (modules '((guix build utils)))
7025 (snippet
7026 '(begin
7027 ;; Remove pre-compiled .pyc files backup files from source.
7028 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7029 #t))))
900e3c0e
LF
7030 (build-system python-build-system)
7031 (native-inputs
7032 `(("python-zope-exceptions" ,python-zope-exceptions)))
7033 (propagated-inputs
7034 `(("python-zope-interface" ,python-zope-interface)))
7035 (home-page "http://pypi.python.org/pypi/zope.testing")
7036 (synopsis "Zope testing helpers")
7037 (description "Zope.testing provides a number of testing utilities for HTML
7038forms, HTTP servers, regular expressions, and more.")
3f641af0 7039 (license license:zpl2.1)))
900e3c0e
LF
7040
7041(define-public python2-zope-testing
7042 (package-with-python2 python-zope-testing))
01614c4f
LF
7043
7044(define-public python-zope-testrunner
7045 (package
7046 (name "python-zope-testrunner")
7047 (version "4.4.9")
7048 (source
7049 (origin
7050 (method url-fetch)
7051 (uri (string-append "https://pypi.python.org/packages/source/z"
7052 "/zope.testrunner/zope.testrunner-"
7053 version ".zip"))
7054 (sha256
7055 (base32
7056 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7057 (build-system python-build-system)
7058 (native-inputs
7059 `(("python-six" ,python-six)
7060 ("python-zope-exceptions" ,python-zope-exceptions)
7061 ("python-zope-testing" ,python-zope-testing)
7062 ("unzip" ,unzip)))
7063 (propagated-inputs
7064 `(("python-zope-interface" ,python-zope-interface)))
7065 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7066 (synopsis "Zope testrunner script")
7067 (description "Zope.testrunner provides a script for running Python
7068tests.")
3f641af0 7069 (license license:zpl2.1)))
01614c4f
LF
7070
7071(define-public python2-zope-testrunner
7072 (let ((base (package-with-python2 python-zope-testrunner)))
7073 (package
7074 (inherit base)
7075 (native-inputs
7076 (append (package-native-inputs base)
7077 `(("python2-subunit" ,python2-subunit)
7078 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7079
7080(define-public python-zope-i18nmessageid
7081 (package
7082 (name "python-zope-i18nmessageid")
7083 (version "4.0.3")
7084 (source
7085 (origin
7086 (method url-fetch)
7087 (uri (string-append
7088 "https://pypi.python.org/packages/source/z"
7089 "/zope.i18nmessageid/zope.i18nmessageid-"
7090 version ".tar.gz"))
7091 (sha256
7092 (base32
7093 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7094 (build-system python-build-system)
7095 (inputs
7096 `(("python-setuptools" ,python-setuptools)))
7097 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7098 (synopsis "Message identifiers for internationalization")
7099 (description "Zope.i18nmessageid provides facilities for declaring
7100internationalized messages within program source text.")
3f641af0 7101 (license license:zpl2.1)))
6a5c710c
LF
7102
7103(define-public python2-zope-i18nmessageid
7104 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7105
7106(define-public python-zope-schema
7107 (package
7108 (name "python-zope-schema")
7109 (version "4.4.2")
7110 (source
7111 (origin
7112 (method url-fetch)
7113 (uri (string-append "https://pypi.python.org/packages/source/z"
7114 "/zope.schema/zope.schema-" version ".tar.gz"))
7115 (sha256
7116 (base32
7117 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7118 (build-system python-build-system)
7119 (propagated-inputs
7120 `(("python-zope-event" ,python-zope-event)
7121 ("python-zope-interface" ,python-zope-interface)))
7122 (native-inputs
7123 `(("python-zope-testing" ,python-zope-testing)))
7124 (home-page "http://pypi.python.org/pypi/zope.schema")
7125 (synopsis "Zope data schemas")
7126 (description "Zope.scheme provides extensions to zope.interface for
7127defining data schemas.")
3f641af0 7128 (license license:zpl2.1)))
71fb09f3
LF
7129
7130(define-public python2-zope-schema
7131 (package-with-python2 python-zope-schema))
fbac9b17
LF
7132
7133(define-public python-zope-configuration
7134 (package
7135 (name "python-zope-configuration")
7136 (version "4.0.3")
7137 (source (origin
7138 (method url-fetch)
7139 (uri (string-append "https://pypi.python.org/packages/source/z"
7140 "/zope.configuration/zope.configuration-"
7141 version ".tar.gz"))
7142 (sha256
7143 (base32
7144 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7145 (build-system python-build-system)
7146 (propagated-inputs
7147 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7148 ("python-zope-schema" ,python-zope-schema)))
7149 (home-page "http://pypi.python.org/pypi/zope.configuration")
7150 (synopsis "Zope Configuration Markup Language")
7151 (description "Zope.configuration implements ZCML, the Zope Configuration
7152Markup Language.")
3f641af0 7153 (license license:zpl2.1)))
fbac9b17
LF
7154
7155(define-public python2-zope-configuration
7156 (package-with-python2 python-zope-configuration))
2ad52086
LF
7157
7158(define-public python-zope-proxy
7159 (package
7160 (name "python-zope-proxy")
7161 (version "4.1.6")
7162 (source
7163 (origin
7164 (method url-fetch)
7165 (uri (string-append "https://pypi.python.org/packages/source/z"
7166 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7167 (sha256
7168 (base32
7169 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7170 (build-system python-build-system)
7171 (propagated-inputs
7172 `(("python-zope-interface" ,python-zope-interface)))
7173 (home-page "http://pypi.python.org/pypi/zope.proxy")
7174 (synopsis "Generic, transparent proxies")
7175 (description "Zope.proxy provides generic, transparent proxies for Python.
7176Proxies are special objects which serve as mostly-transparent wrappers around
7177another object, intervening in the apparent behavior of the wrapped object
7178only when necessary to apply the policy (e.g., access checking, location
7179brokering, etc.) for which the proxy is responsible.")
3f641af0 7180 (license license:zpl2.1)))
2ad52086
LF
7181
7182(define-public python2-zope-proxy
7183 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7184
7185(define-public python-zope-location
7186 (package
7187 (name "python-zope-location")
7188 (version "4.0.3")
7189 (source
7190 (origin
7191 (method url-fetch)
7192 (uri (string-append "https://pypi.python.org/packages/source/z"
7193 "/zope.location/zope.location-" version ".tar.gz"))
7194 (sha256
7195 (base32
7196 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7197 (build-system python-build-system)
7198 (native-inputs
7199 `(("python-zope-proxy" ,python-zope-proxy)
7200 ("python-zope-schema" ,python-zope-schema)))
7201 (home-page "http://pypi.python.org/pypi/zope.location/")
7202 (synopsis "Zope location library")
7203 (description "Zope.location implements the concept of \"locations\" in
7204Zope3, which are are special objects that have a structural location.")
3f641af0 7205 (license license:zpl2.1)))
f404b5ea
LF
7206
7207(define-public python2-zope-location
7208 (package-with-python2 python-zope-location))
d4b77f36
LF
7209
7210(define-public python-zope-security
7211 (package
7212 (name "python-zope-security")
7213 (version "4.0.3")
7214 (source
7215 (origin
7216 (method url-fetch)
7217 (uri (string-append "https://pypi.python.org/packages/source/z"
7218 "/zope.security/zope.security-" version ".tar.gz"))
7219 (sha256
7220 (base32
7221 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7222 (build-system python-build-system)
7223 (propagated-inputs
7224 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7225 ("python-zope-component" ,python-zope-component)
7226 ("python-zope-location" ,python-zope-location)
7227 ("python-zope-proxy" ,python-zope-proxy)
7228 ("python-zope-schema" ,python-zope-schema)
7229 ("python-zope-testrunner" ,python-zope-testrunner)
7230 ("python-zope-testing" ,python-zope-testing)))
7231 (home-page "http://pypi.python.org/pypi/zope.security")
7232 (synopsis "Zope security framework")
7233 (description "Zope.security provides a generic mechanism to implement
7234security policies on Python objects.")
3f641af0 7235 (license license:zpl2.1)))
d4b77f36
LF
7236
7237(define-public python2-zope-security
04417662
EF
7238 (let ((zope-security (package-with-python2 python-zope-security)))
7239 (package (inherit zope-security)
7240 (propagated-inputs
7241 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7242 ,@(alist-delete
7243 "python-zope-testrunner"
7244 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7245
7246(define-public python-zope-component
7247 (package
7248 (name "python-zope-component")
7249 (version "4.2.2")
7250 (source
7251 (origin
7252 (method url-fetch)
7253 (uri (string-append "https://pypi.python.org/packages/source/z"
7254 "/zope.component/zope.component-" version ".tar.gz"))
7255 (sha256
7256 (base32
7257 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7258 (build-system python-build-system)
7259 (arguments
7260 ;; Skip tests due to circular dependency with python-zope-security.
7261 '(#:tests? #f))
7262 (native-inputs
7263 `(("python-zope-testing" ,python-zope-testing)))
7264 (propagated-inputs
7265 `(("python-zope-event" ,python-zope-event)
7266 ("python-zope-interface" ,python-zope-interface)
7267 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7268 ("python-zope-configuration" ,python-zope-configuration)))
7269 (home-page "https://github.com/zopefoundation/zope.component")
7270 (synopsis "Zope Component Architecture")
7271 (description "Zope.component represents the core of the Zope Component
7272Architecture. Together with the zope.interface package, it provides
7273facilities for defining, registering and looking up components.")
3f641af0 7274 (license license:zpl2.1)))
a6b61b27
LF
7275
7276(define-public python2-zope-component
7277 (package-with-python2 python-zope-component))
3859ac12 7278
1ae44b80 7279(define-public python-pythondialog
b5f218be 7280 (package
1ae44b80 7281 (name "python-pythondialog")
42c4b246 7282 (version "3.4.0")
b5f218be
LF
7283 (source
7284 (origin
7285 (method url-fetch)
1ae44b80 7286 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7287 (sha256
7288 (base32
1ae44b80 7289 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7290 (build-system python-build-system)
7291 (arguments
7292 `(#:phases
7293 (modify-phases %standard-phases
7294 (add-after 'unpack 'patch-path
7295 (lambda* (#:key inputs #:allow-other-keys)
7296 (let* ((dialog (assoc-ref inputs "dialog")))
7297 ;; Since this library really wants to grovel the search path, we
7298 ;; must hardcode dialog's store path into it.
7299 (substitute* "dialog.py"
7300 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7301 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7302 #t))))
b5f218be
LF
7303 #:tests? #f)) ; no test suite
7304 (propagated-inputs
7305 `(("dialog" ,dialog)))
7306 (home-page "http://pythondialog.sourceforge.net/")
7307 (synopsis "Python interface to the UNIX dialog utility")
7308 (description "A Python wrapper for the dialog utility. Its purpose is to
7309provide an easy to use, pythonic and comprehensive Python interface to dialog.
7310This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7311 (license license:lgpl2.1)
1ae44b80
LF
7312 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7313
7314(define-public python2-pythondialog
7315 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7316 (package
7317 (inherit base)
7318 (version (package-version python-pythondialog))
7319 (source (origin
7320 (method url-fetch)
7321 (uri (pypi-uri "python2-pythondialog" version))
7322 (sha256
7323 (base32
7324 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7325
3859ac12
LF
7326(define-public python-pyrfc3339
7327 (package
7328 (name "python-pyrfc3339")
d9aa097b 7329 (version "1.0")
3859ac12
LF
7330 (source
7331 (origin
7332 (method url-fetch)
d9aa097b 7333 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7334 (sha256
7335 (base32
d9aa097b 7336 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7337 (build-system python-build-system)
7338 (propagated-inputs
7339 `(("python-pytz" ,python-pytz)))
7340 (native-inputs
7341 `(("python-nose" ,python-nose)
7342 ("python-setuptools" ,python-setuptools)))
7343 (home-page "https://github.com/kurtraschke/pyRFC3339")
7344 (synopsis "Python timestamp library")
7345 (description "Python library for generating and parsing RFC 3339-compliant
7346timestamps.")
7347 (license license:expat)))
7348
7349(define-public python2-pyrfc3339
7350 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7351
7352(define-public python-werkzeug
7353 (package
7354 (name "python-werkzeug")
0580e383 7355 (version "0.11.11")
5eea2005
LF
7356 (source
7357 (origin
7358 (method url-fetch)
4b47cbfa 7359 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7360 (sha256
7361 (base32
0580e383 7362 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7363 (build-system python-build-system)
7364 (native-inputs
7365 `(("python-pytest" ,python-pytest)))
7366 (home-page "http://werkzeug.pocoo.org/")
7367 (synopsis "Utilities for WSGI applications")
7368 (description "One of the most advanced WSGI utility modules. It includes a
7369powerful debugger, full-featured request and response objects, HTTP utilities to
7370handle entity tags, cache control headers, HTTP dates, cookie handling, file
7371uploads, a powerful URL routing system and a bunch of community-contributed
7372addon modules.")
3f641af0 7373 (license license:x11)))
5eea2005
LF
7374
7375(define-public python2-werkzeug
7376 (package-with-python2 python-werkzeug))
99fffa8a
LF
7377
7378(define-public python-configobj
7379 (package
7380 (name "python-configobj")
7381 (version "5.0.6")
7382 (source (origin
7383 (method url-fetch)
7384 (uri (string-append
7385 "https://pypi.python.org/packages/source/c/configobj/"
7386 "configobj-" version ".tar.gz"))
7387 (sha256
7388 (base32
7389 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7390 ;; Patch setup.py so it looks for python-setuptools, which is
7391 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7392 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
7393 (build-system python-build-system)
7394 (native-inputs
7395 `(("python-setuptools" ,python-setuptools)
7396 ("python-six" ,python-six)))
7397 (synopsis "Config file reading, writing and validation")
7398 (description "ConfigObj is a simple but powerful config file reader and
7399writer: an ini file round tripper. Its main feature is that it is very easy to
7400use, with a straightforward programmer’s interface and a simple syntax for
7401config files.")
7402 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7403 (license license:bsd-3)))
99fffa8a
LF
7404
7405(define-public python2-configobj
7406 (package-with-python2 python-configobj))
79e8a291
LF
7407
7408(define-public python-configargparse
7409 (package
7410 (name "python-configargparse")
7411 (version "0.10.0")
7412 (source (origin
7413 (method url-fetch)
7414 (uri (string-append
7415 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7416 "ConfigArgParse-" version ".tar.gz"))
7417 (sha256
7418 (base32
7419 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7420 (build-system python-build-system)
7421 (arguments
7422 ;; FIXME: Bug in test suite filed upstream:
7423 ;; https://github.com/bw2/ConfigArgParse/issues/32
7424 '(#:tests? #f))
7425 (synopsis "Replacement for argparse")
7426 (description "A drop-in replacement for argparse that allows options to also
7427be set via config files and/or environment variables.")
7428 (home-page "https://github.com/bw2/ConfigArgParse")
7429 (license license:expat)))
7430
7431(define-public python2-configargparse
7432 (package-with-python2 python-configargparse))
ab41f979
LF
7433
7434(define-public python-ndg-httpsclient
7435 (package
7436 (name "python-ndg-httpsclient")
7437 (version "0.4.0")
7438 (source (origin
7439 (method url-fetch)
7440 (uri (string-append
7441 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7442 "ndg_httpsclient-" version ".tar.gz"))
7443 (sha256
7444 (base32
7445 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7446 (build-system python-build-system)
7447 (propagated-inputs
7448 `(("python-pyopenssl" ,python-pyopenssl)))
7449 (synopsis "HTTPS support for Python's httplib and urllib2")
7450 (description "This is a HTTPS client implementation for httplib and urllib2
7451based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7452over the default provided with Python and importantly enables full verification
7453of the SSL peer.")
7454 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7455 (license license:bsd-3)))
ab41f979
LF
7456
7457;; python2-openssl requires special care, so package-with-python2 is
7458;; insufficient.
7459(define-public python2-ndg-httpsclient
7460 (package (inherit python-ndg-httpsclient)
7461 (name "python2-ndg-httpsclient")
7462 (arguments `(#:python ,python-2))
7463 (propagated-inputs
7464 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7465
7466(define-public python-contextlib2
7467 (package
7468 (name "python-contextlib2")
7469 (version "0.4.0")
7470 (source
7471 (origin
7472 (method url-fetch)
7473 (uri (pypi-uri "contextlib2" version))
7474 (sha256
7475 (base32
7476 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7477 (build-system python-build-system)
7478 (arguments
7479 `(#:phases
7480 (modify-phases %standard-phases
7481 (replace 'check
7482 (lambda _ (zero?
7483 (system*
b3546174 7484 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7485 (home-page "http://contextlib2.readthedocs.org/")
7486 (synopsis "Tools for decorators and context managers")
7487 (description "This module is primarily a backport of the Python
74883.2 contextlib to earlier Python versions. Like contextlib, it
7489provides utilities for common tasks involving decorators and context
7490managers. It also contains additional features that are not part of
7491the standard library.")
3f641af0 7492 (license license:psfl)))
03f964a5
CM
7493
7494(define-public python2-contextlib2
7495 (package-with-python2 python-contextlib2))
210bf497
DT
7496
7497(define-public python-texttable
7498 (package
7499 (name "python-texttable")
7500 (version "0.8.4")
7501 (source
7502 (origin
7503 (method url-fetch)
7504 (uri (pypi-uri "texttable" version))
7505 (sha256
7506 (base32
7507 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7508 (build-system python-build-system)
7509 (arguments '(#:tests? #f)) ; no tests
7510 (home-page "https://github.com/foutaise/texttable/")
7511 (synopsis "Python module for creating simple ASCII tables")
7512 (description "Texttable is a Python module for creating simple ASCII
7513tables.")
3f641af0 7514 (license license:lgpl2.1+)))
210bf497
DT
7515
7516(define-public python2-texttable
7517 (package-with-python2 python-texttable))
67c52bb3
DT
7518
7519(define-public python-websocket-client
7520 (package
7521 (name "python-websocket-client")
6b810897 7522 (version "0.37.0")
67c52bb3
DT
7523 (source
7524 (origin
7525 (method url-fetch)
6b810897 7526 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7527 (sha256
7528 (base32
6b810897 7529 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3
DT
7530 (build-system python-build-system)
7531 (native-inputs
7532 `(("python-six" ,python-six))) ; for tests
7533 (inputs
7534 `(("python-setuptools" ,python-setuptools)))
7535 (home-page "https://github.com/liris/websocket-client")
7536 (synopsis "WebSocket client for Python")
7537 (description "The Websocket-client module provides the low level APIs for
7538WebSocket usage in Python programs.")
3f641af0 7539 (license license:lgpl2.1+)))
67c52bb3
DT
7540
7541(define-public python2-websocket-client
7542 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7543
7544(define-public python-atomicwrites
7545 (package
7546 (name "python-atomicwrites")
4e92d76a 7547 (version "1.1.0")
5c6eea2a
LF
7548 (source (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "atomicwrites" version))
7551 (sha256
7552 (base32
4e92d76a 7553 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7554 (build-system python-build-system)
7555 (synopsis "Atomic file writes in Python")
7556 (description "Library for atomic file writes using platform dependent tools
8f65585b 7557for atomic file system operations.")
5c6eea2a 7558 (home-page "https://github.com/untitaker/python-atomicwrites")
9bb6d184
LF
7559 (license license:expat)
7560 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7561
7562(define-public python2-atomicwrites
7563 (package (inherit (package-with-python2
7564 (strip-python2-variant python-atomicwrites)))
7565 (native-inputs
7566 `(("python2-setuptools" ,python2-setuptools)))))
561bb3cb
LF
7567
7568(define-public python-requests-toolbelt
7569 (package
7570 (name "python-requests-toolbelt")
c02af1c8 7571 (version "0.6.2")
561bb3cb
LF
7572 (source (origin
7573 (method url-fetch)
c02af1c8
LF
7574 (uri (string-append
7575 "https://pypi.python.org/packages/"
7576 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7577 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7578 (sha256
7579 (base32
c02af1c8 7580 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb
LF
7581 (build-system python-build-system)
7582 (propagated-inputs
7583 `(("python-requests" ,python-requests)))
7584 (synopsis "Extensions to python-requests")
7585 (description "This is a toolbelt of useful classes and functions to be used
7586with python-requests.")
7587 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7588 (license license:asl2.0)))
d1deb90b
LF
7589
7590(define-public python-click-threading
7591 (package
7592 (name "python-click-threading")
3d2e0dbc 7593 (version "0.2.0")
d1deb90b
LF
7594 (source (origin
7595 (method url-fetch)
3d2e0dbc
LF
7596 (uri (string-append
7597 "https://pypi.python.org/packages/"
7598 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7599 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7600 (sha256
7601 (base32
3d2e0dbc 7602 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7603 (build-system python-build-system)
7604 (propagated-inputs
7605 `(("python-click" ,python-click)))
7606 (synopsis "Utilities for multithreading in Click")
7607 (description "This package provides utilities for multithreading in Click
7608applications.")
7609 (home-page "https://github.com/click-contrib/click-threading")
7610 (license license:expat)))
7b17cab9
LF
7611
7612(define-public python-click-log
7613 (package
7614 (name "python-click-log")
a9da8fec 7615 (version "0.1.3")
7b17cab9
LF
7616 (source (origin
7617 (method url-fetch)
7618 (uri (pypi-uri "click-log" version))
7619 (sha256
7620 (base32
a9da8fec 7621 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7622 (build-system python-build-system)
7623 (propagated-inputs
7624 `(("python-click" ,python-click)))
7625 (synopsis "Logging for click applications")
7626 (description "This package provides a Python library for logging Click
7627applications.")
7628 (home-page "https://github.com/click-contrib/click-log")
7629 (license license:expat)))
7b3a4ee4
LF
7630
7631(define-public python-apipkg
7632 (package
7633 (name "python-apipkg")
7634 (version "1.4")
7635 (source (origin
7636 (method url-fetch)
7637 (uri (pypi-uri "apipkg" version))
7638 (sha256
7639 (base32
7640 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7641 (build-system python-build-system)
b43bab3c 7642 (inputs
7b3a4ee4
LF
7643 `(("python-pytest" ,python-pytest)))
7644 (synopsis "Namespace control and lazy-import mechanism")
7645 (description "With apipkg you can control the exported namespace of a Python
7646package and greatly reduce the number of imports for your users. It is a small
7647pure Python module that works on virtually all Python versions.")
7648 (home-page "https://bitbucket.org/hpk42/apipkg")
e08739c3
CAW
7649 (license license:expat)
7650 (properties `((python2-variant . ,(delay python2-apipkg))))))
7651
7652(define-public python2-apipkg
7653 (package
7654 (inherit (package-with-python2
7655 (strip-python2-variant python-apipkg)))
7656 (native-inputs
7657 `(("python2-setuptools" ,python2-setuptools)))))
848964fe
LF
7658
7659(define-public python-execnet
7660 (package
7661 (name "python-execnet")
7662 (version "1.4.1")
7663 (source (origin
7664 (method url-fetch)
7665 (uri (pypi-uri "execnet" version))
7666 (sha256
7667 (base32
7668 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7669 (build-system python-build-system)
7670 (native-inputs
7671 `(("python-setuptools-scm" ,python-setuptools-scm)))
584d068f 7672 (inputs
848964fe
LF
7673 `(("python-apipkg" ,python-apipkg)))
7674 (synopsis "Rapid multi-Python deployment")
7675 (description "Execnet provides a share-nothing model with
7676channel-send/receive communication for distributing execution across many
7677Python interpreters across version, platform and network barriers. It has a
7678minimal and fast API targetting the following uses:
7679@enumerate
7680@item distribute tasks to (many) local or remote CPUs
7681@item write and deploy hybrid multi-process applications
7682@item write scripts to administer multiple environments
7683@end enumerate")
7684 (home-page "http://codespeak.net/execnet/")
16c84f90
CAW
7685 (license license:expat)
7686 (properties `((python2-variant . ,(delay python2-execnet))))))
7687
7688(define-public python2-execnet
7689 (let ((execnet (package-with-python2
7690 (strip-python2-variant python-execnet))))
7691 (package
7692 (inherit execnet)
7693 (native-inputs
7694 `(("python2-setuptools" ,python2-setuptools)
7695 ,@(package-native-inputs execnet))))))
6720dbb4
LF
7696
7697;;; The software provided by this package was integrated into pytest 2.8.
7698(define-public python-pytest-cache
7699 (package
7700 (name "python-pytest-cache")
7701 (version "1.0")
7702 (source (origin
7703 (method url-fetch)
7704 (uri (pypi-uri "pytest-cache" version))
7705 (sha256
7706 (base32
7707 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7708 (build-system python-build-system)
630d938f
EF
7709 (inputs
7710 `(("python-apipkg" ,python-apipkg)
7711 ("python-execnet" ,python-execnet)
7712 ("python-py" ,python-py)
7713 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7714 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7715 (description "The pytest-cache plugin provides tools to rerun failures from
7716the last py.test invocation.")
7717 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
0adc21c2
EF
7718 (license license:expat)
7719 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7720
7721(define-public python2-pytest-cache
7722 (let ((pytest-cache (package-with-python2
7723 (strip-python2-variant python-pytest-cache))))
7724 (package
7725 (inherit pytest-cache)
7726 (native-inputs
7727 `(("python2-setuptools" ,python2-setuptools)
7728 ,@(package-native-inputs pytest-cache))))))
d7e729fe
LF
7729
7730(define-public python-pytest-localserver
7731 (package
7732 (name "python-pytest-localserver")
29f20168 7733 (version "0.3.5")
d7e729fe
LF
7734 (source (origin
7735 (method url-fetch)
29f20168 7736 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7737 (sha256
7738 (base32
29f20168 7739 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7740 (build-system python-build-system)
7741 (arguments
7742 `(#:phases (modify-phases %standard-phases
7743 (replace 'check
7744 (lambda _
7745 (zero? (system* "py.test" "--genscript=runtests.py"))
7746 (zero? (system* "py.test")))))))
7747 (native-inputs
d7e729fe
LF
7748 `(("python-pytest" ,python-pytest)
7749 ("python-requests" ,python-requests)
9ba40f05
EF
7750 ("python-six" ,python-six)))
7751 (inputs
7752 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7753 (synopsis "Py.test plugin to test server connections locally")
7754 (description "Pytest-localserver is a plugin for the pytest testing
7755framework which enables you to test server connections locally.")
7756 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7757 (license license:expat)))
28cecbb7
LF
7758
7759(define-public python-wsgi-intercept
7760 (package
7761 (name "python-wsgi-intercept")
909fbd2b 7762 (version "1.2.2")
28cecbb7
LF
7763 (source (origin
7764 (method url-fetch)
909fbd2b
LF
7765 (uri (string-append
7766 "https://pypi.python.org/packages/"
7767 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7768 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7769 (sha256
7770 (base32
909fbd2b 7771 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7
LF
7772 (build-system python-build-system)
7773 (native-inputs
9d813ec1
EF
7774 `(("python-pytest" ,python-pytest)
7775 ("python-six" ,python-six)))
28cecbb7
LF
7776 (propagated-inputs
7777 `(("python-httplib2" ,python-httplib2)
7778 ("python-requests" ,python-requests)))
7779 (synopsis "Puts a WSGI application in place of a real URI for testing")
7780 (description "Wsgi_intercept installs a WSGI application in place of a real
7781URI for testing. Testing a WSGI application normally involves starting a
7782server at a local host and port, then pointing your test code to that address.
7783Instead, this library lets you intercept calls to any specific host/port
7784combination and redirect them into a WSGI application importable by your test
7785program. Thus, you can avoid spawning multiple processes or threads to test
7786your Web app.")
7787 (home-page "https://github.com/cdent/wsgi-intercept")
7788 (license license:expat)))
89b8a551
LF
7789
7790(define-public python-pytest-xprocess
7791 (package
7792 (name "python-pytest-xprocess")
7793 (version "0.9.1")
7794 (source (origin
7795 (method url-fetch)
7796 (uri (pypi-uri "pytest-xprocess" version))
7797 (sha256
7798 (base32
7799 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7800 (build-system python-build-system)
7801 (propagated-inputs
7802 `(("python-pytest" ,python-pytest)
7803 ("python-pytest-cache" ,python-pytest-cache)
7804 ("python-psutil" ,python-psutil)))
7805 (synopsis "Pytest plugin to manage external processes across test runs")
7806 (description "Pytest-xprocess is an experimental py.test plugin for managing
7807processes across test runs.")
7808 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7809 (license license:expat)))
5c299bf0
LF
7810
7811(define-public python-icalendar
7812 (package
7813 (name "python-icalendar")
f2f53353 7814 (version "3.10")
5c299bf0
LF
7815 (source (origin
7816 (method url-fetch)
7817 (uri (pypi-uri "icalendar" version))
7818 (sha256
7819 (base32
f2f53353 7820 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
5c299bf0
LF
7821 (build-system python-build-system)
7822 (propagated-inputs
7823 `(("python-dateutil-2" ,python-dateutil-2)
7824 ("python-pytz" ,python-pytz)))
7825 (synopsis "Python library for parsing iCalendar files")
7826 (description "The icalendar package is a parser/generator of iCalendar
7827files for use with Python.")
7828 (home-page "https://github.com/collective/icalendar")
3f641af0 7829 (license license:bsd-2)))
6bbbb53e
LF
7830
7831(define-public python-sphinxcontrib-newsfeed
7832 (package
7833 (name "python-sphinxcontrib-newsfeed")
7834 (version "0.1.4")
7835 (source (origin
7836 (method url-fetch)
7837 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7838 (sha256
7839 (base32
7840 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7841 (build-system python-build-system)
7842 (propagated-inputs
7843 `(("python-docutils" ,python-docutils)
7844 ("python-sphinx" ,python-sphinx)))
7845 (synopsis "News Feed extension for Sphinx")
7846 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7847Blog, News or Announcements section to a Sphinx website.")
7848 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 7849 (license license:bsd-2)))
2216e15c
SB
7850
7851(define-public python-args
7852 (package
7853 (name "python-args")
7854 (version "0.1.0")
7855 (source (origin
7856 (method url-fetch)
7857 (uri (pypi-uri "args" version))
7858 (sha256
7859 (base32
7860 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7861 (build-system python-build-system)
7862 (inputs
7863 `(("python-setuptools" ,python-setuptools)))
7864 (home-page "https://github.com/kennethreitz/args")
7865 (synopsis "Command-line argument parser")
7866 (description
7867 "This library provides a Python module to parse command-line arguments.")
3f641af0 7868 (license license:bsd-3)))
2216e15c
SB
7869
7870(define-public python2-args
7871 (package-with-python2 python-args))
c06a3de9
SB
7872
7873(define-public python-clint
7874 (package
7875 (name "python-clint")
7876 (version "0.5.1")
7877 (source (origin
7878 (method url-fetch)
7879 (uri (pypi-uri "clint" version))
7880 (sha256
7881 (base32
7882 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7883 (build-system python-build-system)
7884 (inputs
7885 `(("python-args" ,python-args)
7886 ("python-setuptools" ,python-setuptools)))
7887 (home-page "https://github.com/kennethreitz/clint")
7888 (synopsis "Command-line interface tools")
7889 (description
7890 "Clint is a Python module filled with a set of tools for developing
7891command-line applications, including tools for colored and indented
7892output, progress bar display, and pipes.")
3f641af0 7893 (license license:isc)))
c06a3de9
SB
7894
7895(define-public python2-clint
7896 (package-with-python2 python-clint))
4ecdeef8
SB
7897
7898(define-public python-astor
7899 (package
7900 (name "python-astor")
7901 (version "0.5")
7902 (source (origin
7903 (method url-fetch)
7904 (uri (pypi-uri "astor" version))
7905 (sha256
7906 (base32
7907 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7908 (build-system python-build-system)
7909 (inputs
7910 `(("python-setuptools" ,python-setuptools)))
7911 (home-page "https://github.com/berkerpeksag/astor")
7912 (synopsis "Read and write Python ASTs")
7913 (description
7914 "Astor is designed to allow easy manipulation of Python source via the
7915Abstract Syntax Tree.")
3f641af0 7916 (license license:bsd-3)))
4ecdeef8
SB
7917
7918(define-public python2-astor
7919 (package-with-python2 python-astor))
e224b7d0
SB
7920
7921(define-public python-rply
7922 (package
7923 (name "python-rply")
7924 (version "0.7.4")
7925 (source (origin
7926 (method url-fetch)
7927 (uri (pypi-uri "rply" version))
7928 (sha256
7929 (base32
7930 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7931 (build-system python-build-system)
7932 (inputs
7933 `(("python-appdirs" ,python-appdirs)
7934 ("python-setuptools" ,python-setuptools)))
7935 (home-page "https://github.com/alex/rply")
7936 (synopsis "Parser generator for Python")
7937 (description
7938 "This package provides a pure Python based parser generator, that also
7939works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7940with a new public API, and RPython support.")
3f641af0 7941 (license license:bsd-3)))
e224b7d0
SB
7942
7943(define-public python2-rply
7944 (package-with-python2 python-rply))
c3e919d7
SB
7945
7946(define-public python-hy
7947 (package
7948 (name "python-hy")
7949 (version "0.11.1")
7950 (source (origin
7951 (method url-fetch)
7952 (uri (pypi-uri "hy" version))
7953 (sha256
7954 (base32
7955 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7956 (build-system python-build-system)
7957 (inputs
7958 `(("python-astor" ,python-astor)
7959 ("python-clint" ,python-clint)
7960 ("python-rply" ,python-rply)
7961 ("python-setuptools" ,python-setuptools)))
7962 (home-page "http://hylang.org/")
7963 (synopsis "Lisp frontend to Python")
7964 (description
7965 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7966its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7967Python at your fingertips, in Lisp form.")
7968 (license license:expat)))
7969
7970(define-public python2-hy
7971 (package-with-python2 python-hy))
7a5b944e 7972
81f7f297
EF
7973(define-public python-rauth
7974 (package
7975 (name "python-rauth")
7976 (version "0.7.2")
7977 (source
7978 (origin
7979 (method url-fetch)
7980 (uri (pypi-uri "rauth" version))
7981 (sha256
7982 (base32
7983 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7984 (build-system python-build-system)
7985 (arguments
7986 `(#:test-target "check"))
0848d8d3 7987 (inputs
81f7f297
EF
7988 `(("python-requests" ,python-requests)))
7989 (home-page "https://github.com/litl/rauth")
7990 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7991 (description
7992 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7993provides service wrappers for convenient connection initialization and
7994authenticated session objects providing things like keep-alive.")
0848d8d3
EF
7995 (license license:expat)
7996 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
7997
7998(define-public python2-rauth
0848d8d3
EF
7999 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8000 (package
8001 (inherit base)
8002 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8003 ("python2-unittest2" ,python2-unittest2)
8004 ,@(package-native-inputs base))))))
81f7f297 8005
1abe448d
EF
8006(define-public python2-functools32
8007 (package
8008 (name "python2-functools32")
8009 (version "3.2.3-2")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "functools32" version))
8014 (sha256
8015 (base32
8016 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8017 (build-system python-build-system)
8018 (arguments
8019 `(#:python ,python-2
8020 #:tests? #f)) ; no test target
8021 (native-inputs
8022 `(("python2-setuptools" ,python2-setuptools)))
8023 (home-page "https://github.com/MiCHiLU/python-functools32")
8024 (synopsis
8025 "Backport of the functools module from Python 3.2.3")
8026 (description
8027 "This package is a backport of the @code{functools} module from Python
80283.2.3 for use with older versions of Python and PyPy.")
8029 (license license:expat)))
8030
877889f3 8031(define-public python2-futures
7a5b944e 8032 (package
877889f3 8033 (name "python2-futures")
7a5b944e
EF
8034 (version "3.0.3")
8035 (source
8036 (origin
8037 (method url-fetch)
8038 (uri (pypi-uri "futures" version))
8039 (sha256
8040 (base32
8041 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8042 (build-system python-build-system)
877889f3 8043 (arguments `(#:python ,python-2))
7a5b944e 8044 (native-inputs
877889f3 8045 `(("python2-setuptools" ,python2-setuptools)))
7a5b944e
EF
8046 (home-page "https://github.com/agronholm/pythonfutures")
8047 (synopsis
8048 "Backport of the concurrent.futures package from Python 3.2")
8049 (description
8050 "The concurrent.futures module provides a high-level interface for
8051asynchronously executing callables. This package backports the
8052concurrent.futures package from Python 3.2")
3f641af0 8053 (license license:bsd-3)))
7a5b944e 8054
5cb2fe44
EF
8055(define-public python-promise
8056 (package
8057 (name "python-promise")
8058 (version "0.4.2")
8059 (source
8060 (origin
8061 (method url-fetch)
8062 (uri (pypi-uri "promise" version))
8063 (sha256
8064 (base32
8065 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8066 (build-system python-build-system)
8067 ;; Tests wants python-futures, which is a python2 only program, and
8068 ;; can't be found by python-promise at test time.
8069 (arguments `(#:tests? #f))
8070 (home-page "https://github.com/syrusakbary/promise")
8071 (synopsis "Promises/A+ implementation for Python")
8072 (description
8073 "Promises/A+ implementation for Python")
8074 (properties `((python2-variant . ,(delay python2-promise))))
8075 (license license:expat)))
8076
8077(define-public python2-promise
8078 (let ((promise (package-with-python2
8079 (strip-python2-variant python-promise))))
8080 (package (inherit promise)
8081 (arguments (substitute-keyword-arguments (package-arguments promise)
8082 ((#:tests? _) #t)))
8083 (native-inputs
8084 `(("python2-futures" ,python2-futures)
8085 ("python2-pytest" ,python2-pytest)
8086 ("python2-setuptools" ,python2-setuptools)
8087 ,@(package-native-inputs promise))))))
8088
c18f6368
EF
8089(define-public python-urllib3
8090 (package
8091 (name "python-urllib3")
6178274d 8092 (version "1.18.1")
c18f6368
EF
8093 (source
8094 (origin
8095 (method url-fetch)
8096 (uri (pypi-uri "urllib3" version))
8097 (sha256
8098 (base32
6178274d 8099 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8100 (build-system python-build-system)
8101 (arguments `(#:tests? #f))
8102 (native-inputs
8103 `(("python-setuptools" ,python-setuptools)
8104 ;; some packages for tests
8105 ("python-nose" ,python-nose)
8106 ("python-mock" ,python-mock)
8107 ("python-tornado" ,python-tornado)))
8108 (propagated-inputs
8109 `(;; packages for https security
8110 ("python-certifi" ,python-certifi)
8111 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8112 ("python-pyasn1" ,python-pyasn1)
8113 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8114 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8115 (synopsis "HTTP library with thread-safe connection pooling")
8116 (description
8117 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8118can reuse the same socket connection for multiple requests, it can POST files,
8119supports url redirection and retries, and also gzip and deflate decoding.")
8120 (license license:expat)))
8121
8122(define-public python2-urllib3
8123 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8124
8125(define-public python-colorama
8126 (package
8127 (name "python-colorama")
8128 (version "0.3.3")
8129 (source
8130 (origin
8131 (method url-fetch)
8132 (uri (pypi-uri "colorama" version))
8133 (sha256
8134 (base32
8135 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8136 (build-system python-build-system)
8137 (inputs
8138 `(("python-setuptools" ,python-setuptools)))
8139 (synopsis "colored terminal text rendering for Python")
8140 (description "Colorama is a Python library for rendering colored terminal
8141text.")
8142 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8143 (license license:bsd-3)))
2b2f2fc1
DT
8144
8145(define-public python2-colorama
8146 (package-with-python2 python-colorama))
f5bcec6e
DT
8147
8148(define-public python-rsa
8149 (package
8150 (name "python-rsa")
ecd68c53 8151 (version "3.4.2")
f5bcec6e
DT
8152 (source
8153 (origin
8154 (method url-fetch)
8155 (uri (pypi-uri "rsa" version))
8156 (sha256
8157 (base32
ecd68c53 8158 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e
DT
8159 (build-system python-build-system)
8160 (inputs
8161 `(("python-pyasn1" ,python-pyasn1)
8162 ("python-setuptools" ,python-setuptools)))
8163 (synopsis "Pure-Python RSA implementation")
8164 (description "Python-RSA is a pure-Python RSA implementation. It supports
8165encryption and decryption, signing and verifying signatures, and key
8166generation according to PKCS#1 version 1.5. It can be used as a Python
8167library as well as on the command line.")
8168 (home-page "http://stuvel.eu/rsa")
3f641af0 8169 (license license:asl2.0)))
f5bcec6e
DT
8170
8171(define-public python2-rsa
8172 (package-with-python2 python-rsa))
c0aacfa5
DT
8173
8174(define-public python-pluggy
8175 (package
8176 (name "python-pluggy")
8177 (version "0.3.1")
8178 (source
8179 (origin
8180 (method url-fetch)
8181 (uri (pypi-uri "pluggy" version))
8182 (sha256
8183 (base32
8184 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8185 (build-system python-build-system)
8186 (inputs
8187 `(("python-setuptools" ,python-setuptools)))
8188 (synopsis "Plugin and hook calling mechanism for Python")
8189 (description "Pluggy is an extraction of the plugin manager as used by
8190Pytest but stripped of Pytest specific details.")
8191 (home-page "https://pypi.python.org/pypi/pluggy")
8192 (license license:expat)))
8193
8194(define-public python2-pluggy
8195 (package-with-python2 python-pluggy))
a4af21ca
DT
8196
8197(define-public python-tox
8198 (package
8199 (name "python-tox")
8200 (version "2.3.1")
8201 (source
8202 (origin
8203 (method url-fetch)
8204 (uri (pypi-uri "tox" version))
8205 (sha256
8206 (base32
8207 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8208 (build-system python-build-system)
8209 (arguments
8210 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8211 ;; pytest breaks other packages.
8212 '(#:tests? #f))
8213 (inputs
8214 `(("python-setuptools" ,python-setuptools)
8215 ("python-pluggy" ,python-pluggy)
8216 ("python-py" ,python-py)
8217 ("python-virtualenv" ,python-virtualenv)
8218 ("python-pytest" ,python-pytest)))
8219 (home-page "http://tox.testrun.org/")
8220 (synopsis "Virtualenv-based automation of test activities")
8221 (description "Tox is a generic virtualenv management and test command line
8222tool. It can be used to check that a package installs correctly with
8223different Python versions and interpreters, or run tests in each type of
8224supported environment, or act as a frontend to continuous integration
8225servers.")
8226 (license license:expat)))
8227
8228(define-public python2-tox
8229 (package-with-python2 python-tox))
ba9da248
DT
8230
8231(define-public python-jmespath
8232 (package
8233 (name "python-jmespath")
8234 (version "0.9.0")
8235 (source
8236 (origin
8237 (method url-fetch)
8238 (uri (pypi-uri "jmespath" version))
8239 (sha256
8240 (base32
8241 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8242 (build-system python-build-system)
8243 (inputs
8244 `(("python-setuptools" ,python-setuptools)))
8245 (synopsis "JSON Matching Expressions")
8246 (description "JMESPath (pronounced “james path”) is a Python library that
8247allows one to declaratively specify how to extract elements from a JSON
8248document.")
8249 (home-page "https://github.com/jmespath/jmespath.py")
8250 (license license:expat)))
8251
8252(define-public python2-jmespath
8253 (package-with-python2 python-jmespath))
935fcd5c
DT
8254
8255(define-public python-botocore
8256 (package
8257 (name "python-botocore")
e09f952d 8258 (version "1.4.62")
935fcd5c
DT
8259 (source
8260 (origin
8261 (method url-fetch)
8262 (uri (pypi-uri "botocore" version))
8263 (sha256
8264 (base32
e09f952d 8265 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c
DT
8266 (build-system python-build-system)
8267 (inputs
8268 `(("python-dateutil" ,python-dateutil-2)
8269 ("python-docutils" ,python-docutils)
8270 ("python-mock" ,python-mock)
8271 ("python-nose" ,python-nose)
8272 ("python-setuptools" ,python-setuptools)
8273 ("python-tox" ,python-tox)
8274 ("python-wheel" ,python-wheel)
8275 ("python-jmespath" ,python-jmespath)))
8276 (home-page "https://github.com/boto/botocore")
8277 (synopsis "Low-level interface to AWS")
8278 (description "Botocore is a Python library that provides a low-level
8279interface to the Amazon Web Services (AWS) API.")
3f641af0 8280 (license license:asl2.0)))
935fcd5c
DT
8281
8282(define-public python2-botocore
8283 (package-with-python2 python-botocore))
f861b8b8
DT
8284
8285(define-public awscli
8286 (package
8287 (name "awscli")
d5ccf71e 8288 (version "1.11.5")
f861b8b8
DT
8289 (source
8290 (origin
8291 (method url-fetch)
d5ccf71e 8292 (uri (pypi-uri name version))
f861b8b8
DT
8293 (sha256
8294 (base32
d5ccf71e 8295 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8
DT
8296 (build-system python-build-system)
8297 (inputs
8298 `(("python-colorama" ,python-colorama)
8299 ("python-docutils" ,python-docutils)
8300 ("python-mock" ,python-mock)
8301 ("python-nose" ,python-nose)
8302 ("python-rsa" ,python-rsa)
8303 ("python-setuptools" ,python-setuptools)
8304 ("python-sphinx" ,python-sphinx)
8305 ("python-tox" ,python-tox)
8306 ("python-wheel" ,python-wheel)
d5ccf71e
LF
8307 ("python-botocore" ,python-botocore)
8308 ("python-s3transfer" ,python-s3transfer)))
f861b8b8
DT
8309 (home-page "http://aws.amazon.com/cli/")
8310 (synopsis "Command line client for AWS")
8311 (description "AWS CLI provides a unified command line interface to the
8312Amazon Web Services (AWS) API.")
3f641af0 8313 (license license:asl2.0)))
6a44697d
LF
8314
8315(define-public python-hypothesis
8316 (package
8317 (name "python-hypothesis")
bea6d94d 8318 (version "3.1.0")
6a44697d
LF
8319 (source (origin
8320 (method url-fetch)
8321 (uri (pypi-uri "hypothesis" version))
8322 (sha256
8323 (base32
bea6d94d 8324 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8325 (build-system python-build-system)
6a44697d
LF
8326 (propagated-inputs
8327 `(("python-flake8" ,python-flake8)
8328 ("python-pytest" ,python-pytest)))
8329 (synopsis "Library for property based testing")
8330 (description "Hypothesis is a library for testing your Python code against a
8331much larger range of examples than you would ever want to write by hand. It’s
8332based on the Haskell library, Quickcheck, and is designed to integrate
8333seamlessly into your existing Python unit testing work flow.")
8334 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8335 (license license:mpl2.0)
6f068e08 8336 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8337
8338(define-public python2-hypothesis
6f068e08
EF
8339 (let ((hypothesis (package-with-python2
8340 (strip-python2-variant python-hypothesis))))
8341 (package (inherit hypothesis)
8342 (native-inputs
8343 `(("python2-enum34" ,python2-enum34)
8344 ("python2-setuptools" ,python2-setuptools))))))
7517e73c
LF
8345
8346(define-public python-pytest-subtesthack
8347 (package
8348 (name "python-pytest-subtesthack")
8349 (version "0.1.1")
8350 (source (origin
8351 (method url-fetch)
8352 (uri (pypi-uri "pytest-subtesthack" version))
8353 (sha256
8354 (base32
8355 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8356 (build-system python-build-system)
8357 (native-inputs
8358 `(;; setuptools required for python-2 variant
8359 ("python-setuptools" ,python-setuptools)))
8360 (propagated-inputs
8361 `(("python-pytest" ,python-pytest)))
8362 (synopsis "Set-up and tear-down fixtures for unit tests")
8363 (description "This plugin allows you to set up and tear down fixtures within
8364unit test functions that use @code{py.test}. This is useful for using
8365@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8366function multiple times, without setting up or tearing down fixture state as is
8367normally the case.")
8368 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8369 (license license:unlicense)))
7517e73c
LF
8370
8371(define-public python2-pytest-subtesthack
8372 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8373
8374(define-public python2-xdo
8375 (package
8376 (name "python2-xdo")
8377 (version "0.2")
8378 (source (origin
8379 (method url-fetch)
8380 (uri (string-append
8381 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8382 "python-xdo_" version ".orig.tar.gz"))
8383 (sha256
8384 (base32
8385 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8386 (build-system python-build-system)
8387 (arguments
8388 `(#:python ,python-2
8389 #:tests? #f)) ; no tests provided
8390 (inputs
8391 `(("xdotool" ,xdotool)
8392 ("libX11" ,libx11)))
8393 (home-page "https://tracker.debian.org/pkg/python-xdo")
8394 (synopsis "Python library for simulating X11 keyboard/mouse input")
8395 (description "Provides bindings to libxdo for manipulating X11 via simulated
8396input. (Note that this is mostly a legacy library; you may wish to look at
8397python-xdo for newer bindings.)")
3f641af0 8398 (license license:bsd-3)))
0bdc1671 8399
cb34dc6c
CAW
8400(define-public python-wtforms
8401 (package
8402 (name "python-wtforms")
8403 (version "2.1")
8404 (source
8405 (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "WTForms" version ".zip"))
8408 (sha256
8409 (base32
8410 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8411 (build-system python-build-system)
8412 (native-inputs
8413 `(("unzip" ,unzip)))
8414 (home-page "http://wtforms.simplecodes.com/")
8415 (synopsis
8416 "Form validation and rendering library for Python web development")
8417 (description
8418 "WTForms is a flexible forms validation and rendering library
8419for Python web development. It is very similar to the web form API
8420available in Django, but is a standalone package.")
3f641af0 8421 (license license:bsd-3)
cb34dc6c
CAW
8422 (properties `((python2-variant . ,(delay python2-wtforms))))))
8423
8424(define-public python2-wtforms
8425 (package
8426 (inherit (package-with-python2
8427 (strip-python2-variant python-wtforms)))
8428 (inputs `(("python2-setuptools" ,python2-setuptools)))))
50aaec25
DT
8429
8430(define-public python-mako
8431 (package
8432 (name "python-mako")
8433 (version "1.0.3")
8434 (source
8435 (origin
8436 (method url-fetch)
8437 (uri (pypi-uri "Mako" version))
8438 (sha256
8439 (base32
8440 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8441 (build-system python-build-system)
8442 (native-inputs
8443 `(("python-markupsafe" ,python-markupsafe)
8444 ("python-mock" ,python-mock)
8445 ("python-nose" ,python-nose)))
8446 (home-page "http://www.makotemplates.org/")
8447 (synopsis "Templating language for Python")
8448 (description "Mako is a templating language for Python that compiles
8449templates into Python modules.")
8450 (license license:expat)
8451 (properties `((python2-variant . ,(delay python2-mako))))))
8452
8453(define-public python2-mako
8454 (let ((base (package-with-python2
8455 (strip-python2-variant python-mako))))
8456 (package
8457 (inherit base)
8458 (native-inputs
8459 (cons `("python2-setuptools" ,python2-setuptools)
8460 (package-native-inputs base))))))
ae00a41f
CAW
8461
8462(define-public python-waitress
8463 (package
8464 (name "python-waitress")
8465 (version "0.8.10")
8466 (source
8467 (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "waitress" version))
8470 (sha256
8471 (base32
8472 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8473 (build-system python-build-system)
8474 (home-page "https://github.com/Pylons/waitress")
8475 (synopsis "Waitress WSGI server")
8476 (description "Waitress is meant to be a production-quality pure-Python WSGI
8477server with very acceptable performance.")
3f641af0 8478 (license license:zpl2.1)
ae00a41f
CAW
8479 (properties `((python2-variant . ,(delay python2-waitress))))))
8480
8481(define-public python2-waitress
8482 (package
8483 (inherit (package-with-python2
8484 (strip-python2-variant python-waitress)))
8485 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
778a284b
CAW
8486
8487(define-public python-wsgiproxy2
8488 (package
8489 (name "python-wsgiproxy2")
8490 (version "0.4.2")
8491 (source
8492 (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8495 (sha256
8496 (base32
8497 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8498 (build-system python-build-system)
e359b31a
LF
8499 (arguments
8500 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8501 ;; support Python 3:
8502 ;; https://github.com/benoitc/restkit/issues/140
8503 #:tests? #f))
778a284b
CAW
8504 (native-inputs
8505 `(("unzip" ,unzip)
8506 ("python-nose" ,python-nose)
8507 ("python-coverage" ,python-coverage)))
8508 (propagated-inputs
8509 `(("python-six" ,python-six)
8510 ("python-webob" ,python-webob)))
8511 (home-page
8512 "https://github.com/gawel/WSGIProxy2/")
8513 (synopsis "WSGI Proxy with various http client backends")
8514 (description "WSGI turns HTTP requests into WSGI function calls.
8515WSGIProxy turns WSGI function calls into HTTP requests.
8516It also includes code to sign requests and pass private data,
8517and to spawn subprocesses to handle requests.")
8518 (license license:expat)
8519 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8520
8521(define-public python2-wsgiproxy2
8522 (let ((wsgiproxy2 (package-with-python2
8523 (strip-python2-variant python-wsgiproxy2))))
8524 (package
8525 (inherit wsgiproxy2)
8526 (inputs `(("python2-setuptools" ,python2-setuptools)
8527 ,@(package-inputs wsgiproxy2))))))
bb7518b1
CAW
8528
8529(define-public python-pastedeploy
8530 (package
8531 (name "python-pastedeploy")
8532 (version "1.5.2")
8533 (source
8534 (origin
8535 (method url-fetch)
8536 (uri (pypi-uri "PasteDeploy" version))
8537 (sha256
8538 (base32
8539 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8540 (build-system python-build-system)
8541 (native-inputs
8542 `(("python-nose" ,python-nose)))
8543 (propagated-inputs
8544 ;; This package uses pkg_resources, part of setuptools, during runtime,
8545 ;; hence why not a native-input.
8546 `(("python-setuptools" ,python-setuptools)))
8547 (home-page "http://pythonpaste.org/deploy/")
8548 (synopsis
8549 "Load, configure, and compose WSGI applications and servers")
8550 (description
8551 "This tool provides code to load WSGI applications and servers from URIs;
8552these URIs can refer to Python Eggs for INI-style configuration files. Paste
8553Script provides commands to serve applications based on this configuration
8554file.")
8555 (license license:expat)))
8556
8557(define-public python2-pastedeploy
8558 (package-with-python2 python-pastedeploy))
1cf53652 8559
c4a7904c
CAW
8560(define-public python-paste
8561 (package
8562 (name "python-paste")
8563 (version "2.0.2")
8564 (source
8565 (origin
8566 (method url-fetch)
8567 (uri (pypi-uri "Paste" version))
8568 (sha256
8569 (base32
8570 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8571 (patches (search-patches "python-paste-remove-website-test.patch"
8572 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8573 (build-system python-build-system)
8574 (native-inputs
8575 `(("python-nose" ,python-nose)))
8576 (propagated-inputs
8577 `(;; Uses pkg_resources provided by setuptools internally.
8578 ("python-setuptools" ,python-setuptools)
8579 ("python-six" ,python-six)))
8580 (arguments
8581 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8582 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8583 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8584 ;; still... things should be better by the next Paste release.)
8585 #:tests? #f))
8586 (home-page "http://pythonpaste.org")
8587 (synopsis
8588 "Python web development tools, focusing on WSGI")
8589 (description
8590 "Paste provides a variety of web development tools and middleware which
8591can be nested together to build web applications. Paste's design closely
8592follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8593 (license license:expat)
8594 (properties `((python2-variant . ,(delay python2-paste))))))
8595
8596(define-public python2-paste
8597 (let ((paste (package-with-python2
8598 (strip-python2-variant python-paste))))
8599 (package
8600 (inherit paste)
8601 (arguments
8602 ;; Tests are back for Python 2!
8603 `(#:tests? #t
8604 ,@(package-arguments paste))))))
8605
a8f20f63
CAW
8606(define-public python-pastescript
8607 (package
8608 (name "python-pastescript")
8609 (version "2.0.2")
8610 (source
8611 (origin
8612 (method url-fetch)
8613 (uri (pypi-uri "PasteScript" version))
8614 (sha256
8615 (base32
8616 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8617 (build-system python-build-system)
8618 (native-inputs
8619 `(("python-nose" ,python-nose)))
8620 (propagated-inputs
8621 `(;; Uses pkg_resources provided by setuptools internally.
8622 ("python-setuptools" ,python-setuptools)
8623 ("python-paste" ,python-paste)
8624 ("python-pastedeploy" ,python-pastedeploy)))
8625 (home-page "http://pythonpaste.org/script/")
8626 (arguments
8627 '(;; Unfortunately, this requires the latest unittest2,
8628 ;; but that requires traceback2 which requires linecache2 which requires
8629 ;; unittest2. So we're skipping tests for now.
8630 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8631 ;; so in theory we could get around this situation somehow.)
8632 #:tests? #f))
8633 (synopsis
8634 "Pluggable command line tool for serving web applications and more")
8635 (description
8636 "PasteScript is a plugin-friendly command line tool which provides a
8637variety of features, from launching web applications to bootstrapping project
8638layouts.")
8639 (license license:expat)))
8640
8641(define-public python2-pastescript
8642 (package-with-python2 python-pastescript))
8643
1cf53652
CAW
8644(define-public python-pyquery
8645 (package
8646 (name "python-pyquery")
aab76e80 8647 (version "1.2.13")
1cf53652
CAW
8648 (source
8649 (origin
8650 (method url-fetch)
8651 (uri (pypi-uri "pyquery" version))
8652 (sha256
8653 (base32
aab76e80 8654 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8655 (build-system python-build-system)
2ddbfa8c
LF
8656 (native-inputs
8657 `(("python-webob" ,python-webob)
8658 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8659 (propagated-inputs
8660 `(("python-lxml" ,python-lxml)
8661 ("python-cssselect" ,python-cssselect)))
8662 (home-page "https://github.com/gawel/pyquery")
8663 (synopsis "Make jQuery-like queries on xml documents")
8664 (description "pyquery allows you to make jQuery queries on xml documents.
8665The API is as much as possible the similar to jQuery. pyquery uses lxml for
8666fast xml and html manipulation.")
3f641af0 8667 (license license:bsd-3)
1cf53652
CAW
8668 (properties `((python2-variant . ,(delay python2-pyquery))))))
8669
8670(define-public python2-pyquery
8671 (let ((pyquery (package-with-python2
8672 (strip-python2-variant python-pyquery))))
8673 (package
8674 (inherit pyquery)
2ddbfa8c
LF
8675 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8676 ,@(package-native-inputs pyquery))))))
aa6313d6
CAW
8677
8678(define-public python-webtest
8679 (package
8680 (name "python-webtest")
8681 (version "2.0.20")
8682 (source
8683 (origin
8684 (method url-fetch)
8685 (uri (pypi-uri "WebTest" version))
8686 (sha256
8687 (base32
8688 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8689 (build-system python-build-system)
8690 (arguments
8691 `(;; Unfortunately we have to disable tests!
8692 ;; This release of WebTest is pinned to python-nose < 1.3,
8693 ;; but older versions of python-nose are plagued with the following
8694 ;; bug(s), which rears its ugly head during test execution:
8695 ;; https://github.com/nose-devs/nose/issues/759
8696 ;; https://github.com/nose-devs/nose/pull/811
8697 #:tests? #f))
8698 ;; Commented out code is no good, but in this case, once tests
8699 ;; are ready to be enabled again, we should put the following
8700 ;; in place:
8701 ;; (native-inputs
8702 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8703 ;; ; but see above comment
8704 ;; ("python-coverage" ,python-coverage)
8705 ;; ("python-mock" ,python-mock)
8706 ;; ("python-pastedeploy" ,python-pastedeploy)
8707 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8708 ;; ("python-pyquery" ,python-pyquery)))
8709 (propagated-inputs
8710 `(("python-waitress" ,python-waitress)
8711 ("python-webob" ,python-webob)
8712 ("python-six" ,python-six)
8713 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8714 (home-page "http://webtest.pythonpaste.org/")
8715 (synopsis "Helper to test WSGI applications")
8716 (description "Webtest allows you to test your Python web applications
8717without starting an HTTP server. It supports anything that supports the
8718minimum of WSGI.")
8719 (license license:expat)
8720 (properties `((python2-variant . ,(delay python2-webtest))))))
8721
8722(define-public python2-webtest
8723 (let ((webtest (package-with-python2
8724 (strip-python2-variant python-webtest))))
8725 (package
8726 (inherit webtest)
8727 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8728 ,@(package-native-inputs webtest))))))
4cb122cd
CAW
8729
8730(define-public python-anyjson
8731 (package
8732 (name "python-anyjson")
8733 (version "0.3.3")
8734 (source
8735 (origin
8736 (method url-fetch)
8737 (uri (pypi-uri "anyjson" version))
8738 (sha256
8739 (base32
8740 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8741 (build-system python-build-system)
8742 (arguments
8743 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8744 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8745 ;; whatever) so this transformation needs to be done before the tests
8746 ;; can be run. Maybe we could add a build step to transform beforehand
8747 ;; but it could be annoying/difficult.
8748 ;; We can enable tests for the Python 2 version, though, and do below.
8749 #:tests? #f))
8750 (home-page "http://bitbucket.org/runeh/anyjson/")
8751 (synopsis
8752 "Wraps best available JSON implementation in a common interface")
8753 (description
8754 "Anyjson loads whichever is the fastest JSON module installed
8755and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8756 (license license:bsd-3)
4cb122cd
CAW
8757 (properties `((python2-variant . ,(delay python2-anyjson))))))
8758
8759(define-public python2-anyjson
8760 (let ((anyjson (package-with-python2
8761 (strip-python2-variant python-anyjson))))
8762 (package
8763 (inherit anyjson)
8764 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8765 #:tests? #t
8766 ,@(package-arguments anyjson)))
8767 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8768 ("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8769
8770(define-public python-amqp
8771 (package
8772 (name "python-amqp")
8773 (version "1.4.9")
8774 (source
8775 (origin
8776 (method url-fetch)
8777 (uri (pypi-uri "amqp" version))
8778 (sha256
8779 (base32
8780 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8781 (build-system python-build-system)
8782 (native-inputs
8783 `(("python-nose" ,python-nose)
8784 ("python-mock" ,python-mock)))
8785 (home-page "http://github.com/celery/py-amqp")
8786 (synopsis
8787 "Low-level AMQP client for Python (fork of amqplib)")
8788 (description
8789 "This is a fork of amqplib which was originally written by Barry Pederson.
8790It is maintained by the Celery project, and used by kombu as a pure python
8791alternative when librabbitmq is not available.")
3f641af0 8792 (license license:lgpl2.1+)
8dfceab7
CAW
8793 (properties `((python2-variant . ,(delay python2-amqp))))))
8794
8795(define-public python2-amqp
8796 (let ((amqp (package-with-python2
8797 (strip-python2-variant python-amqp))))
8798 (package
8799 (inherit amqp)
8800 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8801 ;; unmaintained. Weirdly, does not do this on the python 3
8802 ;; version?
8803 #:tests? #f
8804 ,@(package-arguments amqp)))
8805 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8806 ,@(package-native-inputs amqp))))))
7d387305
CAW
8807
8808(define-public python-kombu
8809 (package
8810 (name "python-kombu")
8811 (version "3.0.33")
8812 (source
8813 (origin
8814 (method url-fetch)
8815 (uri (pypi-uri "kombu" version))
8816 (sha256
8817 (base32
8818 "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5"))))
8819 (build-system python-build-system)
8820 (native-inputs
8821 `(("python-mock" ,python-mock)
8822 ("python-nose" ,python-nose)))
8823 (propagated-inputs
8824 `(("python-anyjson" ,python-anyjson)
8825 ("python-amqp" ,python-amqp)))
8826 (home-page "http://kombu.readthedocs.org")
8827 (synopsis "Message passing library for Python")
8828 (description "The aim of Kombu is to make messaging in Python as easy as
8829possible by providing an idiomatic high-level interface for the AMQ protocol,
8830and also provide proven and tested solutions to common messaging problems.
8831AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8832message orientation, queuing, routing, reliability and security, for which the
8833RabbitMQ messaging server is the most popular implementation.")
3f641af0 8834 (license license:bsd-3)
7d387305
CAW
8835 (properties `((python2-variant . ,(delay python2-kombu))))))
8836
8837(define-public python2-kombu
8838 (let ((kombu (package-with-python2
8839 (strip-python2-variant python-kombu))))
8840 (package
8841 (inherit kombu)
8842 (inputs `(("python2-setuptools" ,python2-setuptools)
8843 ("python2-unittest2" ,python2-unittest2)
8844 ,@(package-inputs kombu))))))
b6f0b9fb
CAW
8845
8846(define-public python-billiard
8847 (package
8848 (name "python-billiard")
8849 (version "3.3.0.22")
8850 (source
8851 (origin
8852 (method url-fetch)
8853 (uri (pypi-uri "billiard" version))
8854 (sha256
8855 (base32
8856 "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj"))))
8857 (build-system python-build-system)
8858 (native-inputs
8859 `(("python-nose" ,python-nose)))
8860 (home-page "http://github.com/celery/billiard")
8861 (synopsis
8862 "Python multiprocessing fork with improvements and bugfixes")
8863 (description
8864 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8865multiprocessing package itself is a renamed and updated version of R Oudkerk's
8866pyprocessing package. This standalone variant is intended to be compatible with
8867Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 8868 (license license:bsd-3)
b6f0b9fb
CAW
8869 (properties `((python2-variant . ,(delay python2-billiard))))))
8870
8871(define-public python2-billiard
8872 (let ((billiard (package-with-python2
8873 (strip-python2-variant python-billiard))))
8874 (package
8875 (inherit billiard)
8876 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8877 ("python2-unittest2" ,python2-unittest2)
8878 ("python2-mock" ,python2-mock)
8879 ,@(package-native-inputs billiard))))))
22df6419
CAW
8880
8881(define-public python-celery
8882 (package
8883 (name "python-celery")
8884 (version "3.1.20")
8885 (source
8886 (origin
8887 (method url-fetch)
8888 (uri (pypi-uri "celery" version))
8889 (sha256
8890 (base32
8891 "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh"))))
8892 (build-system python-build-system)
8893 (native-inputs
8894 `(("python-nose" ,python-nose)))
a64cbb6f 8895 (inputs
22df6419 8896 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
8897 ("python-amqp" ,python-amqp)
8898 ("python-anyjson" ,python-anyjson)
22df6419
CAW
8899 ("python-billiard" ,python-billiard)
8900 ("python-kombu" ,python-kombu)))
8901 (home-page "http://celeryproject.org")
8902 (synopsis "Distributed Task Queue")
8903 (description "Celery is an asynchronous task queue/job queue based on
8904distributed message passing. It is focused on real-time operation, but
8905supports scheduling as well. The execution units, called tasks, are executed
8906concurrently on a single or more worker servers using multiprocessing,
8907Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8908synchronously (wait until ready).")
3f641af0 8909 (license license:bsd-3)
22df6419
CAW
8910 (properties `((python2-variant . ,(delay python2-celery))))))
8911
8912(define-public python2-celery
8913 (let ((celery (package-with-python2
8914 (strip-python2-variant python-celery))))
8915 (package
8916 (inherit celery)
8917 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8918 ("python2-unittest2" ,python2-unittest2)
8919 ("python2-mock" ,python2-mock)
8920 ,@(package-native-inputs celery))))))
97e32948
CAW
8921
8922(define-public python-translitcodec
8923 (package
8924 (name "python-translitcodec")
8925 (version "0.4.0")
8926 (source
8927 (origin
8928 (method url-fetch)
8929 (uri (pypi-uri "translitcodec" version))
8930 (sha256
8931 (base32
8932 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8933 (build-system python-build-system)
8934 (arguments
8935 `(#:tests? #f)) ; no tests provided
8936 (home-page
8937 "https://github.com/claudep/translitcodec")
8938 (synopsis
8939 "Unicode to 8-bit charset transliteration codec")
8940 (description
8941 "This package contains codecs for transliterating ISO 10646 texts into
8942best-effort representations using smaller coded character sets (ASCII,
8943ISO 8859, etc.).")
8944 (license license:expat)
8945 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8946
8947(define-public python2-translitcodec
8948 (package
8949 (inherit (package-with-python2
8950 (strip-python2-variant python-translitcodec)))
8951 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0c3b90d4
CAW
8952
8953(define-public python-editor
8954 (package
8955 (name "python-editor")
8956 (version "0.5")
8957 (source
8958 (origin
8959 (method url-fetch)
8960 (uri (pypi-uri "python-editor" version))
8961 (sha256
8962 (base32
8963 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8964 (build-system python-build-system)
8965 (home-page
8966 "https://github.com/fmoo/python-editor")
8967 (synopsis
8968 "Programmatically open an editor, capture the result")
8969 (description
8970 "python-editor is a library that provides the editor module for
8971programmatically interfacing with your system's $EDITOR.")
3f641af0 8972 (license license:asl2.0)
0c3b90d4
CAW
8973 (properties `((python2-variant . ,(delay python2-editor))))))
8974
8975(define-public python2-editor
8976 (package
8977 (inherit (package-with-python2
8978 (strip-python2-variant python-editor)))
8979 (inputs `(("python2-setuptools" ,python2-setuptools)))))
3276517c
LF
8980
8981(define-public python-sphinxcontrib-programoutput
8982 (package
8983 (name "python-sphinxcontrib-programoutput")
8984 (version "0.8")
8985 (source (origin
8986 (method url-fetch)
8987 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8988 (sha256
8989 (base32
8990 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8991 (build-system python-build-system)
8992 (propagated-inputs
8993 `(("python-docutils" ,python-docutils)
8994 ("python-sphinx" ,python-sphinx)))
8995 (synopsis "Sphinx extension to include program output")
8996 (description "A Sphinx extension to literally insert the output of arbitrary
8997commands into documents, helping you to keep your command examples up to date.")
8998 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
3f641af0 8999 (license license:bsd-2)
3276517c
LF
9000 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
9001
9002(define-public python2-sphinxcontrib-programoutput
9003 (package
9004 (inherit (package-with-python2
9005 (strip-python2-variant python-sphinxcontrib-programoutput)))
9006 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
548d7165
LF
9007
9008(define-public python-sphinx-repoze-autointerface
9009 (package
9010 (name "python-sphinx-repoze-autointerface")
328ae341 9011 (version "0.8")
548d7165
LF
9012 (source (origin
9013 (method url-fetch)
9014 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9015 (sha256
9016 (base32
328ae341 9017 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9018 (build-system python-build-system)
9019 (propagated-inputs
9020 `(("python-docutils" ,python-docutils)
9021 ("python-sphinx" ,python-sphinx)
9022 ("python-zope-interface" ,python-zope-interface)))
9023 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9024 (description "This package defines an extension for the Sphinx documentation
9025system. The extension allows generation of API documentation by
9026introspection of @code{zope.interface} instances in code.")
9027 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9028 (license license:repoze)))
548d7165
LF
9029
9030(define-public python2-sphinx-repoze-autointerface
9031 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9032
9033(define-public python-psycopg2
9034 (package
9035 (name "python-psycopg2")
9036 (version "2.6.1")
9037 (source
9038 (origin
9039 (method url-fetch)
9040 (uri (pypi-uri "psycopg2" version))
9041 (sha256
9042 (base32
9043 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9044 (build-system python-build-system)
9045 (arguments
9046 ;; Tests would require a postgresql database "psycopg2_test"
9047 ;; and a running postgresql database management service.
9048 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9049 (inputs
9050 `(("postgresql" ,postgresql))) ; libpq
9051 (home-page "http://initd.org/psycopg/")
9052 (synopsis "Python PostgreSQL adapter")
9053 (description
9054 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
3f641af0 9055 (license license:lgpl3+)
b31fbea5
DM
9056 (properties `((python2-variant . ,(delay python2-psycopg2))))))
9057
9058(define-public python2-psycopg2
9059 (package
9060 (inherit (package-with-python2
9061 (strip-python2-variant python-psycopg2)))
9062 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
eed1a61f
LF
9063
9064(define-public python-vobject
9065 (package
9066 (name "python-vobject")
9bed9b15 9067 (version "0.9.2")
eed1a61f
LF
9068 (source (origin
9069 (method url-fetch)
9070 (uri (pypi-uri "vobject" version))
9071 (sha256
9072 (base32
9bed9b15 9073 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f
LF
9074 (build-system python-build-system)
9075 (inputs
9076 `(("python-dateutil-2" ,python-dateutil-2)
9077 ("python-pyicu" ,python-pyicu)))
9078 (synopsis "Parse and generate vCard and vCalendar files")
9079 (description "Vobject is intended to be a full featured Python package for
9080parsing and generating vCard and vCalendar files. Currently, iCalendar files
9081are supported and well tested. vCard 3.0 files are supported, and all data
9082should be imported, but only a few components are understood in a sophisticated
9083way.")
9084 (home-page "http://eventable.github.io/vobject/")
3f641af0 9085 (license license:asl2.0)
eed1a61f
LF
9086 (properties `((python2-variant . ,(delay python2-vobject))))))
9087
9088(define-public python2-vobject
9089 (package
9090 (inherit (package-with-python2
9091 (strip-python2-variant python-vobject)))
9092 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cedac813
LF
9093
9094(define-public python-munkres
9095 (package
9096 (name "python-munkres")
9097 (version "1.0.7")
9098 (source (origin
9099 (method url-fetch)
9100 (uri (pypi-uri "munkres" version))
9101 (sha256
9102 (base32
9103 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9104 (build-system python-build-system)
9105 (arguments
9106 '(#:tests? #f)) ; no test suite
9107 (home-page "http://software.clapper.org/munkres/")
9108 (synopsis "Implementation of the Munkres algorithm")
9109 (description "The Munkres module provides an implementation of the Munkres
9110algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9111useful for solving the Assignment Problem.")
3f641af0 9112 (license license:bsd-3)))
cedac813
LF
9113
9114(define-public python2-munkres
9115 (package-with-python2 python-munkres))
f3b3d78f
LF
9116
9117(define-public python-flask
9118 (package
9119 (name "python-flask")
9120 (version "0.10.1")
9121 (source (origin
9122 (method url-fetch)
9123 (uri (pypi-uri "Flask" version))
9124 (sha256
9125 (base32
9126 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9127 (build-system python-build-system)
9128 (propagated-inputs
9129 `(("python-itsdangerous" ,python-itsdangerous)
9130 ("python-jinja2" ,python-jinja2)
9131 ("python-werkzeug" ,python-werkzeug)))
9132 (home-page "https://github.com/mitsuhiko/flask/")
9133 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9134 (description "Flask is a micro web framework based on the Werkzeug toolkit
9135and Jinja2 template engine. It is called a micro framework because it does not
9136presume or force a developer to use a particular tool or library.")
3f641af0 9137 (license license:bsd-3)
f3b3d78f
LF
9138 (properties `((python2-variant . ,(delay python2-flask))))))
9139
9140(define-public python2-flask
9141 (package (inherit (package-with-python2
9142 (strip-python2-variant python-flask)))
9143 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
603d665b
LF
9144
9145(define-public python-cookies
9146 (package
9147 (name "python-cookies")
9148 (version "2.2.1")
9149 (source (origin
9150 (method url-fetch)
9151 (uri (pypi-uri "cookies" version))
9152 (sha256
9153 (base32
9154 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9155 (build-system python-build-system)
9156 (arguments
9157 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9158 #:tests? #f))
9159 (native-inputs
9160 `(("python-pytest" ,python2-pytest)))
9161 (synopsis "HTTP cookie parser and renderer")
9162 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9163Python.")
9164 (home-page "https://gitlab.com/sashahart/cookies")
9165 (license license:expat)
9166 (properties `((python2-variant . ,(delay python2-cookies))))))
9167
9168(define-public python2-cookies
9169 (let ((cookies (package-with-python2
9170 (strip-python2-variant python-cookies))))
9171 (package (inherit cookies)
9172 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9173 ,@(package-native-inputs cookies))))))
0efde7d6
LF
9174
9175(define-public python-responses
9176 (package
9177 (name "python-responses")
9178 (version "0.5.1")
9179 (source (origin
9180 (method url-fetch)
9181 (uri (pypi-uri "responses" version))
9182 (sha256
9183 (base32
9184 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9185 (build-system python-build-system)
9186 (arguments
9187 `(;; Test suite is not distributed:
9188 ;; https://github.com/getsentry/responses/issues/38
9189 #:tests? #f))
9190 (native-inputs
9191 `(("python-cookies" ,python-cookies)
9192 ("python-mock" ,python-mock)))
9193 (propagated-inputs
9194 `(("python-requests" ,python-requests)
9195 ("python-six" ,python-six)))
9196 (home-page "https://github.com/getsentry/responses")
9197 (synopsis "Utility for mocking out the `requests` Python library")
9198 (description "A utility library for mocking out the `requests` Python
9199library.")
3f641af0 9200 (license license:asl2.0)
0efde7d6
LF
9201 (properties `((python2-variant . ,(delay python2-responses))))))
9202
9203(define-public python2-responses
9204 (let ((responses (package-with-python2
9205 (strip-python2-variant python-responses))))
9206 (package (inherit responses)
9207 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9208 ,@(package-native-inputs responses))))))
76b94885 9209
b7afd018
RW
9210(define-public python-whoosh
9211 (package
9212 (name "python-whoosh")
9213 (version "2.7.4")
9214 (source
9215 (origin
9216 (method url-fetch)
9217 (uri (pypi-uri "Whoosh" version))
9218 (sha256
9219 (base32
9220 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9221 (build-system python-build-system)
9222 (native-inputs
9223 `(("python-setuptools" ,python-setuptools)
9224 ("python-pytest" ,python-pytest)))
9225 (home-page "http://bitbucket.org/mchaput/whoosh")
9226 (synopsis "Full text indexing, search, and spell checking library")
9227 (description
9228 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9229checking library.")
9230 (license license:bsd-2)))
9231
9232(define-public python2-whoosh
9233 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9234 (package (inherit whoosh)
9235 (propagated-inputs
9236 `(("python2-backport-ssl-match-hostname"
9237 ,python2-backport-ssl-match-hostname)
9238 ,@(package-propagated-inputs whoosh))))))
9239
76b94885
LF
9240(define-public python-pathlib
9241 (package
9242 (name "python-pathlib")
9243 (version "1.0.1")
9244 (source (origin
9245 (method url-fetch)
9246 (uri (pypi-uri "pathlib" version))
9247 (sha256
9248 (base32
9249 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9250 (build-system python-build-system)
92a312dc
RW
9251 ;; The tests depend on the internal "test" module, which does not provide
9252 ;; a stable interface.
9253 (arguments `(#:tests? #f))
76b94885 9254 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9255 (synopsis "Object-oriented file system paths")
9256 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9257It offers the following advantages over using string objects:
9258
9259@enumerate
9260@item No more cumbersome use of os and os.path functions. Everything can
9261be done easily through operators, attribute accesses, and method calls.
9262@item Embodies the semantics of different path types. For example,
9263comparing Windows paths ignores casing.
9264@item Well-defined semantics, eliminating any inconsistencies or
9265ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9266@end enumerate
9267
9268Note: In Python 3.4, pathlib is now part of the standard library. For other
9269Python versions please consider python-pathlib2 instead, which tracks the
9270standard library module. This module (python-pathlib) isn't maintained
9271anymore.")
76b94885
LF
9272 (license license:expat)))
9273
9274(define-public python2-pathlib
9275 (package-with-python2 python-pathlib))
25a7db0a 9276
b7703c81
HG
9277(define-public python2-pathlib2
9278 (package
9279 (name "python2-pathlib2")
9280 (version "2.1.0")
9281 (source (origin
9282 (method url-fetch)
9283 (uri (pypi-uri "pathlib2" version))
9284 (sha256
9285 (base32
9286 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9287 (build-system python-build-system)
49a531f5
HG
9288 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9289 ;; version is 3.4 which already includes this package as part of the
9290 ;; standard library.
b7703c81
HG
9291 (arguments
9292 `(#:python ,python-2))
9293 (native-inputs
9294 `(("python2-setuptools" ,python2-setuptools)
9295 ("python2-six" ,python2-six)))
9296 (home-page "http://pypi.python.org/pypi/pathlib2/")
9297 (synopsis "Object-oriented file system paths - backport of standard
9298pathlib module")
9299 (description "The goal of pathlib2 is to provide a backport of standard
9300pathlib module which tracks the standard library module, so all the newest
9301features of the standard pathlib can be used also on older Python versions.
9302
9303Pathlib offers a set of classes to handle file system paths. It offers the
9304following advantages over using string objects:
9305
9306@enumerate
9307@item No more cumbersome use of os and os.path functions. Everything can
9308be done easily through operators, attribute accesses, and method calls.
9309@item Embodies the semantics of different path types. For example,
9310comparing Windows paths ignores casing.
9311@item Well-defined semantics, eliminating any inconsistencies or
9312ambiguities (forward vs. backward slashes, etc.).
9313@end enumerate")
9314 (license license:expat)))
9315
25a7db0a
LF
9316(define-public python-jellyfish
9317 (package
9318 (name "python-jellyfish")
9319 (version "0.5.3")
9320 (source (origin
9321 (method url-fetch)
9322 (uri (pypi-uri "jellyfish" version))
9323 (sha256
9324 (base32
9325 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9326 (build-system python-build-system)
9327 (native-inputs
9328 `(("python-pytest" ,python-pytest)))
9329 (home-page "https://github.com/jamesturk/jellyfish")
9330 (synopsis "Approximate and phonetic matching of strings")
9331 (description "Jellyfish uses a variety of string comparison and phonetic
9332encoding algorithms to do fuzzy string matching.")
3f641af0 9333 (license license:bsd-2)
25a7db0a
LF
9334 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9335
9336(define-public python2-jellyfish
9337 (let ((jellyfish (package-with-python2
9338 (strip-python2-variant python-jellyfish))))
9339 (package (inherit jellyfish)
9340 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9341 ("python2-unicodecsv" ,python2-unicodecsv)
9342 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9343
9344(define-public python2-unicodecsv
9345 (package
9346 (name "python2-unicodecsv")
9347 (version "0.14.1")
9348 (source (origin
9349 (method url-fetch)
9350 ;; The test suite is not included in the PyPi release.
9351 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9352 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9353 "archive/" version ".tar.gz"))
9354 (file-name (string-append name "-" version ".tar.gz"))
9355 (sha256
9356 (base32
9357 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9358 (build-system python-build-system)
9359 (arguments
9360 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9361 #:python ,python-2))
9362 (native-inputs
9363 `(("python2-setuptools" ,python2-setuptools)
9364 ("python2-unittest2" ,python2-unittest2)))
9365 (home-page "https://github.com/jdunck/python-unicodecsv")
9366 (synopsis "Unicode CSV module for Python 2")
9367 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9368module, adding support for Unicode strings.")
3f641af0 9369 (license license:bsd-2)))
064503aa
LF
9370
9371(define-public python-rarfile
9372 (package
9373 (name "python-rarfile")
9374 (version "2.7")
9375 (source (origin
9376 (method url-fetch)
9377 (uri (pypi-uri "rarfile" version))
9378 (sha256
9379 (base32
9380 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9381 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 9382 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
9383 (build-system python-build-system)
9384 (arguments
9385 '(#:phases
9386 (modify-phases %standard-phases
9387 (replace 'check
9388 ;; Many tests fail, but the installation proceeds.
9389 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9390 (native-inputs
9391 `(("which" ,which))) ; required for tests
9392 (propagated-inputs
9393 `(("libarchive" ,libarchive)))
9394 (home-page "https://github.com/markokr/rarfile")
9395 (synopsis "RAR archive reader for Python")
9396 (description "This is Python module for RAR archive reading. The interface
9397is made as zipfile like as possible.")
3f641af0 9398 (license license:isc)))
064503aa
LF
9399
9400(define-public python2-rarfile
9401 (package-with-python2 python-rarfile))
daeeea71
CM
9402
9403(define-public python-magic
9404 (package
9405 (name "python-magic")
9406 (version "0.4.3")
9407 (source
9408 (origin
9409 (method url-fetch)
9410 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9411 version ".tar.gz"))
9412 (sha256
9413 (base32
9414 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9415 (file-name (string-append name "-" version "-checkout"))))
9416 (build-system python-build-system)
9417 (arguments
9418 ;; The tests are unreliable, so don't run them. The tests fail
9419 ;; under Python3 because they were written for Python2 and
9420 ;; contain import statements that do not work in Python3. One of
9421 ;; the tests fails under Python2 because its assertions are
9422 ;; overly stringent; it relies on comparing output strings which
9423 ;; are brittle and can change depending on the version of
9424 ;; libmagic being used and the system on which the test is
9425 ;; running. In my case, under GuixSD 0.10.0, only one test
9426 ;; failed, and it seems to have failed only because the version
9427 ;; of libmagic that is packaged in Guix outputs a slightly
9428 ;; different (but not wrong) string than the one that the test
9429 ;; expected.
9430 '(#:tests? #f
9431 #:phases (modify-phases %standard-phases
9432 ;; Replace a specific method call with a hard-coded
9433 ;; path to the necessary libmagic.so file in the
9434 ;; store. If we don't do this, then the method call
9435 ;; will fail to find the libmagic.so file, which in
9436 ;; turn will cause any application using
9437 ;; python-magic to fail.
9438 (add-before 'build 'hard-code-path-to-libmagic
9439 (lambda* (#:key inputs #:allow-other-keys)
9440 (let ((file (assoc-ref inputs "file")))
9441 (substitute* "magic.py"
9442 (("ctypes.util.find_library\\('magic'\\)")
9443 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9444 #t)))
9445 (add-before 'install 'disable-egg-compression
9446 (lambda _
9447 (let ((port (open-file "setup.cfg" "a")))
9448 (display "\n[easy_install]\nzip_ok = 0\n"
9449 port)
9450 (close-port port)
9451 #t))))))
daeeea71
CM
9452 (native-inputs
9453 `(("python-setuptools" ,python-setuptools)))
9454 (inputs
9455 ;; python-magic needs to be able to find libmagic.so.
9456 `(("file" ,file)))
9457 (home-page "https://github.com/ahupp/python-magic")
9458 (synopsis "File type identification using libmagic")
9459 (description
9460 "This module uses ctypes to access the libmagic file type
9461identification library. It makes use of the local magic database and
9462supports both textual and MIME-type output. Note that this module and
9463the python-file module both provide a \"magic.py\" file; these two
9464modules, which are different and were developed separately, both serve
9465the same purpose: to provide Python bindings for libmagic.")
9466 (license license:expat)))
9467
9468(define-public python2-magic
9469 (package-with-python2 python-magic))
12af303f
CM
9470
9471(define-public python2-s3cmd
9472 (package
9473 (name "python2-s3cmd")
9474 (version "1.6.1")
9475 (source
9476 (origin
9477 (method url-fetch)
de67e922 9478 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9479 "s3cmd-" version ".tar.gz"))
9480 (sha256
9481 (base32
9482 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9483 (build-system python-build-system)
9484 (arguments
9485 ;; s3cmd is written for python2 only and contains no tests.
9486 `(#:python ,python-2
9487 #:tests? #f))
9488 (native-inputs
9489 `(("python2-setuptools" ,python2-setuptools)))
9490 (inputs
9491 `(("python2-dateutil" ,python2-dateutil)
9492 ;; The python-file package also provides a magic.py module.
9493 ;; This is an unfortunate state of affairs; however, s3cmd
9494 ;; fails to install if it cannot find specifically the
9495 ;; python-magic package. Thus we include it, instead of using
9496 ;; python-file. Ironically, s3cmd sometimes works better
9497 ;; without libmagic bindings at all:
9498 ;; https://github.com/s3tools/s3cmd/issues/198
9499 ("python2-magic" ,python2-magic)))
9500 (home-page "http://s3tools.org/s3cmd")
9501 (synopsis "Command line tool for S3-compatible storage services")
9502 (description
9503 "S3cmd is a command line tool for uploading, retrieving and managing data
9504in storage services that are compatible with the Amazon Simple Storage
9505Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9506GnuPG encryption, and more. It also supports management of Amazon's
9507CloudFront content delivery network.")
3f641af0 9508 (license license:gpl2+)))
4323a5f0
AE
9509
9510(define-public python-pkgconfig
9511 (package
9512 (name "python-pkgconfig")
9513 (version "1.1.0")
9514 (source
9515 (origin
9516 (method url-fetch)
9517 (uri (pypi-uri "pkgconfig" version))
9518 (sha256
9519 (base32
9520 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9521 (build-system python-build-system)
9522 (native-inputs
9523 `(("python-nose" ,python-nose)
9524 ("python-setuptools" ,python-setuptools)))
9525 (inputs
9526 `(("pkg-config" ,pkg-config)))
9527 (arguments
9528 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9529 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9530 #:tests? #f
9531 ;; Prevent creation of the egg. This works around
9532 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9533 #:configure-flags '("--single-version-externally-managed" "--root=/")
9534 ;; Hard-code the path to pkg-config.
9535 #:phases
9536 (modify-phases %standard-phases
9537 (add-before
9538 'build 'patch
9539 (lambda _
9540 (substitute* "pkgconfig/pkgconfig.py"
9541 (("cmd = 'pkg-config")
9542 (string-append "cmd = '" (which "pkg-config"))))
9543 #t)))))
9544 (home-page "http://github.com/matze/pkgconfig")
9545 (synopsis "Python interface for pkg-config")
9546 (description "This module provides a Python interface to pkg-config. It
9547can be used to find all pkg-config packages, check if a package exists,
9548check if a package meets certain version requirements, query CFLAGS and
9549LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9550 (license license:expat)))
4323a5f0
AE
9551
9552(define-public python2-pkgconfig
9553 (package-with-python2 python-pkgconfig))
9554
2e697322
BW
9555(define-public python-bz2file
9556 (package
9557 (name "python-bz2file")
9558 (version "0.98")
9559 (source
9560 (origin
9561 (method url-fetch)
9562 (uri (pypi-uri "bz2file" version))
9563 (sha256
9564 (base32
9565 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9566 (build-system python-build-system)
9567 (arguments
124df723 9568 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9569 (home-page "https://github.com/nvawda/bz2file")
9570 (synopsis "Read and write bzip2-compressed files")
9571 (description
9572 "Bz2file is a Python library for reading and writing bzip2-compressed
9573files. It contains a drop-in replacement for the I/O interface in the
9574standard library's @code{bz2} module, including features from the latest
9575development version of CPython that are not available in older releases.")
3f641af0 9576 (license license:asl2.0)
2e697322
BW
9577 (properties `((python2-variant . ,(delay python2-bz2file))))))
9578
9579(define-public python2-bz2file
9580 (let ((base (package-with-python2
9581 (strip-python2-variant python-bz2file))))
9582 (package
9583 (inherit base)
9584 (native-inputs
124df723
BW
9585 `(("python2-setuptools" ,python2-setuptools)))
9586 (arguments
752bb447
BW
9587 `(#:python ,python-2
9588 #:phases
124df723
BW
9589 (modify-phases %standard-phases
9590 ;; 'python setup.py test' does not work as of 0.98.
9591 ;; There is only the one test file, so we run it directly.
9592 (replace 'check
9593 (lambda _ (zero? (system* "python"
9594 "test_bz2file.py"))))))))))
2e697322 9595
da4ac1aa
BW
9596(define-public python-future
9597 (package
9598 (name "python-future")
9599 (version "0.15.2")
9600 (source
9601 (origin
9602 (method url-fetch)
9603 (uri (pypi-uri "future" version))
9604 (sha256
9605 (base32
9606 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9607 (build-system python-build-system)
9608 ;; Many tests connect to the network or are otherwise flawed.
9609 ;; https://github.com/PythonCharmers/python-future/issues/210
9610 (arguments
9611 `(#:tests? #f))
9612 (home-page "http://python-future.org")
9613 (synopsis "Single-source support for Python 3 and 2")
9614 (description
9615 "@code{python-future} is the missing compatibility layer between Python 2 and
9616Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9617to support both Python 2 and Python 3 with minimal overhead.")
9618 (license license:expat)
9619 (properties `((python2-variant . ,(delay python2-future))))))
9620
9621(define-public python2-future
9622 (let ((base (package-with-python2
9623 (strip-python2-variant python-future))))
9624 (package
9625 (inherit base)
9626 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9627
8e451885
AE
9628(define-public python-cysignals
9629 (package
9630 (name "python-cysignals")
9631 (version "1.1.0")
9632 (source
9633 (origin
9634 (method url-fetch)
9635 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9636 (sha256
9637 (base32
9638 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9639 (build-system python-build-system)
9640 (native-inputs
9641 `(("python-cython" ,python-cython)
9642 ("python-setuptools" ,python-setuptools)
9643 ("python-sphinx" ,python-sphinx)))
9644 (inputs
9645 `(("pari-gp" ,pari-gp)))
9646 (arguments
9647 `(#:modules ((guix build python-build-system)
9648 ((guix build gnu-build-system) #:prefix gnu:)
9649 (guix build utils))
9650 ;; FIXME: Tests are executed after installation and currently fail
9651 ;; when not installing into standard locations; the author is working
9652 ;; on a fix.
9653 #:tests? #f
9654 #:phases
9655 (modify-phases %standard-phases
9656 (add-before
9657 'build 'configure
9658 (assoc-ref gnu:%standard-phases 'configure)))))
9659 (home-page
9660 "https://github.com/sagemath/cysignals")
9661 (synopsis
9662 "Handling of interrupts and signals for Cython")
9663 (description
9664 "The cysignals package provides mechanisms to handle interrupts (and
9665other signals and errors) in Cython code, using two related approaches,
9666for mixed Cython/Python code or external C libraries and pure Cython code,
9667respectively.")
3f641af0 9668 (license license:lgpl3+)))
8e451885
AE
9669
9670(define-public python2-cysignals
9671 (package-with-python2 python-cysignals))
9672
63bcec71
DM
9673(define-public python2-shedskin
9674 (package
9675 (name "python2-shedskin")
9676 (version "0.9.4")
9677 (source
9678 (origin
9679 (method url-fetch)
9680 (uri (string-append "https://github.com/shedskin/shedskin/"
9681 "releases/download/v" version
9682 "/shedskin-" version ".tgz"))
9683 (sha256
9684 (base32
9685 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9686 (build-system python-build-system)
9687 (arguments
9688 `(#:python ,python-2
9689 #:phases (modify-phases %standard-phases
9690 (add-after 'unpack 'fix-resulting-include-libs
9691 (lambda* (#:key inputs #:allow-other-keys)
9692 (let ((libgc (assoc-ref inputs "libgc"))
9693 (pcre (assoc-ref inputs "pcre")))
9694 (substitute* "shedskin/makefile.py"
9695 (("variable == 'CCFLAGS':[ ]*")
9696 (string-append "variable == 'CCFLAGS':\n"
9697 " line += ' -I " pcre "/include"
9698 " -I " libgc "/include'"))
9699 (("variable == 'LFLAGS':[ ]*")
9700 (string-append "variable == 'LFLAGS':\n"
9701 " line += ' -L" pcre "/lib"
9702 " -L " libgc "/lib'")))
9703 #t))))))
9704 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
9705 (inputs `(("pcre" ,pcre)
9706 ("libgc" ,libgc)))
9707 (home-page "https://shedskin.github.io/")
9708 (synopsis "Experimental Python-2 to C++ Compiler")
9709 (description (string-append "This is an experimental compiler for a subset of
9710Python. It generates C++ code and a Makefile."))
3f641af0 9711 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9712
9713(define-public python2-rope
9714 (package
9715 (name "python2-rope")
9716 (version "0.10.3")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "rope" version))
9721 (sha256
9722 (base32
9723 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9724 (arguments
9725 ;; Rope is currently python-2 only.
9726 ;; https://github.com/python-rope/rope/issues/57
9727 `(#:python ,python-2))
9728 (build-system python-build-system)
9729 (native-inputs
9730 `(("python2-unittest2" ,python2-unittest2)
9731 ("python2-setuptools" ,python2-setuptools)))
9732 (home-page "https://github.com/python-rope/rope")
9733 (synopsis "Refactoring library for Python")
9734 (description "Rope is a refactoring library for Python. It facilitates
9735the renaming, moving and extracting of attributes, functions, modules, fields
9736and parameters in Python 2 source code. These refactorings can also be applied
9737to occurences in strings and comments.")
3f641af0 9738 (license license:gpl2)))
6ba8ca17
9739
9740(define-public python-py3status
9741 (package
9742 (name "python-py3status")
d2262d70 9743 (version "3.1")
6ba8ca17
9744 (source
9745 (origin
9746 (method url-fetch)
9747 (uri (pypi-uri "py3status" version))
9748 (sha256
9749 (base32
d2262d70 9750 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17
9751 (build-system python-build-system)
9752 (native-inputs
9753 `(("python-setuptools" ,python-setuptools)))
9754 (home-page "https://github.com/ultrabug/py3status")
9755 (synopsis "Extensible i3status wrapper written in Python")
9756 (description "py3status is an i3status wrapper which extends i3status
9757functionality in a modular way, allowing you to extend your panel with your
9758own code, responding to click events and updating clock every second.")
3f641af0 9759 (license license:bsd-3)))
b8fdbca3
HG
9760
9761(define-public python-tblib
9762 (package
9763 (name "python-tblib")
9764 (version "1.3.0")
9765 (source (origin
9766 (method url-fetch)
9767 (uri (pypi-uri "tblib" version))
9768 (sha256 (base32
9769 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9770 (build-system python-build-system)
9771 (arguments
9772 `(#:phases
9773 (modify-phases %standard-phases
9774 (replace 'check
9775 (lambda _
9776 ;; Upstream runs tests after installation and the package itself
9777 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9778 ;; found.
9779 (setenv "PYTHONPATH"
9780 (string-append (getcwd) "/build/lib:"
9781 (getenv "PYTHONPATH")))
9782 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9783 (native-inputs
9784 `(("python-pytest" ,python-pytest)
9785 ("python-setuptools" ,python-setuptools)
9786 ("python-six" ,python-six)))
9787 (home-page "https://github.com/ionelmc/python-tblib")
9788 (synopsis "Traceback serialization library")
9789 (description
9790 "Traceback serialization allows you to:
9791
9792@enumerate
9793@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9794different processes. This allows better error handling when running code over
9795multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9796
9797@item Parse traceback strings and raise with the parsed tracebacks.
9798@end itemize")
3f641af0 9799 (license license:bsd-3)))
b8fdbca3
HG
9800
9801(define-public python2-tblib
9802 (package-with-python2 python-tblib))
1a024de4
HG
9803
9804(define-public python-sqlparse
9805 (package
9806 (name "python-sqlparse")
9807 (version "0.1.19")
9808 (source (origin
9809 (method url-fetch)
9810 (uri (pypi-uri "sqlparse" version))
9811 (sha256
9812 (base32
9813 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9814 (build-system python-build-system)
9815 (arguments
9816 `(#:phases
9817 (modify-phases %standard-phases
9818 (replace 'check
9819 (lambda* _
9820 ;; setup.py-integrated 2to3 only affects the build files, but
9821 ;; py.test is using the source files. So we need to convert them
9822 ;; manually.
9823 (when (zero? (system* "python3"))
9824 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9825 (zero? (system* "py.test")))))))
9826 (native-inputs
9827 `(("python-pytest" ,python-pytest)
9828 ("python-setuptools" ,python-setuptools)))
9829 (home-page "https://github.com/andialbrecht/sqlparse")
9830 (synopsis "Non-validating SQL parser")
9831 (description "Sqlparse is a non-validating SQL parser for Python. It
9832provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9833 (license license:bsd-3)))
1a024de4
HG
9834
9835(define-public python2-sqlparse
9836 (package-with-python2 python-sqlparse))
68b9d242
SB
9837
9838(define-public python-greenlet
9839 (package
9840 (name "python-greenlet")
9841 (version "0.4.9")
9842 (source (origin
9843 (method url-fetch)
9844 (uri (pypi-uri "greenlet" version))
9845 (sha256
9846 (base32
9847 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9848 (build-system python-build-system)
9849 (native-inputs
9850 `(("python-setuptools" ,python-setuptools)))
9851 (home-page "https://greenlet.readthedocs.io/")
9852 (synopsis "Lightweight in-process concurrent programming")
9853 (description
9854 "Greenlet package is a spin-off of Stackless, a version of CPython
9855that supports micro-threads called \"tasklets\". Tasklets run
9856pseudo-concurrently (typically in a single or a few OS-level threads) and
9857are synchronized with data exchanges on \"channels\".")
3f641af0 9858 (license (list license:psfl license:expat))))
68b9d242
SB
9859
9860(define-public python2-greenlet
9861 (package-with-python2 python-greenlet))
d79a343b
SB
9862
9863(define-public python-gevent
9864 (package
9865 (name "python-gevent")
9866 (version "1.1.1")
9867 (source (origin
9868 (method url-fetch)
9869 (uri (pypi-uri "gevent" version))
9870 (sha256
9871 (base32
9872 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9873 (modules '((guix build utils)))
9874 (snippet
9875 '(begin
9876 ;; unbunding libev and c-ares
9877 (for-each delete-file-recursively '("libev" "c-ares"))
9878 ;; fixing testsuite
9879 (call-with-output-file "greentest/__init__.py" noop)
9880 (substitute* "greentest/testrunner.py"
9881 (("import util") "from . import util")
9882 (("from util import log") "from .util import log"))))))
9883 (build-system python-build-system)
9884 (propagated-inputs
9885 `(("python-greenlet" ,python-greenlet)))
9886 (native-inputs
9887 `(("python-setuptools" ,python-setuptools)
9888 ("python-six" ,python-six)))
9889 (inputs
9890 `(("c-ares" ,c-ares)
9891 ("libev" ,libev)))
9892 (home-page "http://www.gevent.org/")
9893 (synopsis "Coroutine-based network library")
9894 (description
9895 "gevent is a coroutine-based Python networking library that uses greenlet
9896to provide a high-level synchronous API on top of the libev event loop.")
9897 (license license:expat)))
9898
9899(define-public python2-gevent
9900 (package-with-python2 python-gevent))
da3aeeb6
SB
9901
9902(define-public python-twisted
9903 (package
9904 (name "python-twisted")
9905 (version "16.2.0")
9906 (source (origin
9907 (method url-fetch)
8ea8e8d3 9908 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9909 (sha256
9910 (base32
9911 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9912 (build-system python-build-system)
9913 (native-inputs
45912170
SB
9914 `(("python-setuptools" ,python-setuptools)))
9915 (propagated-inputs
9916 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
9917 (home-page "https://twistedmatrix.com/")
9918 (synopsis "Asynchronous networking framework written in Python")
9919 (description
9920 "Twisted is an extensible framework for Python programming, with special
9921focus on event-based network programming and multiprotocol integration.")
9922 (license license:expat)))
9923
9924(define-public python2-twisted
9925 (package-with-python2 python-twisted))
d0b6fed6 9926
4d3fa5a4
EF
9927(define-public python-pika
9928 (package
9929 (name "python-pika")
9930 (version "0.10.0")
9931 (source
9932 (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "pika" version))
9935 (sha256
9936 (base32
9937 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9938 (build-system python-build-system)
9939 (native-inputs
269d9172
LF
9940 `(("python-pyev" ,python-pyev)
9941 ("python-tornado" ,python-tornado)
9942 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
9943 (home-page "https://pika.readthedocs.org")
9944 (synopsis "Pure Python AMQP Client Library")
9945 (description
9946 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9947Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9948network support library.")
9949 (license license:bsd-3)))
9950
9951(define-public python2-pika
9952 (package-with-python2 python-pika))
9953
d0b6fed6
DM
9954(define-public python-ply
9955 (package
9956 (name "python-ply")
9957 (version "3.8")
9958 (source
9959 (origin
9960 (method url-fetch)
9961 (uri (string-append
9962 "https://pypi.python.org/packages/"
9963 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9964 "/ply-" version ".tar.gz"))
9965 (sha256
9966 (base32
9967 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9968 (build-system python-build-system)
9969 (home-page "http://www.dabeaz.com/ply/")
9970 (synopsis "Python Lex & Yacc")
9971 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9972It uses LR parsing and does extensive error checking.")
3f641af0 9973 (license license:bsd-3)
d0b6fed6
DM
9974 (properties `((python2-variant . ,(delay python2-ply))))))
9975
9976(define-public python2-ply
9977 (package
9978 (inherit (package-with-python2
9979 (strip-python2-variant python-ply)))
9980 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
d951bd54
SB
9981
9982(define-public python-tabulate
9983 (package
9984 (name "python-tabulate")
9985 (version "0.7.5")
9986 (source (origin
9987 (method url-fetch)
9988 (uri (pypi-uri "tabulate" version))
9989 (sha256
9990 (base32
9991 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9992 ;; Fix tests
9993 (modules '((guix build utils)))
9994 (snippet '(substitute* '("test/test_cli.py"
9995 "test/test_input.py"
9996 "test/test_output.py"
9997 "test/test_regression.py")
9998 (("from common") "from nose.tools")))))
9999 (build-system python-build-system)
10000 (native-inputs
10001 `(("python-setuptools" ,python-setuptools)
10002 ;; For testing
10003 ("python-nose" ,python-nose)))
10004 (home-page "https://bitbucket.org/astanin/python-tabulate")
10005 (synopsis "Pretty-print tabular data")
10006 (description
10007 "Tabulate is a library and command-line utility to pretty-print tabular
10008data in Python.")
10009 (license license:expat)))
10010
10011(define-public python2-tabulate
10012 (package-with-python2 python-tabulate))
1c4c8a33
SB
10013
10014(define-public python-kazoo
10015 (package
10016 (name "python-kazoo")
10017 (version "2.2.1")
10018 (source
10019 (origin
10020 (method url-fetch)
10021 (uri (pypi-uri "kazoo" version))
10022 (sha256
10023 (base32
10024 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10025 (build-system python-build-system)
10026 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10027 (native-inputs
c18899e8
SB
10028 `(("python-setuptools" ,python-setuptools)))
10029 (propagated-inputs
10030 `(("python-six" ,python-six)))
1c4c8a33
SB
10031 (home-page "https://kazoo.readthedocs.org")
10032 (synopsis "High-level Zookeeper client library")
10033 (description
10034 "Kazoo is a Python client library for the Apache Zookeeper distributed
10035application service. It is designed to be easy to use and to avoid common
10036programming errors.")
3f641af0 10037 (license license:asl2.0)))
1c4c8a33
SB
10038
10039(define-public python2-kazoo
10040 (package-with-python2 python-kazoo))
45dda35e
SB
10041
10042(define-public python-pykafka
10043 (package
10044 (name "python-pykafka")
10045 (version "2.4.0")
10046 (source (origin
10047 (method url-fetch)
c6bccf71
EF
10048 (uri (string-append
10049 "https://pypi.python.org/packages/8b/3e/"
10050 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10051 "pykafka-" version ".tar.gz"))
45dda35e
SB
10052 (sha256
10053 (base32
10054 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10055 (build-system python-build-system)
10056 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10057 (native-inputs
c8fa3d9b
SB
10058 `(("python-setuptools" ,python-setuptools)))
10059 (propagated-inputs
45dda35e
SB
10060 `(("python-gevent" ,python-gevent)
10061 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10062 ("python-tabulate" ,python-tabulate)))
10063 (inputs
10064 `(("librdkafka" ,librdkafka)))
10065 (home-page "https://pykafka.readthedocs.io/")
10066 (synopsis "Apache Kafka client for Python")
10067 (description
10068 "PyKafka is a client for the Apache Kafka distributed messaging system.
10069It includes Python implementations of Kafka producers and consumers, which
10070are optionally backed by a C extension built on librdkafka.")
3f641af0 10071 (license license:asl2.0)))
45dda35e
SB
10072
10073(define-public python2-pykafka
10074 (package-with-python2 python-pykafka))
a44fd439
DM
10075
10076(define-public python-wcwidth
10077 (package
10078 (name "python-wcwidth")
10079 (version "0.1.6")
10080 (source
10081 (origin
10082 (method url-fetch)
10083 (uri (string-append
10084 "https://pypi.python.org/packages/"
10085 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10086 "wcwidth-" version ".tar.gz"))
10087 (sha256
10088 (base32
10089 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10090 (build-system python-build-system)
10091 (home-page "https://github.com/jquast/wcwidth")
66e07664 10092 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10093 (description "Wcwidth measures the number of terminal column cells of
10094wide-character codes. It is useful for those implementing a terminal emulator,
10095or programs that carefully produce output to be interpreted by one. It is a
10096Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10097specified in POSIX.1-2001 and POSIX.1-2008.")
e4875826
LF
10098 (license license:expat)
10099 (properties `((python2-variant . ,(delay python2-wcwidth))))))
a44fd439
DM
10100
10101(define-public python2-wcwidth
10102 (package
10103 (inherit (package-with-python2
10104 (strip-python2-variant python-wcwidth)))
10105 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0de78c95
DP
10106
10107(define-public python2-jsonrpclib
10108 (package
10109 (name "python2-jsonrpclib")
10110 (version "0.1.7")
10111 (source (origin
10112 (method url-fetch)
10113 (uri (string-append
10114 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10115 "jsonrpclib-" version ".tar.gz"))
10116 (sha256
10117 (base32
10118 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10119 (build-system python-build-system)
10120 (native-inputs
10121 `(("python2-setuptools" ,python2-setuptools)))
10122 (arguments
10123 `(#:tests? #f
10124 #:python ,python-2))
10125 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10126 (synopsis "Implementation of JSON-RPC specification for Python")
10127 (description
10128 "This library is an implementation of the JSON-RPC specification.
10129It supports both the original 1.0 specification, as well as the
10130new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10131etc.")
3f641af0 10132 (license license:asl2.0)))
9250b0f3
SB
10133
10134(define-public python-chai
10135 (package
10136 (name "python-chai")
10137 (version "1.1.1")
10138 (source (origin
10139 (method url-fetch)
10140 (uri (pypi-uri "chai" version))
10141 (sha256
10142 (base32
10143 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10144 (build-system python-build-system)
10145 (native-inputs
10146 `(("python-setuptools" ,python-setuptools)))
10147 (home-page "https://github.com/agoragames/chai")
10148 (synopsis "Mocking framework for Python")
10149 (description
10150 "Chai provides an api for mocking, stubbing and spying your python
10151objects, patterned after the Mocha library for Ruby.")
3f641af0 10152 (license license:bsd-3)))
9250b0f3
SB
10153
10154(define-public python2-chai
10155 (package-with-python2 python-chai))
10156
ae43baa8
SB
10157(define-public python-arrow
10158 (package
10159 (name "python-arrow")
10160 (version "0.8.0")
10161 (source (origin
10162 (method url-fetch)
10163 (uri (pypi-uri "arrow" version))
10164 (sha256
10165 (base32
10166 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10167 (build-system python-build-system)
10168 (native-inputs
10169 `(("python-setuptools" ,python-setuptools)
ae43baa8
SB
10170 ;; For testing
10171 ("python-chai" ,python-chai)
10172 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10173 (propagated-inputs
10174 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10175 (home-page "https://github.com/crsmithdev/arrow/")
10176 (synopsis "Dates and times for Python")
10177 (description
10178 "Arrow is a Python library to creating, manipulating, formatting and
10179converting dates, times, and timestamps. It implements and updates the
10180datetime type.")
3f641af0 10181 (license license:asl2.0)))
ae43baa8
SB
10182
10183(define-public python2-arrow
10184 (package-with-python2 python-arrow))
10185
1f2b62a4
SB
10186(define-public python-inflection
10187 (package
10188 (name "python-inflection")
10189 (version "0.3.1")
10190 (source
10191 (origin (method url-fetch)
10192 (uri (pypi-uri "inflection" version))
10193 (sha256
10194 (base32
10195 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10196 (build-system python-build-system)
10197 (native-inputs
10198 `(("python-setuptools" ,python-setuptools)))
10199 (home-page "http://github.com/jpvanhal/inflection")
10200 (synopsis "Python string transformation library")
10201 (description
10202 "Inflection is a string transformation library. It singularizes
10203and pluralizes English words, and transforms strings from CamelCase to
10204underscored string.")
10205 (license license:expat)))
10206
10207(define-public python2-inflection
10208 (package-with-python2 python-inflection))
10209
18995566
SB
10210(define-public python-pylev
10211 (package
10212 (name "python-pylev")
10213 (version "1.3.0")
10214 (source (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "pylev" version))
10217 (sha256
10218 (base32
10219 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10220 (build-system python-build-system)
10221 (native-inputs
10222 `(("python-setuptools" ,python-setuptools)))
10223 (home-page "http://github.com/toastdriven/pylev")
10224 (synopsis "Levenshtein distance implementation in Python")
10225 (description "Pure Python Levenshtein implementation, based off the
10226Wikipedia code samples at
10227@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10228 (license license:bsd-3)))
18995566
SB
10229
10230(define-public python2-pylev
10231 (package-with-python2 python-pylev))
10232
f5deff7a
SB
10233(define-public python-cleo
10234 (package
10235 (name "python-cleo")
10236 (version "0.4.1")
10237 (source (origin
10238 (method url-fetch)
10239 (uri (pypi-uri "cleo" version))
10240 (sha256
10241 (base32
10242 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10243 (build-system python-build-system)
10244 (native-inputs
9403150a 10245 `(("python-setuptools" ,python-setuptools)
f5deff7a
SB
10246 ;; For testing
10247 ("python-mock" ,python-mock)
10248 ("python-pytest" ,python-pytest)))
9403150a
SB
10249 (propagated-inputs
10250 `(("python-psutil" ,python-psutil)
10251 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10252 (home-page "https://github.com/sdispater/cleo")
10253 (synopsis "Command-line arguments library for Python")
10254 (description
10255 "Cleo allows you to create command-line commands with signature in
10256docstring and colored output.")
10257 (license license:expat)))
10258
10259(define-public python2-cleo
10260 (package-with-python2 python-cleo))
10261
77cadb43
SB
10262(define-public python-lazy-object-proxy
10263 (package
10264 (name "python-lazy-object-proxy")
10265 (version "1.2.2")
10266 (source (origin
10267 (method url-fetch)
10268 (uri (pypi-uri "lazy-object-proxy" version))
10269 (sha256
10270 (base32
10271 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10272 (build-system python-build-system)
10273 (native-inputs
10274 `(("python-setuptools" ,python-setuptools)))
10275 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10276 (synopsis "Lazy object proxy for python")
10277 (description
10278 "Lazy object proxy is an object that wraps a callable but defers the call
10279until the object is actually required, and caches the result of said call.")
3f641af0 10280 (license license:bsd-2)))
77cadb43
SB
10281
10282(define-public python2-lazy-object-proxy
10283 (package-with-python2 python-lazy-object-proxy))
10284
5477e05f
SB
10285(define-public python-dnspython
10286 (package
10287 (name "python-dnspython")
6c514128 10288 (version "1.15.0")
5477e05f
SB
10289 (source (origin
10290 (method url-fetch)
10291 (uri (string-append "http://www.dnspython.org/kits/"
10292 version "/dnspython-" version ".tar.gz"))
10293 (sha256
10294 (base32
6c514128 10295 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10296 (build-system python-build-system)
10297 (arguments '(#:tests? #f)) ; XXX: requires internet access
10298 (native-inputs
10299 `(("python-setuptools" ,python-setuptools)))
10300 (home-page "http://www.dnspython.org")
10301 (synopsis "DNS toolkit for Python")
10302 (description
10303 "dnspython is a DNS toolkit for Python. It supports almost all record
10304types. It can be used for queries, zone transfers, and dynamic updates.
10305It supports TSIG authenticated messages and EDNS0.")
10306 (license license:expat)))
10307
10308(define-public python2-dnspython
10309 (package-with-python2 python-dnspython))
10310
22711e25
SB
10311(define-public python-email-validator
10312 (package
10313 (name "python-email-validator")
10314 (version "1.0.1")
10315 (source
10316 (origin (method url-fetch)
10317 (uri (pypi-uri "email_validator" version))
10318 (sha256
10319 (base32
10320 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10321 (build-system python-build-system)
10322 (arguments
10323 '(#:phases
10324 (modify-phases %standard-phases
10325 (add-before 'build 'use-dnspython
10326 (lambda _
10327 (substitute* "setup.py"
10328 (("dnspython3") "dnspython"))
10329 #t)))))
10330 (native-inputs
d42560bd
SB
10331 `(("python-setuptools" ,python-setuptools)))
10332 (propagated-inputs
22711e25 10333 `(("python-dnspython" ,python-dnspython)
d42560bd 10334 ("python-idna" ,python-idna)))
22711e25
SB
10335 (home-page "https://github.com/JoshData/python-email-validator")
10336 (synopsis "Email address validation library for Python")
10337 (description
10338 "This library validates email address syntax and deliverability.")
3f641af0 10339 (license license:cc0)))
22711e25
SB
10340
10341(define-public python2-email-validator
10342 (package-with-python2 python-email-validator))
10343
8987d91e
SB
10344(define-public python-ukpostcodeparser
10345 (package
10346 (name "python-ukpostcodeparser")
10347 (version "1.0.3")
10348 (source (origin
10349 (method url-fetch)
10350 (uri (pypi-uri "UkPostcodeParser" version))
10351 (sha256
10352 (base32
10353 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10354 (build-system python-build-system)
10355 (native-inputs
10356 `(("python-setuptools" ,python-setuptools)))
10357 (home-page "https://github.com/hamstah/ukpostcodeparser")
10358 (synopsis "UK Postcode parser for Python")
10359 (description
10360 "This library provides the @code{parse_uk_postcode} function for
10361parsing UK postcodes.")
10362 (license license:expat)))
10363
10364(define-public python2-ukpostcodeparser
10365 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10366
10367(define-public python-fake-factory
10368 (package
10369 (name "python-fake-factory")
7adc698f 10370 (version "0.7.2")
ea92ae01
SB
10371 (source (origin
10372 (method url-fetch)
10373 (uri (pypi-uri "fake-factory" version))
10374 (sha256
10375 (base32
7adc698f 10376 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10377 (build-system python-build-system)
ea92ae01 10378 (native-inputs
bbcd7297 10379 `(("python-setuptools" ,python-setuptools)
ea92ae01
SB
10380 ;; For testing
10381 ("python-email-validator" ,python-email-validator)
10382 ("python-mock" ,python-mock)
10383 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10384 (propagated-inputs
10385 `(("python-dateutil" ,python-dateutil-2)
10386 ("python-six" ,python-six)))
7adc698f 10387 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10388 (synopsis "Python package that generates fake data")
10389 (description
10390 "Faker is a Python package that generates fake data such as names,
10391addresses, and phone numbers.")
10392 (license license:expat)
10393 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10394
10395(define-public python2-fake-factory
10396 (let ((base (package-with-python2 (strip-python2-variant
10397 python-fake-factory))))
10398 (package
10399 (inherit base)
24c9aa18 10400 (propagated-inputs
ea92ae01 10401 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10402 ,@(package-propagated-inputs base))))))
ea92ae01 10403
b49504fd
SB
10404(define-public python-pyaml
10405 (package
10406 (name "python-pyaml")
10407 (version "15.8.2")
10408 (source (origin
10409 (method url-fetch)
10410 (uri (pypi-uri "pyaml" version))
10411 (sha256
10412 (base32
10413 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10414 (build-system python-build-system)
10415 (native-inputs
10416 `(("python-setuptools" ,python-setuptools)))
10417 (propagated-inputs
10418 `(("python-pyyaml" ,python-pyyaml)))
10419 (home-page "https://github.com/mk-fg/pretty-yaml")
10420 (synopsis "YAML pretty-print library for Python")
10421 (description
10422 "pyaml is a PyYAML based python module to produce pretty and readable
10423YAML-serialized data.")
3f641af0 10424 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10425
10426(define-public python2-pyaml
10427 (package-with-python2 python-pyaml))
10428
347175a2
SB
10429(define-public python-flexmock
10430 (package
10431 (name "python-flexmock")
10432 (version "0.10.2")
10433 (source (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "flexmock" version))
10436 (sha256
10437 (base32
10438 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10439 (build-system python-build-system)
10440 (native-inputs
10441 `(("python-setuptools" ,python-setuptools)))
10442 (home-page "https://flexmock.readthedocs.org")
10443 (synopsis "Testing library for Python")
10444 (description
10445 "flexmock is a testing library for Python that makes it easy to create
10446mocks, stubs and fakes.")
3f641af0 10447 (license license:bsd-3)))
347175a2
SB
10448
10449(define-public python2-flexmock
10450 (package-with-python2 python-flexmock))
10451
5a744191
SB
10452(define-public python-orator
10453 (package
10454 (name "python-orator")
10455 (version "0.8.2")
10456 (source (origin
10457 (method url-fetch)
10458 (uri (pypi-uri "orator" version))
10459 (sha256
10460 (base32
10461 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10462 (build-system python-build-system)
10463 (arguments '(#:tests? #f)) ; no tests
10464 (native-inputs
b2676030
SB
10465 `(("python-setuptools" ,python-setuptools)))
10466 (propagated-inputs
5a744191
SB
10467 `(("python-arrow" ,python-arrow)
10468 ("python-blinker" ,python-blinker)
10469 ("python-cleo" ,python-cleo)
10470 ("python-fake-factory" ,python-fake-factory)
10471 ("python-inflection" ,python-inflection)
10472 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10473 ("python-pyaml" ,python-pyaml)
5a744191
SB
10474 ("python-simplejson" ,python-simplejson)
10475 ("python-wrapt" ,python-wrapt)))
10476 (home-page "https://orator-orm.com/")
10477 (synopsis "ActiveRecord ORM for Python")
10478 (description
10479 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10480implementation for Python.")
10481 (license license:expat)
10482 (properties `((python2-variant . ,(delay python2-orator))))))
10483
10484(define-public python2-orator
10485 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10486 (package
10487 (inherit base)
06961617 10488 (propagated-inputs
5a744191 10489 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10490 ,@(package-propagated-inputs base))))))
f4155188
DM
10491
10492(define-public python-prompt-toolkit
10493 (package
10494 (name "python-prompt-toolkit")
d15e2ef0 10495 (version "1.0.7")
f4155188
DM
10496 (source
10497 (origin
10498 (method url-fetch)
d15e2ef0 10499 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10500 (sha256
10501 (base32
d15e2ef0 10502 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10503 (build-system python-build-system)
bae18710
LF
10504 (arguments
10505 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f4155188
DM
10506 (inputs `(("python-wcwidth" ,python-wcwidth)
10507 ("python-pygments" ,python-pygments)))
10508 (native-inputs `(("python-six" ,python-six)))
10509 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10510 (synopsis "Library for building command line interfaces in Python")
10511 (description
10512 "Prompt-Toolkit is a library for building interactive command line
10513interfaces in Python. It's like GNU Readline but it also features syntax
10514highlighting while typing, out-of-the-box multi-line input editing, advanced
10515code completion, incremental search, support for Chinese double-width
10516characters, mouse support, and auto suggestions.")
3f641af0 10517 (license license:bsd-3)
f4155188
DM
10518 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10519
10520(define-public python2-prompt-toolkit
10521 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10522 (package
10523 (inherit base)
10524 (native-inputs
10525 `(("python2-setuptools" ,python2-setuptools)
10526 ,@(package-native-inputs base))))))
a502dfbf
DM
10527
10528(define-public python-jedi
10529 (package
10530 (name "python-jedi")
10531 (version "0.9.0")
10532 (source
10533 (origin
10534 (method url-fetch)
10535 (uri (pypi-uri "jedi" version))
10536 (sha256
10537 (base32
10538 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10539 (build-system python-build-system)
10540 (home-page "https://github.com/davidhalter/jedi")
10541 (synopsis
10542 "Autocompletion for Python that can be used for text editors")
10543 (description
10544 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10545 (license license:expat)
10546 (properties `((python2-variant . ,(delay python2-jedi))))))
10547
10548(define-public python2-jedi
10549 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10550 (package
10551 (inherit base)
10552 (native-inputs
10553 `(("python2-setuptools" ,python2-setuptools)
10554 ,@(package-native-inputs base))))))
c2f0dc6e
DM
10555
10556(define-public ptpython
10557 (package
10558 (name "ptpython")
10559 (version "0.34")
10560 (source (origin
10561 (method url-fetch)
10562 (uri (pypi-uri "ptpython" version))
10563 (sha256
10564 (base32
10565 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10566 (build-system python-build-system)
10567 (inputs
10568 `(("python-docopt" ,python-docopt)
10569 ("python-jedi" ,python-jedi)
10570 ("python-prompt-toolkit" ,python-prompt-toolkit)
10571 ("python-pygments" ,python-pygments)
10572 ("python-setuptools" ,python-setuptools)))
10573 (home-page "https://github.com/jonathanslenders/ptpython")
10574 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10575 (description
10576 "ptpython is a Python read-eval-print loop with IDE-like features.
10577It supports syntax highlighting, multiline editing, autocompletion, mouse,
10578color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10579etc.")
3f641af0 10580 (license license:bsd-3)
c2f0dc6e
DM
10581 (properties `((python2-variant . ,(delay ptpython-2))))))
10582
10583(define-public ptpython-2
10584 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10585 (package
10586 (inherit base)
10587 (name "ptpython2"))))
b227f0be 10588
b04a52a6
DJ
10589(define-public python-requests-oauthlib
10590 (package
10591 (name "python-requests-oauthlib")
10592 (version "0.6.2")
10593 (source
10594 (origin
10595 (method url-fetch)
10596 (uri (pypi-uri "requests-oauthlib" version))
10597 (sha256
10598 (base32
10599 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10600 (build-system python-build-system)
10601 (arguments
10602 `(#:phases
10603 (modify-phases %standard-phases
10604 ;; removes tests that require network access
10605 (add-before 'check 'pre-check
10606 (lambda _
10607 (delete-file "tests/test_core.py")
10608 #t)))))
10609 (native-inputs
10610 `(("python-requests-mock" ,python-requests-mock)
10611 ("python-mock" ,python-mock)))
10612 (inputs
10613 `(("python-oauthlib" ,python-oauthlib)
10614 ("python-requests" ,python-requests)))
10615 (home-page
10616 "https://github.com/requests/requests-oauthlib")
10617 (synopsis
10618 "OAuthlib authentication support for Requests")
10619 (description
10620 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10621provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10622 (license license:isc)
10623 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10624
10625(define-public python2-requests-oauthlib
10626 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10627 (package
10628 (inherit base)
10629 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10630 ,@(package-native-inputs base))))))
10631
b227f0be 10632(define-public python-stem
10633 (package
10634 (name "python-stem")
10635 (version "1.4.1b")
10636 (source
10637 (origin
10638 (method url-fetch)
10639 (uri (pypi-uri "stem" version ".tar.bz2"))
10640 (sha256
10641 (base32
10642 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10643 (build-system python-build-system)
10644 (arguments
10645 `(#:phases
10646 (modify-phases %standard-phases
10647 (replace 'check
10648 (lambda _
10649 (zero? (system* "./run_tests.py" "--unit")))))))
10650 (native-inputs
10651 `(("python-mock" ,python-mock)
10652 ("python-pep8" ,python-pep8)
10653 ("python-pyflakes" ,python-pyflakes)))
10654 (inputs
10655 `(("python-pycrypto" ,python-pycrypto)))
10656 (home-page "https://stem.torproject.org/")
10657 (synopsis
10658 "Python controller library that allows applications to interact with Tor")
10659 (description
10660 "Stem is a Python controller library for Tor. With it you can use Tor's
10661control protocol to script against the Tor process and read descriptor data
10662relays publish about themselves.")
3f641af0 10663 (license license:lgpl3)))
b227f0be 10664
10665(define-public python2-stem
10666 (package-with-python2 python-stem))
517a6c0c
DM
10667
10668(define-public python-pyserial
10669 (package
10670 (name "python-pyserial")
10671 (version "3.1.1")
10672 (source
10673 (origin
10674 (method url-fetch)
10675 (uri (pypi-uri "pyserial" version))
10676 (sha256
10677 (base32
10678 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10679 (build-system python-build-system)
10680 (home-page
10681 "https://github.com/pyserial/pyserial")
10682 (synopsis "Python Serial Port Bindings")
10683 (description "@code{pyserial} provide serial port bindings for Python. It
10684supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10685and/or Xon/Xoff. The port is accessed in RAW mode.")
3f641af0 10686 (license license:bsd-3)
517a6c0c
DM
10687 (properties `((python2-variant . ,(delay python2-pyserial))))))
10688
10689(define-public python2-pyserial
10690 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10691 (package
10692 (inherit base)
10693 (native-inputs
10694 `(("python2-setuptools" ,python2-setuptools)
10695 ,@(package-native-inputs base))))))
6eb7af2a
DJ
10696
10697(define-public python-kivy
10698 (package
10699 (name "python-kivy")
10700 (version "1.9.1")
10701 (source
10702 (origin
10703 (method url-fetch)
10704 (uri (pypi-uri "kivy" version))
10705 (file-name (string-append name "-" version ".tar.gz"))
10706 (sha256
10707 (base32
10708 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10709 (build-system python-build-system)
10710 (arguments
10711 `(#:tests? #f ; Tests require many optional packages
10712 #:phases
10713 (modify-phases %standard-phases
10714 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10715 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10716 (lambda* (#:key inputs #:allow-other-keys)
10717 (setenv "KIVY_SDL2_PATH"
10718 (string-append (assoc-ref inputs "sdl-union")
10719 "/include/SDL2"))
10720 #t)))))
10721 (native-inputs
10722 `(("pkg-config" ,pkg-config)))
10723 (inputs
10724 `(("python-cython" ,python-cython)
10725 ("gstreamer" ,gstreamer)
10726 ("mesa" ,mesa)
10727 ("sdl-union"
10728 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10729 (home-page "http://kivy.org")
10730 (synopsis
10731 "Multitouch application framework")
10732 (description
10733 "A software library for rapid development of
10734hardware-accelerated multitouch applications.")
10735 (license license:expat)))
10736
10737(define-public python2-kivy
10738 (package-with-python2 python-kivy))
10739
10740(define-public python-kivy-next
10741 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10742 (revision "1"))
10743 (package (inherit python-kivy)
10744 (name "python-kivy-next")
d80a71eb 10745 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10746 (string-take commit 7)))
10747 (source
10748 (origin
10749 (method git-fetch)
10750 (uri (git-reference
10751 (url "https://github.com/kivy/kivy")
10752 (commit commit)))
10753 (file-name (string-append name "-" version "-checkout"))
10754 (sha256
10755 (base32
10756 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10757
10758(define-public python2-kivy-next
10759 (package-with-python2 python-kivy-next))
8794bd8b
DC
10760
10761(define-public python-binaryornot
10762 (package
10763 (name "python-binaryornot")
10764 (version "0.4.0")
10765 (source (origin
10766 (method url-fetch)
10767 (uri (pypi-uri "binaryornot" version))
10768 (sha256
10769 (base32
10770 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10771 (build-system python-build-system)
10772 (inputs
10773 `(("python-chardet" ,python-chardet)
10774 ("python-hypothesis" ,python-hypothesis)))
10775 (home-page "https://github.com/audreyr/binaryornot")
10776 (synopsis "Package to check if a file is binary or text")
10777 (description "Ultra-lightweight pure Python package to check if a file is
10778binary or text.")
10779 (license license:bsd-3)
10780 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10781
10782(define-public python2-binaryornot
10783 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10784 (package (inherit base)
10785 (native-inputs
10786 `(("python2-setuptools" ,python2-setuptools)
10787 ,@(package-native-inputs base)))
10788 (inputs
10789 `(("python2-enum34" ,python2-enum34)
10790 ,@(package-inputs base))))))
a9ac982a
DC
10791
10792(define-public python-nltk
10793 (package
10794 (name "python-nltk")
10795 (version "3.2.1")
10796 (source (origin
10797 (method url-fetch)
10798 (uri (pypi-uri "nltk" version))
10799 (sha256
10800 (base32
10801 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10802 (build-system python-build-system)
59f12985
LF
10803 (arguments
10804 '(;; The tests require some extra resources to be downloaded.
10805 ;; TODO Try packaging these resources.
10806 #:tests? #f))
a9ac982a
DC
10807 (home-page "http://nltk.org/")
10808 (synopsis "Natural Language Toolkit")
10809 (description "It provides interfaces to over 50 corpora and lexical
10810resources such as WordNet, along with a suite of text processing libraries
10811for classification, tokenization, stemming, tagging, parsing, and semantic
10812reasoning, wrappers for natural language processing libraries.")
10813 (license license:asl2.0)
10814 (properties `((python2-variant . ,(delay python2-nltk))))))
10815
10816(define-public python2-nltk
10817 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10818 (package (inherit base)
10819 (native-inputs
10820 `(("python2-setuptools" ,python2-setuptools)
10821 ,@(package-native-inputs base))))))
691cd90d
DC
10822
10823(define-public python-pymongo
10824 (package
10825 (name "python-pymongo")
10826 (version "3.3.0")
10827 (source (origin
10828 (method url-fetch)
10829 (uri (pypi-uri "pymongo" version))
10830 (sha256
10831 (base32
10832 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10833 (build-system python-build-system)
10834 (inputs
10835 `(("python-certifi" ,python-certifi)))
10836 (home-page "http://github.com/mongodb/mongo-python-driver")
10837 (synopsis "Python driver for MongoDB")
10838 (description "Python driver for MongoDB.")
10839 (license license:asl2.0)
10840 (properties `((python2-variant . ,(delay python2-pymongo))))))
10841
10842(define-public python2-pymongo
10843 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10844 (package (inherit base)
10845 (native-inputs
10846 `(("python2-setuptools" ,python2-setuptools)
10847 ,@(package-native-inputs base))))))
6a6c9d43
DC
10848
10849(define-public python-sh
10850 (package
10851 (name "python-sh")
10852 (version "1.11")
10853 (source (origin
10854 (method url-fetch)
10855 (uri (pypi-uri "sh" version))
10856 (sha256
10857 (base32
10858 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10859 (build-system python-build-system)
10860 (arguments
10861 `(#:tests? #f)) ; no tests
10862 (home-page "https://github.com/amoffat/sh")
10863 (synopsis "Python subprocess interface")
10864 (description "Abstracts process invocation by providing a function
10865interface for programs.")
10866 (license license:expat)
10867 (properties `((python2-variant . ,(delay python2-sh))))))
10868
10869(define-public python2-sh
10870 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10871 (package (inherit base)
10872 (native-inputs
10873 `(("python2-setuptools" ,python2-setuptools)
10874 ,@(package-native-inputs base))))))
05b59190 10875
25702397
EF
10876(define-public python-consul
10877 (package
10878 (name "python-consul")
10879 (version "0.6.1")
10880 (source
10881 (origin
10882 (method url-fetch)
10883 (uri (pypi-uri "python-consul" version))
10884 (sha256
10885 (base32
10886 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10887 (build-system python-build-system)
10888 (native-inputs
10889 `(("python-pytest" ,python-pytest)
10890 ("python-requests" ,python-requests)
10891 ("python-six" ,python-six)))
10892 (home-page "https://github.com/cablehead/python-consul")
10893 (synopsis "Python client for Consul")
10894 (description
10895 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10896discovery, monitoring and configuration.")
10897 (license license:expat)))
10898
10899(define-public python2-consul
10900 (let ((consul (package-with-python2 python-consul)))
10901 (package (inherit consul)
10902 (native-inputs
10903 `(("python2-setuptools" ,python2-setuptools)
10904 ,@(package-native-inputs consul))))))
10905
05b59190
DC
10906(define-public python-schematics
10907 (package
10908 (name "python-schematics")
10909 (version "1.1.1")
10910 (source
10911 (origin
10912 (method url-fetch)
10913 (uri (string-append
10914 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10915 (file-name (string-append name "-" version ".tar.gz"))
10916 (sha256
10917 (base32
10918 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10919 (build-system python-build-system)
10920 (inputs
10921 `(("python-six" ,python-six)))
10922 (arguments
10923 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10924 ; version requirements (eg python-coveralls)
10925 (home-page "https://github.com/schematics/schematics")
10926 (synopsis "Python Data Structures for Humans")
10927 (description "Python Data Structures for Humans.")
10928 (license license:bsd-3)
10929 (properties `((python2-variant . ,(delay python2-schematics))))))
10930
10931(define-public python2-schematics
10932 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
10933 (package (inherit base)
10934 (native-inputs
10935 `(("python2-setuptools" ,python2-setuptools)
10936 ,@(package-native-inputs base))))))
d6907ff7
DC
10937
10938(define-public python-publicsuffix
10939 (package
10940 (name "python-publicsuffix")
10941 (version "1.1.0")
10942 (source (origin
10943 (method url-fetch)
10944 (uri (pypi-uri "publicsuffix" version))
10945 (sha256
10946 (base32
10947 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10948 (build-system python-build-system)
10949 (arguments
10950 `(#:tests? #f)) ; tests use the internet
10951 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10952 (synopsis "Get suffix for a domain name")
10953 (description "Get a public suffix for a domain name using the Public Suffix
10954List.")
10955 (license license:expat)
10956 (properties `((python2-variant . ,(delay python2-nltk))))))
10957
10958(define-public python2-publicsuffix
10959 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
10960 (package (inherit base)
10961 (native-inputs
10962 `(("python2-setuptools" ,python2-setuptools)
10963 ,@(package-native-inputs base))))))
b2319996
DC
10964
10965(define-public python-publicsuffix2
10966 (package
10967 (name "python-publicsuffix2")
10968 (version "2.20160621")
10969 (source
10970 (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10973 (sha256
10974 (base32
10975 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10976 (build-system python-build-system)
10797a0a
LF
10977 (arguments
10978 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
10979 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10980 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10981 (description "Get a public suffix for a domain name using the Public Suffix
10982List. Forked from and using the same API as the publicsuffix package.")
10983 (license (list license:expat license:mpl2.0))
10984 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
10985
10986(define-public python2-publicsuffix2
10987 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
10988 (package (inherit base)
10989 (native-inputs
10990 `(("python2-setuptools" ,python2-setuptools)
10991 ,@(package-native-inputs base))))))
81f1515d
DC
10992
10993(define-public python-url
10994 (package
10995 (name "python-url")
10996 (version "0.2.0")
10997 (source (origin
10998 (method url-fetch)
10999 (uri (pypi-uri "url" version))
11000 (sha256
11001 (base32
11002 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11003 (build-system python-build-system)
11004 (inputs
11005 `(("python-publicsuffix" ,python-publicsuffix)))
11006 (native-inputs
11007 `(("python-coverage" ,python-coverage)
11008 ("python-nose" ,python-nose)))
11009 (arguments
11010 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11011 (home-page "http://github.com/seomoz/url-py")
11012 (synopsis "URL Parsing")
11013 (description "Library for parsing urls.")
11014 (license license:expat)
11015 (properties `((python2-variant . ,(delay python2-url))))))
11016
11017(define-public python2-url
11018 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11019 (package (inherit base)
11020 (inputs
11021 `(("python2-publicsuffix" ,python2-publicsuffix)))
11022 (native-inputs
11023 `(("python2-setuptools" ,python2-setuptools)
11024 ,@(package-native-inputs base))))))
974ee2c1
TS
11025
11026(define-public python-freezegun
11027 (package
11028 (name "python-freezegun")
11029 (version "0.3.7")
11030 (source
11031 (origin
11032 (method url-fetch)
11033 (uri (pypi-uri "freezegun" version))
11034 (sha256
11035 (base32
11036 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11037 (build-system python-build-system)
11038 (native-inputs
11039 `(("python-mock" ,python-mock)
11040 ("python-nose" ,python-nose)
11041 ("python-coverage" ,python-coverage)
11042 ("python-dateutil-2" ,python-dateutil-2)))
11043 (inputs
11044 `(("python-six" ,python-six)))
11045 (arguments
11046 `(#:phases (modify-phases %standard-phases
11047 ;; The tests are normally executed via `make test`, but the PyPi
11048 ;; package does not include the Makefile.
11049 (replace 'check
11050 (lambda _
11051 (zero? (system* "nosetests" "./tests/")))))))
11052 (home-page "https://github.com/spulec/freezegun")
11053 (synopsis "Test utility for mocking the datetime module")
11054 (description
11055 "FreezeGun is a library that allows your python tests to travel through
11056time by mocking the datetime module.")
11057 (license license:asl2.0)))
11058
11059(define-public python2-freezegun
11060 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
11061 (package (inherit base)
11062 (native-inputs
11063 `(("python2-setuptools" ,python2-setuptools)
11064 ,@(package-native-inputs base))))))
dddcb25c
MB
11065
11066(define-public python-odfpy
11067 (package
11068 (name "python-odfpy")
11069 (version "1.3.3")
11070 (source (origin
11071 (method url-fetch)
11072 (uri (pypi-uri "odfpy" version))
11073 (sha256
11074 (base32
11075 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11076 (arguments
11077 `(#:modules ((srfi srfi-1)
11078 (guix build python-build-system)
11079 (guix build utils))
11080 #:phases
11081 (modify-phases %standard-phases
11082 (replace 'check
11083 ;; The test runner invokes python2 and python3 for test*.py.
11084 ;; To avoid having both in inputs, we replicate it here.
11085 (lambda _
11086 (every (lambda (test-file)
11087 (zero? (system* "python" test-file)))
11088 (find-files "tests" "^test.*\\.py$")))))))
11089 (build-system python-build-system)
11090 (home-page "https://github.com/eea/odfpy")
11091 (synopsis "Python API and tools to manipulate OpenDocument files")
11092 (description "Collection of libraries and utility programs written in
11093Python to manipulate OpenDocument 1.2 files.")
11094 (license
11095 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11096 ;; number of files with other licenses.
11097 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11098
11099(define-public python2-odfpy
11100 (package-with-python2 python-odfpy))
b30565bd
MB
11101
11102(define-public python-cachecontrol
11103 (package
11104 (name "python-cachecontrol")
11105 (version "0.11.6")
11106 (source
11107 (origin
11108 (method url-fetch)
11109 ;; Pypi does not have tests.
11110 (uri (string-append
11111 "https://github.com/ionrock/cachecontrol/archive/v"
11112 version ".tar.gz"))
11113 (file-name (string-append name "-" version ".tar.gz"))
11114 (sha256
11115 (base32
11116 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11117 (build-system python-build-system)
11118 (arguments
11119 `(#:phases
11120 (modify-phases %standard-phases
11121 (replace 'check
11122 (lambda _
11123 ;; Drop test that requires internet access.
11124 (delete-file "tests/test_regressions.py")
11125 (setenv "PYTHONPATH"
11126 (string-append (getcwd) "/build/lib:"
11127 (getenv "PYTHONPATH")))
11128 (zero? (system* "py.test" "-vv")))))))
11129 (native-inputs
11130 `(("python-pytest" ,python-pytest)
11131 ("python-redis" ,python-redis)
11132 ("python-webtest" ,python-webtest)
11133 ("python-mock" ,python-mock)))
11134 (propagated-inputs
11135 `(("python-requests" ,python-requests)
11136 ("python-lockfile" ,python-lockfile)))
11137 (home-page "https://github.com/ionrock/cachecontrol")
11138 (synopsis "The httplib2 caching algorithms for use with requests")
11139 (description "CacheControl is a port of the caching algorithms in
11140@code{httplib2} for use with @code{requests} session objects.")
11141 (license license:asl2.0)
dd447621 11142 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
b30565bd
MB
11143
11144(define-public python2-cachecontrol
11145 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
11146 (package (inherit base)
11147 (native-inputs
11148 `(("python2-setuptools" ,python2-setuptools)
11149 ,@(package-native-inputs base))))))
243db824
DM
11150
11151(define-public python-lit
11152 (package
11153 (name "python-lit")
11154 (version "0.5.0")
11155 (source
11156 (origin
11157 (method url-fetch)
11158 (uri (pypi-uri "lit" version))
11159 (sha256
11160 (base32
11161 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11162 (build-system python-build-system)
11163 (home-page "http://llvm.org/")
11164 (synopsis "LLVM Software Testing Tool")
11165 (description "@code{lit} is a portable tool for executing LLVM and Clang
11166style test suites, summarizing their results, and providing indication of
11167failures.")
11168 (license license:ncsa)
11169 (properties `((python2-variant . ,(delay python2-lit))))))
11170
11171(define-public python2-lit
11172 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
11173 (package
11174 (inherit base)
11175 (native-inputs
11176 `(("python2-setuptools" ,python2-setuptools)
11177 ,@(package-native-inputs base))))))
66f95b20
MB
11178
11179(define-public python-pytest-pep8
11180 (package
11181 (name "python-pytest-pep8")
11182 (version "1.0.6")
11183 (source (origin
11184 (method url-fetch)
11185 (uri (pypi-uri "pytest-pep8" version))
11186 (sha256
11187 (base32
11188 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11189 (build-system python-build-system)
11190 (arguments
11191 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
11192 ;; Prevent creation of the egg. This works around
11193 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
11194 #:configure-flags '("--single-version-externally-managed" "--root=/")))
11195 (native-inputs
11196 `(("python-pytest" ,python-pytest)))
11197 (propagated-inputs
11198 `(("python-pep8" ,python-pep8)))
11199 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11200 (synopsis "Py.test plugin to check PEP8 requirements")
11201 (description "Pytest plugin for checking PEP8 compliance.")
11202 (license license:expat)
11203 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
11204
11205(define-public python2-pytest-pep8
11206 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
11207 (package (inherit base)
11208 (native-inputs
11209 `(("python2-setuptools" ,python2-setuptools)
11210 ,@(package-native-inputs base))))))
df94a6b5
MB
11211
11212(define-public python-pytest-flakes
11213 (package
11214 (name "python-pytest-flakes")
11215 (version "1.0.1")
11216 (source (origin
11217 (method url-fetch)
11218 (uri (pypi-uri "pytest-flakes" version))
11219 (sha256
11220 (base32
11221 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11222 (build-system python-build-system)
11223 (arguments
11224 `(;; Prevent creation of the egg. This works around
11225 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
11226 #:configure-flags '("--single-version-externally-managed" "--root=/")
11227 #:phases
11228 (modify-phases %standard-phases
11229 (delete 'check)
11230 (add-after 'install 'check
11231 (lambda _ ; It's easier to run tests after install.
11232 (zero? (system* "py.test" "-vv")))))))
11233 (native-inputs
11234 `(("python-coverage" ,python-coverage)
11235 ("python-pytest" ,python-pytest)
11236 ("python-pytest-cache" ,python-pytest-cache)
11237 ("python-pytest-pep8" ,python-pytest-pep8)))
11238 (propagated-inputs
11239 `(("python-pyflakes" ,python-pyflakes)))
11240 (home-page "https://github.com/fschulze/pytest-flakes")
11241 (synopsis "Py.test plugin to check source code with pyflakes")
11242 (description "Pytest plugin for checking Python source code with pyflakes.")
11243 (license license:expat)
11244 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
11245
11246(define-public python2-pytest-flakes
11247 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
11248 (package (inherit base)
11249 (native-inputs
11250 `(("python2-setuptools" ,python2-setuptools)
11251 ,@(package-native-inputs base))))))
5467ea62
MB
11252
11253(define-public python-natsort
11254 (package
11255 (name "python-natsort")
11256 (version "5.0.1")
11257 (source (origin
11258 (method url-fetch)
11259 (uri (pypi-uri "natsort" version))
11260 (sha256
11261 (base32
11262 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11263 (build-system python-build-system)
11264 (arguments
11265 `(#:phases
11266 (modify-phases %standard-phases
11267 (add-before 'check 'set-cachedir
11268 ;; Tests require write access to $HOME by default
11269 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11270 (native-inputs
11271 `(("python-hypothesis" ,python-hypothesis)
11272 ("python-pytest-cache" ,python-pytest-cache)
11273 ("python-pytest-cov" ,python-pytest-cov)
11274 ("python-pytest-flakes" ,python-pytest-flakes)
11275 ("python-pytest-pep8" ,python-pytest-pep8)))
11276 (propagated-inputs ; TODO: Add python-fastnumbers.
11277 `(("python-pyicu" ,python-pyicu)))
11278 (home-page "https://github.com/SethMMorton/natsort")
11279 (synopsis "Natural sorting for python and shell")
11280 (description
11281 "Natsort lets you apply natural sorting on lists instead of
11282lexicographical. If you use the built-in @code{sorted} method in python
11283on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11284returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11285function @code{natsorted} that identifies numbers and sorts them separately
11286from strings. It can also sort version numbers, real numbers, mixed types
11287and more, and comes with a shell command @command{natsort} that exposes this
11288functionality in the command line.")
11289 (license license:expat)
11290 (properties `((python2-variant . ,(delay python2-natsort))))))
11291
11292(define-public python2-natsort
11293 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11294 (package (inherit base)
11295 (native-inputs
11296 `(("python2-setuptools" ,python2-setuptools)
11297 ("python2-pathlib" ,python2-pathlib)
11298 ("python2-mock" ,python2-mock)
11299 ("python2-enum34" ,python2-enum34)
11300 ,@(package-native-inputs base))))))
4efb9c54
SR
11301
11302(define-public python-glances
11303 (package
11304 (name "python-glances")
11305 (version "2.7.1")
11306 (source
11307 (origin
11308 (method url-fetch)
11309 (uri (pypi-uri "Glances" version))
11310 (sha256
11311 (base32
11312 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11313 (build-system python-build-system)
11314 (inputs
11315 `(("python-psutil" ,python-psutil)))
11316 (home-page
11317 "https://github.com/nicolargo/glances")
11318 (synopsis
11319 "A cross-platform curses-based monitoring tool")
11320 (description
11321 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11322Glances uses the PsUtil library to get information from your system. It monitors
11323CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11324 (license license:lgpl3+)
11325 (properties `((python2-variant . ,(delay python2-glances))))))
11326
11327(define-public python2-glances
11328 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
11329 (package
11330 (inherit base)
11331 (native-inputs
11332 `(("python2-setuptools" ,python2-setuptools)
11333 ,@(package-native-inputs base))))))
05b7a593
EF
11334
11335(define-public python-graphql-core
11336 (package
11337 (name "python-graphql-core")
11338 (version "0.5.3")
11339 (source
11340 (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "graphql-core" version))
11343 (sha256
11344 (base32
11345 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11346 (build-system python-build-system)
11347 (arguments
11348 `(#:phases
11349 (modify-phases %standard-phases
11350 (add-after 'unpack 'patch-hardcoded-version
11351 (lambda _ (substitute*
11352 "setup.py"
11353 (("'gevent==1.1rc1'") "'gevent'"))
11354 #t)))))
11355 (native-inputs
11356 `(("python-gevent" ,python-gevent)
11357 ("python-mock" ,python-mock)
11358 ("python-pytest-mock" ,python-pytest-mock)))
11359 (inputs
11360 `(("python-promise" ,python-promise)
11361 ("python-six" ,python-six)))
11362 (home-page "https://github.com/graphql-python/graphql-core")
11363 (synopsis "GraphQL implementation for Python")
11364 (description
11365 "GraphQL implementation for Python. GraphQL is a data query language and
11366runtime designed and used to request and deliver data to mobile and web apps.
11367This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11368to Python.")
11369 (properties `((python2-variant . ,(delay python2-graphql-core))))
11370 (license license:expat)))
11371
11372(define-public python2-graphql-core
11373 (let ((base (package-with-python2
11374 (strip-python2-variant python-graphql-core))))
11375 (package (inherit base)
11376 (native-inputs
11377 `(("python2-setuptools" ,python2-setuptools)
11378 ,@(package-native-inputs base))))))
7ee51575
EF
11379
11380(define-public python-graphql-relay
11381 (package
11382 (name "python-graphql-relay")
11383 (version "0.4.4")
11384 (source
11385 (origin
11386 (method url-fetch)
11387 (uri (pypi-uri "graphql-relay" version))
11388 (sha256
11389 (base32
11390 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11391 (build-system python-build-system)
11392 (native-inputs
11393 `(("python-pytest" ,python-pytest)))
11394 (inputs
11395 `(("python-graphql-core" ,python-graphql-core)
11396 ("python-promise" ,python-promise)
11397 ("python-six" ,python-six)))
11398 (home-page "https://github.com/graphql-python/graphql-relay-py")
11399 (synopsis "Relay implementation for Python")
11400 (description
11401 "This is a library to allow the easy creation of Relay-compliant servers
11402using the GraphQL Python reference implementation of a GraphQL server. It
11403should be noted that the code is a exact port of the original
11404@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11405from Facebook.")
11406 (properties `((python2-variant . ,(delay python2-graphql-relay))))
11407 (license license:expat)))
11408
11409(define-public python2-graphql-relay
11410 (let ((base (package-with-python2
11411 (strip-python2-variant python-graphql-relay))))
11412 (package (inherit base)
11413 (native-inputs
11414 `(("python2-setuptools" ,python2-setuptools)
11415 ,@(package-native-inputs base))))))
ddc63a56
EF
11416
11417(define-public python-graphene
11418 (package
11419 (name "python-graphene")
11420 (version "0.10.2")
11421 (source
11422 (origin
11423 (method url-fetch)
11424 (uri (pypi-uri "graphene" version))
11425 (sha256
11426 (base32
11427 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11428 (build-system python-build-system)
11429 (native-inputs
11430 `(("python-django-filter" ,python-django-filter)
11431 ("python-mock" ,python-mock)
11432 ("python-psycopg2" ,python-psycopg2)
11433 ("python-pytest-django" ,python-pytest-django)
11434 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11435 (inputs
11436 `(("python-graphql-core" ,python-graphql-core)
11437 ("python-graphql-relay" ,python-graphql-relay)
11438 ("python-iso8601" ,python-iso8601)
11439 ("python-promise" ,python-promise)
11440 ("python-six" ,python-six)))
11441 (home-page "http://graphene-python.org/")
11442 (synopsis "GraphQL Framework for Python")
11443 (description
11444 "Graphene is a Python library for building GraphQL schemas/types.
11445A GraphQL schema describes your data model, and provides a GraphQL server
11446with an associated set of resolve methods that know how to fetch data.")
11447 (properties `((python2-variant . ,(delay python2-graphene))))
11448 (license license:expat)))
11449
11450(define-public python2-graphene
11451 (let ((base (package-with-python2
11452 (strip-python2-variant python-graphene))))
11453 (package (inherit base)
11454 (native-inputs
11455 `(("python2-setuptools" ,python2-setuptools)
11456 ("python2-sqlalchemy" ,python2-sqlalchemy)
11457 ,@(package-native-inputs base))))))
d488d5d6
EF
11458
11459(define-public python-nautilus
11460 (package
11461 (name "python-nautilus")
11462 (version "0.4.9")
11463 (source
11464 (origin
11465 (method url-fetch)
11466 (uri (pypi-uri "nautilus" version))
11467 (sha256
11468 (base32
11469 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11470 (build-system python-build-system)
11471 (arguments `(#:tests? #f)) ; fails to import test modules
11472 (native-inputs
11473 `(("python-setuptools" ,python-setuptools)))
11474 (inputs
11475 `(("python-bcrypt" ,python-bcrypt)
11476 ("python-click" ,python-click)
11477 ("python-consul" ,python-consul)
11478 ("python-graphql-core" ,python-graphql-core)
11479 ("python-graphql-relay" ,python-graphql-relay)
11480 ("python-graphene" ,python-graphene)
11481 ("python-jinja2" ,python-jinja2)
11482 ("python-nose2" ,python-nose2)
11483 ("python-peewee" ,python-peewee)
11484 ("python-pika" ,python-pika)
11485 ("python-pycparser" ,python-pycparser)
11486 ("python-requests" ,python-requests)
11487 ("python-tornado" ,python-tornado)
11488 ("python-wtforms" ,python-wtforms)))
11489 (home-page "https://github.com/AlecAivazis/nautilus")
11490 (synopsis "Library for creating microservice applications")
11491 (description
11492 "Nautilus is a framework for flux based microservices that looks to
11493provide extendible implementations of common aspects of a cloud so that you can
11494focus on building massively scalable web applications.")
11495 (license license:expat)))
94cffc63
LF
11496
11497(define-public python-s3transfer
11498 (package
11499 (name "python-s3transfer")
11500 (version "0.1.8")
11501 (source (origin
11502 (method url-fetch)
11503 (uri (pypi-uri "s3transfer" version))
11504 (sha256
11505 (base32
11506 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11507 (build-system python-build-system)
11508 (native-inputs
11509 `(("python-docutils" ,python-docutils)))
11510 (inputs
11511 `(("python-botocore" ,python-botocore)))
11512 (synopsis "Amazon S3 Transfer Manager")
11513 (description "S3transfer is a Python library for managing Amazon S3
11514transfers.")
11515 (home-page "https://github.com/boto/s3transfer")
11516 (license license:asl2.0)
11517 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11518
11519(define-public python2-s3transfer
11520 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11521 (package
11522 (inherit base)
11523 (native-inputs
11524 `(("python2-futures" ,python2-futures)
11525 ("python2-setuptools" ,python2-setuptools)
11526 ,@(package-native-inputs base))))))
8ab59181
HG
11527
11528(define-public python-setproctitle
11529(package
11530 (name "python-setproctitle")
11531 (version "1.1.10")
11532 (source
11533 (origin
11534 (method url-fetch)
11535 (uri (pypi-uri "setproctitle" version))
11536 (sha256
11537 (base32
11538 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11539 (build-system python-build-system)
11540 (arguments
11541 '(#:phases
11542 (modify-phases %standard-phases
11543 (add-before 'check 'patch-Makefile
11544 ;; Stricly this is only required for the python2 variant.
11545 ;; But adding a phase in an inherited package seems to be
11546 ;; cumbersum. So we patch even for python3.
11547 (lambda _
11548 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11549 (when nose
11550 (substitute* "Makefile"
11551 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11552 (string-append nose "/bin/nosetests "))))
11553 #t)))
11554 (replace 'check
11555 (lambda _
11556 (setenv "PYTHON" (or (which "python3") (which "python")))
11557 (setenv "PYCONFIG" (or (which "python3-config")
11558 (which "python-config")))
11559 (setenv "CC" "gcc")
11560 ;; No need to extend PYTHONPATH to find the built package, since
11561 ;; the Makefile will build anyway
11562 (zero? (system* "make" "check")))))))
11563 (native-inputs
11564 `(("procps" ,procps))) ; required for tests
11565 (home-page
11566 "https://github.com/dvarrazzo/py-setproctitle")
11567 (synopsis
11568 "Setproctitle implementation for Python to customize the process title")
11569 (description "The library allows a process to change its title (as displayed
11570by system tools such as ps and top).
11571
11572Changing the title is mostly useful in multi-process systems, for
11573example when a master process is forked: changing the children's title
11574allows to identify the task each process is busy with. The technique
11575is used by PostgreSQL and the OpenSSH Server for example.")
11576 (license license:bsd-3)
11577 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11578
11579(define-public python2-setproctitle
11580 (let ((base (package-with-python2
11581 (strip-python2-variant python-setproctitle))))
11582 (package
11583 (inherit base)
11584 (native-inputs `(("python2-nose" ,python2-nose)
11585 ,@(package-native-inputs base))))))
162e42d8
HG
11586
11587(define-public python-validictory
11588 (package
11589 (name "python-validictory")
11590 (version "1.0.1")
11591 (source
11592 (origin
11593 (method url-fetch)
11594 (uri (pypi-uri "validictory" version))
11595 (sha256
11596 (base32
11597 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11598 (build-system python-build-system)
11599 (arguments
11600 '(#:phases
11601 (modify-phases %standard-phases
11602 (add-after 'unpack 'bootstrap
11603 ;; Move the tests out of the package directory to avoid
11604 ;; packaging them.
11605 (lambda* _
11606 (rename-file "validictory/tests" "tests")
11607 (delete-file "tests/__init__.py")))
11608 (replace 'check
11609 (lambda _
11610 ;; Extend PYTHONPATH so the built package will be found.
11611 (setenv "PYTHONPATH"
11612 (string-append (getcwd) "/build/lib:"
11613 (getenv "PYTHONPATH")))
11614 (zero? (system* "py.test" "-vv" )))))))
11615 (native-inputs
11616 `(("python-pytest" ,python-pytest)))
11617 (home-page
11618 "https://github.com/jamesturk/validictory")
11619 (synopsis "General purpose Python data validator")
11620 (description "It allows validation of arbitrary Python data structures.
11621
11622The schema format is based on the JSON Schema
11623proposal (http://json-schema.org), so combined with json the library is also
11624useful as a validator for JSON data.")
7ca68304
EF
11625 (license license:expat)
11626 (properties `((python2-variant . ,(delay python2-validictory))))))
162e42d8
HG
11627
11628(define-public python2-validictory
7ca68304
EF
11629 (let ((base (package-with-python2
11630 (strip-python2-variant python-validictory))))
11631 (package
11632 (inherit base)
11633 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11634 ,@(package-native-inputs base))))))
0990edfe
DM
11635
11636(define-public python-aniso8601
11637 (package
11638 (name "python-aniso8601")
11639 (version "1.1.0")
11640 (source
11641 (origin
11642 (method url-fetch)
11643 (uri (pypi-uri "aniso8601" version))
11644 (sha256
11645 (base32
11646 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11647 (build-system python-build-system)
11648 (propagated-inputs
11649 `(("python-dateutil-2" ,python-dateutil-2)))
11650 (home-page
11651 "https://bitbucket.org/nielsenb/aniso8601")
11652 (synopsis
11653 "Python library for parsing ISO 8601 strings")
11654 (description
11655 "This package contains a library for parsing ISO 8601 datetime strings.")
11656 (license license:bsd-3)))
999d964d
DM
11657
11658(define-public python-flask-restful
11659 (package
11660 (name "python-flask-restful")
11661 (version "0.3.5")
11662 (source
11663 (origin
11664 (method url-fetch)
11665 (uri (pypi-uri "Flask-RESTful" version))
11666 (sha256
11667 (base32
11668 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11669 (build-system python-build-system)
11670 (propagated-inputs
11671 `(("python-aniso8601" ,python-aniso8601)
11672 ("python-flask" ,python-flask)
11673 ("python-pycrypto" ,python-pycrypto)
11674 ("python-pytz" ,python-pytz)))
11675 (native-inputs
11676 `(;; Optional dependency of Flask. Tests need it.
11677 ("python-blinker" ,python-blinker)
11678 ("python-mock" ,python-mock) ; For tests
11679 ("python-nose" ,python-nose) ; For tests
11680 ("python-sphinx" ,python-sphinx)))
11681 (home-page
11682 "https://www.github.com/flask-restful/flask-restful/")
11683 (synopsis
11684 "Flask module for creating REST APIs")
11685 (description
11686 "This package contains a Flask module for creating REST APIs.")
11687 (license license:bsd-3)))
31288222
DM
11688
11689(define-public python-flask-basicauth
11690 (package
11691 (name "python-flask-basicauth")
11692 (version "0.2.0")
11693 (source
11694 (origin
11695 (method url-fetch)
11696 (uri (pypi-uri "Flask-BasicAuth" version))
11697 (sha256
11698 (base32
11699 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11700 (build-system python-build-system)
11701 (propagated-inputs
11702 `(("python-flask" ,python-flask)))
11703 (home-page
11704 "https://github.com/jpvanhal/flask-basicauth")
11705 (synopsis
11706 "HTTP basic access authentication for Flask")
11707 (description
11708 "This package provides HTTP basic access authentication for Flask.")
11709 (license license:bsd-3)))
903276d0
DM
11710
11711(define-public python-flask-sqlalchemy
11712 (package
11713 (name "python-flask-sqlalchemy")
11714 (version "2.1")
11715 (source
11716 (origin
11717 (method url-fetch)
11718 (uri (pypi-uri "Flask-SQLAlchemy" version))
11719 (sha256
11720 (base32
11721 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11722 (build-system python-build-system)
11723 (propagated-inputs
11724 `(("python-flask" ,python-flask)
11725 ("python-sqlalchemy" ,python-sqlalchemy)))
11726 (home-page
11727 "http://github.com/mitsuhiko/flask-sqlalchemy")
11728 (synopsis
11729 "Module adding SQLAlchemy support to your Flask application")
11730 (description
11731 "This package adds SQLAlchemy support to your Flask application.")
11732 (license license:bsd-3)))
329b4b3b
LF
11733
11734(define-public python-pyev
11735 (package
11736 (name "python-pyev")
11737 (version "0.9.0")
11738 (source
11739 (origin
11740 (method url-fetch)
11741 (uri (pypi-uri "pyev" version))
11742 (sha256
11743 (base32
11744 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11745 (build-system python-build-system)
11746 (arguments
11747 `(#:tests? #f ; no test suite
11748 #:phases
11749 (modify-phases %standard-phases
11750 (add-after 'unpack 'patch
11751 (lambda* (#:key inputs #:allow-other-keys)
11752 (let ((libev (string-append (assoc-ref inputs "libev")
11753 "/lib/libev.so.4")))
11754 (substitute* "setup.py"
11755 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11756 (string-append "libev_dll_name = \"" libev "\"")))))))))
11757 (inputs
11758 `(("libev" ,libev)))
11759 (home-page "http://pythonhosted.org/pyev/")
11760 (synopsis "Python libev interface")
11761 (description "Pyev provides a Python interface to libev.")
11762 (license license:gpl3)))
11763
11764(define-public python2-pyev
11765 (package-with-python2 python-pyev))
45b4f127
DM
11766
11767(define-public python-imagesize
11768 (package
11769 (name "python-imagesize")
11770 (version "0.7.1")
11771 (source
11772 (origin
11773 (method url-fetch)
11774 (uri (pypi-uri "imagesize" version))
11775 (sha256
11776 (base32
11777 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11778 (build-system python-build-system)
11779 (home-page "https://github.com/shibukawa/imagesize_py")
11780 (synopsis "Gets image size of files in variaous formats in Python")
11781 (description
11782 "This package allows determination of image size from
11783PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11784 (license license:expat)
11785 (properties `((python2-variant . ,(delay python2-imagesize))))))
11786
11787(define-public python2-imagesize
11788 (let ((base (package-with-python2 (strip-python2-variant python-imagesize))))
11789 (package
11790 (inherit base)
11791 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11792 ,@(package-native-inputs base))))))