gnu: python-3.4: Update to 3.4.5.
[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>
a01b6da7
NK
29;;;
30;;; This file is part of GNU Guix.
31;;;
32;;; GNU Guix is free software; you can redistribute it and/or modify it
33;;; under the terms of the GNU General Public License as published by
34;;; the Free Software Foundation; either version 3 of the License, or (at
35;;; your option) any later version.
36;;;
37;;; GNU Guix is distributed in the hope that it will be useful, but
38;;; WITHOUT ANY WARRANTY; without even the implied warranty of
39;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40;;; GNU General Public License for more details.
41;;;
42;;; You should have received a copy of the GNU General Public License
43;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44
1ffa7090 45(define-module (gnu packages python)
3f641af0 46 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 47 #:use-module (gnu packages)
8e451885 48 #:use-module (gnu packages algebra)
d79a343b 49 #:use-module (gnu packages adns)
89b2e0b0 50 #:use-module (gnu packages attr)
d96034ed 51 #:use-module (gnu packages backup)
1ffa7090 52 #:use-module (gnu packages compression)
4ed20663 53 #:use-module (gnu packages databases)
5e1c9367 54 #:use-module (gnu packages file)
4ed20663 55 #:use-module (gnu packages fontutils)
4ed20663
AE
56 #:use-module (gnu packages gcc)
57 #:use-module (gnu packages ghostscript)
6eb7af2a 58 #:use-module (gnu packages gl)
4ed20663 59 #:use-module (gnu packages glib)
6eb7af2a 60 #:use-module (gnu packages gstreamer)
4ed20663 61 #:use-module (gnu packages gtk)
421a80a2 62 #:use-module (gnu packages icu4c)
c937562e 63 #:use-module (gnu packages image)
4ed20663 64 #:use-module (gnu packages imagemagick)
d79a343b 65 #:use-module (gnu packages libevent)
b10ab723 66 #:use-module (gnu packages libffi)
89b2e0b0 67 #:use-module (gnu packages linux)
0da98533 68 #:use-module (gnu packages maths)
4ed20663 69 #:use-module (gnu packages multiprecision)
45203542 70 #:use-module (gnu packages networking)
be7134bf 71 #:use-module (gnu packages ncurses)
c9b1b4f9 72 #:use-module (gnu packages pcre)
4ed20663 73 #:use-module (gnu packages perl)
b10ab723 74 #:use-module (gnu packages pkg-config)
4ed20663 75 #:use-module (gnu packages readline)
6eb7af2a 76 #:use-module (gnu packages sdl)
c9b1b4f9 77 #:use-module (gnu packages statistics)
8f9ac901 78 #:use-module (gnu packages tex)
1c65314c 79 #:use-module (gnu packages texinfo)
cc2b77df 80 #:use-module (gnu packages tls)
e25f0174 81 #:use-module (gnu packages version-control)
8d12be1e 82 #:use-module (gnu packages web)
ce0614dd 83 #:use-module (gnu packages base)
26b307e2 84 #:use-module (gnu packages xml)
6fa14469 85 #:use-module (gnu packages xorg)
0bdc1671 86 #:use-module (gnu packages xdisorg)
4ed20663 87 #:use-module (gnu packages zip)
afa181ff 88 #:use-module (gnu packages tcl)
63bcec71
DM
89 #:use-module (gnu packages bdw-gc)
90 #:use-module (gnu packages pcre)
a01b6da7
NK
91 #:use-module (guix packages)
92 #:use-module (guix download)
ea5456c8 93 #:use-module (guix git-download)
11bb85a1 94 #:use-module (guix utils)
acc26ff1 95 #:use-module (guix build-system gnu)
d8c4998f 96 #:use-module (guix build-system cmake)
898238b9 97 #:use-module (guix build-system python)
1c65314c
FB
98 #:use-module (guix build-system trivial)
99 #:use-module (srfi srfi-1))
a01b6da7 100
45848023 101(define-public python-2.7
a01b6da7
NK
102 (package
103 (name "python")
f0499100 104 (version "2.7.12")
a01b6da7
NK
105 (source
106 (origin
107 (method url-fetch)
9b43a0ff 108 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
109 version "/Python-" version ".tar.xz"))
110 (sha256
111 (base32
f0499100 112 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
113 (patches (search-patches "python-2.7-search-paths.patch"
114 "python-2-deterministic-build-info.patch"
115 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
116 (modules '((guix build utils)))
117 ;; suboptimal to delete failing tests here, but if we delete them in the
118 ;; arguments then we need to make sure to strip out that phase when it
119 ;; gets inherited by python and python-minimal.
120 (snippet
121 '(begin
122 (for-each delete-file
123 '("Lib/test/test_compileall.py"
f0499100 124 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
125 "Lib/test/test_distutils.py"
126 "Lib/test/test_import.py"
127 "Lib/test/test_shutil.py"
128 "Lib/test/test_socket.py"
1bb163b0 129 "Lib/test/test_subprocess.py"))
10a42aa2 130 #t))))
02f0c3b2
LC
131 (outputs '("out"
132 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 133 (build-system gnu-build-system)
3fdc99da 134 (arguments
10a42aa2 135 `(;; 356 tests OK.
e7e7a1eb
EF
136 ;; 6 tests failed:
137 ;; test_compileall test_distutils test_import test_shutil test_socket
138 ;; test_subprocess
139 ;; 39 tests skipped:
ff6f33cf
ED
140 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
141 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
142 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
143 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
144 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
145 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
146 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
147 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
148 ;; test_winreg test_winsound test_zipfile64
149 ;; 4 skips unexpected on linux2:
150 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 151 #:test-target "test"
3fdc99da 152 #:configure-flags
6a20289d
LC
153 (list "--enable-shared" ;allow embedding
154 "--with-system-ffi" ;build ctypes
155 (string-append "LDFLAGS=-Wl,-rpath="
156 (assoc-ref %outputs "out") "/lib"))
fd982732 157
d2cc9c7c
LC
158 #:modules ((ice-9 ftw) (ice-9 match)
159 (guix build utils) (guix build gnu-build-system))
fd982732 160 #:phases
46472ecd
MW
161 (modify-phases %standard-phases
162 (add-before
163 'configure 'patch-lib-shells
164 (lambda _
165 ;; Filter for existing files, since some may not exist in all
166 ;; versions of python that are built with this recipe.
167 (substitute* (filter file-exists?
168 '("Lib/subprocess.py"
169 "Lib/popen2.py"
170 "Lib/distutils/tests/test_spawn.py"
171 "Lib/test/test_subprocess.py"))
172 (("/bin/sh") (which "sh")))
dedc8320
LC
173
174 ;; Use zero as the timestamp in .pyc files so that builds are
175 ;; deterministic. TODO: Remove it when this variable is set in
176 ;; gnu-build-system.scm.
a665996f 177 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 178 #t))
5b4e2791
LC
179 (add-before 'configure 'do-not-record-configure-flags
180 (lambda* (#:key configure-flags #:allow-other-keys)
181 ;; Remove configure flags from the installed '_sysconfigdata.py'
182 ;; and 'Makefile' so we don't end up keeping references to the
183 ;; build tools.
184 ;;
185 ;; Preserve at least '--with-system-ffi' since otherwise the
186 ;; thing tries to build libffi, fails, and we end up with a
187 ;; Python that lacks ctypes.
188 (substitute* "configure"
189 (("^CONFIG_ARGS=.*$")
190 (format #f "CONFIG_ARGS='~a'\n"
191 (if (member "--with-system-ffi" configure-flags)
192 "--with-system-ffi"
193 ""))))
194 #t))
46472ecd
MW
195 (add-before
196 'check 'pre-check
197 (lambda _
198 ;; 'Lib/test/test_site.py' needs a valid $HOME
199 (setenv "HOME" (getcwd))
200 #t))
201 (add-after
202 'unpack 'set-source-file-times-to-1980
203 ;; XXX One of the tests uses a ZIP library to pack up some of the
204 ;; source tree, and fails with "ZIP does not support timestamps
205 ;; before 1980". Work around this by setting the file times in the
206 ;; source tree to sometime in early 1980.
207 (lambda _
208 (let ((circa-1980 (* 10 366 24 60 60)))
209 (ftw "." (lambda (file stat flag)
210 (utime file circa-1980 circa-1980)
211 #t))
02f0c3b2 212 #t)))
9ffe61b0
LC
213 (add-after 'install 'remove-tests
214 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
215 ;; because these files are used by some libraries out there.
216 (lambda* (#:key outputs #:allow-other-keys)
217 (let ((out (assoc-ref outputs "out")))
218 (match (scandir (string-append out "/lib")
219 (lambda (name)
220 (string-prefix? "python" name)))
221 ((pythonX.Y)
222 (let ((testdir (string-append out "/lib/" pythonX.Y
223 "/test")))
224 (with-directory-excursion testdir
225 (for-each delete-file-recursively
226 (scandir testdir
227 (match-lambda
228 ((or "." "..") #f)
229 (file
230 (not
231 (string-prefix? "test_support."
232 file))))))
233 (call-with-output-file "__init__.py" (const #t))
234 #t)))))))
216c283b
LC
235 (add-before 'strip 'make-libraries-writable
236 (lambda* (#:key outputs #:allow-other-keys)
237 ;; Make .so files writable so they can be stripped.
238 (let ((out (assoc-ref outputs "out")))
239 (for-each (lambda (file)
240 (chmod file #o755))
241 (find-files (string-append out "/lib")
242 "\\.so"))
243 #t)))
02f0c3b2
LC
244 (add-after 'install 'move-tk-inter
245 (lambda* (#:key outputs #:allow-other-keys)
246 ;; When Tkinter support is built move it to a separate output so
247 ;; that the main output doesn't contain a reference to Tcl/Tk.
248 (let ((out (assoc-ref outputs "out"))
249 (tk (assoc-ref outputs "tk")))
250 (when tk
251 (match (find-files out "tkinter.*\\.so")
252 ((tkinter.so)
253 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
254 ;; want it under TK/lib/pythonX.Y/site-packages.
255 (let* ((len (string-length out))
256 (target (string-append
257 tk "/"
258 (string-drop
259 (dirname (dirname tkinter.so))
260 len)
261 "/site-packages")))
262 (install-file tkinter.so target)
263 (delete-file tkinter.so)))))
264 #t))))))
a01b6da7 265 (inputs
3fdc99da
CR
266 `(("bzip2" ,bzip2)
267 ("gdbm" ,gdbm)
b10ab723 268 ("libffi" ,libffi) ; for ctypes
b88e1b0a 269 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 270 ("openssl" ,openssl)
3fdc99da 271 ("readline" ,readline)
afa181ff
LC
272 ("zlib" ,zlib)
273 ("tcl" ,tcl)
274 ("tk" ,tk))) ; for tkinter
b10ab723
CR
275 (native-inputs
276 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
277 (native-search-paths
278 (list (search-path-specification
279 (variable "PYTHONPATH")
af070955 280 (files '("lib/python2.7/site-packages")))))
f0499100 281 (home-page "https://www.python.org")
afa181ff 282 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
283 (description
284 "Python is a remarkably powerful dynamic programming language that
285is used in a wide variety of application domains. Some of its key
286distinguishing features include: clear, readable syntax; strong
287introspection capabilities; intuitive object orientation; natural
288expression of procedural code; full modularity, supporting hierarchical
289packages; exception-based error handling; and very high level dynamic
290data types.")
3f641af0 291 (license license:psfl)))
acc26ff1 292
45848023
HG
293;; Current 2.x version.
294(define-public python-2 python-2.7)
295
296(define-public python-3.4
b24d1cfc 297 (package (inherit python-2)
d0b73960 298 (version "3.4.5")
717003e3
LC
299 (source (origin
300 (method url-fetch)
301 (uri (string-append "https://www.python.org/ftp/python/"
302 version "/Python-" version ".tar.xz"))
fc1adab1
AK
303 (patches (search-patches
304 "python-fix-tests.patch"
fc1adab1
AK
305 "python-3-deterministic-build-info.patch"
306 "python-3-search-paths.patch"))
717003e3
LC
307 (patch-flags '("-p0"))
308 (sha256
309 (base32
d0b73960 310 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))
1f434457
MW
311 (arguments (substitute-keyword-arguments (package-arguments python-2)
312 ((#:tests? _) #t)))
1aebc0cb
AE
313 (native-search-paths
314 (list (search-path-specification
315 (variable "PYTHONPATH")
0e05d01e
SB
316 (files (list (string-append "lib/python"
317 (version-major+minor version)
318 "/site-packages"))))))))
f26a77ff 319
45848023
HG
320;; Current 3.x version.
321(define-public python-3 python-3.4)
322
323;; Current major version.
324(define-public python python-3)
325
95288fcc
LC
326;; Minimal variants of Python, mostly used to break the cycle between Tk and
327;; Python (Tk -> libxcb -> Python.)
328
329(define-public python2-minimal
330 (package (inherit python-2)
331 (name "python-minimal")
02f0c3b2 332 (outputs '("out"))
95288fcc
LC
333 (arguments
334 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
335 ((#:configure-flags cf)
336 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
337 (inputs '()))) ;none of the optional dependencies
338
339(define-public python-minimal
898238b9 340 (package (inherit python)
95288fcc 341 (name "python-minimal")
02f0c3b2 342 (outputs '("out"))
95288fcc 343
d0b73960 344 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
345 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
346 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
347 (inputs `(("libffi" ,libffi)
348 ("openssl" ,openssl)
95288fcc
LC
349 ("zlib" ,zlib)))))
350
64cb064c
LC
351(define* (wrap-python3 python
352 #:optional
353 (name (string-append (package-name python) "-wrapper")))
898238b9 354 (package (inherit python)
95288fcc 355 (name name)
898238b9
AE
356 (source #f)
357 (build-system trivial-build-system)
02f0c3b2 358 (outputs '("out"))
3c0f2329 359 (propagated-inputs `(("python" ,python)))
898238b9
AE
360 (arguments
361 `(#:modules ((guix build utils))
362 #:builder
363 (begin
364 (use-modules (guix build utils))
365 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
366 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
367 (mkdir-p bin)
368 (for-each
369 (lambda (old new)
370 (symlink (string-append python old)
371 (string-append bin "/" new)))
d06df41d
HG
372 `("python3" ,"pydoc3" ,"idle3" ,"pip3" ,"python3-config")
373 `("python" ,"pydoc" ,"idle" ,"pip" ,"python-config"))))))
0d56e3e1
LC
374 (synopsis "Wrapper for the Python 3 commands")
375 (description
376 "This package provides wrappers for the commands of Python@tie{}3.x such
377that they can be invoked under their usual name---e.g., @command{python}
378instead of @command{python3}.")))
379
95288fcc
LC
380(define-public python-wrapper (wrap-python3 python))
381(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 382
aaf625b8
RW
383(define-public python-psutil
384 (package
385 (name "python-psutil")
88535a44 386 (version "4.3.0")
aaf625b8
RW
387 (source
388 (origin
389 (method url-fetch)
f56777be 390 (uri (pypi-uri "psutil" version))
aaf625b8
RW
391 (sha256
392 (base32
88535a44 393 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8
RW
394 (build-system python-build-system)
395 (native-inputs
396 `(("python-setuptools" ,python-setuptools)))
88535a44 397 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
398 (synopsis "Library for retrieving information on running processes")
399 (description
400 "psutil (Python system and process utilities) is a library for retrieving
401information on running processes and system utilization (CPU, memory, disks,
402network) in Python. It is useful mainly for system monitoring, profiling and
403limiting process resources and management of running processes. It implements
404many functionalities offered by command line tools such as: ps, top, lsof,
405netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
406pidof, tty, taskset, pmap.")
3f641af0 407 (license license:bsd-3)))
aaf625b8
RW
408
409(define-public python2-psutil
410 (package-with-python2 python-psutil))
898238b9 411
f9da1d8a
ED
412(define-public python-passlib
413 (package
414 (name "python-passlib")
690e8c66 415 (version "1.6.5")
f9da1d8a
ED
416 (source
417 (origin
418 (method url-fetch)
690e8c66 419 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
420 (sha256
421 (base32
690e8c66 422 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
423 (build-system python-build-system)
424 (native-inputs
425 `(("python-nose" ,python-nose)
426 ("python-setuptools" ,python-setuptools)))
427 (inputs
428 `(("python-py-bcrypt" ,python-py-bcrypt)))
429 (arguments
430 `(#:phases
431 (alist-cons-before
432 'check 'set-PYTHON_EGG_CACHE
433 ;; some tests require access to "$HOME/.cython"
434 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
435 %standard-phases)))
436 (home-page "https://bitbucket.org/ecollins/passlib")
437 (synopsis
438 "Comprehensive password hashing framework")
439 (description
440 "Passlib is a password hashing library for Python 2 & 3, which provides
441cross-platform implementations of over 30 password hashing algorithms, as well
442as a framework for managing existing password hashes. It's designed to be
443useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
444to providing full-strength password hashing for multi-user application.")
3f641af0 445 (license license:bsd-3)))
f9da1d8a
ED
446
447(define-public python2-passlib
448 (package-with-python2 python-passlib))
449
feb0d9c3
ED
450(define-public python-py-bcrypt
451 (package
452 (name "python-py-bcrypt")
453 (version "0.4")
454 (source
455 (origin
456 (method url-fetch)
457 (uri (string-append
458 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
459 version
460 ".tar.gz"))
461 (sha256
462 (base32
463 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
464 (build-system python-build-system)
465 (native-inputs
466 `(("python-setuptools" ,python-setuptools)))
467 (home-page "https://code.google.com/p/py-bcrypt")
468 (synopsis
469 "Bcrypt password hashing and key derivation")
470 (description
471 "A python wrapper of OpenBSD's Blowfish password hashing code. This
472system hashes passwords using a version of Bruce Schneier's Blowfish block
473cipher with modifications designed to raise the cost of off-line password
474cracking and frustrate fast hardware implementation. The computation cost of
475the algorithm is parametised, so it can be increased as computers get faster.
476The intent is to make a compromise of a password database less likely to
477result in an attacker gaining knowledge of the plaintext passwords (e.g. using
478John the Ripper).")
479 ;; "sha2.c" is under BSD-3;
480 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
481 ;; the rest is under ISC.
3f641af0 482 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
483
484(define-public python2-py-bcrypt
485 (package-with-python2 python-py-bcrypt))
486
487
429fdea1
ED
488(define-public python-paramiko
489 (package
490 (name "python-paramiko")
81b9bbbd 491 (version "1.16.0")
429fdea1
ED
492 (source
493 (origin
494 (method url-fetch)
81b9bbbd 495 (uri (pypi-uri "paramiko" version))
429fdea1
ED
496 (sha256
497 (base32
81b9bbbd 498 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1
ED
499 (build-system python-build-system)
500 (native-inputs
501 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
502 (propagated-inputs
503 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 504 (inputs
a3fc12da 505 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
506 (home-page "http://www.paramiko.org/")
507 (synopsis "SSHv2 protocol library")
508 (description "Paramiko is a python implementation of the SSHv2 protocol,
509providing both client and server functionality. While it leverages a Python C
510extension for low level cryptography (PyCrypto), Paramiko itself is a pure
511Python interface around SSH networking concepts.")
3f641af0 512 (license license:lgpl2.1+)))
429fdea1
ED
513
514(define-public python2-paramiko
515 (package-with-python2 python-paramiko))
516
517
de73dbf6
ED
518(define-public python-httplib2
519 (package
520 (name "python-httplib2")
286f1bac 521 (version "0.9.2")
de73dbf6
ED
522 (source
523 (origin
524 (method url-fetch)
286f1bac 525 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
526 (sha256
527 (base32
286f1bac 528 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6
ED
529 (build-system python-build-system)
530 (native-inputs
531 `(("python-setuptools" ,python-setuptools)))
286f1bac 532 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
533 (synopsis "Comprehensive HTTP client library")
534 (description
535 "A comprehensive HTTP client library supporting many features left out of
536other HTTP libraries.")
537 (license license:expat)))
538
539(define-public python2-httplib2
540 (package-with-python2 python-httplib2))
541
67039875
ED
542(define-public python-ecdsa
543 (package
544 (name "python-ecdsa")
545 (version "0.13")
546 (source
547 (origin
548 (method url-fetch)
549 (uri (string-append
550 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
551 version
552 ".tar.gz"))
553 (sha256
554 (base32
555 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
556 (build-system python-build-system)
557 (native-inputs
558 `(("python-setuptools" ,python-setuptools)))
559 (inputs
560 `(("openssl" ,openssl)))
561 (home-page
562 "http://github.com/warner/python-ecdsa")
563 (synopsis
564 "ECDSA cryptographic signature library (pure python)")
565 (description
566 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
567Curve Digital Signature Algorithm), implemented purely in Python. With this
568library, you can quickly create keypairs (signing key and verifying key), sign
569messages, and verify the signatures. The keys and signatures are very short,
570making them easy to handle and incorporate into other protocols.")
571 (license license:expat)))
572
573(define-public python2-ecdsa
574 (package-with-python2 python-ecdsa))
575
52323f32
ED
576(define-public python-ccm
577 (package
578 (name "python-ccm")
db5567f7 579 (version "2.1.6")
52323f32
ED
580 (source
581 (origin
582 (method url-fetch)
db5567f7 583 (uri (pypi-uri "ccm" version))
52323f32
ED
584 (sha256
585 (base32
db5567f7 586 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32
ED
587 (build-system python-build-system)
588 (native-inputs
589 `(("python-setuptools" ,python-setuptools)))
590 (inputs
591 `(("python-pyyaml" ,python-pyyaml)
592 ("python-six" ,python-six)))
593 (home-page "https://github.com/pcmanus/ccm")
594 (synopsis "Cassandra Cluster Manager")
595 (description "A script/library to create, launch and remove an Apache
596Cassandra cluster on localhost.")
3f641af0 597 (license license:asl2.0)))
52323f32
ED
598
599(define-public python2-ccm
600 (package-with-python2 python-ccm))
601
89114f39 602(define-public python-pytz
acc26ff1 603 (package
89114f39 604 (name "python-pytz")
61c9babb 605 (version "2016.3")
acc26ff1
CR
606 (source
607 (origin
608 (method url-fetch)
61c9babb 609 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
610 (sha256
611 (base32
61c9babb 612 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 613 (build-system python-build-system)
8498b8cf 614 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 615 (home-page "http://pythonhosted.org/pytz")
9e771e3b 616 (synopsis "Python timezone library")
acc26ff1
CR
617 (description
618 "This library allows accurate and cross platform timezone calculations
619using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 620 (license license:expat)))
5ace6e2f 621
89114f39 622(define-public python2-pytz
11bb85a1 623 (package-with-python2 python-pytz))
89114f39 624
fc50e9c6 625
89114f39 626(define-public python-babel
5ace6e2f 627 (package
89114f39 628 (name "python-babel")
3f37db6b 629 (version "2.3.2")
5ace6e2f
CR
630 (source
631 (origin
632 (method url-fetch)
b850a6d8 633 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
634 (sha256
635 (base32
3f37db6b 636 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f
CR
637 (build-system python-build-system)
638 (inputs
e1804763
AE
639 `(("python-pytz" ,python-pytz)
640 ("python-setuptools" ,python-setuptools)))
8498b8cf 641 (arguments `(#:tests? #f)) ; no test target
e1804763 642 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
643 (synopsis
644 "Tools for internationalizing Python applications")
645 (description
646 "Babel is composed of two major parts:
647- tools to build and work with gettext message catalogs
648- a Python interface to the CLDR (Common Locale Data Repository), providing
649access to various locale display names, localized number and date formatting,
650etc. ")
3f641af0 651 (license license:bsd-3)))
89114f39
AE
652
653(define-public python2-babel
11bb85a1 654 (package-with-python2 python-babel))
73adf220 655
ed377cc6
RW
656(define-public python2-backport-ssl-match-hostname
657 (package
658 (name "python2-backport-ssl-match-hostname")
f2d06d46 659 (version "3.5.0.1")
ed377cc6
RW
660 (source
661 (origin
662 (method url-fetch)
663 (uri (string-append
664 "https://pypi.python.org/packages/source/b/"
665 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
666 version ".tar.gz"))
667 (sha256
668 (base32
f2d06d46 669 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 670 (build-system python-build-system)
f2d06d46
EF
671 (arguments
672 `(#:python ,python-2
673 #:tests? #f)) ; no test target
ed377cc6
RW
674 (inputs
675 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
676 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
677 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
678 (description
679 "This backport brings the ssl.match_hostname() function to users of
680earlier versions of Python. The function checks the hostname in the
681certificate returned by the server to which a connection has been established,
682and verifies that it matches the intended target hostname.")
3f641af0 683 (license license:psfl)))
ed377cc6 684
ef5cbf9b
RW
685(define-public python-h5py
686 (package
687 (name "python-h5py")
fe147c41 688 (version "2.6.0")
ef5cbf9b
RW
689 (source
690 (origin
691 (method url-fetch)
fe147c41 692 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
693 (sha256
694 (base32
fe147c41 695 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 696 (build-system python-build-system)
797e1401
RW
697 (arguments
698 `(#:tests? #f ; no test target
699 #:phases
700 (modify-phases %standard-phases
701 (add-after 'unpack 'fix-hdf5-paths
702 (lambda* (#:key inputs #:allow-other-keys)
703 (let ((prefix (assoc-ref inputs "hdf5")))
704 (substitute* "setup_build.py"
705 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
706 (string-append "['" prefix "/lib" "']"))
707 (("'/opt/local/include', '/usr/local/include'")
708 (string-append "'" prefix "/include" "'")))
709 (substitute* "setup_configure.py"
710 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
711 (string-append "['" prefix "/lib" "']")))
712 #t))))))
3c4010b1
RW
713 (propagated-inputs
714 `(("python-numpy" ,python-numpy)))
ef5cbf9b 715 (inputs
fe147c41
EF
716 `(("hdf5" ,hdf5)
717 ("python-six" ,python-six)))
ef5cbf9b 718 (native-inputs
fe147c41
EF
719 `(("python-cython" ,python-cython)
720 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
721 (home-page "http://www.h5py.org/")
722 (synopsis "Read and write HDF5 files from Python")
723 (description
724 "The h5py package provides both a high- and low-level interface to the
725HDF5 library from Python. The low-level interface is intended to be a
726complete wrapping of the HDF5 API, while the high-level component supports
727access to HDF5 files, datasets and groups using established Python and NumPy
728concepts.")
3f641af0 729 (license license:bsd-3)
fe147c41 730 (properties `((python2-variant . ,(delay python2-h5py))))))
ef5cbf9b
RW
731
732(define-public python2-h5py
fe147c41 733 (package-with-python2 (strip-python2-variant python-h5py)))
ef5cbf9b 734
c1448c69
EB
735(define-public python-lockfile
736 (package
737 (name "python-lockfile")
692add53 738 (version "0.12.2")
c1448c69
EB
739 (source
740 (origin
741 (method url-fetch)
742 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
743 "lockfile-" version ".tar.gz"))
744 (sha256
745 (base32
692add53 746 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
747 (build-system python-build-system)
748 (arguments '(#:test-target "check"))
692add53
BW
749 (native-inputs
750 `(("python-pbr" ,python-pbr)))
c1448c69
EB
751 (home-page "http://code.google.com/p/pylockfile/")
752 (synopsis "Platform-independent file locking module")
753 (description
754 "The lockfile package exports a LockFile class which provides a simple
755API for locking files.")
1804527a
BW
756 (license license:expat)
757 (properties `((python2-variant . ,(delay python2-lockfile))))))
c1448c69
EB
758
759(define-public python2-lockfile
1804527a
BW
760 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
761 (package
692add53
BW
762 (inherit base)
763 (native-inputs `(("python2-setuptools" ,python2-setuptools)
764 ,@(package-native-inputs base))))))
c1448c69 765
5a1a4bf6
EB
766(define-public python-mock
767 (package
768 (name "python-mock")
769 (version "1.0.1")
770 (source
771 (origin
772 (method url-fetch)
773 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
774 "mock-" version ".tar.gz"))
775 (sha256
776 (base32
777 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
778 (build-system python-build-system)
779 (arguments '(#:test-target "check"))
07af3e5e 780 (home-page "http://code.google.com/p/mock/")
9e771e3b 781 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
782 (description
783 "Mock is a library for testing in Python. It allows you to replace parts
784of your system under test with mock objects and make assertions about how they
785have been used.")
bd3fa666 786 (license license:expat)))
5a1a4bf6
EB
787
788(define-public python2-mock
789 (package-with-python2 python-mock))
790
fc50e9c6 791
73adf220
AE
792(define-public python-setuptools
793 (package
794 (name "python-setuptools")
62a9a23b 795 (version "18.3.1")
73adf220
AE
796 (source
797 (origin
798 (method url-fetch)
799 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
800 version ".tar.gz"))
801 (sha256
802 (base32
62a9a23b 803 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 804 (build-system python-build-system)
d3d656c5
AE
805 ;; FIXME: Tests require pytest, which itself relies on setuptools.
806 ;; One could bootstrap with an internal untested setuptools.
73adf220 807 (arguments
824af8ca 808 `(#:tests? #f))
73adf220
AE
809 (home-page "https://pypi.python.org/pypi/setuptools")
810 (synopsis
811 "Library designed to facilitate packaging Python projects")
812 (description
813 "Setuptools is a fully-featured, stable library designed to facilitate
814packaging Python projects, where packaging includes:
815Python package and module definitions,
816distribution package metadata,
817test hooks,
818project installation,
819platform-specific details,
820Python 3 support.")
3f641af0 821 (license license:psfl)))
73adf220
AE
822
823(define-public python2-setuptools
824 (package-with-python2 python-setuptools))
fc50e9c6
AE
825
826
cafc3f5a
EB
827(define-public python-pycrypto
828 (package
829 (name "python-pycrypto")
830 (version "2.6.1")
831 (source
832 (origin
833 (method url-fetch)
834 (uri (string-append "https://pypi.python.org/packages/source/p/"
835 "pycrypto/pycrypto-" version ".tar.gz"))
836 (sha256
837 (base32
838 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
839 (build-system python-build-system)
840 (native-inputs
841 `(("python-setuptools" ,python-setuptools)))
842 (inputs
843 `(("python" ,python)
844 ("gmp" ,gmp)))
845 (arguments
846 `(#:phases
847 (alist-cons-before
848 'build 'set-build-env
849 ;; pycrypto runs an autoconf configure script behind the scenes
850 (lambda _
851 (setenv "CONFIG_SHELL" (which "bash")))
852 %standard-phases)))
853 (home-page "http://www.pycrypto.org/")
854 (synopsis "Cryptographic modules for Python")
855 (description
856 "Pycrypto is a collection of both secure hash functions (such as SHA256
857and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 858etc.). The package is structured to make adding new modules easy.")
3f641af0 859 (license license:public-domain)))
cafc3f5a 860
345f0611 861(define-public python2-pycrypto
1c0059da
EF
862 (let ((pycrypto (package-with-python2 python-pycrypto)))
863 (package (inherit pycrypto)
864 (inputs
865 `(("python" ,python-2)
866 ,@(alist-delete
867 "python"
868 (package-inputs pycrypto)))))))
345f0611 869
cafc3f5a
EB
870(define-public python-keyring
871 (package
872 (name "python-keyring")
13f3ff35 873 (version "8.7")
cafc3f5a
EB
874 (source
875 (origin
876 (method url-fetch)
664e6c3a 877 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
878 (sha256
879 (base32
13f3ff35 880 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
881 (build-system python-build-system)
882 (native-inputs
13f3ff35 883 `(("python-setuptools-scm" ,python-setuptools-scm)))
cafc3f5a
EB
884 (inputs
885 `(("python-pycrypto" ,python-pycrypto)))
886 (arguments
664e6c3a 887 `(#:tests? #f)) ;TODO: tests require pytest
cafc3f5a
EB
888 (home-page "http://bitbucket.org/kang/python-keyring-lib")
889 (synopsis "Store and access your passwords safely")
890 (description
891 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 892service from python. It can be used in any application that needs safe
cafc3f5a
EB
893password storage.")
894 ;; "MIT" and PSF dual license
3f641af0 895 (license license:x11)
13f3ff35 896 (properties `((python2-variant . ,(delay python2-keyring))))))
cafc3f5a 897
d7af1069 898(define-public python2-keyring
13f3ff35
EF
899 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
900 (package
901 (inherit base)
902 (native-inputs `(("python2-setuptools" ,python2-setuptools)
903 ,@(package-native-inputs base))))))
d7af1069 904
a480bc41
EB
905(define-public python-six
906 (package
907 (name "python-six")
b6ab89ef 908 (version "1.10.0")
a480bc41
EB
909 (source
910 (origin
911 (method url-fetch)
b6ab89ef 912 (uri (pypi-uri "six" version))
a480bc41
EB
913 (sha256
914 (base32
b6ab89ef 915 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
916 (build-system python-build-system)
917 (inputs
918 `(("python-setuptools" ,python-setuptools)))
919 (home-page "http://pypi.python.org/pypi/six/")
920 (synopsis "Python 2 and 3 compatibility utilities")
921 (description
35b9e423 922 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
923functions for smoothing over the differences between the Python versions with
924the goal of writing Python code that is compatible on both Python versions.
35b9e423 925Six supports every Python version since 2.5. It is contained in only one
a480bc41 926Python file, so it can be easily copied into your project.")
3f641af0 927 (license license:x11)))
a480bc41 928
0c20025c
AE
929(define-public python2-six
930 (package-with-python2 python-six))
931
cafc3f5a
EB
932(define-public python-dateutil-2
933 (package
934 (name "python-dateutil")
394b8060 935 (version "2.5.2")
cafc3f5a
EB
936 (source
937 (origin
938 (method url-fetch)
394b8060 939 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
940 (sha256
941 (base32
394b8060 942 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a
EB
943 (build-system python-build-system)
944 (inputs
394b8060 945 `(("python-six" ,python-six)))
cafc3f5a
EB
946 (home-page "http://labix.org/python-dateutil")
947 (synopsis "Extensions to the standard datetime module")
948 (description
949 "The dateutil module provides powerful extensions to the standard
950datetime module, available in Python 2.3+.")
3f641af0 951 (license license:bsd-3)
394b8060 952 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
cafc3f5a
EB
953
954(define-public python2-dateutil-2
394b8060
EF
955 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
956 (package
957 (inherit base)
958 (inputs `(("python2-setuptools" ,python2-setuptools)
959 ,@(package-inputs base))))))
cafc3f5a 960
fc50e9c6
AE
961(define-public python-dateutil
962 (package
963 (name "python-dateutil")
964 (version "1.5") ; last version for python < 3
965 (source
966 (origin
967 (method url-fetch)
cafc3f5a
EB
968 (uri (string-append "http://labix.org/download/python-dateutil/"
969 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
970 (sha256
971 (base32
972 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
973 (build-system python-build-system)
974 (inputs
975 `(("python-setuptools" ,python-setuptools)))
976 (home-page "http://labix.org/python-dateutil")
cafc3f5a 977 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
978 (description
979 "The dateutil module provides powerful extensions to the standard
980datetime module, available in Python 2.3+.")
3f641af0 981 (license license:psfl)))
fc50e9c6
AE
982
983(define-public python2-dateutil
984 (package-with-python2 python-dateutil))
1d08c01f 985
cafc3f5a
EB
986(define-public python-parsedatetime
987 (package
988 (name "python-parsedatetime")
eebf6f01 989 (version "2.1")
cafc3f5a
EB
990 (source
991 (origin
992 (method url-fetch)
eebf6f01 993 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
994 (sha256
995 (base32
eebf6f01 996 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
997 (build-system python-build-system)
998 (native-inputs
eebf6f01
EF
999 `(("python-nose" ,python-nose)
1000 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1001 (home-page "http://github.com/bear/parsedatetime/")
1002 (synopsis
1003 "Parse human-readable date/time text")
1004 (description
e881752c 1005 "Parse human-readable date/time text.")
3f641af0 1006 (license license:asl2.0)
eebf6f01 1007 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
cafc3f5a 1008
38b8f9b2 1009(define-public python2-parsedatetime
eebf6f01
EF
1010 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1011 (package
1012 (inherit base)
1013 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1014 ,@(package-native-inputs base))))))
38b8f9b2 1015
d072efcb
RW
1016(define-public python-pandas
1017 (package
1018 (name "python-pandas")
7d0c3c8d 1019 (version "0.18.1")
d072efcb
RW
1020 (source
1021 (origin
1b96f069 1022 (method url-fetch)
7d0c3c8d
EF
1023 (uri (string-append
1024 "https://pypi.python.org/packages/11/09/"
1025 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1026 "pandas-" version ".tar.gz"))
1b96f069 1027 (sha256
7d0c3c8d 1028 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1029 (build-system python-build-system)
d072efcb 1030 (propagated-inputs
42603726
EF
1031 `(("python-numpy" ,python-numpy)))
1032 (inputs
1033 `(("python-pytz" ,python-pytz)
d072efcb
RW
1034 ("python-dateutil" ,python-dateutil-2)))
1035 (native-inputs
7d0c3c8d 1036 `(("python-nose" ,python-nose)))
d072efcb
RW
1037 (home-page "http://pandas.pydata.org")
1038 (synopsis "Data structures for data analysis, time series, and statistics")
1039 (description
1040 "Pandas is a Python package providing fast, flexible, and expressive data
1041structures designed to make working with structured (tabular,
1042multidimensional, potentially heterogeneous) and time series data both easy
1043and intuitive. It aims to be the fundamental high-level building block for
1044doing practical, real world data analysis in Python.")
3f641af0 1045 (license license:bsd-3)
7d0c3c8d 1046 (properties `((python2-variant . ,(delay python2-pandas))))))
d072efcb
RW
1047
1048(define-public python2-pandas
7d0c3c8d
EF
1049 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1050 (package
1051 (inherit base)
1052 (native-inputs `(("python2-setuptools" ,python2-setuptools)
dbd40ac1 1053 ,@(package-native-inputs base))))))
d072efcb 1054
cafc3f5a
EB
1055(define-public python-tzlocal
1056 (package
1057 (name "python-tzlocal")
ed80839b 1058 (version "1.2.2")
cafc3f5a
EB
1059 (source
1060 (origin
1061 (method url-fetch)
226d3331 1062 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1063 (sha256
1064 (base32
ed80839b 1065 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1066 (build-system python-build-system)
ed80839b 1067 (inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1068 (home-page "https://github.com/regebro/tzlocal")
1069 (synopsis
35b9e423 1070 "Local timezone information for Python")
cafc3f5a
EB
1071 (description
1072 "Tzlocal returns a tzinfo object with the local timezone information.
1073This module attempts to fix a glaring hole in pytz, that there is no way to
1074get the local timezone information, unless you know the zoneinfo name, and
1075under several distributions that's hard or impossible to figure out.")
3f641af0 1076 (license license:cc0)))
cafc3f5a 1077
1d08c01f
AE
1078(define-public python2-pysqlite
1079 (package
1080 (name "python2-pysqlite")
fe476868 1081 (version "2.8.1")
1d08c01f
AE
1082 (source
1083 (origin
1084 (method url-fetch)
fe476868 1085 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1086 (sha256
1087 (base32
fe476868 1088 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1089 (build-system python-build-system)
1090 (inputs
1091 `(("sqlite" ,sqlite)))
1092 (arguments
1093 `(#:python ,python-2 ; incompatible with Python 3
1094 #:tests? #f)) ; no test target
fe476868 1095 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1096 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1097 (description
1098 "Pysqlite provides SQLite bindings for Python that comply to the
1099Database API 2.0T.")
ed0cdf83 1100 (license license:zlib)))
1d08c01f 1101
2875caf5
AE
1102
1103(define-public python2-mechanize
1104 (package
1105 (name "python2-mechanize")
1106 (version "0.2.5")
1107 (source
1108 (origin
1109 (method url-fetch)
1110 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1111 version ".tar.gz"))
1112 (sha256
1113 (base32
1114 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1115 (build-system python-build-system)
1116 (inputs
1117 `(("python2-setuptools" ,python2-setuptools)))
1118 (arguments
1119 `(#:python ,python-2 ; apparently incompatible with Python 3
1120 #:tests? #f))
1121 ;; test fails with message
1122 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1123 ;; (python-3.3.2) or
1124 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1125 ;; (python-2.7.5).
1126 ;; The source code is from March 2011 and probably not up-to-date
1127 ;; with respect to python unit tests.
1128 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1129 (synopsis
1130 "Stateful programmatic web browsing in Python")
1131 (description
1132 "Mechanize implements stateful programmatic web browsing in Python,
1133after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1134 (license (license:non-copyleft
1135 "file://COPYING"
1136 "See COPYING in the distribution."))))
2875caf5 1137
0352532e
AE
1138
1139(define-public python-simplejson
1140 (package
1141 (name "python-simplejson")
988d1bad 1142 (version "3.8.2")
0352532e
AE
1143 (source
1144 (origin
1145 (method url-fetch)
988d1bad 1146 (uri (pypi-uri "simplejson" version))
0352532e
AE
1147 (sha256
1148 (base32
988d1bad 1149 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
0352532e
AE
1150 (build-system python-build-system)
1151 (home-page "http://simplejson.readthedocs.org/en/latest/")
1152 (synopsis
1153 "Json library for Python")
1154 (description
e881752c
AK
1155 "JSON (JavaScript Object Notation) is a subset of JavaScript
1156syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1157format.
0352532e
AE
1158
1159Simplejson exposes an API familiar to users of the standard library marshal
1160and pickle modules. It is the externally maintained version of the json
1161library contained in Python 2.6, but maintains compatibility with Python 2.5
1162and (currently) has significant performance advantages, even without using
1163the optional C extension for speedups. Simplejson is also supported on
1164Python 3.3+.")
3f641af0 1165 (license license:x11)))
0352532e
AE
1166
1167(define-public python2-simplejson
1168 (package-with-python2 python-simplejson))
421a80a2
AE
1169
1170
ed07b08d 1171(define-public python-pyicu
421a80a2 1172 (package
ed07b08d 1173 (name "python-pyicu")
d3b29319 1174 (version "1.9.2")
421a80a2
AE
1175 (source
1176 (origin
1177 (method url-fetch)
1178 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1179 version ".tar.gz"))
1180 (sha256
1181 (base32
d3b29319 1182 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1183 (build-system python-build-system)
1184 (inputs
1185 `(("icu4c" ,icu4c)))
421a80a2 1186 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1187 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1188 (description
1189 "PyICU is a python extension wrapping the ICU C++ API.")
3f641af0 1190 (license license:x11)
ed07b08d
LF
1191 (properties `((python2-variant . ,(delay python2-pyicu))))))
1192
1193(define-public python2-pyicu
1194 (package
1195 (inherit (package-with-python2
1196 (strip-python2-variant python-pyicu)))
1197 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cc20a22a
LC
1198
1199(define-public python2-dogtail
1200 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1201 ;; spaces in indentation" with Python 3.
1202 (package
1203 (name "python2-dogtail")
1204 (version "0.8.2")
1205 (source (origin
1206 (method url-fetch)
1207 (uri (string-append
1208 "https://fedorahosted.org/released/dogtail/dogtail-"
1209 version ".tar.gz"))
1210 (sha256
1211 (base32
1212 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1213 (build-system python-build-system)
1214 (arguments `(#:python ,python-2
1215 #:tests? #f)) ; invalid command "test"
1216 (home-page "https://fedorahosted.org/dogtail/")
1217 (synopsis "GUI test tool and automation framework written in ​Python")
1218 (description
35b9e423 1219 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1220It uses Accessibility (a11y) technologies to communicate with desktop
1221applications. dogtail scripts are written in Python and executed like any
1222other Python program.")
3f641af0 1223 (license license:gpl2+)))
515e6878 1224
011b18c3
LC
1225(define-public python2-empy
1226 (package
1227 (name "python2-empy")
1228 (version "3.3")
1229 (source (origin
1230 (method url-fetch)
1231 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1232 version ".tar.gz"))
1233 (sha256
1234 (base32
1235 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1236 (build-system python-build-system)
1237 (arguments
1238 `(#:python ,python-2
1239 #:phases (alist-replace
1240 'check
1241 (lambda _
1242 (zero? (system* "./test.sh")))
1243 %standard-phases)))
1244 (home-page "http://www.alcyone.com/software/empy/")
1245 (synopsis "Templating system for Python")
1246 (description
1247 "EmPy is a system for embedding Python expressions and statements in
1248template text; it takes an EmPy source file, processes it, and produces
1249output. This is accomplished via expansions, which are special signals to the
1cd4027c 1250EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1251EmPy can expand arbitrary Python expressions and statements in this way, as
1252well as a variety of special forms. Textual data not explicitly delimited in
1253this way is sent unaffected to the output, allowing Python to be used in
1254effect as a markup language. Also supported are callbacks via hooks,
1255recording and playback via diversions, and dynamic, chainable filters. The
1256system is highly configurable via command line options and embedded
1257commands.")
3f641af0 1258 (license license:lgpl2.1+)))
011b18c3 1259
8deeda0c
LC
1260(define-public python2-element-tree
1261 (package
1262 (name "python2-element-tree")
1263 (version "1.2.6")
1264 (source (origin
1265 (method url-fetch)
1266 (uri (string-append
1267 "http://effbot.org/media/downloads/elementtree-"
1268 version "-20050316.tar.gz"))
1269 (sha256
1270 (base32
1271 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1272 (build-system python-build-system)
1273 (arguments
1274 `(#:python ,python-2 ; seems to be part of Python 3
1275 #:tests? #f)) ; no 'test' sub-command
1276 (synopsis "Toolkit for XML processing in Python")
1277 (description
1278 "ElementTree is a Python library supporting lightweight XML processing.")
1279 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1280 (license (license:x11-style
1281 "http://docs.python.org/2/license.html"
1282 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1283
1284(define-public python2-pybugz
1285 (package
1286 (name "python2-pybugz")
1287 (version "0.6.11")
1288 (source (origin
1289 (method url-fetch)
1290 (uri (string-append
1291 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1292 version ".tar.gz"))
1293 (sha256
1294 (base32
6f194a1e 1295 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1296 (patches (search-patches "pybugz-stty.patch"
1297 "pybugz-encode-error.patch"))))
8deeda0c
LC
1298 (build-system python-build-system)
1299 (arguments
1300 `(#:python ,python-2 ; SyntaxError with Python 3
1301 #:tests? #f)) ; no 'test' sub-command
1302 (inputs `(("element-tree" ,python2-element-tree)))
1303 (synopsis "Python and command-line interface to Bugzilla")
1304 (description
1305 "PyBugz is a Python library and command-line tool to query the Bugzilla
1306bug tracking system. It is meant as an aid to speed up interaction with the
1307bug tracker.")
1308 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1309 (license license:gpl2)))
8deeda0c 1310
a480bc41
EB
1311(define-public python-enum34
1312 (package
1313 (name "python-enum34")
d39ae1e5 1314 (version "1.1.0")
a480bc41
EB
1315 (source
1316 (origin
1317 (method url-fetch)
d39ae1e5 1318 (uri (pypi-uri "enum34" version))
a480bc41
EB
1319 (sha256
1320 (base32
d39ae1e5 1321 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1322 (build-system python-build-system)
a480bc41
EB
1323 (arguments
1324 `(#:phases
1325 (alist-replace
1326 'check
1327 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1328 %standard-phases)))
1329 (home-page "https://pypi.python.org/pypi/enum34")
1330 (synopsis "Backported Python 3.4 Enum")
1331 (description
1332 "Enum34 is the new Python stdlib enum module available in Python 3.4
1333backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1334 (license license:bsd-3)))
a480bc41 1335
820acd1b
LF
1336(define-public python2-enum34
1337 (package-with-python2 python-enum34))
1338
a480bc41
EB
1339(define-public python-parse-type
1340 (package
1341 (name "python-parse-type")
1342 (version "0.3.4")
1343 (source
1344 (origin
1345 (method url-fetch)
1346 (uri (string-append "https://pypi.python.org/packages/source/p/"
1347 "parse_type/parse_type-" version ".tar.gz"))
1348 (sha256
1349 (base32
1350 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1351 (build-system python-build-system)
1352 (inputs
1353 `(("python-setuptools" ,python-setuptools)
1354 ("python-six" ,python-six)
68f1cdec 1355 ("python-parse" ,python-parse)))
a480bc41
EB
1356 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1357 (home-page "https://github.com/jenisys/parse_type")
1358 (synopsis "Extended parse module")
1359 (description
1360 "Parse_type extends the python parse module.")
3f641af0 1361 (license license:bsd-3)))
a480bc41
EB
1362
1363(define-public python-parse
1364 (package
1365 (name "python-parse")
eb3d3503 1366 (version "1.6.6")
a480bc41
EB
1367 (source
1368 (origin
1369 (method url-fetch)
eb3d3503 1370 (uri (pypi-uri "parse" version))
a480bc41
EB
1371 (sha256
1372 (base32
eb3d3503 1373 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
a480bc41
EB
1374 (build-system python-build-system)
1375 (arguments
1376 `(#:phases
1377 (alist-replace
1378 'check
1379 (lambda _ (zero? (system* "python" "test_parse.py")))
1380 %standard-phases)))
1381 (home-page "https://github.com/r1chardj0n3s/parse")
1382 (synopsis "Parse strings")
1383 (description
1384 "Parse strings using a specification based on the Python format()
1385syntax.")
3f641af0 1386 (license license:x11)))
a480bc41
EB
1387
1388
515e6878
LC
1389(define-public scons
1390 (package
1391 (name "scons")
a3f61425 1392 (version "2.3.4")
515e6878
LC
1393 (source (origin
1394 (method url-fetch)
de67e922
LF
1395 (uri (string-append "mirror://sourceforge/scons/scons/" version
1396 "/scons-" version ".tar.gz"))
515e6878
LC
1397 (sha256
1398 (base32
a3f61425 1399 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1400 (build-system python-build-system)
1401 (arguments
1402 ;; With Python 3.x, fails to build with a syntax error.
1403 `(#:python ,python-2
1404 #:tests? #f)) ; no 'python setup.py test' command
1405 (home-page "http://scons.org/")
1406 (synopsis "Software construction tool written in Python")
1407 (description
1408 "SCons is a software construction tool. Think of SCons as an improved,
1409cross-platform substitute for the classic Make utility with integrated
1410functionality similar to autoconf/automake and compiler caches such as ccache.
1411In short, SCons is an easier, more reliable and faster way to build
1412software.")
3f641af0 1413 (license license:x11)))
011b18c3 1414
c15a5c0e
DT
1415(define-public python-extras
1416 (package
1417 (name "python-extras")
1418 (version "0.0.3")
1419 (source
1420 (origin
1421 (method url-fetch)
1422 (uri (string-append
1423 "https://pypi.python.org/packages/source/e/extras/extras-"
1424 version ".tar.gz"))
1425 (sha256
1426 (base32
1427 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1428 (build-system python-build-system)
1429 (inputs
1430 `(("python-setuptools" ,python-setuptools)))
1431 (arguments
1432 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1433 '(#:tests? #f))
1434 (home-page "https://github.com/testing-cabal/extras")
1435 (synopsis "Useful extensions to the Python standard library")
1436 (description
1437 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1438 (license license:expat)))
c15a5c0e
DT
1439
1440(define-public python2-extras
1441 (package-with-python2 python-extras))
1442
56ea0efd
DT
1443(define-public python-mimeparse
1444 (package
1445 (name "python-mimeparse")
1446 (version "0.1.4")
1447 (source
1448 (origin
1449 (method url-fetch)
1450 (uri (string-append
1451 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1452 version ".tar.gz"))
1453 (sha256
1454 (base32
1455 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1456 (build-system python-build-system)
1457 (inputs
1458 `(("python-setuptools" ,python-setuptools)))
1459 (arguments
1460 '(#:tests? #f)) ; no setup.py test command
1461 (home-page
1462 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1463 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1464 (description
1465 "Mimeparse provides basic functions for parsing MIME type names and
1466matching them against a list of media-ranges.")
bd3fa666 1467 (license license:expat)))
56ea0efd
DT
1468
1469(define-public python2-mimeparse
1470 (package-with-python2 python-mimeparse))
1471
4435427e
DT
1472(define-public python-nose
1473 (package
1474 (name "python-nose")
f7cb9841 1475 (version "1.3.7")
4435427e
DT
1476 (source
1477 (origin
1478 (method url-fetch)
f7cb9841 1479 (uri (pypi-uri "nose" version))
4435427e
DT
1480 (sha256
1481 (base32
f7cb9841 1482 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1483 (build-system python-build-system)
1484 (inputs
1485 `(("python-setuptools" ,python-setuptools)))
1486 (arguments
1487 '(#:tests? #f)) ; FIXME: test suite fails
1488 (home-page "http://readthedocs.org/docs/nose/")
1489 (synopsis "Python testing library")
1490 (description
1491 "Nose extends the unittest library to make testing easier.")
3f641af0 1492 (license license:lgpl2.0+)))
4435427e
DT
1493
1494(define-public python2-nose
1495 (package-with-python2 python-nose))
1496
6cd9c356
DT
1497(define-public python-unittest2
1498 (package
1499 (name "python-unittest2")
1500 (version "0.5.1")
1501 (source
1502 (origin
1503 (method url-fetch)
1504 (uri (string-append
1505 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1506 version ".tar.gz"))
1507 (sha256
1508 (base32
1509 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1510 (build-system python-build-system)
1511 (inputs
1512 `(("python-setuptools" ,python-setuptools)))
1513 (home-page "http://pypi.python.org/pypi/unittest2")
1514 (synopsis "Python unit testing library")
1515 (description
1516 "Unittest2 is a replacement for the unittest module in the Python
1517standard library.")
3f641af0 1518 (license license:psfl)))
6cd9c356
DT
1519
1520(define-public python2-unittest2
1521 (package (inherit python-unittest2)
1522 (name "python2-unittest2")
1523 (version "0.5.1")
1524 (source
1525 (origin
1526 (method url-fetch)
1527 (uri (string-append
1528 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1529 version ".tar.gz"))
1530 (sha256
1531 (base32
1532 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1533 (inputs
7957fe6c 1534 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1535 (arguments
1536 `(#:python ,python-2
1537 #:tests? #f)))) ; no setup.py test command
1538
542ad60f
DT
1539(define-public python-py
1540 (package
1541 (name "python-py")
71c8a804 1542 (version "1.4.31")
542ad60f
DT
1543 (source
1544 (origin
1545 (method url-fetch)
71c8a804 1546 (uri (pypi-uri "py" version))
542ad60f
DT
1547 (sha256
1548 (base32
71c8a804 1549 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1550 (build-system python-build-system)
1551 (inputs
1552 `(("python-setuptools" ,python-setuptools)))
1553 (home-page "http://pylib.readthedocs.org/")
1554 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1555 (description
1556 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1557code introspection, and logging.")
bd3fa666 1558 (license license:expat)))
542ad60f
DT
1559
1560(define-public python2-py
1561 (package-with-python2 python-py))
1562
855d4761
DT
1563(define-public python-pytest
1564 (package
1565 (name "python-pytest")
61a4332d 1566 (version "2.7.3")
855d4761
DT
1567 (source
1568 (origin
1569 (method url-fetch)
1570 (uri (string-append
1571 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1572 version ".tar.gz"))
1573 (sha256
1574 (base32
61a4332d 1575 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1576 (modules '((guix build utils)))
1577 (snippet
1578 ;; One of the tests involves the /usr directory, so it fails.
1579 '(substitute* "testing/test_argcomplete.py"
1580 (("def test_remove_dir_prefix\\(self\\):")
1581 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1582 (build-system python-build-system)
1583 (inputs
1584 `(("python-setuptools" ,python-setuptools)
1585 ("python-py" ,python-py)
1586 ("python-nose" ,python-nose)
1587 ("python-mock" ,python-mock)))
1588 (home-page "http://pytest.org")
1589 (synopsis "Python testing library")
1590 (description
1591 "Pytest is a testing tool that provides auto-discovery of test modules
1592and functions, detailed info on failing assert statements, modular fixtures,
1593and many external plugins.")
bd3fa666 1594 (license license:expat)))
855d4761
DT
1595
1596(define-public python2-pytest
1597 (package-with-python2 python-pytest))
1598
358c3d61
EF
1599(define-public python-pytest-cov
1600 (package
1601 (name "python-pytest-cov")
545f4a1c 1602 (version "2.2.1")
358c3d61
EF
1603 (source
1604 (origin
1605 (method url-fetch)
1606 (uri (pypi-uri "pytest-cov" version))
1607 (sha256
545f4a1c
EF
1608 (base32
1609 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1610 (build-system python-build-system)
545f4a1c 1611 (inputs
10468636
EF
1612 `(("python-coverage" ,python-coverage)
1613 ("python-pytest" ,python-pytest)))
10468636
EF
1614 (home-page "https://github.com/pytest-dev/pytest-cov")
1615 (synopsis "Pytest plugin for measuring coverage")
1616 (description
1617 "Pytest-cov produces coverage reports. It supports centralised testing and
1618distributed testing in both @code{load} and @code{each} modes. It also
1619supports coverage of subprocesses.")
545f4a1c
EF
1620 (license license:expat)
1621 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
358c3d61
EF
1622
1623(define-public python2-pytest-cov
545f4a1c
EF
1624 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1625 (package
1626 (inherit base)
1627 (inputs `(("python2-setuptools" ,python2-setuptools)
1628 ,@(package-inputs base))))))
358c3d61 1629
6784f2e3
RW
1630(define-public python-pytest-runner
1631 (package
1632 (name "python-pytest-runner")
1633 (version "2.6.2")
1634 (source
1635 (origin
1636 (method url-fetch)
54cd239b 1637 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1638 (sha256
1639 (base32
1640 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1641 (build-system python-build-system)
1642 (arguments
1643 `(#:phases
1644 (modify-phases %standard-phases
1645 ;; The fancy way of setting the version with setuptools_scm does not
1646 ;; seem to work here.
1647 (add-after 'unpack 'set-version
1648 (lambda _
1649 (substitute* "docs/conf.py"
1650 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1651 (string-append "version = \"" ,version "\"")))
1652 #t)))))
1653 (native-inputs
1654 `(("python-pytest" ,python-pytest)
1655 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1656 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1657 (synopsis "Invoke py.test as a distutils command")
1658 (description
1659 "This package provides a @command{pytest-runner} command that
1660@file{setup.py} files can use to run tests.")
54cd239b
EF
1661 (license license:expat)
1662 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1663
1664(define-public python2-pytest-runner
1665 (let ((base (package-with-python2
1666 (strip-python2-variant python-pytest-runner))))
1667 (package
1668 (inherit base)
1669 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1670 ,@(package-native-inputs base))))))
6784f2e3
RW
1671
1672(define-public python2-pytest-runner
1673 (package-with-python2 python-pytest-runner))
1674
8fa58fc9
CAW
1675(define-public python-pytest-xdist
1676 (package
1677 (name "python-pytest-xdist")
1678 (version "1.14")
1679 (source
1680 (origin
1681 (method url-fetch)
1682 (uri (pypi-uri "pytest-xdist" version ".zip"))
1683 (sha256
1684 (base32
1685 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))))
1686 (build-system python-build-system)
1687 (native-inputs
1688 `(("unzip" ,unzip)
8fa58fc9 1689 ("python-setuptools-scm" ,python-setuptools-scm)))
fbe9abcc
EF
1690 (inputs
1691 `(("python-apipkg" ,python-apipkg)
1692 ("python-execnet" ,python-execnet)
8fa58fc9
CAW
1693 ("python-pytest" ,python-pytest)
1694 ("python-py" ,python-py)))
1695 (home-page
1696 "https://github.com/pytest-dev/pytest-xdist")
1697 (synopsis
1698 "Plugin for py.test with distributed testing and loop-on-failing modes")
1699 (description
1700 "The pytest-xdist plugin extends py.test with some unique test execution
1701modes: parallelization, running tests in boxed subprocesses, the ability
1702to run tests repeatedly when failed, and the ability to run tests on multiple
1703Python interpreters or platforms. It uses rsync to copy the existing
1704program code to a remote location, executes there, and then syncs the
1705result back.")
fbe9abcc
EF
1706 (license license:expat)
1707 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
8fa58fc9
CAW
1708
1709(define-public python2-pytest-xdist
fbe9abcc
EF
1710 (let ((base (package-with-python2
1711 (strip-python2-variant python-pytest-xdist))))
1712 (package
1713 (inherit base)
1714 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1715 ,@(package-native-inputs base))))))
8fa58fc9 1716
84d24017
DT
1717(define-public python-scripttest
1718 (package
1719 (name "python-scripttest")
1720 (version "1.3")
1721 (source
1722 (origin
1723 (method url-fetch)
1724 (uri (string-append
1725 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1726 version ".tar.gz"))
1727 (sha256
1728 (base32
1729 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1730 (build-system python-build-system)
1731 (inputs
1732 `(("python-setuptools" ,python-setuptools)
1733 ("python-pytest" ,python-pytest)))
1734 (home-page "http://pythonpaste.org/scripttest/")
1735 (synopsis "Python library to test command-line scripts")
1736 (description "Scripttest is a Python helper library for testing
1737interactive command-line applications. With it you can run a script in a
1738subprocess and see the output as well as any file modifications.")
bd3fa666 1739 (license license:expat)))
84d24017
DT
1740
1741(define-public python2-scripttest
1742 (package-with-python2 python-scripttest))
1743
d8fa80e1
DT
1744(define-public python-testtools
1745 (package
1746 (name "python-testtools")
1747 (version "1.0.0")
1748 (source
1749 (origin
1750 (method url-fetch)
1751 (uri (string-append
1752 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1753 version ".tar.gz"))
1754 (sha256
1755 (base32
1756 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1757 (build-system python-build-system)
0e88cbf8
CR
1758 (propagated-inputs
1759 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1760 (inputs
1761 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1762 ("python-extras" ,python-extras)))
1763 (home-page "https://github.com/testing-cabal/testtools")
1764 (synopsis
1765 "Extensions to the Python standard library unit testing framework")
1766 (description
1767 "Testtools extends the Python standard library unit testing framework to
1768provide matchers, more debugging information, and cross-Python
1769compatibility.")
3f641af0 1770 (license license:psfl)))
d8fa80e1
DT
1771
1772(define-public python2-testtools
1773 (package-with-python2 python-testtools))
1774
5bf3afea
DT
1775(define-public python-testscenarios
1776 (package
1777 (name "python-testscenarios")
1778 (version "0.4")
1779 (source
1780 (origin
1781 (method url-fetch)
1782 (uri (string-append
1783 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1784 version ".tar.gz"))
1785 (sha256
1786 (base32
1787 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1788 (build-system python-build-system)
1789 (inputs
1790 `(("python-setuptools" ,python-setuptools)
1791 ("python-testtools" ,python-testtools)
1792 ("python-mimeparse" ,python-mimeparse)))
1793 (home-page "https://launchpad.net/testscenarios")
1794 (synopsis "Pyunit extension for dependency injection")
1795 (description
1796 "Testscenarios provides clean dependency injection for Python unittest
1797style tests.")
3f641af0 1798 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1799
1800(define-public python2-testscenarios
1801 (package-with-python2 python-testscenarios))
1802
dac79ecc
DT
1803(define-public python-testresources
1804 (package
1805 (name "python-testresources")
1806 (version "0.2.7")
1807 (source
1808 (origin
1809 (method url-fetch)
1810 (uri (string-append
1811 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1812 version ".tar.gz"))
1813 (sha256
1814 (base32
1815 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1816 (build-system python-build-system)
1817 (inputs
1818 `(("python-setuptools" ,python-setuptools)))
1819 (home-page "https://launchpad.net/testresources")
1820 (synopsis
1821 "Pyunit extension for managing test resources")
1822 (description
1823 "Testresources is an extension to Python's unittest to allow declarative
1824use of resources by test cases.")
3f641af0 1825 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1826
1827(define-public python2-testresources
1828 (package-with-python2 python-testresources))
1829
070ab058
DT
1830(define-public python-subunit
1831 (package
1832 (name "python-subunit")
1833 (version "0.0.21")
1834 (source
1835 (origin
1836 (method url-fetch)
1837 (uri (string-append
1838 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1839 version ".tar.gz"))
1840 (sha256
1841 (base32
1842 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1843 (build-system python-build-system)
1844 (inputs
1845 `(("python-setuptools" ,python-setuptools)
1846 ("python-testtools" ,python-testtools)
1847 ("python-mimeparse" ,python-mimeparse)
1848 ("python-testscenarios" ,python-testscenarios)))
1849 (home-page "http://launchpad.net/subunit")
1850 (synopsis "Python implementation of the subunit protocol")
1851 (description
1852 "Python-subunit is a Python implementation of the subunit test streaming
1853protocol.")
3f641af0 1854 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1855
1856(define-public python2-subunit
1857 (package-with-python2 python-subunit))
1858
7787ef76
CR
1859;; Recent versions of python-fixtures need a recent version of python-pbr,
1860;; which needs a recent version of python-fixtures. To fix this circular
1861;; dependency, we keep old versions of python-fixtures and python-pbr to
1862;; bootstrap the whole thing:
1863;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1864;; - python-pbr-0.11 is used to build python-fixtures
1865;; - python-fixtures is used to build python-pbr
1866(define-public python-fixtures-0.3.16
cd49454b
DT
1867 (package
1868 (name "python-fixtures")
1869 (version "0.3.16")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (string-append
1874 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1875 version ".tar.gz"))
1876 (sha256
1877 (base32
1878 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1879 (build-system python-build-system)
1880 (inputs
1881 `(("python-setuptools" ,python-setuptools)))
1882 (arguments
1883 '(#:tests? #f)) ; no setup.py test command
1884 (home-page "https://launchpad.net/python-fixtures")
1885 (synopsis "Python test fixture library")
1886 (description
1887 "Fixtures provides a way to create reusable state, useful when writing
1888Python tests.")
3f641af0 1889 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
cd49454b 1890
7787ef76
CR
1891(define-public python2-fixtures-0.3.16
1892 (package-with-python2 python-fixtures-0.3.16))
1893
1894(define-public python-pbr-0.11
1895 (package
1896 (name "python-pbr")
1897 (version "0.11.0")
1898 (source
1899 (origin
1900 (method url-fetch)
1901 (uri (string-append
1902 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1903 version ".tar.gz"))
1904 (sha256
1905 (base32
1906 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1907 (build-system python-build-system)
1908 (arguments
1909 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1910 (inputs
1911 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1912 ("python-pip" ,python-pip)
1913 ("python-setuptools" ,python-setuptools)))
1914 (home-page "https://launchpad.net/pbr")
1915 (synopsis "Change the default behavior of Python’s setuptools")
1916 (description
1917 "Python Build Reasonableness (PBR) is a library that injects some useful
1918and sensible default behaviors into your setuptools run.")
3f641af0 1919 (license license:asl2.0)))
7787ef76
CR
1920
1921(define-public python2-pbr-0.11
1922 (package-with-python2 python-pbr-0.11))
1923
1ef09c0c 1924(define-public python-pbr
e25f0174
BW
1925 (package
1926 (name "python-pbr")
1ef09c0c
BW
1927 (version "1.8.1")
1928 (source
e25f0174
BW
1929 (origin
1930 (method url-fetch)
1931 (uri (string-append
1932 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1933 version
1934 ".tar.gz"))
1935 (sha256
1936 (base32
1937 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1ef09c0c 1938 (build-system python-build-system)
e25f0174
BW
1939 (arguments
1940 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1941 (propagated-inputs
1942 `(("python-testrepository" ,python-testrepository)
1943 ("git" ,git))) ;; pbr actually uses the "git" binary.
1ef09c0c 1944 (inputs
e25f0174
BW
1945 `(("python-fixtures" ,python-fixtures)
1946 ("python-mimeparse" ,python-mimeparse)
1947 ("python-mock" ,python-mock)
1948 ("python-setuptools" ,python-setuptools)
1949 ("python-six" ,python-six)
1950 ("python-sphinx" ,python-sphinx)
1951 ("python-testrepository" ,python-testrepository)
1952 ("python-testresources" ,python-testresources)
1953 ("python-testscenarios" ,python-testscenarios)
1954 ("python-testtools" ,python-testtools)
1955 ("python-virtualenv" ,python-virtualenv)))
1956 (home-page "https://launchpad.net/pbr")
1957 (synopsis "Change the default behavior of Python’s setuptools")
1958 (description
1959 "Python Build Reasonableness (PBR) is a library that injects some useful
1960and sensible default behaviors into your setuptools run.")
3f641af0 1961 (license license:asl2.0)))
1ef09c0c
BW
1962
1963(define-public python2-pbr
e25f0174 1964 (package-with-python2 python-pbr))
1ef09c0c 1965
7787ef76
CR
1966(define-public python-fixtures
1967 (package
1968 (name "python-fixtures")
13fcc6df 1969 (version "1.4.0")
7787ef76
CR
1970 (source
1971 (origin
1972 (method url-fetch)
13fcc6df 1973 (uri (pypi-uri "fixtures" version))
7787ef76
CR
1974 (sha256
1975 (base32
13fcc6df 1976 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
1977 (build-system python-build-system)
1978 (propagated-inputs
1979 `(("python-six" ,python-six)
1980 ("python-pbr-0.11" ,python-pbr-0.11)))
1981 (inputs
1982 `(("python-pip" ,python-pip)
1983 ("python-setuptools" ,python-setuptools)
1984 ;; Tests
1985 ("python-testtools" ,python-testtools)))
1986 (arguments
1987 '(#:tests? #f)) ; no setup.py test command
1988 (home-page "https://launchpad.net/python-fixtures")
1989 (synopsis "Python test fixture library")
1990 (description
1991 "Fixtures provides a way to create reusable state, useful when writing
1992Python tests.")
3f641af0 1993 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 1994
cd49454b
DT
1995(define-public python2-fixtures
1996 (package-with-python2 python-fixtures))
1997
b24a0c00
DT
1998(define-public python-testrepository
1999 (package
2000 (name "python-testrepository")
2001 (version "0.0.20")
2002 (source
2003 (origin
2004 (method url-fetch)
2005 (uri (string-append
2006 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2007 version ".tar.gz"))
2008 (sha256
2009 (base32
2010 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2011 (build-system python-build-system)
05de40c5 2012 (propagated-inputs
7787ef76 2013 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 2014 ("python-testtools" ,python-testtools)))
b24a0c00
DT
2015 (inputs
2016 `(("python-setuptools" ,python-setuptools)
b24a0c00 2017 ("python-subunit" ,python-subunit)
b24a0c00
DT
2018 ("python-mimeparse" ,python-mimeparse)))
2019 (home-page "https://launchpad.net/testrepository")
2020 (synopsis "Database for Python test results")
2021 (description "Testrepository provides a database of test results which can
2022be used as part of a developer's workflow to check things such as what tests
2023have failed since the last commit or what tests are currently failing.")
3f641af0 2024 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2025
2026(define-public python2-testrepository
2027 (package-with-python2 python-testrepository))
2028
243a009a
DT
2029(define-public python-coverage
2030 (package
2031 (name "python-coverage")
4d4cf3dd 2032 (version "4.1")
243a009a
DT
2033 (source
2034 (origin
2035 (method url-fetch)
82a3c582 2036 (uri (pypi-uri "coverage" version))
243a009a
DT
2037 (sha256
2038 (base32
4d4cf3dd 2039 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a
DT
2040 (build-system python-build-system)
2041 (inputs
2042 `(("python-setuptools" ,python-setuptools)))
2043 (home-page "http://nedbatchelder.com/code/coverage")
2044 (synopsis "Code coverage measurement for Python")
2045 (description
2046 "Coverage measures code coverage, typically during test execution. It
2047uses the code analysis tools and tracing hooks provided in the Python standard
2048library to determine which lines are executable, and which have been
2049executed.")
3f641af0 2050 (license license:bsd-3)))
243a009a
DT
2051
2052(define-public python2-coverage
2053 (package-with-python2 python-coverage))
2054
041358fb
DT
2055(define-public python-discover
2056 (package
2057 (name "python-discover")
2058 (version "0.4.0")
2059 (source
2060 (origin
2061 (method url-fetch)
2062 (uri (string-append
2063 "https://pypi.python.org/packages/source/d/discover/discover-"
2064 version ".tar.gz"))
2065 (sha256
2066 (base32
2067 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2068 (build-system python-build-system)
2069 (inputs
2070 `(("python-setuptools" ,python-setuptools)))
2071 (home-page "http://pypi.python.org/pypi/discover/")
2072 (synopsis
2073 "Python test discovery for unittest")
2074 (description
2075 "Discover provides test discovery for unittest, a feature that has been
e881752c 2076backported from Python 2.7 for Python 2.4+.")
3f641af0 2077 (license license:bsd-3)))
041358fb
DT
2078
2079(define-public python2-discover
2080 (package-with-python2 python-discover))
2081
a480bc41
EB
2082(define-public behave
2083 (package
2084 (name "behave")
287cfd1a 2085 (version "1.2.5")
a480bc41
EB
2086 (source (origin
2087 (method url-fetch)
287cfd1a 2088 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2089 (sha256
2090 (base32
287cfd1a 2091 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41
EB
2092 (build-system python-build-system)
2093 (inputs
2094 `(("python-setuptools" ,python-setuptools)
2095 ("python-six" ,python-six)
a480bc41
EB
2096 ("python-parse" ,python-parse)
2097 ("python-parse-type" ,python-parse-type)))
2098 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2099 ;PyHamcrest>=1.8
2100 (home-page "http://github.com/behave/behave")
2101 (synopsis "Python behavior-driven development")
2102 (description
2103 "Behave is a tool for behavior-driven development in python.
2104Behavior-driven development (or BDD) is an agile software development
2105technique that encourages collaboration between developers, QA and
2106non-technical or business participants in a software project. Behave uses
2107tests written in a natural language style, backed up by Python code.")
3f641af0 2108 (license license:x11)))
c7303d3c
DT
2109
2110(define-public python-exif-read
2111 (package
2112 (name "python-exif-read")
2a2d0981 2113 (version "2.1.2")
c7303d3c
DT
2114 (source (origin
2115 (method url-fetch)
2a2d0981 2116 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2117 (sha256
2118 (base32
2a2d0981 2119 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2120 (build-system python-build-system)
2121 (inputs
2122 `(("python-setuptools" ,python-setuptools)))
2123 (arguments `(#:tests? #f)) ; no tests
2124 (home-page "https://github.com/ianare/exif-py")
2125 (synopsis "Python library to extract EXIF data from image files")
2126 (description
2127 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2128files.")
3f641af0 2129 (license license:bsd-3)))
c7303d3c
DT
2130
2131(define-public python2-exif-read
2132 (package-with-python2 python-exif-read))
d5f89b22
DT
2133
2134(define-public python-pyld
2135 (package
2136 (name "python-pyld")
af1ab773 2137 (version "0.6.8")
d5f89b22
DT
2138 (source (origin
2139 (method url-fetch)
af1ab773 2140 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2141 (sha256
2142 (base32
af1ab773 2143 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2144 (build-system python-build-system)
2145 (inputs
2146 `(("python-setuptools" ,python-setuptools)))
2147 (arguments `(#:tests? #f)) ; no tests
2148 (home-page "http://github.com/digitalbazaar/pyld")
2149 (synopsis "Python implementation of the JSON-LD specification")
2150 (description
2151 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2152 (license license:bsd-3)))
d5f89b22
DT
2153
2154(define-public python2-pyld
2155 (package-with-python2 python-pyld))
3a1f9a68
DT
2156
2157(define-public python-certifi
2158 (package
2159 (name "python-certifi")
9a41f443 2160 (version "2015.11.20.1")
3a1f9a68
DT
2161 (source (origin
2162 (method url-fetch)
9a41f443 2163 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2164 (sha256
2165 (base32
9a41f443 2166 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
3a1f9a68
DT
2167 (build-system python-build-system)
2168 (inputs
2169 `(("python-setuptools" ,python-setuptools)))
2170 (arguments `(#:tests? #f)) ; no tests
2171 (home-page "http://python-requests.org/")
2172 (synopsis "Python CA certificate bundle")
2173 (description
2174 "Certifi is a Python library that contains a CA certificate bundle, which
2175is used by the Requests library to verify HTTPS requests.")
3f641af0 2176 (license license:asl2.0)))
3a1f9a68
DT
2177
2178(define-public python2-certifi
2179 (package-with-python2 python-certifi))
e6cfbd36 2180
12c270dd
RW
2181(define-public python-click
2182 (package
2183 (name "python-click")
43accb58 2184 (version "6.6")
12c270dd
RW
2185 (source
2186 (origin
2187 (method url-fetch)
43accb58
LF
2188 (uri (string-append
2189 "https://pypi.python.org/packages/"
2190 "7a/00/c14926d8232b36b08218067bcd5853caefb4737cda3f0a47437151344792/"
2191 "click-" version ".tar.gz"))
12c270dd 2192 (sha256
43accb58
LF
2193 (base32
2194 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd
RW
2195 (build-system python-build-system)
2196 (native-inputs
2197 `(("python-setuptools" ,python-setuptools)))
2198 (home-page "http://click.pocoo.org")
2199 (synopsis "Command line library for Python")
2200 (description
2201 "Click is a Python package for creating command line interfaces in a
2202composable way with as little code as necessary. Its name stands for
2203\"Command Line Interface Creation Kit\". It's highly configurable but comes
2204with sensible defaults out of the box.")
3f641af0 2205 (license license:bsd-3)))
12c270dd
RW
2206
2207(define-public python2-click
2208 (package-with-python2 python-click))
2209
addc808d
EF
2210(define-public python-wheel
2211 (package
2212 (name "python-wheel")
40981b5c 2213 (version "0.29.0")
e1ba0749
EF
2214 (source
2215 (origin
2216 (method url-fetch)
2217 (uri (pypi-uri "wheel" version))
2218 (sha256
2219 (base32
40981b5c 2220 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2221 (build-system python-build-system)
2222 (native-inputs
2223 `(("python-setuptools" ,python-setuptools)
2224 ("python-jsonschema" ,python-jsonschema)
2225 ("python-pytest-cov" ,python-pytest-cov)))
2226 (home-page "https://bitbucket.org/pypa/wheel/")
2227 (synopsis "Format for built Python packages")
2228 (description
2229 "A wheel is a ZIP-format archive with a specially formatted filename and
2230the @code{.whl} extension. It is designed to contain all the files for a PEP
2231376 compatible install in a way that is very close to the on-disk format. Many
2232packages will be properly installed with only the @code{Unpack} step and the
2233unpacked archive preserves enough information to @code{Spread} (copy data and
2234scripts to their final locations) at any later time. Wheel files can be
2235installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2236 (license license:expat)
2237 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2238
2239(define-public python2-wheel
8ad4ae20
LF
2240 (let ((wheel (package-with-python2
2241 (strip-python2-variant python-wheel))))
264ae686 2242 (package (inherit wheel)
8ad4ae20
LF
2243 (native-inputs `(("python2-functools32" ,python2-functools32)
2244 ,@(package-native-inputs wheel))))))
2245
addc808d 2246
ae641128 2247(define-public python-requests
e6cfbd36 2248 (package
ae641128 2249 (name "python-requests")
74a066f9 2250 (version "2.9.1")
e6cfbd36
DT
2251 (source (origin
2252 (method url-fetch)
5d691657 2253 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2254 (sha256
2255 (base32
74a066f9 2256 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2257 (build-system python-build-system)
5d691657 2258 (native-inputs
6a308947
EF
2259 `(("python-setuptools" ,python-setuptools)
2260 ("python-py" ,python-py)
5d691657
EF
2261 ("python-pytest" ,python-pytest)
2262 ("python-pytest-cov" ,python-pytest-cov)
2263 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2264 (home-page "http://python-requests.org/")
2265 (synopsis "Python HTTP library")
2266 (description
2267 "Requests is a Python HTTP client library. It aims to be easier to use
2268than Python’s urllib2 library.")
3f641af0 2269 (license license:asl2.0)))
864b5211 2270
e9005180
DT
2271;; Some software requires an older version of Requests, notably Docker
2272;; Compose.
2273(define-public python-requests-2.7
2274 (package (inherit python-requests)
2275 (version "2.7.0")
2276 (source (origin
2277 (method url-fetch)
2278 (uri (pypi-uri "requests" version))
2279 (sha256
2280 (base32
2281 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2282
ae641128 2283(define-public python2-requests
8ad4ae20 2284 (package-with-python2 python-requests))
ae641128 2285
ea521b42
DT
2286(define-public python-vcversioner
2287 (package
2288 (name "python-vcversioner")
2289 (version "2.14.0.0")
2290 (source
2291 (origin
2292 (method url-fetch)
2293 (uri (pypi-uri "vcversioner" version))
2294 (sha256
2295 (base32
2296 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2297 (build-system python-build-system)
2298 (inputs
2299 `(("python-setuptools" ,python-setuptools)))
2300 (synopsis "Python library for version number discovery")
2301 (description "Vcversioner is a Python library that inspects tagging
2302information in a variety of version control systems in order to discover
2303version numbers.")
2304 (home-page "https://github.com/habnabit/vcversioner")
3f641af0 2305 (license license:isc)))
ea521b42
DT
2306
2307(define-public python2-vcversioner
2308 (package-with-python2 python-vcversioner))
ae641128 2309
864b5211
DT
2310(define-public python-jsonschema
2311 (package
2312 (name "python-jsonschema")
b3667afb 2313 (version "2.5.1")
864b5211
DT
2314 (source (origin
2315 (method url-fetch)
2316 (uri
2317 (string-append
2318 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2319 version ".tar.gz"))
2320 (sha256
2321 (base32
b3667afb 2322 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2323 (build-system python-build-system)
2324 (inputs
b3667afb
DT
2325 `(("python-setuptools" ,python-setuptools)
2326 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2327 (home-page "http://github.com/Julian/jsonschema")
2328 (synopsis "Implementation of JSON Schema for Python")
2329 (description
2330 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2331 (license license:expat)
2332 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2333
2334(define-public python2-jsonschema
a14600ec
LF
2335 (let ((jsonschema (package-with-python2
2336 (strip-python2-variant python-jsonschema))))
264ae686
EF
2337 (package (inherit jsonschema)
2338 (inputs
2339 `(("python2-functools32" ,python2-functools32)
2340 ,@(package-inputs jsonschema))))))
850189b8
DT
2341
2342(define-public python-unidecode
2343 (package
2344 (name "python-unidecode")
8925d4f3 2345 (version "0.04.18")
850189b8
DT
2346 (source (origin
2347 (method url-fetch)
8925d4f3 2348 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2349 (sha256
2350 (base32
8925d4f3 2351 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2352 (build-system python-build-system)
2353 (inputs
2354 `(("python-setuptools" ,python-setuptools)))
2355 (home-page "https://pypi.python.org/pypi/Unidecode")
2356 (synopsis "ASCII transliterations of Unicode text")
2357 (description
2358 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2359useful when integrating with legacy code that doesn't support Unicode, or for
2360ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2361machine identifiers from human-readable Unicode strings that should still be
2362somewhat intelligeble.")
3f641af0 2363 (license license:gpl2+)))
850189b8
DT
2364
2365(define-public python2-unidecode
2366 (package-with-python2 python-unidecode))
6d45fef4
DT
2367
2368(define-public python-pyjwt
2369 (package
2370 (name "python-pyjwt")
eb31d4b4 2371 (version "1.4.0")
6d45fef4
DT
2372 (source
2373 (origin
2374 (method url-fetch)
eb31d4b4 2375 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2376 (sha256
2377 (base32
eb31d4b4 2378 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2379 (build-system python-build-system)
eb31d4b4
EF
2380 (native-inputs
2381 `(("python-setuptools" ,python-setuptools)
2382 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2383 (arguments
2384 '(#:tests? #f)) ; test suite doesn't work
2385 (home-page "http://github.com/progrium/pyjwt")
2386 (synopsis "JSON Web Token implementation in Python")
2387 (description
2388 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2389 (license license:expat)))
6d45fef4
DT
2390
2391(define-public python2-pyjwt
2392 (package-with-python2 python-pyjwt))
2393
2cec1f6f
DT
2394(define-public python-oauthlib
2395 (package
2396 (name "python-oauthlib")
bde2171d 2397 (version "1.0.3")
2cec1f6f
DT
2398 (source (origin
2399 (method url-fetch)
bde2171d 2400 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2401 (sha256
2402 (base32
bde2171d 2403 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2404 (build-system python-build-system)
bde2171d 2405 (native-inputs
59f151ec 2406 `(("python-coverage" ,python-coverage)
2cec1f6f
DT
2407 ("python-nose" ,python-nose)
2408 ("python-mock" ,python-mock)))
bde2171d
EF
2409 (inputs
2410 `(("python-blinker" ,python-blinker)
2411 ("python-cryptography" ,python-cryptography)
2412 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2413 (home-page "https://github.com/idan/oauthlib")
2414 (synopsis "OAuth implementation for Python")
2415 (description
2416 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2417OAuth request-signing logic.")
3f641af0 2418 (license license:bsd-3)
59f151ec 2419 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2420
2421(define-public python2-oauthlib
59f151ec 2422 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2423 (package
2424 (inherit base)
59f151ec
EF
2425 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2426 ("python2-unittest2" ,python2-unittest2)
2427 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2428
2429(define-public python-itsdangerous
2430 (package
2431 (name "python-itsdangerous")
2432 (version "0.24")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (string-append
2437 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2438 version ".tar.gz"))
2439 (sha256
2440 (base32
2441 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2442 (build-system python-build-system)
ec5dbb5c
DT
2443 (home-page "http://github.com/mitsuhiko/itsdangerous")
2444 (synopsis "Python library for passing data to/from untrusted environments")
2445 (description
2446 "Itsdangerous provides various helpers to pass trusted data to untrusted
2447environments and back.")
3f641af0 2448 (license license:bsd-3)
194d0d98 2449 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
ec5dbb5c
DT
2450
2451(define-public python2-itsdangerous
194d0d98
EF
2452 (let ((base (package-with-python2
2453 (strip-python2-variant python-itsdangerous))))
2454 (package
2455 (inherit base)
2456 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2457 ,@(package-native-inputs base))))))
5731cae3 2458
8d12be1e
RW
2459(define-public python-pyyaml
2460 (package
2461 (name "python-pyyaml")
2462 (version "3.11")
2463 (source
2464 (origin
2465 (method url-fetch)
2466 (uri (string-append
2467 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2468 version ".tar.gz"))
2469 (sha256
2470 (base32
2471 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2472 (build-system python-build-system)
2473 (inputs
2474 `(("libyaml" ,libyaml)))
2475 (native-inputs
2476 `(("python-setuptools" ,python-setuptools)))
2477 (home-page "http://pyyaml.org/wiki/PyYAML")
2478 (synopsis "YAML parser and emitter for Python")
2479 (description
2480 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2481complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2482API, and sensible error messages. PyYAML supports standard YAML tags and
2483provides Python-specific tags that allow to represent an arbitrary Python
2484object.")
2485 (license license:expat)))
2486
2487(define-public python2-pyyaml
2488 (package-with-python2 python-pyyaml))
2489
5731cae3
DT
2490(define-public python-virtualenv
2491 (package
2492 (name "python-virtualenv")
17804240 2493 (version "13.1.2")
5731cae3
DT
2494 (source
2495 (origin
2496 (method url-fetch)
17804240 2497 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2498 (sha256
2499 (base32
17804240 2500 "1p732accxwqfjbdna39k8w8lp9gyw91vr4kzkhm8mgfxikqqxg5a"))))
5731cae3 2501 (build-system python-build-system)
17804240
EF
2502 (arguments
2503 `(#:phases
2504 (modify-phases %standard-phases
2505 (replace 'check
2506 (lambda _ (zero? (system* "py.test")))))))
5731cae3
DT
2507 (inputs
2508 `(("python-setuptools" ,python-setuptools)
2509 ("python-mock" ,python-mock)
17804240 2510 ("python-pytest" ,python-pytest)))
5731cae3
DT
2511 (home-page "https://virtualenv.pypa.io/")
2512 (synopsis "Virtual Python environment builder")
2513 (description
2514 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2515 (license license:expat)))
5731cae3
DT
2516
2517(define-public python2-virtualenv
2518 (package-with-python2 python-virtualenv))
8176d4d5
DT
2519
2520(define-public python-markupsafe
2521 (package
2522 (name "python-markupsafe")
2523 (version "0.23")
2524 (source
2525 (origin
2526 (method url-fetch)
2527 (uri (string-append
2528 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2529 version ".tar.gz"))
2530 (sha256
2531 (base32
2532 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2533 (build-system python-build-system)
2534 (inputs
2535 `(("python-setuptools" ,python-setuptools)))
2536 (home-page "http://github.com/mitsuhiko/markupsafe")
2537 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2538 (description
2539 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2540for Python.")
3f641af0 2541 (license license:bsd-3)))
8176d4d5
DT
2542
2543(define-public python2-markupsafe
2544 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2545
2546(define-public python-jinja2
2547 (package
2548 (name "python-jinja2")
e98149b3 2549 (version "2.8")
fe34f0d1
DT
2550 (source
2551 (origin
2552 (method url-fetch)
e98149b3 2553 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2554 (sha256
2555 (base32
e98149b3 2556 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2557 (build-system python-build-system)
2558 (inputs
2559 `(("python-setuptools" ,python-setuptools)
2560 ("python-markupsafe" ,python-markupsafe)))
2561 (home-page "http://jinja.pocoo.org/")
2562 (synopsis "Python template engine")
2563 (description
2564 "Jinja2 is a small but fast and easy to use stand-alone template engine
2565written in pure Python.")
3f641af0 2566 (license license:bsd-3)))
fe34f0d1
DT
2567
2568(define-public python2-jinja2
2569 (package-with-python2 python-jinja2))
3580ab8b 2570
f7d17ac7
EE
2571(define-public python-pystache
2572 (package
2573 (name "python-pystache")
2574 (version "0.5.4")
2575 (source (origin
2576 (method url-fetch)
2577 (uri (pypi-uri "pystache" version))
2578 (sha256
2579 (base32
2580 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2581 (build-system python-build-system)
2582 (native-inputs
2583 `(("python-setuptools" ,python-setuptools)))
2584 (home-page "http://defunkt.io/pystache/")
2585 (synopsis "Python logic-less template engine")
2586 (description
2587 "Pystache is a Python implementation of the framework agnostic,
2588logic-free templating system Mustache.")
2589 (license license:expat)))
2590
2591(define-public python2-pystache
2592 (package-with-python2 python-pystache))
2593
1285119b
RW
2594(define-public python-joblib
2595 (package
2596 (name "python-joblib")
2597 (version "0.9.0b4")
2598 (source (origin
2599 (method url-fetch)
2600 (uri (string-append "https://pypi.python.org/packages/source/"
2601 "j/joblib/joblib-" version ".tar.gz"))
2602 (sha256
2603 (base32
2604 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2605 (build-system python-build-system)
2606 (native-inputs
2607 `(("python-setuptools" ,python-setuptools)
2608 ("python-nose" ,python-nose)))
2609 (home-page "http://pythonhosted.org/joblib/")
2610 (synopsis "Using Python functions as pipeline jobs")
2611 (description
2612 "Joblib is a set of tools to provide lightweight pipelining in Python.
2613In particular, joblib offers: transparent disk-caching of the output values
2614and lazy re-evaluation (memoize pattern), easy simple parallel computing
2615logging and tracing of the execution.")
3f641af0 2616 (license license:bsd-3)))
1285119b
RW
2617
2618(define-public python2-joblib
2619 (package-with-python2 python-joblib))
2620
3580ab8b
DT
2621(define-public python-docutils
2622 (package
2623 (name "python-docutils")
2624 (version "0.12")
2625 (source
2626 (origin
2627 (method url-fetch)
2628 (uri (string-append
2629 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2630 version ".tar.gz"))
2631 (sha256
2632 (base32
2633 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2634 (build-system python-build-system)
2635 (inputs
2636 `(("python-setuptools" ,python-setuptools)))
2637 (arguments
2638 '(#:tests? #f)) ; no setup.py test command
2639 (home-page "http://docutils.sourceforge.net/")
2640 (synopsis "Python Documentation Utilities")
2641 (description
2642 "Docutils is a modular system for processing documentation into useful
2643formats, such as HTML, XML, and LaTeX. For input Docutils supports
2644reStructuredText.")
2645 ;; Most of the source code is public domain, but some source files are
2646 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2647 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2648
2649(define-public python2-docutils
2650 (package-with-python2 python-docutils))
fb35b7c0
DT
2651
2652(define-public python-pygments
2653 (package
2654 (name "python-pygments")
9f442285 2655 (version "2.0.2")
fb35b7c0
DT
2656 (source
2657 (origin
2658 (method url-fetch)
9f442285 2659 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2660 (sha256
2661 (base32
9f442285 2662 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2663 (build-system python-build-system)
2664 (inputs
2665 `(("python-setuptools" ,python-setuptools)))
2666 (home-page "http://pygments.org/")
2667 (synopsis "Syntax highlighting")
2668 (description
2669 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2670 (license license:bsd-2)))
fb35b7c0
DT
2671
2672(define-public python2-pygments
2673 (package-with-python2 python-pygments))
9dd6078d
DT
2674
2675(define-public python-sphinx
2676 (package
2677 (name "python-sphinx")
2678 (version "1.2.3")
2679 (source
2680 (origin
2681 (method url-fetch)
2682 (uri (string-append
2683 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2684 version ".tar.gz"))
2685 (sha256
2686 (base32
2687 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2688 (build-system python-build-system)
2689 (inputs
2690 `(("python-setuptools" ,python-setuptools)
2691 ("python-jinja2" ,python-jinja2)
2692 ("python-docutils" ,python-docutils)
2693 ("python-pygments" ,python-pygments)))
2694 (home-page "http://sphinx-doc.org/")
2695 (synopsis "Python documentation generator")
2696 (description "Sphinx is a tool that makes it easy to create documentation
2697for Python projects or other documents consisting of multiple reStructuredText
2698sources.")
3f641af0 2699 (license license:bsd-3)))
9dd6078d
DT
2700
2701(define-public python2-sphinx
2702 (package-with-python2 python-sphinx))
6888830b 2703
ad320b20
RW
2704(define-public python-sphinx-rtd-theme
2705 (package
2706 (name "python-sphinx-rtd-theme")
2707 (version "0.1.6")
2708 (source
2709 (origin
2710 (method url-fetch)
2711 (uri (string-append "https://pypi.python.org/packages/source/s/"
2712 "sphinx_rtd_theme/sphinx_rtd_theme-"
2713 version ".tar.gz"))
2714 (sha256
2715 (base32
2716 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2717 (build-system python-build-system)
2718 (arguments
2719 `(;; With standard flags, the install phase attempts to create a zip'd
2720 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2721 ;; before 1980'
2722 #:configure-flags '("--single-version-externally-managed"
2723 "--record=sphinx-rtd-theme.txt")))
2724 (native-inputs
2725 `(("python-setuptools" ,python-setuptools)))
2726 (inputs
2727 `(("python-docutils" ,python-docutils)
2728 ("python-sphinx" ,python-sphinx)))
2729 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2730 (synopsis "ReadTheDocs.org theme for Sphinx")
2731 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2732 (license license:expat)))
ad320b20
RW
2733
2734(define-public python2-sphinx-rtd-theme
2735 (package-with-python2 python-sphinx-rtd-theme))
2736
f4de5b3b
CAW
2737(define-public python-feedgenerator
2738 (package
2739 (name "python-feedgenerator")
f0412aa2 2740 (version "1.8")
f4de5b3b 2741 (source
f4de5b3b 2742 (origin
f0412aa2
EF
2743 (method url-fetch)
2744 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2745 (sha256
2746 (base32
f0412aa2 2747 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
f4de5b3b 2748 (build-system python-build-system)
f0412aa2 2749 (native-inputs
f4de5b3b
CAW
2750 `(("python-setuptools" ,python-setuptools)
2751 ("python-pytz" ,python-pytz)
2752 ("python-six" ,python-six)))
f0412aa2 2753 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2754 (synopsis
2755 "Standalone version of Django's Atom/RSS feed generator")
2756 (description
2757 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2758which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2759 (license license:bsd-3)))
f4de5b3b
CAW
2760
2761(define-public python2-feedgenerator
2762 (package-with-python2 python-feedgenerator))
2763
59ad30e3
CAW
2764(define-public python-blinker
2765 (package
2766 (name "python-blinker")
7fb9ff4d 2767 (version "1.4")
59ad30e3
CAW
2768 (source
2769 (origin
2770 (method url-fetch)
7fb9ff4d 2771 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2772 (sha256
2773 (base32
7fb9ff4d 2774 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2775 (build-system python-build-system)
2776 (native-inputs
2777 `(("python-setuptools" ,python-setuptools)))
2778 ;; No "test" command supplied to setuptools, so unless there's another way
2779 ;; to run tests, we're skipping them!
2780 (arguments '(#:tests? #f))
2781 (home-page "http://pythonhosted.org/blinker/")
2782 (synopsis "Fast, simple object-to-object and broadcast signaling")
2783 (description
2784 "Blinker provides a fast dispatching system that allows any number of
2785interested parties to subscribe to events, or \"signals\".")
2786 (license license:expat)))
2787
2788(define-public python2-blinker
2789 (package-with-python2 python-blinker))
2790
b8050e71
CAW
2791(define-public pelican
2792 (package
2793 (name "pelican")
11f97c27 2794 (version "3.6.3")
b8050e71
CAW
2795 (source
2796 (origin
2797 (method url-fetch)
11f97c27 2798 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2799 (sha256
2800 (base32
11f97c27 2801 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2802 (build-system python-build-system)
d9f2dece 2803 (inputs
b8050e71
CAW
2804 `(("python-feedgenerator" ,python-feedgenerator)
2805 ("python-jinja2" ,python-jinja2)
2806 ("python-pygments" ,python-pygments)
2807 ("python-docutils" ,python-docutils)
2808 ("python-pytz" ,python-pytz)
2809 ("python-blinker" ,python-blinker)
2810 ("python-unidecode" ,python-unidecode)
2811 ("python-six" ,python-six)
2812 ("python-dateutil-2" ,python-dateutil-2)))
2813 (home-page "http://getpelican.com/")
2814 (arguments
2815 `(;; XXX Requires a lot more packages to do unit tests :P
2816 #:tests? #f
2817 #:phases (modify-phases %standard-phases
2818 (add-before
2819 'install 'adjust-requires
2820 ;; Since feedgenerator is installed from git, it doesn't
2821 ;; conform to the version requirements.
2822 ;;
2823 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2824 ;; version requirement so setuptools doesn't get confused.
2825 (lambda _
2826 (substitute* "setup.py"
2827 (("['\"]feedgenerator.*?['\"]")
2828 "'feedgenerator'")))))))
2829 (synopsis "Python-based static site publishing system")
2830 (description
2831 "Pelican is a tool to generate a static blog from reStructuredText,
2832Markdown input files, and more. Pelican uses Jinja2 for templating
2833and is very extensible.")
3f641af0 2834 (license license:agpl3+)))
b8050e71 2835
240ca4aa
RW
2836(define-public python-scikit-learn
2837 (package
2838 (name "python-scikit-learn")
be0a4c26 2839 (version "0.16.1")
240ca4aa
RW
2840 (source
2841 (origin
2842 (method url-fetch)
2843 (uri (string-append
2844 "https://github.com/scikit-learn/scikit-learn/archive/"
2845 version ".tar.gz"))
2846 (sha256
2847 (base32
be0a4c26 2848 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2849 (build-system python-build-system)
2850 (arguments
2851 `(#:phases
2852 (alist-cons-before
2f6b3d2e
RW
2853 'check 'set-HOME
2854 ;; some tests require access to "$HOME"
2855 (lambda _ (setenv "HOME" "/tmp"))
2856 ;; Tests can only be run after the library has been installed and not
2857 ;; within the source directory.
2858 (alist-cons-after
2859 'install 'check
2860 (lambda _
2861 (with-directory-excursion "/tmp"
2862 ;; With Python 3 one test of 3334 fails
2863 ;; (sklearn.tests.test_common.test_transformers); see
2864 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2865 (system* "nosetests" "-v" "sklearn")))
2866 (alist-delete 'check %standard-phases)))))
240ca4aa 2867 (inputs
2f6b3d2e 2868 `(("openblas" ,openblas)
240ca4aa
RW
2869 ("python-nose" ,python-nose)))
2870 (propagated-inputs
2871 `(("python-numpy" ,python-numpy)
2872 ("python-scipy" ,python-scipy)))
2873 (home-page "http://scikit-learn.org/")
2874 (synopsis "Machine Learning in Python")
2875 (description
2876 "Scikit-learn provides simple and efficient tools for data
2877mining and data analysis.")
3f641af0 2878 (license license:bsd-3)))
240ca4aa
RW
2879
2880(define-public python2-scikit-learn
2881 (let ((scikit (package-with-python2 python-scikit-learn)))
2882 (package (inherit scikit)
2883 (propagated-inputs
2884 `(("python2-numpy" ,python2-numpy)
2885 ("python2-scipy" ,python2-scipy)
2886 ,@(alist-delete
2887 "python-numpy"
2888 (alist-delete
2889 "python-scipy" (package-propagated-inputs scikit))))))))
2890
12f8f9bb
RW
2891(define-public python-scikit-image
2892 (package
2893 (name "python-scikit-image")
2894 (version "0.11.3")
2895 (source
2896 (origin
2897 (method url-fetch)
2898 (uri (string-append
2899 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2900 version ".tar.gz"))
2901 (sha256
2902 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2903 (build-system python-build-system)
2904 (propagated-inputs
2905 `(("python-matplotlib" ,python-matplotlib)
2906 ("python-networkx" ,python-networkx)
2907 ("python-numpy" ,python-numpy)
2908 ("python-scipy" ,python-scipy)
2909 ("python-six" ,python-six)
2910 ("python-pillow" ,python-pillow)))
2911 (native-inputs
2912 `(("python-cython" ,python-cython)
2913 ("python-setuptools" ,python-setuptools)))
2914 (home-page "http://scikit-image.org/")
2915 (synopsis "Image processing in Python")
2916 (description
e881752c 2917 "Scikit-image is a collection of algorithms for image processing.")
3f641af0 2918 (license license:bsd-3)))
12f8f9bb
RW
2919
2920(define-public python2-scikit-image
2921 (let ((scikit-image (package-with-python2 python-scikit-image)))
2922 (package (inherit scikit-image)
2923 (native-inputs
2924 `(("python2-mock" ,python2-mock)
2925 ,@(package-native-inputs scikit-image)))
2926 (propagated-inputs
2927 `(("python2-pytz" ,python2-pytz)
d9bc0bf8
FB
2928 ("python2-matplotlib" ,python2-matplotlib)
2929 ("python2-numpy" ,python2-numpy)
2930 ("python2-scipy" ,python2-scipy)
2931 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2932 '("python-matplotlib" "python-numpy" "python-scipy")))))))
12f8f9bb 2933
5394a6a6
RW
2934(define-public python-redis
2935 (package
2936 (name "python-redis")
2937 (version "2.10.3")
2938 (source
2939 (origin
2940 (method url-fetch)
2941 (uri (string-append
2942 "https://pypi.python.org/packages/source/r/redis/redis-"
2943 version ".tar.gz"))
2944 (sha256
2945 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2946 (build-system python-build-system)
2947 ;; Tests require a running Redis server
2948 (arguments '(#:tests? #f))
2949 (native-inputs
2950 `(("python-setuptools" ,python-setuptools)
2951 ("python-pytest" ,python-pytest)))
2952 (home-page "https://github.com/andymccurdy/redis-py")
2953 (synopsis "Redis Python client")
2954 (description
2955 "This package provides a Python interface to the Redis key-value store.")
2956 (license license:expat)))
2957
2958(define-public python2-redis
2959 (package-with-python2 python-redis))
2960
748cef5b
RW
2961(define-public python-rq
2962 (package
2963 (name "python-rq")
2964 (version "0.5.2")
2965 (source
2966 (origin
2967 (method url-fetch)
2968 (uri (string-append
2969 "https://pypi.python.org/packages/source/r/rq/rq-"
2970 version ".tar.gz"))
2971 (sha256
2972 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2973 (build-system python-build-system)
2974 (propagated-inputs
2975 `(("python-click" ,python-click)
2976 ("python-redis" ,python-redis)))
2977 (native-inputs
2978 `(("python-setuptools" ,python-setuptools)))
2979 (home-page "http://python-rq.org/")
2980 (synopsis "Simple job queues for Python")
2981 (description
2982 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2983processing them in the background with workers. It is backed by Redis and it
2984is designed to have a low barrier to entry.")
3f641af0 2985 (license license:bsd-2)))
748cef5b
RW
2986
2987(define-public python2-rq
2988 (package-with-python2 python-rq))
2989
6888830b
FB
2990(define-public python-cython
2991 (package
2992 (name "python-cython")
dd22efef 2993 (version "0.24.1")
6888830b
FB
2994 (source
2995 (origin
2996 (method url-fetch)
56918e26 2997 (uri (pypi-uri "Cython" version))
6888830b
FB
2998 (sha256
2999 (base32
dd22efef 3000 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3001 (build-system python-build-system)
3002 ;; we need the full python package and not just the python-wrapper
3003 ;; because we need libpython3.3m.so
3004 (inputs
3005 `(("python" ,python)))
3006 (arguments
3007 `(#:phases
b92f651b
EF
3008 (modify-phases %standard-phases
3009 (add-before 'check 'set-HOME
3010 ;; some tests require access to "$HOME/.cython"
3011 (lambda _ (setenv "HOME" "/tmp")))
3012 (replace 'check
3013 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3014 (home-page "http://cython.org/")
3015 (synopsis "C extensions for Python")
3016 (description "Cython is an optimising static compiler for both the Python
3017programming language and the extended Cython programming language. It makes
3018writing C extensions for Python as easy as Python itself.")
3f641af0 3019 (license license:asl2.0)
48b311b1 3020 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3021
3022(define-public python2-cython
48b311b1
LC
3023 (package (inherit (package-with-python2
3024 (strip-python2-variant python-cython)))
6888830b
FB
3025 (name "python2-cython")
3026 (inputs
3027 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
3028
3029;; This version of numpy is missing the documentation and is only used to
3030;; build matplotlib which is required to build numpy's documentation.
3031(define python-numpy-bootstrap
3032 (package
3033 (name "python-numpy-bootstrap")
ef9b4c04 3034 (version "1.10.4")
0da98533
FB
3035 (source
3036 (origin
3037 (method url-fetch)
de67e922 3038 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3039 "/numpy-" version ".tar.gz"))
3040 (sha256
3041 (base32
ef9b4c04 3042 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3043 (build-system python-build-system)
3044 (inputs
3045 `(("python-nose" ,python-nose)
cba256f8
RW
3046 ("openblas" ,openblas)
3047 ("lapack" ,lapack)))
0da98533 3048 (native-inputs
19afbea1 3049 `(("gfortran" ,gfortran)))
0da98533
FB
3050 (arguments
3051 `(#:phases
3052 (alist-cons-before
3053 'build 'set-environment-variables
3054 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3055 (call-with-output-file "site.cfg"
3056 (lambda (port)
cba256f8
RW
3057 (format port
3058 "[openblas]
dbdfe515
RW
3059libraries = openblas
3060library_dirs = ~a/lib
3061include_dirs = ~a/include
cba256f8
RW
3062
3063[lapack]
3064lapack_libs = lapack
3065library_dirs = ~a/lib
3066include_dirs = ~a/include
3067"
3068 (assoc-ref inputs "openblas")
3069 (assoc-ref inputs "openblas")
3070 (assoc-ref inputs "lapack")
3071 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3072 ;; Use "gcc" executable, not "cc".
3073 (substitute* "numpy/distutils/system_info.py"
3074 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3075 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3076 #t)
6a843168
FB
3077 ;; Tests can only be run after the library has been installed and not
3078 ;; within the source directory.
3079 (alist-cons-after
3080 'install 'check
89b5c60e 3081 (lambda _
6a843168 3082 (with-directory-excursion "/tmp"
89b5c60e 3083 (zero? (system* "python" "-c"
6a843168 3084 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3085 (alist-delete
3086 'check
6a843168 3087 %standard-phases)))))
0da98533
FB
3088 (home-page "http://www.numpy.org/")
3089 (synopsis "Fundamental package for scientific computing with Python")
3090 (description "NumPy is the fundamental package for scientific computing
e881752c 3091with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3092object, sophisticated (broadcasting) functions, tools for integrating C/C++
3093and Fortran code, useful linear algebra, Fourier transform, and random number
3094capabilities.")
3f641af0 3095 (license license:bsd-3)))
0da98533
FB
3096
3097(define python2-numpy-bootstrap
3098 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3099
3a1bfe18
RW
3100(define-public python2-fastlmm
3101 (package
3102 (name "python2-fastlmm")
b074e7d4 3103 (version "0.2.21")
3a1bfe18
RW
3104 (source
3105 (origin
3106 (method url-fetch)
b074e7d4 3107 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3108 (sha256
3109 (base32
b074e7d4 3110 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3111 (build-system python-build-system)
3112 (arguments
3113 `(#:python ,python-2)) ; only Python 2.7 is supported
3114 (propagated-inputs
3115 `(("python2-numpy" ,python2-numpy)
3116 ("python2-scipy" ,python2-scipy)
3117 ("python2-matplotlib" ,python2-matplotlib)
3118 ("python2-pandas" ,python2-pandas)
3119 ("python2-scikit-learn" ,python2-scikit-learn)
3120 ("python2-cython" ,python2-cython)
3121 ("python2-pysnptools" ,python2-pysnptools)))
3122 (native-inputs
3123 `(("unzip" ,unzip)
3124 ("python2-mock" ,python2-mock)
3125 ("python2-setuptools" ,python2-setuptools)))
3126 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3127 (synopsis "Perform genome-wide association studies on large data sets")
3128 (description
3129 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3130Models, is a program for performing both single-SNP and SNP-set genome-wide
3131association studies (GWAS) on extremely large data sets.")
3f641af0 3132 (license license:asl2.0)))
3a1bfe18 3133
2ee8869a
FB
3134(define-public python-numpy
3135 (package (inherit python-numpy-bootstrap)
3136 (name "python-numpy")
3137 (outputs '("out" "doc"))
89b5c60e 3138 (inputs
2ee8869a
FB
3139 `(("which" ,which)
3140 ("python-setuptools" ,python-setuptools)
3141 ("python-matplotlib" ,python-matplotlib)
3142 ("python-sphinx" ,python-sphinx)
3143 ("python-pyparsing" ,python-pyparsing)
3144 ("python-numpydoc" ,python-numpydoc)
3145 ,@(package-inputs python-numpy-bootstrap)))
3146 (native-inputs
3147 `(("pkg-config" ,pkg-config)
3148 ("texlive" ,texlive)
3149 ("texinfo" ,texinfo)
3150 ("perl" ,perl)
3151 ,@(package-native-inputs python-numpy-bootstrap)))
3152 (arguments
89b5c60e 3153 `(,@(substitute-keyword-arguments
2ee8869a
FB
3154 (package-arguments python-numpy-bootstrap)
3155 ((#:phases phases)
3156 `(alist-cons-after
3157 'install 'install-doc
3158 (lambda* (#:key outputs #:allow-other-keys)
3159 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3160 (doc (string-append
3161 data "/doc/" ,name "-"
2ee8869a
FB
3162 ,(package-version python-numpy-bootstrap)))
3163 (info (string-append data "/info"))
3164 (html (string-append doc "/html"))
3165 (pyver ,(string-append "PYVER=")))
3166 (with-directory-excursion "doc"
3167 (mkdir-p html)
3168 (system* "make" "html" pyver)
3169 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3170 (system* "make" "-C" "build/latex"
2ee8869a
FB
3171 "all-pdf" "PAPER=a4" pyver)
3172 ;; FIXME: Generation of the info file fails.
3173 ;; (system* "make" "info" pyver)
3174 ;; (mkdir-p info)
3175 ;; (copy-file "build/texinfo/numpy.info"
3176 ;; (string-append info "/numpy.info"))
3177 (for-each (lambda (file)
3178 (copy-file (string-append "build/latex" file)
3179 (string-append doc file)))
3180 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3181 (with-directory-excursion "build/html"
3182 (for-each (lambda (file)
3183 (let* ((dir (dirname file))
3184 (tgt-dir (string-append html "/" dir)))
3185 (unless (equal? "." dir)
3186 (mkdir-p tgt-dir))
96c46210 3187 (install-file file html)))
2ee8869a
FB
3188 (find-files "." ".*"))))))
3189 ,phases)))))))
3190
764c077b 3191(define-public python2-numpy
57b7b8cd 3192 (package-with-python2 python-numpy))
2ee8869a 3193
15bfe6d6
FB
3194(define-public python-pyparsing
3195 (package
3196 (name "python-pyparsing")
e0669289 3197 (version "2.0.3")
15bfe6d6
FB
3198 (source
3199 (origin
3200 (method url-fetch)
de67e922
LF
3201 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3202 "/pyparsing-" version
15bfe6d6
FB
3203 "/pyparsing-" version ".tar.gz"))
3204 (sha256
3205 (base32
e0669289 3206 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3207 (build-system python-build-system)
3208 (outputs '("out" "doc"))
3209 (arguments
3210 `(#:tests? #f ; no test target
3211 #:modules ((guix build python-build-system)
3212 (guix build utils))
3213 #:phases
3214 (alist-cons-after
3215 'install 'install-doc
3216 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3217 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3218 "/share/doc/" ,name "-" ,version))
3219 (html-doc (string-append doc "/html"))
3220 (examples (string-append doc "/examples")))
3221 (mkdir-p html-doc)
3222 (mkdir-p examples)
89b5c60e 3223 (for-each
15bfe6d6 3224 (lambda (dir tgt)
89b5c60e 3225 (map (lambda (file)
96c46210 3226 (install-file file tgt))
15bfe6d6
FB
3227 (find-files dir ".*")))
3228 (list "docs" "htmldoc" "examples")
3229 (list doc html-doc examples))))
3230 %standard-phases)))
3231 (home-page "http://pyparsing.wikispaces.com")
3232 (synopsis "Python parsing class library")
3233 (description
3234 "The pyparsing module is an alternative approach to creating and
3235executing simple grammars, vs. the traditional lex/yacc approach, or the use
3236of regular expressions. The pyparsing module provides a library of classes
3237that client code uses to construct the grammar directly in Python code.")
bd3fa666 3238 (license license:expat)))
15bfe6d6
FB
3239
3240(define-public python2-pyparsing
3241 (package-with-python2 python-pyparsing))
3242
ec00de35
FB
3243(define-public python-numpydoc
3244 (package
3245 (name "python-numpydoc")
3246 (version "0.5")
3247 (source
3248 (origin
3249 (method url-fetch)
89b5c60e 3250 (uri (string-append
ec00de35
FB
3251 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3252 version ".tar.gz"))
3253 (sha256
3254 (base32
5e4d8f67
AE
3255 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3256 (modules '((guix build utils)))
3257 (snippet
3258 '(begin
3259 ;; Drop a test requiring matplotlib, which we cannot add as an
3260 ;; input since it would create a circular dependency: Extend the
3261 ;; test for Python 3, where it is already dropped, to Python 2.
3262 (substitute* "numpydoc/tests/test_plot_directive.py"
3263 (("3") "2"))))))
ec00de35
FB
3264 (build-system python-build-system)
3265 (inputs
3266 `(("python-setuptools" ,python-setuptools)
3267 ("python-docutils" ,python-docutils)
3268 ("python-sphinx" ,python-sphinx)
3269 ("python-nose" ,python-nose)))
3270 (home-page "https://pypi.python.org/pypi/numpydoc")
3271 (synopsis
3272 "Numpy's Sphinx extensions")
3273 (description
3274 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3275 (license license:bsd-2)))
ec00de35
FB
3276
3277(define-public python2-numpydoc
5e4d8f67 3278 (package-with-python2 python-numpydoc))
1c65314c 3279
1e656049
RW
3280(define-public python-numexpr
3281 (package
3282 (name "python-numexpr")
26112c0a 3283 (version "2.6.0")
1e656049
RW
3284 (source
3285 (origin
3286 (method url-fetch)
26112c0a 3287 (uri (pypi-uri "numexpr" version))
1e656049
RW
3288 (sha256
3289 (base32
26112c0a 3290 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3291 (build-system python-build-system)
3292 (arguments `(#:tests? #f)) ; no tests included
3293 (propagated-inputs
3294 `(("python-numpy" ,python-numpy)))
3295 (home-page "https://github.com/pydata/numexpr")
3296 (synopsis "Fast numerical expression evaluator for NumPy")
3297 (description
3298 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3299expressions that operate on arrays are accelerated and use less memory than
3300doing the same calculation in Python. In addition, its multi-threaded
3301capabilities can make use of all your cores, which may accelerate
3302computations, most specially if they are not memory-bounded (e.g. those using
3303transcendental functions).")
3304 (license license:expat)))
3305
3306(define-public python2-numexpr
3307 (let ((numexpr (package-with-python2 python-numexpr)))
3308 (package (inherit numexpr)
3309 ;; Make sure to use special packages for Python 2 instead
3310 ;; of those automatically rewritten by package-with-python2.
3311 (propagated-inputs
3312 `(("python2-numpy" ,python2-numpy)
3313 ,@(alist-delete "python-numpy"
3314 (package-propagated-inputs numexpr)))))))
3315
1c65314c
FB
3316(define-public python-matplotlib
3317 (package
3318 (name "python-matplotlib")
1bbc659f 3319 (version "1.4.3")
1c65314c
FB
3320 (source
3321 (origin
3322 (method url-fetch)
de67e922
LF
3323 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3324 "/matplotlib-" version
1c65314c
FB
3325 "/matplotlib-" version ".tar.gz"))
3326 (sha256
3327 (base32
1bbc659f 3328 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3329 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3330 (build-system python-build-system)
3331 (outputs '("out" "doc"))
25f9a068
FB
3332 (propagated-inputs ; the following packages are all needed at run time
3333 `(("python-pyparsing" ,python-pyparsing)
3334 ("python-pygobject" ,python-pygobject)
3335 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3336 ("python-tkinter" ,python "tk")
25f9a068
FB
3337 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3338 ;; from 'gtk+') provides the required 'typelib' files used by
3339 ;; 'gobject-introspection'. The location of these files is set with the
3340 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3341 ;; is done automatically by a 'native-search-path' procedure. However,
3342 ;; at run-time the user must set this variable as follows:
3343 ;;
3344 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3345 ("gtk+" ,gtk+)
3346 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3347 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3348 ;; object. For this reason we need to import both libraries.
3349 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3350 ("python-pycairo" ,python-pycairo)
3351 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3352 (inputs
3353 `(("python-setuptools" ,python-setuptools)
3354 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3355 ("python-six" ,python-six)
3356 ("python-pytz" ,python-pytz)
3357 ("python-numpy" ,python-numpy-bootstrap)
3358 ("python-sphinx" ,python-sphinx)
3359 ("python-numpydoc" ,python-numpydoc)
3360 ("python-nose" ,python-nose)
3361 ("python-mock" ,python-mock)
3362 ("libpng" ,libpng)
3363 ("imagemagick" ,imagemagick)
3364 ("freetype" ,freetype)
25f9a068
FB
3365 ("cairo" ,cairo)
3366 ("glib" ,glib)
4e7a137a 3367 ("python-pillow" ,python-pillow)
1c65314c 3368 ;; FIXME: Add backends when available.
1c65314c
FB
3369 ;("python-wxpython" ,python-wxpython)
3370 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3371 ("tcl" ,tcl)
3372 ("tk" ,tk)))
1c65314c
FB
3373 (native-inputs
3374 `(("pkg-config" ,pkg-config)
3375 ("texlive" ,texlive)
3376 ("texinfo" ,texinfo)))
3377 (arguments
3378 `(#:phases
25f9a068
FB
3379 (alist-cons-before
3380 'build 'configure-environment
3381 (lambda* (#:key outputs inputs #:allow-other-keys)
3382 (let ((cairo (assoc-ref inputs "cairo"))
3383 (gtk+ (assoc-ref inputs "gtk+")))
3384 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3385 ;; has not effect.
25f9a068
FB
3386 (setenv "LD_LIBRARY_PATH"
3387 (string-append cairo "/lib:" gtk+ "/lib"))
3388 (setenv "HOME" (getcwd))
3389 (call-with-output-file "setup.cfg"
3390 (lambda (port)
1bbc659f
FB
3391 (format port "[directories]~%
3392basedirlist = ~a,~a~%
57b7b8cd 3393 [rc_options]~%
1bbc659f
FB
3394backend = TkAgg~%"
3395 (assoc-ref inputs "tcl")
3396 (assoc-ref inputs "tk"))))))
25f9a068
FB
3397 (alist-cons-after
3398 'install 'install-doc
3399 (lambda* (#:key outputs #:allow-other-keys)
3400 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3401 (doc (string-append data "/doc/" ,name "-" ,version))
3402 (info (string-append data "/info"))
3403 (html (string-append doc "/html")))
3404 (with-directory-excursion "doc"
25f9a068
FB
3405 ;; Produce pdf in 'A4' format.
3406 (substitute* (find-files "." "conf\\.py")
3407 (("latex_paper_size = 'letter'")
3408 "latex_paper_size = 'a4'"))
3409 (mkdir-p html)
3410 (mkdir-p info)
3411 ;; The doc recommends to run the 'html' target twice.
3412 (system* "python" "make.py" "html")
3413 (system* "python" "make.py" "html")
18b31516 3414 (copy-recursively "build/html" html)
25f9a068
FB
3415 (system* "python" "make.py" "latex")
3416 (system* "python" "make.py" "texinfo")
18b31516
FB
3417 (symlink (string-append html "/_images")
3418 (string-append info "/matplotlib-figures"))
3419 (with-directory-excursion "build/texinfo"
3420 (substitute* "matplotlib.texi"
3421 (("@image\\{([^,]*)" all file)
3422 (string-append "@image{matplotlib-figures/" file)))
3423 (symlink (string-append html "/_images")
3424 "./matplotlib-figures")
3425 (system* "makeinfo" "--no-split"
3426 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3427 (copy-file "build/texinfo/matplotlib.info"
3428 (string-append info "/matplotlib.info"))
3429 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3430 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3431 %standard-phases))))
1c65314c
FB
3432 (home-page "http://matplotlib.org")
3433 (synopsis "2D plotting library for Python")
3434 (description
3435 "Matplotlib is a Python 2D plotting library which produces publication
3436quality figures in a variety of hardcopy formats and interactive environments
3437across platforms. Matplotlib can be used in Python scripts, the python and
3438ipython shell, web application servers, and six graphical user interface
3439toolkits.")
3f641af0 3440 (license license:psfl)
57b7b8cd 3441 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3442
764c077b 3443(define-public python2-matplotlib
57b7b8cd
LC
3444 (let ((matplotlib (package-with-python2
3445 (strip-python2-variant python-matplotlib))))
764c077b 3446 (package (inherit matplotlib)
88c26834
AE
3447 ;; Make sure to use special packages for Python 2 instead
3448 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3449 (propagated-inputs
7ca0dbc3 3450 `(("python2-pycairo" ,python2-pycairo)
764c077b 3451 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3452 ("python2-tkinter" ,python-2 "tk")
3453 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3454 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3455
0dde6232
RW
3456(define-public python2-pysnptools
3457 (package
3458 (name "python2-pysnptools")
a800018e 3459 (version "0.3.9")
0dde6232
RW
3460 (source
3461 (origin
3462 (method url-fetch)
3f2e9675 3463 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3464 (sha256
3465 (base32
a800018e 3466 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3467 (build-system python-build-system)
3468 (arguments
3469 `(#:python ,python-2)) ; only Python 2.7 is supported
3470 (propagated-inputs
3471 `(("python2-numpy" ,python2-numpy)
3472 ("python2-scipy" ,python2-scipy)
a800018e 3473 ("python2-pytz" ,python2-pytz)
0dde6232 3474 ("python2-cython" ,python2-cython)))
a800018e
EF
3475 (inputs
3476 `(("python2-dateutil-2" ,python2-dateutil-2)
3477 ("python2-pandas" ,python2-pandas)
3478 ("python2-six" ,python2-six)))
0dde6232
RW
3479 (native-inputs
3480 `(("unzip" ,unzip)
3481 ("python2-setuptools" ,python2-setuptools)))
3482 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3483 (synopsis "Library for reading and manipulating genetic data")
3484 (description
3485 "PySnpTools is a library for reading and manipulating genetic data. It
3486can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3487those files. It can also efficiently manipulate ranges of integers using set
3488operators such as union, intersection, and difference.")
3f641af0 3489 (license license:asl2.0)))
0dde6232 3490
c9b1b4f9
RW
3491(define-public python-rpy2
3492 (package
3493 (name "python-rpy2")
ec3bcbc7 3494 (version "2.7.6")
c9b1b4f9
RW
3495 (source
3496 (origin
3497 (method url-fetch)
ec3bcbc7 3498 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3499 (sha256
3500 (base32
ec3bcbc7 3501 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3502 (build-system python-build-system)
3503 (inputs
3504 `(("python-six" ,python-six)
3505 ("readline" ,readline)
3506 ("icu4c" ,icu4c)
3507 ("pcre" ,pcre)
3508 ("r" ,r)))
3509 (native-inputs
5ff6575b
RW
3510 `(("python-setuptools" ,python-setuptools)
3511 ("zlib" ,zlib)))
c9b1b4f9
RW
3512 (home-page "http://rpy.sourceforge.net/")
3513 (synopsis "Python interface to the R language")
3514 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3515low-level interface to R from Python, a proposed high-level interface,
3516including wrappers to graphical libraries, as well as R-like structures and
3517functions.")
3f641af0 3518 (license license:gpl3+)))
c9b1b4f9
RW
3519
3520(define-public python2-rpy2
3521 (let ((rpy2 (package-with-python2 python-rpy2)))
3522 (package (inherit rpy2)
3523 (native-inputs
3524 `(("python2-singledispatch" ,python2-singledispatch)
3525 ,@(package-native-inputs rpy2))))))
3526
bb986599
FB
3527(define-public python-scipy
3528 (package
3529 (name "python-scipy")
ba8a0824 3530 (version "0.16.0")
bb986599
FB
3531 (source
3532 (origin
3533 (method url-fetch)
de67e922
LF
3534; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3535 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3536 "/scipy-" version ".tar.xz"))
bb986599
FB
3537 (sha256
3538 (base32
ba8a0824 3539 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3540 (build-system python-build-system)
dd86c0d1 3541 (propagated-inputs
bb986599
FB
3542 `(("python-numpy" ,python-numpy)
3543 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3544 ("python-pyparsing" ,python-pyparsing)))
3545 (inputs
3546 `(("lapack" ,lapack)
719b01c1 3547 ("openblas" ,openblas)))
bb986599 3548 (native-inputs
dd86c0d1
RW
3549 `(("python-nose" ,python-nose)
3550 ("python-sphinx" ,python-sphinx)
5248d49e 3551 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3552 ("gfortran" ,gfortran)
bb986599
FB
3553 ("texlive" ,texlive)
3554 ("perl" ,perl)))
3555 (outputs '("out" "doc"))
3556 (arguments
3557 `(#:phases
3558 (alist-cons-before
719b01c1 3559 'build 'configure-openblas
bb986599 3560 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3561 (call-with-output-file "site.cfg"
3562 (lambda (port)
3563 (format port
3564 "[blas]
3565libraries = openblas
3566library_dirs = ~a/lib
3567include_dirs = ~a/include
3568[atlas]
3569library_dirs = ~a/lib
3570atlas_libs = openblas
3571"
3572 (assoc-ref inputs "openblas")
3573 (assoc-ref inputs "openblas")
3574 (assoc-ref inputs "openblas"))))
3575 #t)
bb986599
FB
3576 (alist-cons-after
3577 'install 'install-doc
3578 (lambda* (#:key outputs #:allow-other-keys)
3579 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3580 (doc (string-append data "/doc/" ,name "-" ,version))
3581 (html (string-append doc "/html"))
3582 (pyver ,(string-append "PYVER=")))
3583 (with-directory-excursion "doc"
bb986599
FB
3584 ;; Fix generation of images for mathematical expressions.
3585 (substitute* (find-files "source" "conf\\.py")
3586 (("pngmath_use_preview = True")
3587 "pngmath_use_preview = False"))
3588 (mkdir-p html)
3589 (system* "make" "html" pyver)
3590 (system* "make" "latex" "PAPER=a4" pyver)
3591 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3592 (copy-file "build/latex/scipy-ref.pdf"
3593 (string-append doc "/scipy-ref.pdf"))
3594 (with-directory-excursion "build/html"
3595 (for-each (lambda (file)
3596 (let* ((dir (dirname file))
3597 (tgt-dir (string-append html "/" dir)))
96c46210 3598 (install-file file html)))
bb986599
FB
3599 (find-files "." ".*"))))))
3600 ;; Tests can only be run after the library has been installed and not
3601 ;; within the source directory.
3602 (alist-cons-after
3603 'install 'check
89b5c60e 3604 (lambda _
bb986599
FB
3605 (with-directory-excursion "/tmp"
3606 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3607 (alist-delete
3608 'check
4f9ff21e
RW
3609 (alist-cons-after
3610 'unpack 'fix-tests
3611 (lambda _
3612 (substitute* "scipy/integrate/tests/test_quadpack.py"
3613 (("libm.so") "libm.so.6"))
3614 #t)
3615 %standard-phases)))))))
bb986599
FB
3616 (home-page "http://www.scipy.org/")
3617 (synopsis "The Scipy library provides efficient numerical routines")
3618 (description "The SciPy library is one of the core packages that make up
3619the SciPy stack. It provides many user-friendly and efficient numerical
3620routines such as routines for numerical integration and optimization.")
3f641af0 3621 (license license:bsd-3)))
bb986599 3622
764c077b 3623(define-public python2-scipy
57b7b8cd 3624 (package-with-python2 python-scipy))
bb986599 3625
94914805
EB
3626(define-public python-sqlalchemy
3627 (package
3628 (name "python-sqlalchemy")
a4ba286b 3629 (version "1.0.12")
94914805
EB
3630 (source
3631 (origin
3632 (method url-fetch)
3633 (uri (string-append "https://pypi.python.org/packages/source/S/"
3634 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3635 (sha256
3636 (base32
a4ba286b 3637 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3638 (build-system python-build-system)
3639 (native-inputs
3640 `(("python-cython" ,python-cython) ;for c extensions
3641 ("python-pytest" ,python-pytest)
3642 ("python-mock" ,python-mock))) ;for tests
3643 (arguments
3644 `(#:phases (alist-replace
3645 'check
3646 (lambda _ (zero? (system* "py.test")))
3647 %standard-phases)))
3648 (home-page "http://www.sqlalchemy.org")
3649 (synopsis "Database abstraction library")
3650 (description
3651 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3652gives application developers the full power and flexibility of SQL. It
3653provides a full suite of well known enterprise-level persistence patterns,
3654designed for efficient and high-performing database access, adapted into a
3655simple and Pythonic domain language.")
3f641af0 3656 (license license:x11)))
94914805
EB
3657
3658(define-public python2-sqlalchemy
3659 (package-with-python2 python-sqlalchemy))
c937562e 3660
af5a4602
CAW
3661(define-public python-alembic
3662 (package
3663 (name "python-alembic")
bb484529 3664 (version "0.8.7")
af5a4602
CAW
3665 (source
3666 (origin
3667 (method url-fetch)
3668 (uri (pypi-uri "alembic" version))
3669 (sha256
3670 (base32
bb484529 3671 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
3672 (build-system python-build-system)
3673 (native-inputs
3674 `(("python-mock" ,python-mock)
3675 ("python-pytest-cov" ,python-pytest-cov)))
3676 (propagated-inputs
3677 `(("python-sqlalchemy" ,python-sqlalchemy)
3678 ("python-mako" ,python-mako)
3679 ("python-editor" ,python-editor)))
3680 (home-page "http://bitbucket.org/zzzeek/alembic")
3681 (synopsis
3682 "Database migration tool for SQLAlchemy")
3683 (description
3684 "Alembic is a lightweight database migration tool for usage with the
3685SQLAlchemy Database Toolkit for Python.")
3686 (license license:expat)
3687 (properties `((python2-variant . ,(delay python2-alembic))))))
3688
3689(define-public python2-alembic
3690 (let ((alembic (package-with-python2
3691 (strip-python2-variant python-alembic))))
3692 (package
3693 (inherit alembic)
3694 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3695 ,@(package-native-inputs alembic))))))
3696
1671c07c
EB
3697(define-public python-distutils-extra
3698 (package
3699 (name "python-distutils-extra")
3700 (version "2.38")
3701 (source
3702 (origin
3703 (method url-fetch)
3704 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3705 version "/+download/python-distutils-extra-"
3706 version ".tar.gz"))
3707 (sha256
3708 (base32
3709 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3710 (build-system python-build-system)
3711 (native-inputs
3712 `(("python-setuptools" ,python-setuptools)))
3713 (home-page "https://launchpad.net/python-distutils-extra/")
3714 (synopsis "Enhancements to Python's distutils")
3715 (description
3716 "The python-distutils-extra module enables you to easily integrate
3717gettext support, themed icons, and scrollkeeper-based documentation into
3718Python's distutils.")
3f641af0 3719 (license license:gpl2)))
1671c07c
EB
3720
3721(define-public python2-distutils-extra
3722 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3723
3724(define-public python2-elib.intl
3725 (package
3726 (name "python2-elib.intl")
3727 (version "0.0.3")
3728 (source
3729 (origin
3730 ;; This project doesn't tag releases or publish tarballs, so we take
3731 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3732 (method git-fetch)
3733 (uri (git-reference
3734 (url "https://github.com/dieterv/elib.intl.git")
3735 (commit "d09997cfef")))
3736 (sha256
3737 (base32
3738 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3739 (build-system python-build-system)
3740 (native-inputs
3741 `(("python2-setuptools" ,python2-setuptools)))
3742 (arguments
3743 ;; incompatible with Python 3 (exception syntax)
3744 `(#:python ,python-2
3745 #:tests? #f
3746 ;; With standard flags, the install phase attempts to create a zip'd
3747 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3748 ;; before 1980'
3749 #:configure-flags '("--single-version-externally-managed"
3750 "--record=elib.txt")))
3751 (home-page "https://github.com/dieterv/elib.intl")
3752 (synopsis "Enhanced internationalization for Python")
3753 (description
3754 "The elib.intl module provides enhanced internationalization (I18N)
3755services for your Python modules and applications.")
3f641af0 3756 (license license:lgpl3+)))
ea5456c8 3757
c937562e
EB
3758(define-public python-pillow
3759 (package
3760 (name "python-pillow")
16095d27 3761 (version "3.1.1")
c937562e
EB
3762 (source
3763 (origin
3764 (method url-fetch)
f1d9231d 3765 (uri (pypi-uri "Pillow" version))
c937562e
EB
3766 (sha256
3767 (base32
16095d27 3768 "1zwzakr5v0skdh0azp5cd6fwzbll5305dsk33k5jk570vv6lqvs8"))))
c937562e
EB
3769 (build-system python-build-system)
3770 (native-inputs
3771 `(("python-setuptools" ,python-setuptools)
3772 ("python-nose" ,python-nose)))
3773 (inputs
5ff408d9
SB
3774 `(("freetype" ,freetype)
3775 ("lcms" ,lcms)
c937562e
EB
3776 ("zlib" ,zlib)
3777 ("libjpeg" ,libjpeg)
3778 ("openjpeg" ,openjpeg)
5ff408d9
SB
3779 ("libtiff" ,libtiff)
3780 ("libwebp" ,libwebp)))
c937562e
EB
3781 (propagated-inputs
3782 `(;; Used at runtime for pkg_resources
3783 ("python-setuptools" ,python-setuptools)))
3784 (arguments
e5358a6b
LC
3785 `(#:phases (modify-phases %standard-phases
3786 (add-before
3787 'install 'disable-egg-compression
3788 (lambda _
3789 ;; Leave the .egg uncompressed since compressing it would
3790 ;; prevent the GC from identifying run-time dependencies.
3791 ;; See <http://bugs.gnu.org/20765>.
3792 (let ((port (open-file "setup.cfg" "a")))
3793 (display "\n[easy_install]\nzip_ok = 0\n"
3794 port)
3795 (close-port port)
3796 #t)))
3797 (add-after
3798 'install 'check-installed
3799 (lambda _
3800 (begin
3801 (setenv "HOME" (getcwd))
3802 (and (zero? (system* "python" "selftest.py"
3803 "--installed"))
3804 (zero? (system* "python" "test-installed.py"))))))
3805 (delete 'check))))
c937562e
EB
3806 (home-page "https://pypi.python.org/pypi/Pillow")
3807 (synopsis "Fork of the Python Imaging Library")
3808 (description
3809 "The Python Imaging Library adds image processing capabilities to your
3810Python interpreter. This library provides extensive file format support, an
3811efficient internal representation, and fairly powerful image processing
3812capabilities. The core image library is designed for fast access to data
3813stored in a few basic pixel formats. It should provide a solid foundation for
3814a general image processing tool.")
3f641af0 3815 (license (license:x11-style
c937562e
EB
3816 "http://www.pythonware.com/products/pil/license.htm"
3817 "The PIL Software License"))))
3818
3819(define-public python2-pillow
3820 (package-with-python2 python-pillow))
bb986599 3821
a415f036
FB
3822(define-public python-pycparser
3823 (package
3824 (name "python-pycparser")
38eb6919 3825 (version "2.14")
a415f036
FB
3826 (source
3827 (origin
3828 (method url-fetch)
38eb6919 3829 (uri (pypi-uri "pycparser" version))
a415f036
FB
3830 (sha256
3831 (base32
38eb6919 3832 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
3833 (outputs '("out" "doc"))
3834 (build-system python-build-system)
3835 (native-inputs
3836 `(("pkg-config" ,pkg-config)
3837 ("python-setuptools" ,python-setuptools)))
3838 (arguments
89b5c60e 3839 `(#:phases
a415f036
FB
3840 (alist-replace
3841 'check
3842 (lambda _
3843 (with-directory-excursion "tests"
3844 (zero? (system* "python" "all_tests.py"))))
3845 (alist-cons-after
3846 'install 'install-doc
3847 (lambda* (#:key outputs #:allow-other-keys)
3848 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3849 (doc (string-append data "/doc/" ,name "-" ,version))
3850 (examples (string-append doc "/examples")))
3851 (mkdir-p examples)
3852 (for-each (lambda (file)
3853 (copy-file (string-append "." file)
3854 (string-append doc file)))
3855 '("/README.rst" "/CHANGES" "/LICENSE"))
3856 (copy-recursively "examples" examples)))
3857 %standard-phases))))
3858 (home-page "https://github.com/eliben/pycparser")
3859 (synopsis "C parser in Python")
3860 (description
3861 "Pycparser is a complete parser of the C language, written in pure Python
3862using the PLY parsing library. It parses C code into an AST and can serve as
3863a front-end for C compilers or analysis tools.")
3f641af0 3864 (license license:bsd-3)))
a415f036
FB
3865
3866(define-public python2-pycparser
3867 (package-with-python2 python-pycparser))
57c3f716
FB
3868
3869(define-public python-cffi
3870 (package
3871 (name "python-cffi")
2d3a437c 3872 (version "1.4.2")
57c3f716
FB
3873 (source
3874 (origin
3875 (method url-fetch)
2d3a437c 3876 (uri (pypi-uri "cffi" version))
89b5c60e 3877 (sha256
2d3a437c 3878 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
3879 (build-system python-build-system)
3880 (outputs '("out" "doc"))
3881 (inputs
3882 `(("libffi" ,libffi)))
3883 (propagated-inputs ; required at run-time
3884 `(("python-pycparser" ,python-pycparser)))
3885 (native-inputs
3886 `(("pkg-config" ,pkg-config)
3887 ("python-sphinx" ,python-sphinx)
4179f952 3888 ("python-pytest" ,python-pytest)
57c3f716
FB
3889 ("python-setuptools" ,python-setuptools)))
3890 (arguments
4179f952 3891 `(#:phases
57c3f716
FB
3892 (alist-cons-after
3893 'install 'install-doc
3894 (lambda* (#:key outputs #:allow-other-keys)
3895 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3896 (doc (string-append data "/doc/" ,name "-" ,version))
3897 (html (string-append doc "/html")))
3898 (with-directory-excursion "doc"
3899 (system* "make" "html")
3900 (mkdir-p html)
3901 (copy-recursively "build/html" html))
3902 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3903 %standard-phases)))
3904 (home-page "http://cffi.readthedocs.org")
3905 (synopsis "Foreign function interface for Python")
3906 (description
3907 "Foreign Function Interface for Python calling C code.")
bd3fa666 3908 (license license:expat)))
57c3f716
FB
3909
3910(define-public python2-cffi
3911 (package-with-python2 python-cffi))
6fa14469
FB
3912
3913(define-public python-xcffib
3914 (package
3915 (name "python-xcffib")
3916 (version "0.1.9")
3917 (source
3918 (origin
3919 (method url-fetch)
3920 (uri (string-append "https://pypi.python.org/packages/source/x/"
3921 "xcffib/xcffib-" version ".tar.gz"))
3922 (sha256
3923 (base32
3924 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3925 (build-system python-build-system)
3926 (inputs
3927 `(("libxcb" ,libxcb)
3928 ("python-six" ,python-six)))
3929 (native-inputs
3930 `(("python-setuptools" ,python-setuptools)))
3931 (propagated-inputs
3932 `(("python-cffi" ,python-cffi))) ; used at run time
3933 (arguments
89b5c60e 3934 `(#:phases
6fa14469
FB
3935 (alist-cons-after
3936 'install 'install-doc
3937 (lambda* (#:key outputs #:allow-other-keys)
3938 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3939 "/doc/" ,name "-" ,version)))
3940 (mkdir-p doc)
3941 (copy-file "README.md"
3942 (string-append doc "/README.md"))))
3943 %standard-phases)))
3944 (home-page "https://github.com/tych0/xcffib")
3945 (synopsis "XCB Python bindings")
3946 (description
3947 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3948support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3949 (license license:expat)))
6fa14469
FB
3950
3951(define-public python2-xcffib
3952 (package-with-python2 python-xcffib))
3953
9e099723
FB
3954(define-public python-cairocffi
3955 (package
3956 (name "python-cairocffi")
3957 (version "0.6")
3958 (source
3959 (origin
3960 (method url-fetch)
3961 ;; The archive on pypi is missing the 'utils' directory!
3962 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3963 version ".tar.gz"))
f586c877 3964 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3965 (sha256
3966 (base32
3967 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3968 (build-system python-build-system)
3969 (outputs '("out" "doc"))
3970 (inputs
3971 `(("gdk-pixbuf" ,gdk-pixbuf)
3972 ("cairo" ,cairo)))
3973 (native-inputs
3974 `(("pkg-config" ,pkg-config)
3975 ("python-sphinx" ,python-sphinx)
3976 ("python-docutils" ,python-docutils)
3977 ("python-setuptools" ,python-setuptools)))
3978 (propagated-inputs
3979 `(("python-xcffib" ,python-xcffib))) ; used at run time
3980 (arguments
89b5c60e 3981 `(#:phases
9e099723
FB
3982 (alist-cons-after
3983 'install 'install-doc
3984 (lambda* (#:key inputs outputs #:allow-other-keys)
3985 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3986 (doc (string-append data "/doc/" ,name "-" ,version))
3987 (html (string-append doc "/html")))
89b5c60e 3988 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3989 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3990 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3991 (setenv "LANG" "en_US.UTF-8")
3992 (mkdir-p html)
3993 (for-each (lambda (file)
3994 (copy-file (string-append "." file)
3995 (string-append doc file)))
3996 '("/README.rst" "/CHANGES" "/LICENSE"))
3997 (system* "python" "setup.py" "build_sphinx")
3998 (copy-recursively "docs/_build/html" html)))
3999 %standard-phases)))
4000 (home-page "https://github.com/SimonSapin/cairocffi")
4001 (synopsis "Python bindings and object-oriented API for Cairo")
4002 (description
4003 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4004Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4005graphics library with support for multiple backends including image buffers,
4006PNG, PostScript, PDF, and SVG file output.")
3f641af0 4007 (license license:bsd-3)))
9e099723
FB
4008
4009(define-public python2-cairocffi
4010 (package-with-python2 python-cairocffi))
4011
3cff95cb
RW
4012(define-public python-decorator
4013 (package
4014 (name "python-decorator")
eb6e2e81 4015 (version "4.0.9")
3cff95cb
RW
4016 (source
4017 (origin
4018 (method url-fetch)
e21338be 4019 (uri (pypi-uri "decorator" version))
3cff95cb 4020 (sha256
eb6e2e81 4021 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4022 (build-system python-build-system)
4023 (arguments '(#:tests? #f)) ; no test target
4024 (native-inputs
4025 `(("python-setuptools" ,python-setuptools)))
eb6e2e81 4026 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4027 (synopsis "Python module to simplify usage of decorators")
4028 (description
4029 "The aim of the decorator module is to simplify the usage of decorators
4030for the average programmer, and to popularize decorators usage giving examples
4031of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4032etc. The core of this module is a decorator factory.")
4033 (license license:expat)))
4034
4035(define-public python2-decorator
4036 (package-with-python2 python-decorator))
4037
2c0499ad
RW
4038(define-public python-drmaa
4039 (package
4040 (name "python-drmaa")
4041 (version "0.7.6")
4042 (source
4043 (origin
4044 (method url-fetch)
4045 (uri (string-append
4046 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4047 version ".tar.gz"))
4048 (sha256
4049 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4050 (build-system python-build-system)
4051 ;; The test suite requires libdrmaa which is provided by the cluster
4052 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4053 ;; should be set to the path of the libdrmaa library.
4054 (arguments '(#:tests? #f))
4055 (native-inputs
4056 `(("python-nose" ,python-nose)
4057 ("python-setuptools" ,python-setuptools)))
4058 (home-page "https://pypi.python.org/pypi/drmaa")
4059 (synopsis "Python bindings for the DRMAA library")
4060 (description
4061 "A Python package for Distributed Resource Management (DRM) job
4062submission and control. This package is an implementation of the DRMAA 1.0
4063Python language binding specification.")
3f641af0 4064 (license license:bsd-3)))
2c0499ad
RW
4065
4066(define-public python2-drmaa
4067 (package-with-python2 python-drmaa))
4068
d05c6da0
RW
4069(define-public python-gridmap
4070 (package
4071 (name "python-gridmap")
4072 (version "0.13.0")
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (string-append
4077 "https://github.com/pygridtools/gridmap/archive/v"
4078 version ".tar.gz"))
4079 (file-name (string-append name "-" version ".tar.gz"))
4080 (sha256
4081 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4082 (build-system python-build-system)
4083 (inputs
4084 `(("python-psutil" ,python-psutil)
4085 ("python-drmaa" ,python-drmaa)
4086 ("python-pyzmq" ,python-pyzmq)))
4087 (native-inputs
4088 `(("python-setuptools" ,python-setuptools)))
4089 (home-page "https://github.com/pygridtools/gridmap")
4090 (synopsis "Create jobs on a cluster directly from Python")
4091 (description
4092 "Gridmap is a Python package to allow you to easily create jobs on the
4093cluster directly from Python. You can directly map Python functions onto the
4094cluster without needing to write any wrapper code yourself.")
3f641af0 4095 (license license:gpl3+)))
d05c6da0
RW
4096
4097(define-public python2-gridmap
4098 (package-with-python2 python-gridmap))
4099
cb6d5c54
RW
4100(define-public python-pexpect
4101 (package
4102 (name "python-pexpect")
4103 (version "3.3")
4104 (source
4105 (origin
4106 (method url-fetch)
4107 (uri (string-append "https://pypi.python.org/packages/source/p/"
4108 "pexpect/pexpect-" version ".tar.gz"))
4109 (sha256
4110 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4111 (build-system python-build-system)
4112 (arguments
4113 `(#:phases
4114 (modify-phases %standard-phases
4115 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4116 (native-inputs
4117 `(("python-nose" ,python-nose)))
4118 (home-page "http://pexpect.readthedocs.org/")
4119 (synopsis "Controlling interactive console applications")
4120 (description
4121 "Pexpect is a pure Python module for spawning child applications;
4122controlling them; and responding to expected patterns in their output.
4123Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4124child application and control it as if a human were typing commands.")
3f641af0 4125 (license license:isc)))
cb6d5c54
RW
4126
4127(define-public python2-pexpect
4128 (package-with-python2 python-pexpect))
4129
229ad120
RW
4130(define-public python-setuptools-scm
4131 (package
4132 (name "python-setuptools-scm")
42d6d0d0 4133 (version "1.11.1")
229ad120
RW
4134 (source (origin
4135 (method url-fetch)
383af6b0 4136 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4137 (sha256
4138 (base32
42d6d0d0 4139 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120 4140 (build-system python-build-system)
383af6b0 4141 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4142 (home-page "https://github.com/pypa/setuptools_scm/")
4143 (synopsis "Manage Python package versions in SCM metadata")
4144 (description
383af6b0 4145 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4146@dfn{software configuration management} (SCM) metadata instead of declaring
4147them as the version argument or in a SCM managed file.")
4148 (license license:expat)))
4149
4150(define-public python2-setuptools-scm
4151 (package-with-python2 python-setuptools-scm))
4152
b74270ee
RW
4153(define-public python-pathpy
4154 (package
4155 (name "python-pathpy")
4156 (version "8.1.1")
4157 (source
4158 (origin
4159 (method url-fetch)
4160 (uri (string-append "https://pypi.python.org/packages/source/p/"
4161 "path.py/path.py-" version ".tar.gz"))
4162 (sha256
4163 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4164 (build-system python-build-system)
4165 (propagated-inputs
4166 `(("python-appdirs" ,python-appdirs)))
4167 (native-inputs
553b709b
EF
4168 `(("python-setuptools" ,python-setuptools)
4169 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4170 ("python-pytest" ,python-pytest)
4171 ("python-pytest-runner" ,python-pytest-runner)))
4172 (home-page "http://github.com/jaraco/path.py")
4173 (synopsis "Python module wrapper for built-in os.path")
4174 (description
4175 "@code{path.py} implements path objects as first-class entities, allowing
4176common operations on files to be invoked on those path objects directly.")
4177 (license license:expat)))
4178
4179(define-public python2-pathpy
4180 (package-with-python2 python-pathpy))
4181
0d34e01b
RW
4182(define-public python-pickleshare
4183 (package
4184 (name "python-pickleshare")
4185 (version "0.5")
4186 (source
4187 (origin
4188 (method url-fetch)
4189 (uri (string-append "https://pypi.python.org/packages/source/p/"
4190 "pickleshare/pickleshare-" version ".tar.gz"))
4191 (sha256
4192 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4193 (build-system python-build-system)
4194 (propagated-inputs
4195 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4196 (native-inputs
4197 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4198 (home-page "https://github.com/vivainio/pickleshare")
4199 (synopsis "Tiny key value database with concurrency support")
4200 (description
4201 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4202Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4203shelve, many processes can access the database simultaneously. Changing a
4204value in database is immediately visible to other processes accessing the same
4205database. Concurrency is possible because the values are stored in separate
4206files. Hence the “database” is a directory where all files are governed by
4207PickleShare.")
4208 (license license:expat)))
4209
4210(define-public python2-pickleshare
4211 (package-with-python2 python-pickleshare))
4212
cd6e5189
RW
4213(define-public python-simplegeneric
4214 (package
4215 (name "python-simplegeneric")
4216 (version "0.8.1")
4217 (source
4218 (origin
4219 (method url-fetch)
4220 (uri (string-append "https://pypi.python.org/packages/source/s/"
4221 "simplegeneric/simplegeneric-" version ".zip"))
4222 (sha256
4223 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4224 (build-system python-build-system)
4225 (native-inputs
69b96e5e
RW
4226 `(("python-setuptools" ,python-setuptools)
4227 ("unzip" ,unzip)))
cd6e5189
RW
4228 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4229 (synopsis "Python module for simple generic functions")
4230 (description
4231 "The simplegeneric module lets you define simple single-dispatch generic
4232functions, akin to Python’s built-in generic functions like @code{len()},
4233@code{iter()} and so on. However, instead of using specially-named methods,
4234these generic functions use simple lookup tables, akin to those used by
4235e.g. @code{pickle.dump()} and other generic functions found in the Python
4236standard library.")
3f641af0 4237 (license license:zpl2.1)))
cd6e5189
RW
4238
4239(define-public python2-simplegeneric
4240 (package-with-python2 python-simplegeneric))
4241
ddc7d8ed
RW
4242(define-public python-ipython-genutils
4243 (package
4244 (name "python-ipython-genutils")
4245 (version "0.1.0")
4246 (source
4247 (origin
4248 (method url-fetch)
4249 (uri (string-append "https://pypi.python.org/packages/source/i/"
4250 "ipython_genutils/ipython_genutils-"
4251 version ".tar.gz"))
4252 (sha256
4253 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4254 (build-system python-build-system)
4255 (arguments `(#:tests? #f)) ; no tests
4256 (home-page "http://ipython.org")
4257 (synopsis "Vestigial utilities from IPython")
4258 (description
4259 "This package provides retired utilities from IPython.")
3f641af0 4260 (license license:bsd-3)))
ddc7d8ed
RW
4261
4262(define-public python2-ipython-genutils
4263 (package-with-python2 python-ipython-genutils))
4264
2b10eb48
RW
4265(define-public python-traitlets
4266 (package
4267 (name "python-traitlets")
cc0c4fde 4268 (version "4.1.0")
2b10eb48
RW
4269 (source
4270 (origin
4271 (method url-fetch)
cc0c4fde 4272 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4273 (sha256
4274 (base32
cc0c4fde 4275 "0nxgj8jxlm1kqf8cx2x7vjid05zdgbxpqhjbdl46r8njlpgkh3j4"))))
2b10eb48
RW
4276 (build-system python-build-system)
4277 (arguments
4278 `(#:phases
4279 (modify-phases %standard-phases
4280 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4281 (propagated-inputs
4282 `(("python-ipython-genutils" ,python-ipython-genutils)
4283 ("python-decorator" ,python-decorator)))
4284 (native-inputs
cc0c4fde
EF
4285 `(("python-mock" ,python-mock)
4286 ("python-nose" ,python-nose)))
2b10eb48
RW
4287 (home-page "http://ipython.org")
4288 (synopsis "Configuration system for Python applications")
4289 (description
4290 "Traitlets is a framework that lets Python classes have attributes with
4291type checking, dynamically calculated default values, and ‘on change’
4292callbacks. The package also includes a mechanism to use traitlets for
4293configuration, loading values from files or from command line arguments. This
4294is a distinct layer on top of traitlets, so you can use traitlets in your code
4295without using the configuration machinery.")
3f641af0 4296 (license license:bsd-3)))
2b10eb48
RW
4297
4298(define-public python2-traitlets
4299 (package-with-python2 python-traitlets))
4300
ae1ab9fe
FB
4301(define-public python-ipython
4302 (package
4303 (name "python-ipython")
3a0b1b9a 4304 (version "3.2.1")
ae1ab9fe
FB
4305 (source
4306 (origin
fceac880 4307 (method url-fetch)
fc1adab1 4308 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
fceac880
FB
4309 (uri (string-append "https://pypi.python.org/packages/source/i/"
4310 "ipython/ipython-" version ".tar.gz"))
4311 (sha256
4312 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4313 (build-system python-build-system)
4314 (outputs '("out" "doc"))
3a0b1b9a
FB
4315 (propagated-inputs
4316 `(("python-pyzmq" ,python-pyzmq)
4317 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4318 (inputs
4319 `(("readline" ,readline)
3a0b1b9a 4320 ("which" ,which)
ae1ab9fe 4321 ("python-matplotlib" ,python-matplotlib)
5d26e542 4322 ("python-numpy" ,python-numpy)
ae1ab9fe 4323 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4324 ("python-jinja2" ,python-jinja2)
4325 ("python-mistune" ,python-mistune)
4326 ("python-jsonschema" ,python-jsonschema)
4327 ("python-pygments" ,python-pygments)
4328 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4329 ("python-nose" ,python-nose)))
4330 (native-inputs
4331 `(("pkg-config" ,pkg-config)
4332 ("python-sphinx" ,python-sphinx)
4333 ("texlive" ,texlive)
4334 ("texinfo" ,texinfo)
4335 ("python-setuptools" ,python-setuptools)))
4336 (arguments
89b5c60e 4337 `(#:phases
3a0b1b9a
FB
4338 (modify-phases %standard-phases
4339 (add-after
4340 'install 'install-doc
4341 (lambda* (#:key inputs outputs #:allow-other-keys)
4342 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4343 (doc (string-append data "/doc/" ,name "-" ,version))
4344 (html (string-append doc "/html"))
4345 (man1 (string-append data "/man/man1"))
4346 (info (string-append data "/info"))
4347 (examples (string-append doc "/examples")))
afd3d931 4348 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4349 (with-directory-excursion "docs"
4350 ;; FIXME: html and pdf fail to build
4351 ;; (system* "make" "html")
4352 ;; (system* "make" "pdf" "PAPER=a4")
4353 (system* "make" "info"))
4354 (copy-recursively "docs/man" man1)
4355 (copy-recursively "examples" examples)
4356 ;; (copy-recursively "docs/build/html" html)
4357 ;; (copy-file "docs/build/latex/ipython.pdf"
4358 ;; (string-append doc "/ipython.pdf"))
4359 (mkdir-p info)
4360 (copy-file "docs/build/texinfo/ipython.info"
4361 (string-append info "/ipython.info"))
4362 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4363 ;; Tests can only be run after the library has been installed and not
4364 ;; within the source directory.
4365 (delete 'check)
4366 (add-after
4367 'install 'check
4368 (lambda* (#:key outputs tests? #:allow-other-keys)
4369 (if tests?
4370 (with-directory-excursion "/tmp"
4371 (setenv "HOME" "/tmp/") ;; required by a test
4372 (zero? (system* (string-append (assoc-ref outputs "out")
4373 "/bin/iptest"))))
4374 #t)))
4375 (add-before
4376 'install 'fix-tests
4377 (lambda* (#:key inputs #:allow-other-keys)
4378 (substitute* "./IPython/utils/_process_posix.py"
4379 (("/usr/bin/env', 'which") (which "which")))
4380 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4381 (("#!/usr/bin/env python")
4382 (string-append "#!" (which "python"))))
4383 ;; Disable 1 failing test
4384 (substitute* "./IPython/core/tests/test_magic.py"
4385 (("def test_dirops\\(\\):" all)
4386 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4387 (home-page "http://ipython.org")
4388 (synopsis "IPython is a tool for interactive computing in Python")
4389 (description
4390 "IPython provides a rich architecture for interactive computing with:
4391Powerful interactive shells, a browser-based notebook, support for interactive
4392data visualization, embeddable interpreters and tools for parallel
4393computing.")
3f641af0 4394 (license license:bsd-3)))
ae1ab9fe
FB
4395
4396(define-public python2-ipython
4397 (let ((ipython (package-with-python2 python-ipython)))
3a0b1b9a
FB
4398 (package
4399 (inherit ipython)
4400 ;; FIXME: some tests are failing
4401 (arguments
4402 `(#:tests? #f ,@(package-arguments ipython)))
ae1ab9fe 4403 ;; Make sure we use custom python2-NAME packages.
3a0b1b9a 4404 ;; FIXME: add pyreadline once available.
667d90df
RW
4405 (propagated-inputs
4406 `(("python2-terminado" ,python2-terminado)
4407 ,@(alist-delete "python-terminado"
4408 (package-propagated-inputs ipython))))
89b5c60e 4409 (inputs
264ae686
EF
4410 `(("python2-jsonschema" ,python2-jsonschema)
4411 ("python2-mock" ,python2-mock)
3a0b1b9a 4412 ("python2-matplotlib" ,python2-matplotlib)
5587253a 4413 ("python2-numpy" ,python2-numpy)
264ae686 4414 ("python2-requests" ,python2-requests)
5587253a 4415 ,@(fold alist-delete (package-inputs ipython)
264ae686 4416 '("python-jsonschema" "python-matplotlib" "python-numpy" "python-requests")))))))
03411993
AE
4417
4418(define-public python-isodate
4419 (package
4420 (name "python-isodate")
b6785c2e 4421 (version "0.5.4")
03411993
AE
4422 (source
4423 (origin
4424 (method url-fetch)
b6785c2e 4425 (uri (pypi-uri "isodate" version))
03411993
AE
4426 (sha256
4427 (base32
b6785c2e 4428 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993
AE
4429 (build-system python-build-system)
4430 (inputs
4431 `(("python-setuptools" ,python-setuptools)))
4432 (home-page
4433 "http://cheeseshop.python.org/pypi/isodate")
4434 (synopsis
4435 "Python date parser and formatter")
4436 (description
4437 "Python-isodate is a python module for parsing and formatting
4438ISO 8601 dates, time and duration.")
3f641af0 4439 (license license:bsd-3)))
03411993
AE
4440
4441(define-public python2-isodate
4442 (package-with-python2 python-isodate))
673ab897
AE
4443
4444(define-public python-html5lib
4445 (package
4446 (name "python-html5lib")
fee04c19 4447 (version "1.0b8")
673ab897
AE
4448 (source
4449 (origin
4450 (method url-fetch)
fee04c19 4451 (uri (pypi-uri "html5lib" version))
673ab897
AE
4452 (sha256
4453 (base32
fee04c19 4454 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
673ab897 4455 (build-system python-build-system)
3dd75476
AE
4456 (propagated-inputs
4457 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4458 (inputs
4459 `(("python-setuptools" ,python-setuptools)))
4460 (arguments
4461 `(#:test-target "check"))
4462 (home-page
4463 "https://github.com/html5lib/html5lib-python")
4464 (synopsis
4465 "Python HTML parser based on the WHATWG HTML specifcation")
4466 (description
4467 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4468and written in Python.")
bd3fa666 4469 (license license:expat)))
673ab897
AE
4470
4471(define-public python2-html5lib
4472 (package-with-python2 python-html5lib))
e99f4211
MW
4473
4474(define-public python-urwid
4475 (package
4476 (name "python-urwid")
51ff41f6 4477 (version "1.3.1")
e99f4211
MW
4478 (source
4479 (origin
4480 (method url-fetch)
b97c1bfd 4481 (uri (pypi-uri "urwid" version))
e99f4211
MW
4482 (sha256
4483 (base32
51ff41f6 4484 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4485 (build-system python-build-system)
b97c1bfd
LF
4486 (arguments
4487 `(#:phases
4488 (modify-phases %standard-phases
4489 ;; Disable failing test. Bug filed upstream:
4490 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4491 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4492 (add-after 'unpack 'disable-failing-test
4493 (lambda _
4494 (substitute* "urwid/tests/test_event_loops.py"
4495 (("test_remove_watch_file")
4496 "disable_remove_watch_file")))))))
e99f4211
MW
4497 (native-inputs `(("python-setuptools" ,python-setuptools)))
4498 (home-page "http://urwid.org")
4499 (synopsis "Console user interface library for Python")
4500 (description
4501 "Urwid is a curses-based UI/widget library for Python. It includes many
4502features useful for text console applications.")
3f641af0 4503 (license license:lgpl2.1+)))
e99f4211
MW
4504
4505(define-public python2-urwid
4506 (package-with-python2 python-urwid))
d95a56c6 4507
47d0b292
TS
4508(define-public python-urwidtrees
4509 (package
4510 (name "python-urwidtrees")
37ec4623 4511 (version "1.0.2")
47d0b292
TS
4512 (source
4513 (origin
4514 (method url-fetch)
37ec4623
TS
4515 ;; package author intends on distributing via github rather than pypi:
4516 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4517 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4518 version ".tar.gz"))
4519 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
4520 (sha256
4521 (base32
37ec4623 4522 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
4523 (build-system python-build-system)
4524 (arguments
4525 '(#:tests? #f)) ; no tests
4526 (inputs `(("python-urwid" ,python-urwid)))
4527 (home-page "https://github.com/pazz/urwidtrees")
4528 (synopsis "Tree widgets for urwid")
4529 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4530toolkit. Use it to build trees of widgets.")
3f641af0 4531 (license license:gpl3+)))
47d0b292
TS
4532
4533(define-public python2-urwidtrees
4534 (package-with-python2 python-urwidtrees))
4535
d95a56c6
PAR
4536(define-public python-dbus
4537 (package
4538 (name "python-dbus")
4539 (version "1.2.0")
4540 (source
4541 (origin
4542 (method url-fetch)
4543 (uri (string-append
5cc3096c 4544 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
4545 version ".tar.gz"))
4546 (sha256
4547 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4548 (build-system gnu-build-system)
6717c879
SB
4549 (arguments
4550 '(#:phases
4551 (modify-phases %standard-phases
4552 (add-before
4553 'check 'pre-check
4554 (lambda _
4555 ;; XXX: For the missing '/etc/machine-id'.
4556 (substitute* "test/run-test.sh"
4557 (("DBUS_FATAL_WARNINGS=1")
4558 "DBUS_FATAL_WARNINGS=0"))
4559 #t)))))
d95a56c6
PAR
4560 (native-inputs
4561 `(("pkg-config" ,pkg-config)))
4562 (inputs
4563 `(("python" ,python)
2e88d113 4564 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4565 (synopsis "Python bindings for D-bus")
4566 (description "python-dbus provides bindings for libdbus, the reference
4567implementation of D-Bus.")
4568 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4569 (license license:expat)))
b52af02b
MW
4570
4571(define-public python2-dbus
4572 (package (inherit python-dbus)
4573 (name "python2-dbus")
4574 (inputs `(("python" ,python-2)
4575 ,@(alist-delete "python"
4576 (package-inputs python-dbus)
4577 equal?)))
4578 ;; FIXME: on Python 2, the test_utf8 fails with:
4579 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4580 (arguments `(#:tests? #f))))
a6ac8332
AE
4581
4582(define-public python-apsw
4583 (package
4584 (name "python-apsw")
917708c2 4585 (version "3.9.2-r1")
a6ac8332
AE
4586 (source
4587 (origin
4588 (method url-fetch)
917708c2 4589 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4590 (sha256
4591 (base32
917708c2 4592 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4593 (build-system python-build-system)
4594 (inputs
4595 `(("python-setuptools" ,python-setuptools)
4596 ("sqlite" ,sqlite)))
4597 (arguments
4598 `(#:phases
4599 ;; swap check and install phases
4600 (alist-cons-after
4601 'install 'check
4602 (assoc-ref %standard-phases 'check)
4603 (alist-delete
4604 'check
4605 %standard-phases))))
4606 (home-page "https://github.com/rogerbinns/apsw/")
4607 (synopsis "Another Python SQLite Wrapper")
4608 (description "APSW is a Python wrapper for the SQLite
4609embedded relational database engine. In contrast to other wrappers such as
4610pysqlite it focuses on being a minimal layer over SQLite attempting just to
4611translate the complete SQLite API into Python.")
abde5f37 4612 (license license:zlib)))
a6ac8332
AE
4613
4614(define-public python2-apsw
4615 (package-with-python2 python-apsw))
26b307e2
AE
4616
4617(define-public python-lxml
4618 (package
4619 (name "python-lxml")
d58a3203 4620 (version "3.6.0")
26b307e2
AE
4621 (source
4622 (origin
4623 (method url-fetch)
97bbc480 4624 (uri (pypi-uri "lxml" version))
26b307e2 4625 (sha256
d58a3203
EF
4626 (base32
4627 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
4628 (build-system python-build-system)
4629 (inputs
4630 `(("libxml2" ,libxml2)
4631 ("libxslt" ,libxslt)
4632 ("python-setuptools" ,python-setuptools)))
4633 (home-page "http://lxml.de/")
4634 (synopsis
4635 "Python XML processing library")
4636 (description
4637 "The lxml XML toolkit is a Pythonic binding for the C libraries
4638libxml2 and libxslt.")
3f641af0 4639 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
4640
4641(define-public python2-lxml
4642 (package-with-python2 python-lxml))
4ed20663 4643
b32a1e47
CAW
4644;; beautifulsoup4 has a totally different namespace than 3.x,
4645;; and pypi seems to put it under its own name, so I guess we should too
4646(define-public python-beautifulsoup4
4647 (package
4648 (name "python-beautifulsoup4")
cfbb3b0d 4649 (version "4.5.0")
b32a1e47
CAW
4650 (source
4651 (origin
4652 (method url-fetch)
4653 (uri (pypi-uri "beautifulsoup4" version))
4654 (sha256
4655 (base32
cfbb3b0d 4656 "1rf94360s8pmn37vxqjl0g74krq2p6nj3wbn6pj94ik6ny44q24f"))))
b32a1e47
CAW
4657 (build-system python-build-system)
4658 (home-page
4659 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4660 (synopsis
4661 "Python screen-scraping library")
4662 (description
4663 "Beautiful Soup is a Python library designed for rapidly setting up
4664screen-scraping projects. It offers Pythonic idioms for navigating,
4665searching, and modifying a parse tree, providing a toolkit for
4666dissecting a document and extracting what you need. It automatically
4667converts incoming documents to Unicode and outgoing documents to UTF-8.")
4668 (license license:expat)
4669 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4670
4671(define-public python2-beautifulsoup4
4672 (package
4673 (inherit (package-with-python2
4674 (strip-python2-variant python-beautifulsoup4)))
4675 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
4676
092e86f5
AE
4677(define-public python2-cssutils
4678 (package
4679 (name "python2-cssutils")
58d1d816 4680 (version "1.0.1")
092e86f5
AE
4681 (source
4682 (origin
4683 (method url-fetch)
58d1d816 4684 (uri (pypi-uri "cssutils" version))
092e86f5 4685 (sha256
58d1d816
EF
4686 (base32
4687 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
4688 (build-system python-build-system)
4689 (native-inputs
4690 `(("python2-mock" ,python2-mock) ; for the tests
4691 ("unzip" ,unzip))) ; for unpacking the source
4692 (inputs
4693 `(("python2-setuptools" ,python2-setuptools)))
4694 (arguments
4695 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4696 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4697 ))
092e86f5
AE
4698 (home-page "http://cthedot.de/cssutils/")
4699 (synopsis
4700 "CSS Cascading Style Sheets library for Python")
4701 (description
4702 "Cssutils is a Python package for parsing and building CSS
4703Cascading Style Sheets. Currently it provides a DOM only and no rendering
4704options.")
3f641af0 4705 (license license:lgpl3+)))
880ff77c
AE
4706
4707(define-public python-cssselect
4708 (package
4709 (name "python-cssselect")
d5ccd9ab 4710 (version "0.9.2")
880ff77c
AE
4711 (source
4712 (origin
4713 (method url-fetch)
d5ccd9ab 4714 (uri (pypi-uri "cssselect" version))
880ff77c 4715 (sha256
d5ccd9ab
EF
4716 (base32
4717 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c
AE
4718 (build-system python-build-system)
4719 (inputs
4720 `(("python-setuptools" ,python-setuptools)))
4721 (arguments
4722 ;; tests fail with message
4723 ;; AttributeError: 'module' object has no attribute 'tests'
4724 `(#:tests? #f))
4725 (home-page
4726 "https://pythonhosted.org/cssselect/")
4727 (synopsis
4728 "CSS3 selector parser and translator to XPath 1.0")
4729 (description
4730 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4731them to XPath 1.0 expressions. Such expressions can be used in lxml or
4732another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 4733 (license license:bsd-3)))
880ff77c
AE
4734
4735(define-public python2-cssselect
4736 (package-with-python2 python-cssselect))
60357f99
AE
4737
4738(define-public python-netifaces
4739 (package
4740 (name "python-netifaces")
4741 (version "0.10.4")
4742 (source
4743 (origin
4744 (method url-fetch)
4745 (uri (string-append
4746 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4747 version
4748 ".tar.gz"))
4749 (sha256
4750 (base32
4751 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4752 (build-system python-build-system)
4753 (inputs
4754 `(("python-setuptools" ,python-setuptools)))
4755 (home-page
4756 "https://bitbucket.org/al45tair/netifaces")
4757 (synopsis
4758 "Python module for portable network interface information")
4759 (description
4760 "Netifaces is a Python module providing information on network
4761interfaces in an easy and portable manner.")
4762 (license license:expat)))
4763
4764(define-public python2-netifaces
4765 (package-with-python2 python-netifaces))
92cb152b 4766
32f77c04
RW
4767(define-public python-networkx
4768 (package
4769 (name "python-networkx")
a4d9609c 4770 (version "1.11")
32f77c04
RW
4771 (source
4772 (origin
4773 (method url-fetch)
a4d9609c 4774 (uri (pypi-uri "networkx" version))
32f77c04 4775 (sha256
a4d9609c 4776 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
4777 (build-system python-build-system)
4778 ;; python-decorator is needed at runtime
4779 (propagated-inputs
4780 `(("python-decorator" ,python-decorator)))
4781 (native-inputs
4782 `(("python-setuptools" ,python-setuptools)
4783 ("python-nose" ,python-nose)))
4784 (home-page "http://networkx.github.io/")
4785 (synopsis "Python module for creating and manipulating graphs and networks")
4786 (description
4787 "NetworkX is a Python package for the creation, manipulation, and study
4788of the structure, dynamics, and functions of complex networks.")
3f641af0 4789 (license license:bsd-3)))
32f77c04
RW
4790
4791(define-public python2-networkx
4792 (package-with-python2 python-networkx))
4793
92cb152b
RW
4794(define-public snakemake
4795 (package
4796 (name "snakemake")
4797 (version "3.2.1")
4798 (source
4799 (origin
4800 (method url-fetch)
4801 (uri (string-append
4802 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4803 version ".tar.gz"))
4804 (sha256
4805 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4806 (build-system python-build-system)
4807 (inputs `(("python-setuptools" ,python-setuptools)))
4808 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4809 (synopsis "Python-based execution environment for make-like workflows")
4810 (description
4811 "Snakemake aims to reduce the complexity of creating workflows by
4812providing a clean and modern domain specific specification language (DSL) in
4813Python style, together with a fast and comfortable execution environment.")
4814 (license license:expat)))
a1920bc9 4815
35de1fbd
RW
4816(define-public python-seaborn
4817 (package
4818 (name "python-seaborn")
fc899d4f 4819 (version "0.7.0")
35de1fbd
RW
4820 (source
4821 (origin
4822 (method url-fetch)
fc899d4f 4823 (uri (pypi-uri "seaborn" version))
35de1fbd 4824 (sha256
fc899d4f 4825 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
4826 (build-system python-build-system)
4827 (propagated-inputs
4828 `(("python-pandas" ,python-pandas)
4829 ("python-matplotlib" ,python-matplotlib)
4830 ("python-scipy" ,python-scipy)))
35de1fbd
RW
4831 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4832 (synopsis "Statistical data visualization")
4833 (description
4834 "Seaborn is a library for making attractive and informative statistical
4835graphics in Python. It is built on top of matplotlib and tightly integrated
4836with the PyData stack, including support for numpy and pandas data structures
4837and statistical routines from scipy and statsmodels.")
3f641af0 4838 (license license:bsd-3)
fc899d4f 4839 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
4840
4841(define-public python2-seaborn
fc899d4f
EF
4842 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
4843 (package
4844 (inherit base)
4845 (propagated-inputs `(("python2-pytz" ,python2-pytz)
4846 ,@(package-propagated-inputs base)))
4847 (native-inputs `(("python2-setuptools" ,python2-setuptools)
4848 ,@(package-native-inputs base))))))
35de1fbd 4849
90fc547f
RW
4850(define-public python-sympy
4851 (package
4852 (name "python-sympy")
4853 (version "0.7.6")
4854 (source
4855 (origin
4856 (method url-fetch)
4857 (uri (string-append
4858 "https://github.com/sympy/sympy/releases/download/sympy-"
4859 version "/sympy-" version ".tar.gz"))
4860 (sha256
4861 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4862 (build-system python-build-system)
4863 (native-inputs
4864 `(("python-setuptools" ,python-setuptools)))
4865 (home-page "http://www.sympy.org/")
4866 (synopsis "Python library for symbolic mathematics")
4867 (description
4868 "SymPy is a Python library for symbolic mathematics. It aims to become a
4869full-featured computer algebra system (CAS) while keeping the code as simple
4870as possible in order to be comprehensible and easily extensible.")
3f641af0 4871 (license license:bsd-3)))
90fc547f
RW
4872
4873(define-public python2-sympy
4874 (package-with-python2 python-sympy))
4875
a1920bc9
FB
4876(define-public python-testlib
4877 (package
4878 (name "python-testlib")
4879 (version "0.6.5")
4880 (source
4881 (origin
4882 (method url-fetch)
4883 (uri (string-append
4884 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4885 version ".zip"))
4886 (sha256
4887 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4888 (build-system python-build-system)
4889 (inputs
4890 `(("python-setuptools" ,python-setuptools)))
4891 (native-inputs
4892 `(("unzip" ,unzip)))
4893 (arguments
4894 `(#:phases
4895 (alist-replace
4896 'unpack
4897 (lambda* (#:key inputs outputs #:allow-other-keys)
4898 (let ((unzip (string-append (assoc-ref inputs "unzip")
4899 "/bin/unzip"))
4900 (source (assoc-ref inputs "source")))
4901 (and (zero? (system* unzip source))
4902 (chdir (string-append "testlib-" ,version)))))
4903 %standard-phases)))
4904 (synopsis "Python micro test suite harness")
4905 (description "A micro unittest suite harness for Python.")
4906 (home-page "https://github.com/trentm/testlib")
1cb9c006 4907 (license license:expat)))
a1920bc9
FB
4908
4909(define-public python2-testlib
4910 (package-with-python2 python-testlib))
db62afa5
LC
4911
4912(define-public python2-xlib
4913 (package
4914 (name "python2-xlib")
4915 (version "0.14")
4916 (source (origin
4917 (method url-fetch)
de67e922
LF
4918 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
4919 "/" version "/"
db62afa5
LC
4920 "python-xlib-" version ".tar.gz"))
4921 (sha256
4922 (base32
4923 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4924 (build-system python-build-system)
4925 (arguments
4926 `(#:python ,python-2 ;Python 2 only
4927 #:tests? #f)) ;no tests
4928 (inputs
4929 `(("python-setuptools" ,python-setuptools)))
4930 (home-page "http://python-xlib.sourceforge.net/")
4931 (synopsis "Python X11 client library")
4932 (description
4933 "The Python X Library is intended to be a fully functional X client
4934library for Python programs. It is useful to implement low-level X clients.
4935It is written entirely in Python.")
3f641af0 4936 (license license:gpl2+)))
0234ca06
DT
4937
4938(define-public python-singledispatch
4939 (package
4940 (name "python-singledispatch")
4941 (version "3.4.0.3")
4942 (source
4943 (origin
4944 (method url-fetch)
bdb67d84 4945 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
4946 (sha256
4947 (base32
4948 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4949 (build-system python-build-system)
4950 (native-inputs
4951 `(("python-setuptools" ,python-setuptools)))
bdb67d84 4952 (inputs
0234ca06
DT
4953 `(("python-six" ,python-six)))
4954 (home-page
4955 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4956 (synopsis "Backport of singledispatch feature from Python 3.4")
4957 (description
4958 "This library brings functools.singledispatch from Python 3.4 to Python
49592.6-3.3.")
4960 (license license:expat)))
4961
4962(define-public python2-singledispatch
4963 (package-with-python2 python-singledispatch))
feaae484 4964
310d218f
RW
4965(define-public python-tornado
4966 (package
4967 (name "python-tornado")
a724924b 4968 (version "4.3")
310d218f
RW
4969 (source
4970 (origin
4971 (method url-fetch)
a724924b 4972 (uri (pypi-uri "tornado" version))
310d218f 4973 (sha256
a724924b 4974 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 4975 (build-system python-build-system)
310d218f 4976 (native-inputs
b455439b
EF
4977 `(("python-certifi" ,python-certifi)))
4978 (inputs
4979 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 4980 (home-page "http://www.tornadoweb.org/")
310d218f
RW
4981 (synopsis "Python web framework and asynchronous networking library")
4982 (description
4983 "Tornado is a Python web framework and asynchronous networking library,
4984originally developed at FriendFeed. By using non-blocking network I/O,
4985Tornado can scale to tens of thousands of open connections, making it ideal
4986for long polling, WebSockets, and other applications that require a long-lived
4987connection to each user.")
3f641af0 4988 (license license:asl2.0)
b455439b 4989 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
4990
4991(define-public python2-tornado
b455439b 4992 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f
RW
4993 (package (inherit tornado)
4994 (inputs
4995 `(("python2-backport-ssl-match-hostname"
4996 ,python2-backport-ssl-match-hostname)
b455439b
EF
4997 ("python2-singledispatch" ,python2-singledispatch)
4998 ,@(package-inputs tornado)))
4999 (native-inputs
5000 `(("python2-setuptools" ,python2-setuptools)
5001 ,@(package-native-inputs tornado))))))
310d218f 5002
6b59fc10
EF
5003;; the python- version can be removed with python-3.5
5004(define-public python-backports-abc
5005 (package
5006 (name "python-backports-abc")
5007 (version "0.4")
5008 (source
5009 (origin
5010 (method url-fetch)
5011 (uri (pypi-uri "backports_abc" version))
5012 (sha256
5013 (base32
5014 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5015 (build-system python-build-system)
5016 (inputs
5017 `(("python-setuptools" ,python-setuptools)))
5018 (home-page "https://github.com/cython/backports_abc")
66e07664 5019 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5020 (description
5021 "Python-backports-abc provides a backport of additions to the
5022'collections.abc' module in Python-3.5.")
3f641af0 5023 (license license:psfl)))
6b59fc10
EF
5024
5025(define-public python2-backports-abc
5026 (package-with-python2 python-backports-abc))
5027
feaae484
SB
5028(define-public python-waf
5029 (package
5030 (name "python-waf")
f0e8d85e 5031 (version "1.9.1")
feaae484
SB
5032 (source (origin
5033 (method url-fetch)
5034 (uri (string-append "https://waf.io/"
5035 "waf-" version ".tar.bz2"))
5036 (sha256
5037 (base32
f0e8d85e 5038 "1nc4qaqx2vsanlpp9mcwvf91xjqpkvcc6fcxd5sb4fwvaxamw5v6"))))
feaae484
SB
5039 (build-system python-build-system)
5040 (arguments
5041 '(#:phases
5042 (modify-phases %standard-phases
5043 (replace 'build
5044 (lambda _
5045 (zero? (begin
5046 (system* "python" "waf-light" "configure")
5047 (system* "python" "waf-light" "build")))))
5048 (replace 'check
5049 (lambda _
5050 (zero? (system* "python" "waf" "--version"))))
5051 (replace 'install
5052 (lambda _
5053 (copy-file "waf" %output))))))
5054 (home-page "https://waf.io/")
5055 (synopsis "Python-based build system")
5056 (description
5057 "Waf is a Python-based framework for configuring, compiling and installing
5058applications.")
3f641af0 5059 (license license:bsd-3)))
feaae484
SB
5060
5061(define-public python2-waf
5062 (package-with-python2 python-waf))
45203542
RW
5063
5064(define-public python-pyzmq
5065 (package
5066 (name "python-pyzmq")
3655ee76 5067 (version "15.1.0")
45203542
RW
5068 (source
5069 (origin
5070 (method url-fetch)
3655ee76 5071 (uri (pypi-uri "pyzmq" version))
45203542 5072 (sha256
3655ee76 5073 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5074 (build-system python-build-system)
5075 (arguments
5076 `(#:configure-flags
5077 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5078 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5079 ;; --inplace' for 'python setup.py test' to work.
5080 #:tests? #f))
5081 (inputs
5082 `(("zeromq" ,zeromq)))
5083 (native-inputs
5084 `(("pkg-config" ,pkg-config)
5085 ("python-nose" ,python-nose)
5086 ("python-setuptools" ,python-setuptools)))
5087 (home-page "http://github.com/zeromq/pyzmq")
5088 (synopsis "Python bindings for 0MQ")
5089 (description
5090 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5091 (license license:bsd-4)))
45203542
RW
5092
5093(define-public python2-pyzmq
5094 (package-with-python2 python-pyzmq))
d889e6c4
CR
5095
5096(define-public python-pep8
5097 (package
5098 (name "python-pep8")
db251311 5099 (version "1.7.0")
d889e6c4
CR
5100 (source
5101 (origin
5102 (method url-fetch)
db251311 5103 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5104 (sha256
5105 (base32
db251311 5106 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4
CR
5107 (build-system python-build-system)
5108 (inputs
5109 `(("python-setuptools" ,python-setuptools)))
5110 (home-page "http://pep8.readthedocs.org/")
5111 (synopsis "Python style guide checker")
5112 (description
5113 "This tools checks Python code against some of the style conventions in
5114PEP 8.")
5115 (license license:expat)))
5116
5117(define-public python2-pep8
5118 (package-with-python2 python-pep8))
e31d7f44
CR
5119
5120(define-public python-pyflakes
5121 (package
5122 (name "python-pyflakes")
2abc3972 5123 (version "1.0.0")
e31d7f44
CR
5124 (source
5125 (origin
5126 (method url-fetch)
2abc3972 5127 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5128 (sha256
5129 (base32
2abc3972 5130 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5131 (build-system python-build-system)
5132 (inputs
5133 `(("python-setuptools" ,python-setuptools)))
5134 (home-page
5135 "https://github.com/pyflakes/pyflakes")
5136 (synopsis "Passive checker of Python programs")
5137 (description
5138 "Pyflakes statically checks Python source code for common errors.")
5139 (license license:expat)))
a59e017c 5140
7261d9eb
CR
5141(define-public python2-pyflakes
5142 (package-with-python2 python-pyflakes))
5143
a59e017c
CR
5144(define-public python-mccabe
5145 (package
5146 (name "python-mccabe")
c6ebd40d 5147 (version "0.4.0")
a59e017c
CR
5148 (source
5149 (origin
5150 (method url-fetch)
c6ebd40d 5151 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5152 (sha256
5153 (base32
c6ebd40d 5154 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c
CR
5155 (build-system python-build-system)
5156 (inputs
c6ebd40d
EF
5157 `(("python-pytest" ,python-pytest)
5158 ("python-pytest-runner" ,python-pytest-runner)
5159 ("python-setuptools" ,python-setuptools)))
a59e017c
CR
5160 (home-page "https://github.com/flintwork/mccabe")
5161 (synopsis "McCabe checker, plugin for flake8")
5162 (description
5163 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5164complexity of Python source code.")
7362371d 5165 (license license:expat)))
a59e017c
CR
5166
5167(define-public python2-mccabe
5168 (package-with-python2 python-mccabe))
e8df8f47 5169
7477fbb1
CR
5170(define-public python-mccabe-0.2.1
5171 (package (inherit python-mccabe)
5172 (version "0.2.1")
5173 (source
5174 (origin
5175 (method url-fetch)
5176 (uri (pypi-uri "mccabe" version))
5177 (sha256
5178 (base32
c6ebd40d 5179 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
b3546174 5180 (inputs `(("python-setuptools" ,python-setuptools)))))
7477fbb1
CR
5181
5182(define-public python2-mccabe-0.2.1
5183 (package-with-python2 python-mccabe-0.2.1))
5184
e8df8f47
CR
5185;; Flake8 2.4.1 requires an older version of pep8.
5186;; This should be removed ASAP.
5187(define-public python-pep8-1.5.7
5188 (package (inherit python-pep8)
5189 (version "1.5.7")
5190 (source
5191 (origin
5192 (method url-fetch)
5193 (uri (string-append
5194 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5195 version
5196 ".tar.gz"))
5197 (sha256
5198 (base32
5199 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5200
5201(define-public python2-pep8-1.5.7
5202 (package-with-python2 python-pep8-1.5.7))
5203
5204;; Flake8 2.4.1 requires an older version of pyflakes.
5205;; This should be removed ASAP.
5206(define-public python-pyflakes-0.8.1
5207 (package (inherit python-pyflakes)
5208 (version "0.8.1")
5209 (source
5210 (origin
5211 (method url-fetch)
5212 (uri (string-append
5213 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5214 version
5215 ".tar.gz"))
5216 (sha256
5217 (base32
5218 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5219
5220(define-public python2-pyflakes-0.8.1
7261d9eb 5221 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5222
5223(define-public python-flake8
5224 (package
5225 (name "python-flake8")
43789136 5226 (version "2.5.4")
e8df8f47
CR
5227 (source
5228 (origin
5229 (method url-fetch)
1b995533 5230 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5231 (sha256
5232 (base32
43789136 5233 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
e8df8f47
CR
5234 (build-system python-build-system)
5235 (inputs
5236 `(("python-setuptools" ,python-setuptools)
43789136
EF
5237 ("python-pep8" ,python-pep8)
5238 ("python-pyflakes" ,python-pyflakes)
e8df8f47
CR
5239 ("python-mccabe" ,python-mccabe)
5240 ("python-mock" ,python-mock)
5241 ("python-nose" ,python-nose)))
5242 (home-page "https://gitlab.com/pycqa/flake8")
5243 (synopsis
5244 "The modular source code checker: pep8, pyflakes and co")
5245 (description
5246 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5247 (license license:expat)))
5248
5249(define-public python2-flake8
5250 (package-with-python2 python-flake8))
61b9ac53 5251
abf21efc
CR
5252;; This will only be needed by the python-hacking package and will not be
5253;; necessary once python-hacking > 0.10.2 is released.
5254(define-public python-flake8-2.2.4
5255 (package (inherit python-flake8)
5256 (inputs
5257 `(("python-setuptools" ,python-setuptools)
5258 ("python-pep8" ,python-pep8-1.5.7)
5259 ("python-pyflakes" ,python-pyflakes-0.8.1)
5260 ("python-mccabe" ,python-mccabe-0.2.1)
5261 ("python-mock" ,python-mock)
5262 ("python-nose" ,python-nose)))
5263 (version "2.2.4")
5264 (source
5265 (origin
5266 (method url-fetch)
5267 (uri (pypi-uri "flake8" version))
5268 (sha256
5269 (base32
5270 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5271
5272(define-public python2-flake8-2.2.4
5273 (package-with-python2 python-flake8-2.2.4))
5274
61b9ac53
FB
5275(define-public python-mistune
5276 (package
5277 (name "python-mistune")
5278 (version "0.7")
5279 (source
5280 (origin
5281 (method url-fetch)
5282 (uri (string-append
5283 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5284 version
5285 ".tar.gz"))
5286 (sha256
5287 (base32
5288 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5289 (build-system python-build-system)
5290 (inputs
5291 `(("python-setuptools" ,python-setuptools)
5292 ("python-nose" ,python-nose)
5293 ("python-cython" ,python-cython)))
5294 (home-page "https://github.com/lepture/mistune")
5295 (synopsis "Markdown parser in pure Python")
5296 (description "This package provides a fast markdown parser in pure
5297Python.")
3f641af0 5298 (license license:bsd-3)))
61b9ac53
FB
5299
5300(define-public python2-mistune
5301 (package-with-python2 python-mistune))
6d992d07 5302
b9893908
EE
5303(define-public python-markdown
5304 (package
5305 (name "python-markdown")
5306 (version "2.6.5")
5307 (source
5308 (origin
5309 (method url-fetch)
5310 (uri (pypi-uri "Markdown" version))
5311 (sha256
5312 (base32
5313 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5314 (build-system python-build-system)
5315 (arguments
5316 `(#:phases
5317 (modify-phases %standard-phases
5318 (replace 'check
5319 (lambda _
5320 (zero? (system* "python" "run-tests.py")))))))
5321 (native-inputs
5322 `(("python-nose" ,python-nose)
5323 ("python-pyyaml" ,python-pyyaml)))
5324 (home-page "https://pythonhosted.org/Markdown/")
5325 (synopsis "Python implementation of Markdown")
5326 (description
5327 "This package provides a Python implementation of John Gruber's
5328Markdown. The library features international input, various Markdown
5329extensions, and several HTML output formats. A command line wrapper
5330markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5331 (license license:bsd-3)))
b9893908
EE
5332
5333(define-public python2-markdown
5334 (package-with-python2 python-markdown))
5335
6d992d07
FB
5336(define-public python-ptyprocess
5337 (package
5338 (name "python-ptyprocess")
5339 (version "0.5")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (string-append
5344 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5345 version ".tar.gz"))
5346 (sha256
5347 (base32
5348 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5349 (build-system python-build-system)
5350 (inputs
5351 `(("python-setuptools" ,python-setuptools)
5352 ("python-nose" ,python-nose)))
5353 (arguments
5354 `(#:phases
5355 (modify-phases %standard-phases
5356 (replace 'check
5357 (lambda _
5358 (zero? (system* "nosetests")))))))
5359 (home-page "https://github.com/pexpect/ptyprocess")
5360 (synopsis "Run a subprocess in a pseudo terminal")
5361 (description
5362 "This package provides a Python library used to launch a subprocess in a
5363pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5364 (license license:isc)))
6d992d07
FB
5365
5366(define-public python2-ptyprocess
5367 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5368
5369(define-public python-terminado
5370 (package
5371 (name "python-terminado")
783fb0a3 5372 (version "0.6")
4aadb1df
FB
5373 (source
5374 (origin
5375 (method url-fetch)
783fb0a3 5376 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5377 (sha256
5378 (base32
783fb0a3 5379 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5380 (build-system python-build-system)
5381 (propagated-inputs
5382 `(("python-tornado" ,python-tornado)
5383 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5384 (native-inputs
5385 `(("python-nose" ,python-nose)))
4aadb1df
FB
5386 (arguments
5387 `(#:phases
5388 (modify-phases %standard-phases
5389 (replace 'check
5390 (lambda _
5391 (zero? (system* "nosetests")))))))
5392 (home-page "https://github.com/takluyver/terminado")
5393 (synopsis "Terminals served to term.js using Tornado websockets")
5394 (description "This package provides a Tornado websocket backend for the
5395term.js Javascript terminal emulator library.")
3f641af0 5396 (license license:bsd-2)
783fb0a3 5397 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5398
5399(define-public python2-terminado
783fb0a3 5400 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5401 (package (inherit terminado)
783fb0a3
EF
5402 (propagated-inputs
5403 `(("python2-backport-ssl-match-hostname"
5404 ,python2-backport-ssl-match-hostname)
5405 ,@(package-propagated-inputs terminado)))
5406 (native-inputs
5407 `(("python2-setuptools" ,python2-setuptools)
5408 ,@(package-native-inputs terminado))))))
5faa5ce4 5409
d582eaac
SB
5410(define-public python-fonttools
5411 (package
5412 (name "python-fonttools")
5413 (version "2.5")
5414 (source (origin
5415 (method url-fetch)
5416 (uri (string-append
5417 "https://pypi.python.org/packages/source/F/FontTools/"
5418 "fonttools-" version ".tar.gz"))
5419 (sha256
5420 (base32
5421 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5422 (build-system python-build-system)
5423 (arguments '(#:test-target "check"))
5424 (propagated-inputs
5425 ;; XXX: module not found if setuptools is not available.
5426 `(("python-setuptools" ,python-setuptools)))
5427 (home-page "http://github.com/behdad/fonttools")
5428 (synopsis "Tools to manipulate font files")
5429 (description
5430 "FontTools/TTX is a library to manipulate font files from Python. It
5431supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5432of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5433also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5434from an XML-based format.")
3f641af0
DC
5435 (license (license:non-copyleft
5436 "file://LICENSE.txt"
5437 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5438
5439(define-public python2-fonttools
5440 (package-with-python2 python-fonttools))
75710da6 5441
5faa5ce4
RW
5442(define-public python-ly
5443 (package
5444 (name "python-ly")
5135354f 5445 (version "0.9.4")
5faa5ce4
RW
5446 (source
5447 (origin
5448 (method url-fetch)
5135354f
RW
5449 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5450 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5451 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5452 (sha256
5453 (base32
5135354f 5454 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4
RW
5455 (build-system python-build-system)
5456 (native-inputs
5457 `(("python-setuptools" ,python-setuptools)))
5458 (synopsis "Tool and library for manipulating LilyPond files")
5459 (description "This package provides a Python library to parse, manipulate
5460or create documents in LilyPond format. A command line program ly is also
5461provided that can be used to do various manipulations with LilyPond files.")
5462 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5463 (license license:gpl2+)))
7e7b27d9
CR
5464
5465(define-public python-appdirs
5466 (package
5467 (name "python-appdirs")
5468 (version "1.4.0")
5469 (source
5470 (origin
5471 (method url-fetch)
5472 (uri (string-append
5473 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5474 version
5475 ".tar.gz"))
5476 (sha256
5477 (base32
5478 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5479 (build-system python-build-system)
5480 (inputs
5481 `(("python-setuptools" ,python-setuptools)))
5482 (home-page "http://github.com/ActiveState/appdirs")
5483 (synopsis
5484 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5485 (description
5486 "This module provides a portable way of finding out where user data
5487should be stored on various operating systems.")
5488 (license license:expat)))
5489
5490(define-public python2-appdirs
5491 (package-with-python2 python-appdirs))
89b2e0b0
LF
5492
5493(define-public python-llfuse
5494 (package
5495 (name "python-llfuse")
e36ace36 5496 (version "1.1.1")
89b2e0b0
LF
5497 (source (origin
5498 (method url-fetch)
5499 (uri (string-append
5500 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5501 "llfuse-" version ".tar.bz2"))
5502 (sha256
5503 (base32
e36ace36 5504 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
5505 (build-system python-build-system)
5506 (inputs
5507 `(("fuse" ,fuse)
5508 ("attr" ,attr)))
5509 (native-inputs
5510 `(("pkg-config" ,pkg-config)
5511 ("python-setuptools" ,python-setuptools)))
5512 (synopsis "Python bindings for FUSE")
5513 (description
5514 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5515 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 5516 (license license:lgpl2.0+)
cd0569c4 5517 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
5518
5519(define-public python2-llfuse
cd0569c4
LF
5520 (package (inherit (package-with-python2
5521 (strip-python2-variant python-llfuse)))
5522 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5523
5524;; For attic-0.16
5525(define-public python-llfuse-0.41
5526 (package (inherit python-llfuse)
229b3661 5527 (version "0.41.1")
cd0569c4
LF
5528 (source (origin
5529 (method url-fetch)
5530 (uri (string-append
5531 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5532 "llfuse-" version ".tar.bz2"))
5533 (sha256
5534 (base32
229b3661 5535 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
5536 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5537 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 5538 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
5539
5540(define-public python-msgpack
5541 (package
5542 (name "python-msgpack")
aed625bd 5543 (version "0.4.8")
641c9871
LF
5544 (source (origin
5545 (method url-fetch)
ae831df4 5546 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
5547 (sha256
5548 (base32
aed625bd 5549 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 5550 (build-system python-build-system)
641c9871
LF
5551 (synopsis "MessagePack (de)serializer")
5552 (description "MessagePack is a fast, compact binary serialization format,
5553suitable for similar data to JSON. This package provides CPython bindings for
5554reading and writing MessagePack data.")
5555 (home-page "https://pypi.python.org/pypi/msgpack-python/")
3f641af0 5556 (license license:asl2.0)
bd74be7b
LF
5557 (properties `((python2-variant . ,(delay python2-msgpack))))))
5558
5559(define-public python2-msgpack
5560 (package (inherit (package-with-python2
5561 (strip-python2-variant python-msgpack)))
5562 (native-inputs
5563 `(("python2-setuptools" ,python2-setuptools)))))
641c9871
LF
5564
5565(define-public python2-msgpack
5566 (package-with-python2 python-msgpack))
6e5e39f4
CR
5567
5568(define-public python-netaddr
5569 (package
5570 (name "python-netaddr")
5571 (version "0.7.18")
5572 (source
5573 (origin
5574 (method url-fetch)
5575 (uri (string-append
5576 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5577 version
5578 ".tar.gz"))
5579 (sha256
5580 (base32
5581 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5582 (build-system python-build-system)
5583 (arguments `(#:tests? #f)) ;; No tests.
5584 (inputs
5585 `(("python-setuptools" ,python-setuptools)))
5586 (home-page "https://github.com/drkjam/netaddr/")
5587 (synopsis "Pythonic manipulation of network addresses")
5588 (description
5589 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5590and MAC network addresses.")
3f641af0 5591 (license license:bsd-3)))
6e5e39f4
CR
5592
5593(define-public python2-netaddr
5594 (package-with-python2 python-netaddr))
8c692a52
CR
5595
5596(define-public python-wrapt
5597 (package
5598 (name "python-wrapt")
5599 (version "1.10.5")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (string-append
5604 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5605 version
5606 ".tar.gz"))
5607 (sha256
5608 (base32
5609 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5610 (build-system python-build-system)
5611 (arguments
5612 ;; Tests are not included in the tarball, they are only available in the
5613 ;; git repository.
5614 `(#:tests? #f))
5615 (inputs
5616 `(("python-setuptools" ,python-setuptools)))
5617 (home-page "https://github.com/GrahamDumpleton/wrapt")
5618 (synopsis "Module for decorators, wrappers and monkey patching")
5619 (description
5620 "The aim of the wrapt module is to provide a transparent object proxy for
5621 Python, which can be used as the basis for the construction of function
5622 wrappers and decorator functions.")
3f641af0 5623 (license license:bsd-2)))
8c692a52
CR
5624
5625(define-public python2-wrapt
5626 (package-with-python2 python-wrapt))
b85c85be
CR
5627
5628(define-public python-iso8601
5629 (package
5630 (name "python-iso8601")
fe84bc9a 5631 (version "0.1.11")
b85c85be
CR
5632 (source
5633 (origin
5634 (method url-fetch)
fe84bc9a 5635 (uri (pypi-uri "iso8601" version))
b85c85be 5636 (sha256
fe84bc9a
EF
5637 (base32
5638 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be
CR
5639 (build-system python-build-system)
5640 (inputs
5641 `(("python-setuptools" ,python-setuptools)))
5642 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5643 (synopsis "Module to parse ISO 8601 dates")
5644 (description
5645 "This module parses the most common forms of ISO 8601 date strings (e.g.
5646@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5647 (license license:expat)))
5648
5649(define-public python2-iso8601
5650 (package-with-python2 python-iso8601))
5e412b63
CR
5651
5652(define-public python-monotonic
5653 (package
5654 (name "python-monotonic")
5655 (version "0.3")
5656 (source
5657 (origin
5658 (method url-fetch)
5659 (uri (string-append
5660 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5661 version
5662 ".tar.gz"))
5663 (sha256
5664 (base32
5665 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5666 (build-system python-build-system)
5667 (inputs
5668 `(("python-setuptools" ,python-setuptools)))
5669 (home-page "https://github.com/atdt/monotonic")
5670 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5671 (description
5672 "This module provides a monotonic() function which returns the value (in
5673fractional seconds) of a clock which never goes backwards.")
3f641af0 5674 (license license:asl2.0)))
5e412b63
CR
5675
5676(define-public python2-monotonic
5677 (package-with-python2 python-monotonic))
de34afac
CR
5678
5679(define-public python-webob
5680 (package
5681 (name "python-webob")
b8834c21 5682 (version "1.5.1")
de34afac
CR
5683 (source
5684 (origin
5685 (method url-fetch)
b8834c21 5686 (uri (pypi-uri "WebOb" version))
de34afac
CR
5687 (sha256
5688 (base32
b8834c21 5689 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
5690 (build-system python-build-system)
5691 (inputs
5692 `(("python-nose" ,python-nose)
5693 ("python-setuptools" ,python-setuptools)))
5694 (home-page "http://webob.org/")
5695 (synopsis "WSGI request and response object")
5696 (description
5697 "WebOb provides wrappers around the WSGI request environment, and an
5698object to help create WSGI responses.")
5699 (license license:expat)))
5700
5701(define-public python2-webob
5702 (package-with-python2 python-webob))
350ba0a3 5703
02a8a187
BW
5704(define-public python-xlrd
5705 (package
5706 (name "python-xlrd")
5707 (version "0.9.4")
5708 (source (origin
5709 (method url-fetch)
5710 (uri (string-append "https://pypi.python.org/packages/source/x/"
5711 "xlrd/xlrd-" version ".tar.gz"))
5712 (sha256
5713 (base32
5714 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5715 (build-system python-build-system)
5716 (arguments
5717 `(#:phases
5718 (modify-phases %standard-phases
5719 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5720 ;; run tests instead for now.
5721 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5722 (native-inputs `(("python-nose" ,python-nose)
5723 ("python-setuptools" ,python-setuptools)))
5724 (home-page "http://www.python-excel.org/")
5725 (synopsis "Library for extracting data from Excel files")
5726 (description "This packages provides a library to extract data from
c598e35c 5727spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
5728@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5729Unicode-aware. It is not intended as an end-user tool.")
3f641af0 5730 (license license:bsd-3)))
02a8a187
BW
5731
5732(define-public python2-xlrd
5733 (package-with-python2 python-xlrd))
5734
350ba0a3
CR
5735(define-public python-prettytable
5736 (package
5737 (name "python-prettytable")
5738 (version "0.7.2")
5739 (source
5740 (origin
5741 (method url-fetch)
5742 (uri (string-append
5743 "https://pypi.python.org/packages/source/P/PrettyTable/"
5744 "prettytable-" version ".tar.bz2"))
5745 (sha256
5746 (base32
5747 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5748 (build-system python-build-system)
5749 (inputs
5750 `(("python-setuptools" ,python-setuptools)))
5751 (home-page "http://code.google.com/p/prettytable/")
5752 (synopsis "Display tabular data in an ASCII table format")
5753 (description
5754 "A library designed to represent tabular data in visually appealing ASCII
5755tables. PrettyTable allows for selection of which columns are to be printed,
5756independent alignment of columns (left or right justified or centred) and
5757printing of sub-tables by specifying a row range.")
3f641af0 5758 (license license:bsd-3)))
350ba0a3
CR
5759
5760(define-public python2-prettytable
5761 (package-with-python2 python-prettytable))
7a8ac75a 5762
9f8ee3fe
RW
5763(define-public python-tables
5764 (package
5765 (name "python-tables")
5766 (version "3.2.2")
5767 (source
5768 (origin
5769 (method url-fetch)
5770 (uri (pypi-uri "tables" version))
5771 (sha256
5772 (base32
5773 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
5774 (build-system python-build-system)
5775 (arguments
5776 `(;; FIXME: python-build-system does not pass configure-flags to "build"
5777 ;; or "check", so we must override the build and check phases.
5778 #:phases
5779 (modify-phases %standard-phases
5780 (add-after 'unpack 'use-gcc
5781 (lambda _
5782 (substitute* "setup.py"
5783 (("compiler = new_compiler\\(\\)" line)
5784 (string-append line
5785 "\ncompiler.set_executables(compiler='gcc',"
5786 "compiler_so='gcc',"
5787 "linker_exe='gcc',"
5788 "linker_so='gcc -shared')")))
5789 #t))
5790 (replace 'build
5791 (lambda* (#:key inputs #:allow-other-keys)
5792 (zero? (system* "python" "setup.py" "build"
5793 (string-append "--hdf5="
5794 (assoc-ref inputs "hdf5"))))))
5795 (replace 'check
5796 (lambda* (#:key inputs #:allow-other-keys)
5797 (zero? (system* "python" "setup.py" "check"
5798 (string-append "--hdf5="
5799 (assoc-ref inputs "hdf5")))))))))
5800 (propagated-inputs
5801 `(("python-numexpr" ,python-numexpr)
5802 ("python-numpy" ,python-numpy)))
5803 (native-inputs
5804 `(("python-setuptools" ,python-setuptools)
5805 ("python-cython" ,python-cython)
5806 ("pkg-config" ,pkg-config)))
5807 (inputs
5808 `(("hdf5" ,hdf5)
5809 ("bzip2" ,bzip2)
5810 ("zlib" ,zlib)))
5811 (home-page "http://www.pytables.org/")
5812 (synopsis "Hierarchical datasets for Python")
5813 (description "PyTables is a package for managing hierarchical datasets and
5814designed to efficently cope with extremely large amounts of data.")
3f641af0 5815 (license license:bsd-3)))
9f8ee3fe
RW
5816
5817(define-public python2-tables
5818 (package-with-python2 python-tables))
5819
7a8ac75a
RW
5820(define-public python-pyasn1
5821 (package
5822 (name "python-pyasn1")
5823 (version "0.1.8")
5824 (source
5825 (origin
5826 (method url-fetch)
5827 (uri (string-append "https://pypi.python.org/packages/source/p/"
5828 "pyasn1/pyasn1-" version ".tar.gz"))
5829 (sha256
5830 (base32
5831 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5832 (build-system python-build-system)
5833 (home-page "http://pyasn1.sourceforge.net/")
5834 (synopsis "ASN.1 types and codecs")
5835 (description
5836 "This is an implementation of ASN.1 types and codecs in Python. It is
5837suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 5838 (license license:bsd-2)))
7a8ac75a
RW
5839
5840(define-public python2-pyasn1
5841 (package-with-python2 python-pyasn1))
9a49a535 5842
5988c299
EF
5843(define-public python-pyasn1-modules
5844 (package
5845 (name "python-pyasn1-modules")
5846 (version "0.0.8")
5847 (source
5848 (origin
5849 (method url-fetch)
5850 (uri (pypi-uri "pyasn1-modules" version))
5851 (sha256
5852 (base32
5853 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
5854 (build-system python-build-system)
5855 (native-inputs
5856 `(("python-setuptools" ,python-setuptools)))
5857 (propagated-inputs
5858 `(("python-pyasn1" ,python-pyasn1)))
5859 (home-page "http://sourceforge.net/projects/pyasn1/")
5860 (synopsis "ASN.1 codec implementations")
5861 (description
5862 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
5863implementations of ASN.1-based codecs and protocols.")
3f641af0 5864 (license license:bsd-3)))
5988c299
EF
5865
5866(define-public python2-pyasn1-modules
5867 (package-with-python2 python-pyasn1-modules))
5868
520af157 5869(define-public python-ipaddress
9a49a535 5870 (package
520af157
DC
5871 (name "python-ipaddress")
5872 (version "1.0.16")
5873 (source (origin
5874 (method url-fetch)
5875 (uri (pypi-uri "ipaddress" version))
5876 (sha256
5877 (base32
5878 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 5879 (build-system python-build-system)
9a49a535
RW
5880 (home-page "https://github.com/phihag/ipaddress")
5881 (synopsis "IP address manipulation library")
5882 (description
520af157
DC
5883 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5884 in Python. This library is used to create, poke at, and manipulate IPv4 and
5885 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5886 module to older versions of Python.")
5887 (license license:psfl)
5888 (properties `((python2-variant . ,(delay python2-ipaddress))))))
5889
5890(define-public python2-ipaddress
5891 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
5892 (package (inherit base)
5893 (native-inputs
5894 `(("python2-setuptools" ,python2-setuptools)
5895 ,@(package-native-inputs base))))))
3f00e078 5896
4a238186
HG
5897(define-public python2-ipaddr
5898 (package
5899 (name "python2-ipaddr")
5900 (version "2.1.11")
5901 (source
5902 (origin
5903 (method url-fetch)
5904 (uri (pypi-uri "ipaddr" version))
5905 (sha256
5906 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
5907 (build-system python-build-system)
5908 (arguments
5909 `(#:python ,python-2 ;version 2 only
5910 #:phases
5911 (modify-phases %standard-phases
5912 (replace 'check
5913 (lambda* _
5914 (zero? (system* "python" "ipaddr_test.py")))))))
5915 (home-page "https://github.com/google/ipaddr-py")
5916 (synopsis "IP address manipulation library")
5917 (description
5918 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
5919IPv6 addresses and networks.
5920
5921For new implementations you may prefer to use the standard module
5922@code{ipaddress}, which was introduced in Python 3.3 and backported to older
5923versions of Python.")
3f641af0 5924 (license license:asl2.0)))
4a238186 5925
3f00e078
RW
5926(define-public python-idna
5927 (package
5928 (name "python-idna")
5929 (version "2.0")
5930 (source
5931 (origin
5932 (method url-fetch)
5933 (uri (string-append "https://pypi.python.org/packages/source/i/"
5934 "idna/idna-" version ".tar.gz"))
5935 (sha256
5936 (base32
5937 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5938 (build-system python-build-system)
5939 (native-inputs
5940 `(("python-setuptools" ,python-setuptools)))
5941 (home-page "https://github.com/kjd/idna")
5942 (synopsis "Internationalized domain names in applications")
5943 (description
5944 "This is a library to support the Internationalised Domain Names in
5945Applications (IDNA) protocol as specified in RFC 5891. This version of the
5946protocol is often referred to as “IDNA2008” and can produce different results
5947from the earlier standard from 2003. The library is also intended to act as a
5948suitable drop-in replacement for the “encodings.idna” module that comes with
5949the Python standard library but currently only supports the older 2003
5950specification.")
3f641af0 5951 (license license:bsd-4)))
3f00e078
RW
5952
5953(define-public python2-idna
5954 (package-with-python2 python-idna))
36ebf972
RW
5955
5956(define-public python-pretend
5957 (package
5958 (name "python-pretend")
5959 (version "1.0.8")
5960 (source
5961 (origin
5962 (method url-fetch)
5963 (uri (string-append "https://pypi.python.org/packages/source/p/"
5964 "pretend/pretend-" version ".tar.gz"))
5965 (sha256
5966 (base32
5967 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5968 (build-system python-build-system)
5969 (native-inputs
5970 `(("python-setuptools" ,python-setuptools)))
5971 (home-page "https://github.com/alex/pretend")
5972 (synopsis "Library for stubbing in Python")
5973 (description
5974 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5975technique for writing tests. You may hear the term mixed up with mocks,
5976fakes, or doubles. Basically, a stub is an object that returns pre-canned
5977responses, rather than doing any computation.")
3f641af0 5978 (license license:bsd-3)))
36ebf972
RW
5979
5980(define-public python2-pretend
5981 (package-with-python2 python-pretend))
aa759a51
RW
5982
5983(define-public python-cryptography-vectors
5984 (package
5985 (name "python-cryptography-vectors")
9c509ca9 5986 (version "1.3.4")
aa759a51
RW
5987 (source
5988 (origin
5989 (method url-fetch)
9c509ca9 5990 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
5991 (sha256
5992 (base32
9c509ca9 5993 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
aa759a51
RW
5994 (build-system python-build-system)
5995 (native-inputs
5996 `(("python-setuptools" ,python-setuptools)))
5997 (home-page "https://github.com/pyca/cryptography")
66e07664 5998 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
5999 (description
6000 "This package contains test vectors for the cryptography package.")
6001 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6002 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6003
6004(define-public python2-cryptography-vectors
6005 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6006
6007(define-public python-cryptography
6008 (package
6009 (name "python-cryptography")
9c509ca9 6010 (version "1.3.4")
88b47cb0
RW
6011 (source
6012 (origin
6013 (method url-fetch)
9c509ca9 6014 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6015 (sha256
6016 (base32
9c509ca9 6017 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
88b47cb0
RW
6018 (build-system python-build-system)
6019 (inputs
6020 `(("openssl" ,openssl)))
6021 (propagated-inputs
6022 `(("python-cffi" ,python-cffi)
6023 ("python-six" ,python-six)
6024 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6025 ("python-idna" ,python-idna)
6026 ("python-iso8601" ,python-iso8601)))
6027 (native-inputs
6028 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6029 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
6030 ("python-setuptools" ,python-setuptools)
6031 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6032 ("python-pyasn1" ,python-pyasn1)
6033 ("python-pyasn1-modules" ,python-pyasn1-modules)
88b47cb0
RW
6034 ("python-pytest" ,python-pytest)))
6035 (home-page "https://github.com/pyca/cryptography")
6036 (synopsis "Cryptographic recipes and primitives for Python")
6037 (description
6038 "cryptography is a package which provides cryptographic recipes and
6039primitives to Python developers. It aims to be the “cryptographic standard
6040library” for Python. The package includes both high level recipes, and low
6041level interfaces to common cryptographic algorithms such as symmetric ciphers,
6042message digests and key derivation functions.")
6043 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6044 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6045 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6046
6047(define-public python2-cryptography
519e2f4f
LF
6048 (let ((crypto (package-with-python2
6049 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6050 (package (inherit crypto)
6051 (propagated-inputs
6052 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6053 ("python2-backport-ssl-match-hostname"
6054 ,python2-backport-ssl-match-hostname)
68f1cdec 6055 ("python2-enum34" ,python2-enum34)
88b47cb0 6056 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6057
6058(define-public python-pyopenssl
6059 (package
6060 (name "python-pyopenssl")
2fc629dd 6061 (version "16.0.0")
5af999b8
RW
6062 (source
6063 (origin
6064 (method url-fetch)
6065 (uri (string-append "https://pypi.python.org/packages/source/p/"
6066 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
6067 (sha256
6068 (base32
2fc629dd 6069 "0zfijaxlq4vgi6jz0d4i5xq9ygqnyps6br7lmigjhqnh8gp10g9n"))))
5af999b8 6070 (build-system python-build-system)
5af999b8
RW
6071 (propagated-inputs
6072 `(("python-cryptography" ,python-cryptography)
6073 ("python-six" ,python-six)))
6074 (inputs
6075 `(("openssl" ,openssl)))
6076 (native-inputs
6077 `(("python-setuptools" ,python-setuptools)))
6078 (home-page "https://github.com/pyca/pyopenssl")
6079 (synopsis "Python wrapper module around the OpenSSL library")
6080 (description
6081 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6082library.")
3f641af0 6083 (license license:asl2.0)))
5af999b8
RW
6084
6085(define-public python2-pyopenssl
519e2f4f 6086 (package-with-python2 python-pyopenssl))
643725a1
CR
6087
6088(define-public python-pip
6089 (package
6090 (name "python-pip")
6fb54e3b 6091 (version "8.0.2")
643725a1
CR
6092 (source
6093 (origin
6094 (method url-fetch)
6fb54e3b 6095 (uri (pypi-uri "pip" version))
643725a1
CR
6096 (sha256
6097 (base32
6fb54e3b 6098 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
6099 (build-system python-build-system)
6100 (inputs
6101 `(("python-setuptools" ,python-setuptools)
6102 ("python-virtualenv" ,python-virtualenv)
6103 ;; Tests
6104 ("python-mock" ,python-mock)
6105 ("python-pytest" ,python-pytest)
6106 ("python-scripttest" ,python-scripttest)))
6107 (home-page "https://pip.pypa.io/")
6108 (synopsis
6109 "Package manager for Python software")
6110 (description
6111 "Pip is a package manager for Python software, that finds packages on the
6112Python Package Index (PyPI).")
6113 (license license:expat)))
6114
6115(define-public python2-pip
6116 (package-with-python2 python-pip))
d8c4998f
LC
6117
6118(define-public python-tlsh
6119 (package
6120 (name "python-tlsh")
99b00dc7 6121 (version "3.4.4")
d8c4998f
LC
6122 (home-page "https://github.com/trendmicro/tlsh")
6123 (source (origin
99b00dc7
EF
6124 (method url-fetch)
6125 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6126 version ".tar.gz"))
d8c4998f
LC
6127 (sha256
6128 (base32
99b00dc7
EF
6129 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6130 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6131 (build-system cmake-build-system)
6132 (arguments
6133 '(#:out-of-source? #f
6134 #:phases (modify-phases %standard-phases
6135 (replace
6136 'install
6137 (lambda* (#:key outputs #:allow-other-keys)
6138 ;; Build and install the Python bindings. The underlying
6139 ;; C++ library is apparently not meant to be installed.
6140 (let ((out (assoc-ref outputs "out")))
6141 (with-directory-excursion "py_ext"
6142 (and (system* "python" "setup.py" "build")
6143 (system* "python" "setup.py" "install"
6144 (string-append "--prefix=" out))))))))))
6145 (inputs `(("python" ,python-wrapper))) ;for the bindings
6146 (synopsis "Fuzzy matching library for Python")
6147 (description
6148 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6149Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6150value which can be used for similarity comparisons. Similar objects have
6151similar hash values, which allows for the detection of similar objects by
6152comparing their hash values. The byte stream should have a sufficient amount
6153of complexity; for example, a byte stream of identical bytes will not generate
6154a hash value.")
3f641af0 6155 (license license:asl2.0)))
d8c4998f
LC
6156
6157(define-public python2-tlsh
6158 (package
6159 (inherit python-tlsh)
6160 (name "python2-tlsh")
6161 (inputs `(("python" ,python-2)))))
d96034ed
LC
6162
6163(define-public python-libarchive-c
6164 (package
6165 (name "python-libarchive-c")
03fd001c 6166 (version "2.2")
d96034ed
LC
6167 (source (origin
6168 (method url-fetch)
03fd001c 6169 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6170 (sha256
6171 (base32
03fd001c 6172 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6173 (build-system python-build-system)
6174 (arguments
6175 '(#:phases (modify-phases %standard-phases
6176 (add-before
6177 'build 'reference-libarchive
6178 (lambda* (#:key inputs #:allow-other-keys)
6179 ;; Retain the absolute file name of libarchive.so.
6180 (let ((libarchive (assoc-ref inputs "libarchive")))
6181 (substitute* "libarchive/ffi.py"
6182 (("find_library\\('archive'\\)")
6183 (string-append "'" libarchive
6184 "/lib/libarchive.so'"))))
6185
6186 ;; Do not make a compressed egg (see
6187 ;; <http://bugs.gnu.org/20765>).
6188 (let ((port (open-file "setup.cfg" "a")))
6189 (display "\n[easy_install]\nzip_ok = 0\n"
6190 port)
6191 (close-port port)
6192 #t))))))
6193 (inputs
6194 `(("python-setuptools" ,python-setuptools)
6195 ("libarchive" ,libarchive)))
6196 (home-page "https://github.com/Changaco/python-libarchive-c")
6197 (synopsis "Python interface to libarchive")
6198 (description
6199 "This package provides Python bindings to libarchive, a C library to
6200access possibly compressed archives in many different formats. It uses
6201Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6202 (license license:lgpl2.0+)))
d96034ed
LC
6203
6204(define-public python2-libarchive-c
6205 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6206
6207(define-public python-file
6208 (package
6209 (inherit file)
6210 (name "python-file")
6211 (build-system python-build-system)
6212 (arguments
6213 '(#:tests? #f ;no tests
6214 #:phases (modify-phases %standard-phases
6215 (add-before 'build 'change-directory
6216 (lambda _
6217 (chdir "python")
6218 #t))
6219 (add-before 'build 'set-library-file-name
6220 (lambda* (#:key inputs #:allow-other-keys)
6221 (let ((file (assoc-ref inputs "file")))
6222 (substitute* "magic.py"
6223 (("find_library\\('magic'\\)")
6224 (string-append "'" file "/lib/libmagic.so'")))
6225 #t))))))
6226 (inputs `(("file" ,file)))
6227 (self-native-input? #f)
daeeea71
CM
6228 (synopsis "Python bindings to the libmagic file type guesser. Note that
6229this module and the python-magic module both provide a \"magic.py\" file;
6230these two modules, which are different and were developed separately, both
6231serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6232
6233(define-public python2-file
6234 (package-with-python2 python-file))
85d4aeac
LC
6235
6236(define-public python-debian
6237 (package
6238 (name "python-debian")
6239 (version "0.1.23")
6240 (source
6241 (origin
6242 (method url-fetch)
6243 (uri (string-append
6244 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6245 version ".tar.gz"))
6246 (sha256
6247 (base32
6248 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6249 (build-system python-build-system)
6250 (inputs
6251 `(("python-six" ,python-six)))
6252 (native-inputs
6253 `(("python-setuptools" ,python-setuptools)))
6254 (home-page "http://packages.debian.org/sid/python-debian")
6255 (synopsis "Debian package related modules")
6256 (description
5c7bdc9a
LC
6257 ;; XXX: Use @enumerate instead of @itemize to work around
6258 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6259 "This package provides Python modules that abstract many formats of
6260Debian-related files, such as:
6261
5c7bdc9a 6262@enumerate
85d4aeac
LC
6263@item Debtags information;
6264@item @file{debian/changelog} files;
6265@item packages files, pdiffs;
6266@item control files of single or multiple RFC822-style paragraphs---e.g.
6267 @file{debian/control}, @file{.changes}, @file{.dsc};
6268@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6269 contained files and meta-information.
5c7bdc9a 6270@end enumerate\n")
85d4aeac
LC
6271
6272 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6273 (license license:gpl3+)))
85d4aeac
LC
6274
6275(define-public python2-debian
6276 (package-with-python2 python-debian))
816a6538
LC
6277
6278(define-public python-chardet
6279 (package
6280 (name "python-chardet")
6281 (version "2.3.0")
6282 (source
6283 (origin
6284 (method url-fetch)
6285 (uri (string-append
6286 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6287 version
6288 ".tar.gz"))
6289 (sha256
6290 (base32
6291 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6292 (build-system python-build-system)
6293 (native-inputs
6294 `(("python-setuptools" ,python-setuptools)))
6295 (home-page "https://github.com/chardet/chardet")
6296 (synopsis "Universal encoding detector for Python 2 and 3")
6297 (description
6298 "This package provides @code{chardet}, a Python module that can
6299automatically detect a wide range of file encodings.")
3f641af0 6300 (license license:lgpl2.1+)))
816a6538
LC
6301
6302(define-public python2-chardet
6303 (package-with-python2 python-chardet))
2fc5f186 6304
1872f1bb
KM
6305(define-public python-docopt
6306 (package
6307 (name "python-docopt")
6308 (version "0.6.2")
6309 (source
6310 (origin
6311 (method url-fetch)
6312 ;; The release on PyPI does not include tests.
6313 (uri (string-append
6314 "https://github.com/docopt/docopt/archive/"
6315 version ".tar.gz"))
6316 (file-name (string-append name "-" version ".tar.gz"))
6317 (sha256
6318 (base32
6319 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6320 (build-system python-build-system)
6321 (native-inputs
6322 `(("python-pytest" ,python-pytest)
6323 ("python-setuptools" ,python-setuptools)))
6324 (arguments
6325 `(#:phases (alist-replace
6326 'check
6327 (lambda _ (zero? (system* "py.test")))
6328 %standard-phases)))
6329 (home-page "http://docopt.org")
6330 (synopsis "Command-line interface description language for Python")
6331 (description "This library allows the user to define a command-line
6332interface from a program's help message rather than specifying it
6333programatically with command-line parsers like @code{getopt} and
6334@code{argparse}.")
6335 (license license:expat)))
6336
6337(define-public python2-docopt
6338 (package-with-python2 python-docopt))
6339
2fc5f186
LF
6340(define-public python-zope-event
6341 (package
6342 (name "python-zope-event")
6343 (version "4.1.0")
6344 (source
6345 (origin
6346 (method url-fetch)
6347 (uri (string-append "https://pypi.python.org/packages/source/z"
6348 "/zope.event/zope.event-" version ".tar.gz"))
6349 (sha256
6350 (base32
6351 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6352 (build-system python-build-system)
6353 (inputs
6354 `(("python-setuptools" ,python-setuptools)))
6355 (home-page "http://pypi.python.org/pypi/zope.event")
6356 (synopsis "Event publishing system for Python")
6357 (description "Zope.event provides an event publishing API, intended for
6358use by applications which are unaware of any subscribers to their events. It
6359is a simple event-dispatching system on which more sophisticated event
6360dispatching systems can be built.")
3f641af0 6361 (license license:zpl2.1)))
2fc5f186
LF
6362
6363(define-public python2-zope-event
6364 (package-with-python2 python-zope-event))
97abe268
LF
6365
6366(define-public python-zope-interface
6367 (package
6368 (name "python-zope-interface")
6369 (version "4.1.3")
6370 (source
6371 (origin
6372 (method url-fetch)
6373 (uri (string-append "https://pypi.python.org/packages/source/z"
6374 "/zope.interface/zope.interface-" version ".tar.gz"))
6375 (sha256
6376 (base32
6377 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6378 (build-system python-build-system)
6379 (propagated-inputs
6380 `(("python-zope-event" ,python-zope-event)))
6381 (home-page "https://github.com/zopefoundation/zope.interface")
6382 (synopsis "Python implementation of the \"design by contract\"
6383methodology")
6384 (description "Zope.interface provides an implementation of \"object
6385interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6386conforming to a given API or contract.")
3f641af0 6387 (license license:zpl2.1)))
97abe268
LF
6388
6389(define-public python2-zope-interface
6390 (package-with-python2 python-zope-interface))
81f2373c
LF
6391
6392(define-public python-zope-exceptions
6393 (package
6394 (name "python-zope-exceptions")
6395 (version "4.0.8")
6396 (source
6397 (origin
6398 (method url-fetch)
6399 (uri (string-append "https://pypi.python.org/packages/source/z"
6400 "/zope.exceptions/zope.exceptions-"
6401 version ".tar.gz"))
6402 (sha256
6403 (base32
6404 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6405 (build-system python-build-system)
6406 (arguments
6407 '(#:tests? #f)) ; circular dependency with zope.testrunner
6408 (propagated-inputs
6409 `(("python-zope-interface" ,python-zope-interface)))
6410 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6411 (synopsis "Zope exceptions")
6412 (description "Zope.exceptions provides general-purpose exception types
6413that have uses outside of the Zope framework.")
3f641af0 6414 (license license:zpl2.1)))
81f2373c
LF
6415
6416(define-public python2-zope-exceptions
6417 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6418
6419(define-public python-zope-testing
6420 (package
6421 (name "python-zope-testing")
6422 (version "4.5.0")
6423 (source
6424 (origin
6425 (method url-fetch)
6426 (uri (string-append "https://pypi.python.org/packages/source/z"
6427 "/zope.testing/zope.testing-" version ".tar.gz"))
6428 (sha256
6429 (base32
6430 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6431 (build-system python-build-system)
6432 (native-inputs
6433 `(("python-zope-exceptions" ,python-zope-exceptions)))
6434 (propagated-inputs
6435 `(("python-zope-interface" ,python-zope-interface)))
6436 (home-page "http://pypi.python.org/pypi/zope.testing")
6437 (synopsis "Zope testing helpers")
6438 (description "Zope.testing provides a number of testing utilities for HTML
6439forms, HTTP servers, regular expressions, and more.")
3f641af0 6440 (license license:zpl2.1)))
900e3c0e
LF
6441
6442(define-public python2-zope-testing
6443 (package-with-python2 python-zope-testing))
01614c4f
LF
6444
6445(define-public python-zope-testrunner
6446 (package
6447 (name "python-zope-testrunner")
6448 (version "4.4.9")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (string-append "https://pypi.python.org/packages/source/z"
6453 "/zope.testrunner/zope.testrunner-"
6454 version ".zip"))
6455 (sha256
6456 (base32
6457 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6458 (build-system python-build-system)
6459 (native-inputs
6460 `(("python-six" ,python-six)
6461 ("python-zope-exceptions" ,python-zope-exceptions)
6462 ("python-zope-testing" ,python-zope-testing)
6463 ("unzip" ,unzip)))
6464 (propagated-inputs
6465 `(("python-zope-interface" ,python-zope-interface)))
6466 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6467 (synopsis "Zope testrunner script")
6468 (description "Zope.testrunner provides a script for running Python
6469tests.")
3f641af0 6470 (license license:zpl2.1)))
01614c4f
LF
6471
6472(define-public python2-zope-testrunner
6473 (let ((base (package-with-python2 python-zope-testrunner)))
6474 (package
6475 (inherit base)
6476 (native-inputs
6477 (append (package-native-inputs base)
6478 `(("python2-subunit" ,python2-subunit)
6479 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6480
6481(define-public python-zope-i18nmessageid
6482 (package
6483 (name "python-zope-i18nmessageid")
6484 (version "4.0.3")
6485 (source
6486 (origin
6487 (method url-fetch)
6488 (uri (string-append
6489 "https://pypi.python.org/packages/source/z"
6490 "/zope.i18nmessageid/zope.i18nmessageid-"
6491 version ".tar.gz"))
6492 (sha256
6493 (base32
6494 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6495 (build-system python-build-system)
6496 (inputs
6497 `(("python-setuptools" ,python-setuptools)))
6498 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6499 (synopsis "Message identifiers for internationalization")
6500 (description "Zope.i18nmessageid provides facilities for declaring
6501internationalized messages within program source text.")
3f641af0 6502 (license license:zpl2.1)))
6a5c710c
LF
6503
6504(define-public python2-zope-i18nmessageid
6505 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6506
6507(define-public python-zope-schema
6508 (package
6509 (name "python-zope-schema")
6510 (version "4.4.2")
6511 (source
6512 (origin
6513 (method url-fetch)
6514 (uri (string-append "https://pypi.python.org/packages/source/z"
6515 "/zope.schema/zope.schema-" version ".tar.gz"))
6516 (sha256
6517 (base32
6518 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6519 (build-system python-build-system)
6520 (propagated-inputs
6521 `(("python-zope-event" ,python-zope-event)
6522 ("python-zope-interface" ,python-zope-interface)))
6523 (native-inputs
6524 `(("python-zope-testing" ,python-zope-testing)))
6525 (home-page "http://pypi.python.org/pypi/zope.schema")
6526 (synopsis "Zope data schemas")
6527 (description "Zope.scheme provides extensions to zope.interface for
6528defining data schemas.")
3f641af0 6529 (license license:zpl2.1)))
71fb09f3
LF
6530
6531(define-public python2-zope-schema
6532 (package-with-python2 python-zope-schema))
fbac9b17
LF
6533
6534(define-public python-zope-configuration
6535 (package
6536 (name "python-zope-configuration")
6537 (version "4.0.3")
6538 (source (origin
6539 (method url-fetch)
6540 (uri (string-append "https://pypi.python.org/packages/source/z"
6541 "/zope.configuration/zope.configuration-"
6542 version ".tar.gz"))
6543 (sha256
6544 (base32
6545 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6546 (build-system python-build-system)
6547 (propagated-inputs
6548 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6549 ("python-zope-schema" ,python-zope-schema)))
6550 (home-page "http://pypi.python.org/pypi/zope.configuration")
6551 (synopsis "Zope Configuration Markup Language")
6552 (description "Zope.configuration implements ZCML, the Zope Configuration
6553Markup Language.")
3f641af0 6554 (license license:zpl2.1)))
fbac9b17
LF
6555
6556(define-public python2-zope-configuration
6557 (package-with-python2 python-zope-configuration))
2ad52086
LF
6558
6559(define-public python-zope-proxy
6560 (package
6561 (name "python-zope-proxy")
6562 (version "4.1.6")
6563 (source
6564 (origin
6565 (method url-fetch)
6566 (uri (string-append "https://pypi.python.org/packages/source/z"
6567 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6568 (sha256
6569 (base32
6570 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6571 (build-system python-build-system)
6572 (propagated-inputs
6573 `(("python-zope-interface" ,python-zope-interface)))
6574 (home-page "http://pypi.python.org/pypi/zope.proxy")
6575 (synopsis "Generic, transparent proxies")
6576 (description "Zope.proxy provides generic, transparent proxies for Python.
6577Proxies are special objects which serve as mostly-transparent wrappers around
6578another object, intervening in the apparent behavior of the wrapped object
6579only when necessary to apply the policy (e.g., access checking, location
6580brokering, etc.) for which the proxy is responsible.")
3f641af0 6581 (license license:zpl2.1)))
2ad52086
LF
6582
6583(define-public python2-zope-proxy
6584 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6585
6586(define-public python-zope-location
6587 (package
6588 (name "python-zope-location")
6589 (version "4.0.3")
6590 (source
6591 (origin
6592 (method url-fetch)
6593 (uri (string-append "https://pypi.python.org/packages/source/z"
6594 "/zope.location/zope.location-" version ".tar.gz"))
6595 (sha256
6596 (base32
6597 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6598 (build-system python-build-system)
6599 (native-inputs
6600 `(("python-zope-proxy" ,python-zope-proxy)
6601 ("python-zope-schema" ,python-zope-schema)))
6602 (home-page "http://pypi.python.org/pypi/zope.location/")
6603 (synopsis "Zope location library")
6604 (description "Zope.location implements the concept of \"locations\" in
6605Zope3, which are are special objects that have a structural location.")
3f641af0 6606 (license license:zpl2.1)))
f404b5ea
LF
6607
6608(define-public python2-zope-location
6609 (package-with-python2 python-zope-location))
d4b77f36
LF
6610
6611(define-public python-zope-security
6612 (package
6613 (name "python-zope-security")
6614 (version "4.0.3")
6615 (source
6616 (origin
6617 (method url-fetch)
6618 (uri (string-append "https://pypi.python.org/packages/source/z"
6619 "/zope.security/zope.security-" version ".tar.gz"))
6620 (sha256
6621 (base32
6622 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6623 (build-system python-build-system)
6624 (propagated-inputs
6625 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6626 ("python-zope-component" ,python-zope-component)
6627 ("python-zope-location" ,python-zope-location)
6628 ("python-zope-proxy" ,python-zope-proxy)
6629 ("python-zope-schema" ,python-zope-schema)
6630 ("python-zope-testrunner" ,python-zope-testrunner)
6631 ("python-zope-testing" ,python-zope-testing)))
6632 (home-page "http://pypi.python.org/pypi/zope.security")
6633 (synopsis "Zope security framework")
6634 (description "Zope.security provides a generic mechanism to implement
6635security policies on Python objects.")
3f641af0 6636 (license license:zpl2.1)))
d4b77f36
LF
6637
6638(define-public python2-zope-security
04417662
EF
6639 (let ((zope-security (package-with-python2 python-zope-security)))
6640 (package (inherit zope-security)
6641 (propagated-inputs
6642 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6643 ,@(alist-delete
6644 "python-zope-testrunner"
6645 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6646
6647(define-public python-zope-component
6648 (package
6649 (name "python-zope-component")
6650 (version "4.2.2")
6651 (source
6652 (origin
6653 (method url-fetch)
6654 (uri (string-append "https://pypi.python.org/packages/source/z"
6655 "/zope.component/zope.component-" version ".tar.gz"))
6656 (sha256
6657 (base32
6658 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6659 (build-system python-build-system)
6660 (arguments
6661 ;; Skip tests due to circular dependency with python-zope-security.
6662 '(#:tests? #f))
6663 (native-inputs
6664 `(("python-zope-testing" ,python-zope-testing)))
6665 (propagated-inputs
6666 `(("python-zope-event" ,python-zope-event)
6667 ("python-zope-interface" ,python-zope-interface)
6668 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6669 ("python-zope-configuration" ,python-zope-configuration)))
6670 (home-page "https://github.com/zopefoundation/zope.component")
6671 (synopsis "Zope Component Architecture")
6672 (description "Zope.component represents the core of the Zope Component
6673Architecture. Together with the zope.interface package, it provides
6674facilities for defining, registering and looking up components.")
3f641af0 6675 (license license:zpl2.1)))
a6b61b27
LF
6676
6677(define-public python2-zope-component
6678 (package-with-python2 python-zope-component))
3859ac12 6679
1ae44b80 6680(define-public python-pythondialog
b5f218be 6681 (package
1ae44b80 6682 (name "python-pythondialog")
42c4b246 6683 (version "3.4.0")
b5f218be
LF
6684 (source
6685 (origin
6686 (method url-fetch)
1ae44b80 6687 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
6688 (sha256
6689 (base32
1ae44b80 6690 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
6691 (build-system python-build-system)
6692 (arguments
6693 `(#:phases
6694 (modify-phases %standard-phases
6695 (add-after 'unpack 'patch-path
6696 (lambda* (#:key inputs #:allow-other-keys)
6697 (let* ((dialog (assoc-ref inputs "dialog")))
6698 ;; Since this library really wants to grovel the search path, we
6699 ;; must hardcode dialog's store path into it.
6700 (substitute* "dialog.py"
6701 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6702 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6703 #t))))
b5f218be
LF
6704 #:tests? #f)) ; no test suite
6705 (propagated-inputs
6706 `(("dialog" ,dialog)))
6707 (home-page "http://pythondialog.sourceforge.net/")
6708 (synopsis "Python interface to the UNIX dialog utility")
6709 (description "A Python wrapper for the dialog utility. Its purpose is to
6710provide an easy to use, pythonic and comprehensive Python interface to dialog.
6711This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 6712 (license license:lgpl2.1)
1ae44b80
LF
6713 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6714
6715(define-public python2-pythondialog
6716 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6717 (package
6718 (inherit base)
6719 (version (package-version python-pythondialog))
6720 (source (origin
6721 (method url-fetch)
6722 (uri (pypi-uri "python2-pythondialog" version))
6723 (sha256
6724 (base32
6725 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 6726
3859ac12
LF
6727(define-public python-pyrfc3339
6728 (package
6729 (name "python-pyrfc3339")
d9aa097b 6730 (version "1.0")
3859ac12
LF
6731 (source
6732 (origin
6733 (method url-fetch)
d9aa097b 6734 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
6735 (sha256
6736 (base32
d9aa097b 6737 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
6738 (build-system python-build-system)
6739 (propagated-inputs
6740 `(("python-pytz" ,python-pytz)))
6741 (native-inputs
6742 `(("python-nose" ,python-nose)
6743 ("python-setuptools" ,python-setuptools)))
6744 (home-page "https://github.com/kurtraschke/pyRFC3339")
6745 (synopsis "Python timestamp library")
6746 (description "Python library for generating and parsing RFC 3339-compliant
6747timestamps.")
6748 (license license:expat)))
6749
6750(define-public python2-pyrfc3339
6751 (package-with-python2 python-pyrfc3339))
5eea2005
LF
6752
6753(define-public python-werkzeug
6754 (package
6755 (name "python-werkzeug")
4b47cbfa 6756 (version "0.11.5")
5eea2005
LF
6757 (source
6758 (origin
6759 (method url-fetch)
4b47cbfa 6760 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
6761 (sha256
6762 (base32
4b47cbfa 6763 "0r41xqp4cypzcgsf6zbspbqd272wnzf20igb4w4b5wzfhgqh9nxg"))))
5eea2005
LF
6764 (build-system python-build-system)
6765 (native-inputs
6766 `(("python-pytest" ,python-pytest)))
6767 (home-page "http://werkzeug.pocoo.org/")
6768 (synopsis "Utilities for WSGI applications")
6769 (description "One of the most advanced WSGI utility modules. It includes a
6770powerful debugger, full-featured request and response objects, HTTP utilities to
6771handle entity tags, cache control headers, HTTP dates, cookie handling, file
6772uploads, a powerful URL routing system and a bunch of community-contributed
6773addon modules.")
3f641af0 6774 (license license:x11)))
5eea2005
LF
6775
6776(define-public python2-werkzeug
6777 (package-with-python2 python-werkzeug))
99fffa8a
LF
6778
6779(define-public python-configobj
6780 (package
6781 (name "python-configobj")
6782 (version "5.0.6")
6783 (source (origin
6784 (method url-fetch)
6785 (uri (string-append
6786 "https://pypi.python.org/packages/source/c/configobj/"
6787 "configobj-" version ".tar.gz"))
6788 (sha256
6789 (base32
6790 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6791 ;; Patch setup.py so it looks for python-setuptools, which is
6792 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 6793 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a
LF
6794 (build-system python-build-system)
6795 (native-inputs
6796 `(("python-setuptools" ,python-setuptools)
6797 ("python-six" ,python-six)))
6798 (synopsis "Config file reading, writing and validation")
6799 (description "ConfigObj is a simple but powerful config file reader and
6800writer: an ini file round tripper. Its main feature is that it is very easy to
6801use, with a straightforward programmer’s interface and a simple syntax for
6802config files.")
6803 (home-page "https://github.com/DiffSK/configobj")
3f641af0 6804 (license license:bsd-3)))
99fffa8a
LF
6805
6806(define-public python2-configobj
6807 (package-with-python2 python-configobj))
79e8a291
LF
6808
6809(define-public python-configargparse
6810 (package
6811 (name "python-configargparse")
6812 (version "0.10.0")
6813 (source (origin
6814 (method url-fetch)
6815 (uri (string-append
6816 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6817 "ConfigArgParse-" version ".tar.gz"))
6818 (sha256
6819 (base32
6820 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6821 (build-system python-build-system)
6822 (arguments
6823 ;; FIXME: Bug in test suite filed upstream:
6824 ;; https://github.com/bw2/ConfigArgParse/issues/32
6825 '(#:tests? #f))
6826 (synopsis "Replacement for argparse")
6827 (description "A drop-in replacement for argparse that allows options to also
6828be set via config files and/or environment variables.")
6829 (home-page "https://github.com/bw2/ConfigArgParse")
6830 (license license:expat)))
6831
6832(define-public python2-configargparse
6833 (package-with-python2 python-configargparse))
ab41f979
LF
6834
6835(define-public python-ndg-httpsclient
6836 (package
6837 (name "python-ndg-httpsclient")
6838 (version "0.4.0")
6839 (source (origin
6840 (method url-fetch)
6841 (uri (string-append
6842 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6843 "ndg_httpsclient-" version ".tar.gz"))
6844 (sha256
6845 (base32
6846 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6847 (build-system python-build-system)
6848 (propagated-inputs
6849 `(("python-pyopenssl" ,python-pyopenssl)))
6850 (synopsis "HTTPS support for Python's httplib and urllib2")
6851 (description "This is a HTTPS client implementation for httplib and urllib2
6852based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6853over the default provided with Python and importantly enables full verification
6854of the SSL peer.")
6855 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 6856 (license license:bsd-3)))
ab41f979
LF
6857
6858;; python2-openssl requires special care, so package-with-python2 is
6859;; insufficient.
6860(define-public python2-ndg-httpsclient
6861 (package (inherit python-ndg-httpsclient)
6862 (name "python2-ndg-httpsclient")
6863 (arguments `(#:python ,python-2))
6864 (propagated-inputs
6865 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
6866
6867(define-public python-contextlib2
6868 (package
6869 (name "python-contextlib2")
6870 (version "0.4.0")
6871 (source
6872 (origin
6873 (method url-fetch)
6874 (uri (pypi-uri "contextlib2" version))
6875 (sha256
6876 (base32
6877 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6878 (build-system python-build-system)
6879 (arguments
6880 `(#:phases
6881 (modify-phases %standard-phases
6882 (replace 'check
6883 (lambda _ (zero?
6884 (system*
b3546174 6885 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
6886 (home-page "http://contextlib2.readthedocs.org/")
6887 (synopsis "Tools for decorators and context managers")
6888 (description "This module is primarily a backport of the Python
68893.2 contextlib to earlier Python versions. Like contextlib, it
6890provides utilities for common tasks involving decorators and context
6891managers. It also contains additional features that are not part of
6892the standard library.")
3f641af0 6893 (license license:psfl)))
03f964a5
CM
6894
6895(define-public python2-contextlib2
6896 (package-with-python2 python-contextlib2))
210bf497
DT
6897
6898(define-public python-texttable
6899 (package
6900 (name "python-texttable")
6901 (version "0.8.4")
6902 (source
6903 (origin
6904 (method url-fetch)
6905 (uri (pypi-uri "texttable" version))
6906 (sha256
6907 (base32
6908 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
6909 (build-system python-build-system)
6910 (arguments '(#:tests? #f)) ; no tests
6911 (home-page "https://github.com/foutaise/texttable/")
6912 (synopsis "Python module for creating simple ASCII tables")
6913 (description "Texttable is a Python module for creating simple ASCII
6914tables.")
3f641af0 6915 (license license:lgpl2.1+)))
210bf497
DT
6916
6917(define-public python2-texttable
6918 (package-with-python2 python-texttable))
67c52bb3
DT
6919
6920(define-public python-websocket-client
6921 (package
6922 (name "python-websocket-client")
6b810897 6923 (version "0.37.0")
67c52bb3
DT
6924 (source
6925 (origin
6926 (method url-fetch)
6b810897 6927 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
6928 (sha256
6929 (base32
6b810897 6930 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3
DT
6931 (build-system python-build-system)
6932 (native-inputs
6933 `(("python-six" ,python-six))) ; for tests
6934 (inputs
6935 `(("python-setuptools" ,python-setuptools)))
6936 (home-page "https://github.com/liris/websocket-client")
6937 (synopsis "WebSocket client for Python")
6938 (description "The Websocket-client module provides the low level APIs for
6939WebSocket usage in Python programs.")
3f641af0 6940 (license license:lgpl2.1+)))
67c52bb3
DT
6941
6942(define-public python2-websocket-client
6943 (package-with-python2 python-websocket-client))
5c6eea2a
LF
6944
6945(define-public python-atomicwrites
6946 (package
6947 (name "python-atomicwrites")
4e92d76a 6948 (version "1.1.0")
5c6eea2a
LF
6949 (source (origin
6950 (method url-fetch)
6951 (uri (pypi-uri "atomicwrites" version))
6952 (sha256
6953 (base32
4e92d76a 6954 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
6955 (build-system python-build-system)
6956 (synopsis "Atomic file writes in Python")
6957 (description "Library for atomic file writes using platform dependent tools
6958for atomic filesystem operations.")
6959 (home-page "https://github.com/untitaker/python-atomicwrites")
9bb6d184
LF
6960 (license license:expat)
6961 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
6962
6963(define-public python2-atomicwrites
6964 (package (inherit (package-with-python2
6965 (strip-python2-variant python-atomicwrites)))
6966 (native-inputs
6967 `(("python2-setuptools" ,python2-setuptools)))))
561bb3cb
LF
6968
6969(define-public python-requests-toolbelt
6970 (package
6971 (name "python-requests-toolbelt")
c02af1c8 6972 (version "0.6.2")
561bb3cb
LF
6973 (source (origin
6974 (method url-fetch)
c02af1c8
LF
6975 (uri (string-append
6976 "https://pypi.python.org/packages/"
6977 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
6978 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
6979 (sha256
6980 (base32
c02af1c8 6981 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb
LF
6982 (build-system python-build-system)
6983 (propagated-inputs
6984 `(("python-requests" ,python-requests)))
6985 (synopsis "Extensions to python-requests")
6986 (description "This is a toolbelt of useful classes and functions to be used
6987with python-requests.")
6988 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 6989 (license license:asl2.0)))
d1deb90b
LF
6990
6991(define-public python-click-threading
6992 (package
6993 (name "python-click-threading")
3d2e0dbc 6994 (version "0.2.0")
d1deb90b
LF
6995 (source (origin
6996 (method url-fetch)
3d2e0dbc
LF
6997 (uri (string-append
6998 "https://pypi.python.org/packages/"
6999 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7000 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7001 (sha256
7002 (base32
3d2e0dbc 7003 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7004 (build-system python-build-system)
7005 (propagated-inputs
7006 `(("python-click" ,python-click)))
7007 (synopsis "Utilities for multithreading in Click")
7008 (description "This package provides utilities for multithreading in Click
7009applications.")
7010 (home-page "https://github.com/click-contrib/click-threading")
7011 (license license:expat)))
7b17cab9
LF
7012
7013(define-public python-click-log
7014 (package
7015 (name "python-click-log")
a9da8fec 7016 (version "0.1.3")
7b17cab9
LF
7017 (source (origin
7018 (method url-fetch)
7019 (uri (pypi-uri "click-log" version))
7020 (sha256
7021 (base32
a9da8fec 7022 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7023 (build-system python-build-system)
7024 (propagated-inputs
7025 `(("python-click" ,python-click)))
7026 (synopsis "Logging for click applications")
7027 (description "This package provides a Python library for logging Click
7028applications.")
7029 (home-page "https://github.com/click-contrib/click-log")
7030 (license license:expat)))
7b3a4ee4
LF
7031
7032(define-public python-apipkg
7033 (package
7034 (name "python-apipkg")
7035 (version "1.4")
7036 (source (origin
7037 (method url-fetch)
7038 (uri (pypi-uri "apipkg" version))
7039 (sha256
7040 (base32
7041 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7042 (build-system python-build-system)
b43bab3c 7043 (inputs
7b3a4ee4
LF
7044 `(("python-pytest" ,python-pytest)))
7045 (synopsis "Namespace control and lazy-import mechanism")
7046 (description "With apipkg you can control the exported namespace of a Python
7047package and greatly reduce the number of imports for your users. It is a small
7048pure Python module that works on virtually all Python versions.")
7049 (home-page "https://bitbucket.org/hpk42/apipkg")
e08739c3
CAW
7050 (license license:expat)
7051 (properties `((python2-variant . ,(delay python2-apipkg))))))
7052
7053(define-public python2-apipkg
7054 (package
7055 (inherit (package-with-python2
7056 (strip-python2-variant python-apipkg)))
7057 (native-inputs
7058 `(("python2-setuptools" ,python2-setuptools)))))
848964fe
LF
7059
7060(define-public python-execnet
7061 (package
7062 (name "python-execnet")
7063 (version "1.4.1")
7064 (source (origin
7065 (method url-fetch)
7066 (uri (pypi-uri "execnet" version))
7067 (sha256
7068 (base32
7069 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7070 (build-system python-build-system)
7071 (native-inputs
7072 `(("python-setuptools-scm" ,python-setuptools-scm)))
584d068f 7073 (inputs
848964fe
LF
7074 `(("python-apipkg" ,python-apipkg)))
7075 (synopsis "Rapid multi-Python deployment")
7076 (description "Execnet provides a share-nothing model with
7077channel-send/receive communication for distributing execution across many
7078Python interpreters across version, platform and network barriers. It has a
7079minimal and fast API targetting the following uses:
7080@enumerate
7081@item distribute tasks to (many) local or remote CPUs
7082@item write and deploy hybrid multi-process applications
7083@item write scripts to administer multiple environments
7084@end enumerate")
7085 (home-page "http://codespeak.net/execnet/")
16c84f90
CAW
7086 (license license:expat)
7087 (properties `((python2-variant . ,(delay python2-execnet))))))
7088
7089(define-public python2-execnet
7090 (let ((execnet (package-with-python2
7091 (strip-python2-variant python-execnet))))
7092 (package
7093 (inherit execnet)
7094 (native-inputs
7095 `(("python2-setuptools" ,python2-setuptools)
7096 ,@(package-native-inputs execnet))))))
6720dbb4
LF
7097
7098;;; The software provided by this package was integrated into pytest 2.8.
7099(define-public python-pytest-cache
7100 (package
7101 (name "python-pytest-cache")
7102 (version "1.0")
7103 (source (origin
7104 (method url-fetch)
7105 (uri (pypi-uri "pytest-cache" version))
7106 (sha256
7107 (base32
7108 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7109 (build-system python-build-system)
630d938f
EF
7110 (inputs
7111 `(("python-apipkg" ,python-apipkg)
7112 ("python-execnet" ,python-execnet)
7113 ("python-py" ,python-py)
7114 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7115 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7116 (description "The pytest-cache plugin provides tools to rerun failures from
7117the last py.test invocation.")
7118 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
0adc21c2
EF
7119 (license license:expat)
7120 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7121
7122(define-public python2-pytest-cache
7123 (let ((pytest-cache (package-with-python2
7124 (strip-python2-variant python-pytest-cache))))
7125 (package
7126 (inherit pytest-cache)
7127 (native-inputs
7128 `(("python2-setuptools" ,python2-setuptools)
7129 ,@(package-native-inputs pytest-cache))))))
d7e729fe
LF
7130
7131(define-public python-pytest-localserver
7132 (package
7133 (name "python-pytest-localserver")
29f20168 7134 (version "0.3.5")
d7e729fe
LF
7135 (source (origin
7136 (method url-fetch)
29f20168 7137 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7138 (sha256
7139 (base32
29f20168 7140 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7141 (build-system python-build-system)
7142 (arguments
7143 `(#:phases (modify-phases %standard-phases
7144 (replace 'check
7145 (lambda _
7146 (zero? (system* "py.test" "--genscript=runtests.py"))
7147 (zero? (system* "py.test")))))))
7148 (native-inputs
d7e729fe
LF
7149 `(("python-pytest" ,python-pytest)
7150 ("python-requests" ,python-requests)
9ba40f05
EF
7151 ("python-six" ,python-six)))
7152 (inputs
7153 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7154 (synopsis "Py.test plugin to test server connections locally")
7155 (description "Pytest-localserver is a plugin for the pytest testing
7156framework which enables you to test server connections locally.")
7157 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7158 (license license:expat)))
28cecbb7
LF
7159
7160(define-public python-wsgi-intercept
7161 (package
7162 (name "python-wsgi-intercept")
909fbd2b 7163 (version "1.2.2")
28cecbb7
LF
7164 (source (origin
7165 (method url-fetch)
909fbd2b
LF
7166 (uri (string-append
7167 "https://pypi.python.org/packages/"
7168 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7169 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7170 (sha256
7171 (base32
909fbd2b 7172 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7
LF
7173 (build-system python-build-system)
7174 (native-inputs
9d813ec1
EF
7175 `(("python-pytest" ,python-pytest)
7176 ("python-six" ,python-six)))
28cecbb7
LF
7177 (propagated-inputs
7178 `(("python-httplib2" ,python-httplib2)
7179 ("python-requests" ,python-requests)))
7180 (synopsis "Puts a WSGI application in place of a real URI for testing")
7181 (description "Wsgi_intercept installs a WSGI application in place of a real
7182URI for testing. Testing a WSGI application normally involves starting a
7183server at a local host and port, then pointing your test code to that address.
7184Instead, this library lets you intercept calls to any specific host/port
7185combination and redirect them into a WSGI application importable by your test
7186program. Thus, you can avoid spawning multiple processes or threads to test
7187your Web app.")
7188 (home-page "https://github.com/cdent/wsgi-intercept")
7189 (license license:expat)))
89b8a551
LF
7190
7191(define-public python-pytest-xprocess
7192 (package
7193 (name "python-pytest-xprocess")
7194 (version "0.9.1")
7195 (source (origin
7196 (method url-fetch)
7197 (uri (pypi-uri "pytest-xprocess" version))
7198 (sha256
7199 (base32
7200 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7201 (build-system python-build-system)
7202 (propagated-inputs
7203 `(("python-pytest" ,python-pytest)
7204 ("python-pytest-cache" ,python-pytest-cache)
7205 ("python-psutil" ,python-psutil)))
7206 (synopsis "Pytest plugin to manage external processes across test runs")
7207 (description "Pytest-xprocess is an experimental py.test plugin for managing
7208processes across test runs.")
7209 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7210 (license license:expat)))
5c299bf0
LF
7211
7212(define-public python-icalendar
7213 (package
7214 (name "python-icalendar")
f2f53353 7215 (version "3.10")
5c299bf0
LF
7216 (source (origin
7217 (method url-fetch)
7218 (uri (pypi-uri "icalendar" version))
7219 (sha256
7220 (base32
f2f53353 7221 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
5c299bf0
LF
7222 (build-system python-build-system)
7223 (propagated-inputs
7224 `(("python-dateutil-2" ,python-dateutil-2)
7225 ("python-pytz" ,python-pytz)))
7226 (synopsis "Python library for parsing iCalendar files")
7227 (description "The icalendar package is a parser/generator of iCalendar
7228files for use with Python.")
7229 (home-page "https://github.com/collective/icalendar")
3f641af0 7230 (license license:bsd-2)))
6bbbb53e
LF
7231
7232(define-public python-sphinxcontrib-newsfeed
7233 (package
7234 (name "python-sphinxcontrib-newsfeed")
7235 (version "0.1.4")
7236 (source (origin
7237 (method url-fetch)
7238 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7239 (sha256
7240 (base32
7241 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7242 (build-system python-build-system)
7243 (propagated-inputs
7244 `(("python-docutils" ,python-docutils)
7245 ("python-sphinx" ,python-sphinx)))
7246 (synopsis "News Feed extension for Sphinx")
7247 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7248Blog, News or Announcements section to a Sphinx website.")
7249 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 7250 (license license:bsd-2)))
2216e15c
SB
7251
7252(define-public python-args
7253 (package
7254 (name "python-args")
7255 (version "0.1.0")
7256 (source (origin
7257 (method url-fetch)
7258 (uri (pypi-uri "args" version))
7259 (sha256
7260 (base32
7261 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7262 (build-system python-build-system)
7263 (inputs
7264 `(("python-setuptools" ,python-setuptools)))
7265 (home-page "https://github.com/kennethreitz/args")
7266 (synopsis "Command-line argument parser")
7267 (description
7268 "This library provides a Python module to parse command-line arguments.")
3f641af0 7269 (license license:bsd-3)))
2216e15c
SB
7270
7271(define-public python2-args
7272 (package-with-python2 python-args))
c06a3de9
SB
7273
7274(define-public python-clint
7275 (package
7276 (name "python-clint")
7277 (version "0.5.1")
7278 (source (origin
7279 (method url-fetch)
7280 (uri (pypi-uri "clint" version))
7281 (sha256
7282 (base32
7283 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7284 (build-system python-build-system)
7285 (inputs
7286 `(("python-args" ,python-args)
7287 ("python-setuptools" ,python-setuptools)))
7288 (home-page "https://github.com/kennethreitz/clint")
7289 (synopsis "Command-line interface tools")
7290 (description
7291 "Clint is a Python module filled with a set of tools for developing
7292command-line applications, including tools for colored and indented
7293output, progress bar display, and pipes.")
3f641af0 7294 (license license:isc)))
c06a3de9
SB
7295
7296(define-public python2-clint
7297 (package-with-python2 python-clint))
4ecdeef8
SB
7298
7299(define-public python-astor
7300 (package
7301 (name "python-astor")
7302 (version "0.5")
7303 (source (origin
7304 (method url-fetch)
7305 (uri (pypi-uri "astor" version))
7306 (sha256
7307 (base32
7308 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7309 (build-system python-build-system)
7310 (inputs
7311 `(("python-setuptools" ,python-setuptools)))
7312 (home-page "https://github.com/berkerpeksag/astor")
7313 (synopsis "Read and write Python ASTs")
7314 (description
7315 "Astor is designed to allow easy manipulation of Python source via the
7316Abstract Syntax Tree.")
3f641af0 7317 (license license:bsd-3)))
4ecdeef8
SB
7318
7319(define-public python2-astor
7320 (package-with-python2 python-astor))
e224b7d0
SB
7321
7322(define-public python-rply
7323 (package
7324 (name "python-rply")
7325 (version "0.7.4")
7326 (source (origin
7327 (method url-fetch)
7328 (uri (pypi-uri "rply" version))
7329 (sha256
7330 (base32
7331 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7332 (build-system python-build-system)
7333 (inputs
7334 `(("python-appdirs" ,python-appdirs)
7335 ("python-setuptools" ,python-setuptools)))
7336 (home-page "https://github.com/alex/rply")
7337 (synopsis "Parser generator for Python")
7338 (description
7339 "This package provides a pure Python based parser generator, that also
7340works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7341with a new public API, and RPython support.")
3f641af0 7342 (license license:bsd-3)))
e224b7d0
SB
7343
7344(define-public python2-rply
7345 (package-with-python2 python-rply))
c3e919d7
SB
7346
7347(define-public python-hy
7348 (package
7349 (name "python-hy")
7350 (version "0.11.1")
7351 (source (origin
7352 (method url-fetch)
7353 (uri (pypi-uri "hy" version))
7354 (sha256
7355 (base32
7356 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7357 (build-system python-build-system)
7358 (inputs
7359 `(("python-astor" ,python-astor)
7360 ("python-clint" ,python-clint)
7361 ("python-rply" ,python-rply)
7362 ("python-setuptools" ,python-setuptools)))
7363 (home-page "http://hylang.org/")
7364 (synopsis "Lisp frontend to Python")
7365 (description
7366 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7367its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7368Python at your fingertips, in Lisp form.")
7369 (license license:expat)))
7370
7371(define-public python2-hy
7372 (package-with-python2 python-hy))
7a5b944e 7373
81f7f297
EF
7374(define-public python-rauth
7375 (package
7376 (name "python-rauth")
7377 (version "0.7.2")
7378 (source
7379 (origin
7380 (method url-fetch)
7381 (uri (pypi-uri "rauth" version))
7382 (sha256
7383 (base32
7384 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7385 (build-system python-build-system)
7386 (arguments
7387 `(#:test-target "check"))
0848d8d3 7388 (inputs
81f7f297
EF
7389 `(("python-requests" ,python-requests)))
7390 (home-page "https://github.com/litl/rauth")
7391 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7392 (description
7393 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7394provides service wrappers for convenient connection initialization and
7395authenticated session objects providing things like keep-alive.")
0848d8d3
EF
7396 (license license:expat)
7397 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
7398
7399(define-public python2-rauth
0848d8d3
EF
7400 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7401 (package
7402 (inherit base)
7403 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7404 ("python2-unittest2" ,python2-unittest2)
7405 ,@(package-native-inputs base))))))
81f7f297 7406
1abe448d
EF
7407(define-public python2-functools32
7408 (package
7409 (name "python2-functools32")
7410 (version "3.2.3-2")
7411 (source
7412 (origin
7413 (method url-fetch)
7414 (uri (pypi-uri "functools32" version))
7415 (sha256
7416 (base32
7417 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7418 (build-system python-build-system)
7419 (arguments
7420 `(#:python ,python-2
7421 #:tests? #f)) ; no test target
7422 (native-inputs
7423 `(("python2-setuptools" ,python2-setuptools)))
7424 (home-page "https://github.com/MiCHiLU/python-functools32")
7425 (synopsis
7426 "Backport of the functools module from Python 3.2.3")
7427 (description
7428 "This package is a backport of the @code{functools} module from Python
74293.2.3 for use with older versions of Python and PyPy.")
7430 (license license:expat)))
7431
877889f3 7432(define-public python2-futures
7a5b944e 7433 (package
877889f3 7434 (name "python2-futures")
7a5b944e
EF
7435 (version "3.0.3")
7436 (source
7437 (origin
7438 (method url-fetch)
7439 (uri (pypi-uri "futures" version))
7440 (sha256
7441 (base32
7442 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7443 (build-system python-build-system)
877889f3 7444 (arguments `(#:python ,python-2))
7a5b944e 7445 (native-inputs
877889f3 7446 `(("python2-setuptools" ,python2-setuptools)))
7a5b944e
EF
7447 (home-page "https://github.com/agronholm/pythonfutures")
7448 (synopsis
7449 "Backport of the concurrent.futures package from Python 3.2")
7450 (description
7451 "The concurrent.futures module provides a high-level interface for
7452asynchronously executing callables. This package backports the
7453concurrent.futures package from Python 3.2")
3f641af0 7454 (license license:bsd-3)))
7a5b944e 7455
c18f6368
EF
7456(define-public python-urllib3
7457 (package
7458 (name "python-urllib3")
7459 (version "1.13.1")
7460 (source
7461 (origin
7462 (method url-fetch)
7463 (uri (pypi-uri "urllib3" version))
7464 (sha256
7465 (base32
7466 "10rrbr6c6k7j5dvfsyj4b2gsgxg9gggnn708qixf6ll57xqivfkf"))))
7467 (build-system python-build-system)
7468 (arguments `(#:tests? #f))
7469 (native-inputs
7470 `(("python-setuptools" ,python-setuptools)
7471 ;; some packages for tests
7472 ("python-nose" ,python-nose)
7473 ("python-mock" ,python-mock)
7474 ("python-tornado" ,python-tornado)))
7475 (propagated-inputs
7476 `(;; packages for https security
7477 ("python-certifi" ,python-certifi)
7478 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7479 ("python-pyasn1" ,python-pyasn1)
7480 ("python-pyopenssl" ,python-pyopenssl)))
7481 (home-page "http://urllib3.readthedocs.org/")
7482 (synopsis "HTTP library with thread-safe connection pooling")
7483 (description
7484 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7485can reuse the same socket connection for multiple requests, it can POST files,
7486supports url redirection and retries, and also gzip and deflate decoding.")
7487 (license license:expat)))
7488
7489(define-public python2-urllib3
7490 (package-with-python2 python-urllib3))
2b2f2fc1
DT
7491
7492(define-public python-colorama
7493 (package
7494 (name "python-colorama")
7495 (version "0.3.3")
7496 (source
7497 (origin
7498 (method url-fetch)
7499 (uri (pypi-uri "colorama" version))
7500 (sha256
7501 (base32
7502 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7503 (build-system python-build-system)
7504 (inputs
7505 `(("python-setuptools" ,python-setuptools)))
7506 (synopsis "colored terminal text rendering for Python")
7507 (description "Colorama is a Python library for rendering colored terminal
7508text.")
7509 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 7510 (license license:bsd-3)))
2b2f2fc1
DT
7511
7512(define-public python2-colorama
7513 (package-with-python2 python-colorama))
f5bcec6e
DT
7514
7515(define-public python-rsa
7516 (package
7517 (name "python-rsa")
7518 (version "3.2")
7519 (source
7520 (origin
7521 (method url-fetch)
7522 (uri (pypi-uri "rsa" version))
7523 (sha256
7524 (base32
7525 "0xwp929g7lvb1sghxfpqlxvgg96qcwqdbhh27sjplx30n3xp3wrh"))))
7526 (build-system python-build-system)
7527 (inputs
7528 `(("python-pyasn1" ,python-pyasn1)
7529 ("python-setuptools" ,python-setuptools)))
7530 (synopsis "Pure-Python RSA implementation")
7531 (description "Python-RSA is a pure-Python RSA implementation. It supports
7532encryption and decryption, signing and verifying signatures, and key
7533generation according to PKCS#1 version 1.5. It can be used as a Python
7534library as well as on the command line.")
7535 (home-page "http://stuvel.eu/rsa")
3f641af0 7536 (license license:asl2.0)))
f5bcec6e
DT
7537
7538(define-public python2-rsa
7539 (package-with-python2 python-rsa))
c0aacfa5
DT
7540
7541(define-public python-pluggy
7542 (package
7543 (name "python-pluggy")
7544 (version "0.3.1")
7545 (source
7546 (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "pluggy" version))
7549 (sha256
7550 (base32
7551 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7552 (build-system python-build-system)
7553 (inputs
7554 `(("python-setuptools" ,python-setuptools)))
7555 (synopsis "Plugin and hook calling mechanism for Python")
7556 (description "Pluggy is an extraction of the plugin manager as used by
7557Pytest but stripped of Pytest specific details.")
7558 (home-page "https://pypi.python.org/pypi/pluggy")
7559 (license license:expat)))
7560
7561(define-public python2-pluggy
7562 (package-with-python2 python-pluggy))
a4af21ca
DT
7563
7564(define-public python-tox
7565 (package
7566 (name "python-tox")
7567 (version "2.3.1")
7568 (source
7569 (origin
7570 (method url-fetch)
7571 (uri (pypi-uri "tox" version))
7572 (sha256
7573 (base32
7574 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7575 (build-system python-build-system)
7576 (arguments
7577 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7578 ;; pytest breaks other packages.
7579 '(#:tests? #f))
7580 (inputs
7581 `(("python-setuptools" ,python-setuptools)
7582 ("python-pluggy" ,python-pluggy)
7583 ("python-py" ,python-py)
7584 ("python-virtualenv" ,python-virtualenv)
7585 ("python-pytest" ,python-pytest)))
7586 (home-page "http://tox.testrun.org/")
7587 (synopsis "Virtualenv-based automation of test activities")
7588 (description "Tox is a generic virtualenv management and test command line
7589tool. It can be used to check that a package installs correctly with
7590different Python versions and interpreters, or run tests in each type of
7591supported environment, or act as a frontend to continuous integration
7592servers.")
7593 (license license:expat)))
7594
7595(define-public python2-tox
7596 (package-with-python2 python-tox))
ba9da248
DT
7597
7598(define-public python-jmespath
7599 (package
7600 (name "python-jmespath")
7601 (version "0.9.0")
7602 (source
7603 (origin
7604 (method url-fetch)
7605 (uri (pypi-uri "jmespath" version))
7606 (sha256
7607 (base32
7608 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7609 (build-system python-build-system)
7610 (inputs
7611 `(("python-setuptools" ,python-setuptools)))
7612 (synopsis "JSON Matching Expressions")
7613 (description "JMESPath (pronounced “james path”) is a Python library that
7614allows one to declaratively specify how to extract elements from a JSON
7615document.")
7616 (home-page "https://github.com/jmespath/jmespath.py")
7617 (license license:expat)))
7618
7619(define-public python2-jmespath
7620 (package-with-python2 python-jmespath))
935fcd5c
DT
7621
7622(define-public python-botocore
7623 (package
7624 (name "python-botocore")
7625 (version "1.3.17")
7626 (source
7627 (origin
7628 (method url-fetch)
7629 (uri (pypi-uri "botocore" version))
7630 (sha256
7631 (base32
7632 "08vpvdixx1c1lfv6vzjig68bpiir7wfyhzf49ysxgvhbprg5ra0w"))))
7633 (build-system python-build-system)
7634 (inputs
7635 `(("python-dateutil" ,python-dateutil-2)
7636 ("python-docutils" ,python-docutils)
7637 ("python-mock" ,python-mock)
7638 ("python-nose" ,python-nose)
7639 ("python-setuptools" ,python-setuptools)
7640 ("python-tox" ,python-tox)
7641 ("python-wheel" ,python-wheel)
7642 ("python-jmespath" ,python-jmespath)))
7643 (home-page "https://github.com/boto/botocore")
7644 (synopsis "Low-level interface to AWS")
7645 (description "Botocore is a Python library that provides a low-level
7646interface to the Amazon Web Services (AWS) API.")
3f641af0 7647 (license license:asl2.0)))
935fcd5c
DT
7648
7649(define-public python2-botocore
7650 (package-with-python2 python-botocore))
f861b8b8
DT
7651
7652(define-public awscli
7653 (package
7654 (name "awscli")
7655 (version "1.9.17")
7656 (source
7657 (origin
7658 (method url-fetch)
7659 (uri (string-append
7660 "https://pypi.python.org/packages/source/a/awscli/awscli-"
7661 version ".tar.gz"))
7662 (sha256
7663 (base32
7664 "1nj7jqvlpq57hfhby1njsbf8303gapa3njc4dramr6p3ffzvfi2i"))))
7665 (build-system python-build-system)
7666 (inputs
7667 `(("python-colorama" ,python-colorama)
7668 ("python-docutils" ,python-docutils)
7669 ("python-mock" ,python-mock)
7670 ("python-nose" ,python-nose)
7671 ("python-rsa" ,python-rsa)
7672 ("python-setuptools" ,python-setuptools)
7673 ("python-sphinx" ,python-sphinx)
7674 ("python-tox" ,python-tox)
7675 ("python-wheel" ,python-wheel)
7676 ("python-botocore" ,python-botocore)))
7677 (home-page "http://aws.amazon.com/cli/")
7678 (synopsis "Command line client for AWS")
7679 (description "AWS CLI provides a unified command line interface to the
7680Amazon Web Services (AWS) API.")
3f641af0 7681 (license license:asl2.0)))
6a44697d
LF
7682
7683(define-public python-hypothesis
7684 (package
7685 (name "python-hypothesis")
bea6d94d 7686 (version "3.1.0")
6a44697d
LF
7687 (source (origin
7688 (method url-fetch)
7689 (uri (pypi-uri "hypothesis" version))
7690 (sha256
7691 (base32
bea6d94d 7692 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 7693 (build-system python-build-system)
6a44697d
LF
7694 (propagated-inputs
7695 `(("python-flake8" ,python-flake8)
7696 ("python-pytest" ,python-pytest)))
7697 (synopsis "Library for property based testing")
7698 (description "Hypothesis is a library for testing your Python code against a
7699much larger range of examples than you would ever want to write by hand. It’s
7700based on the Haskell library, Quickcheck, and is designed to integrate
7701seamlessly into your existing Python unit testing work flow.")
7702 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 7703 (license license:mpl2.0)
6f068e08 7704 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
7705
7706(define-public python2-hypothesis
6f068e08
EF
7707 (let ((hypothesis (package-with-python2
7708 (strip-python2-variant python-hypothesis))))
7709 (package (inherit hypothesis)
7710 (native-inputs
7711 `(("python2-enum34" ,python2-enum34)
7712 ("python2-setuptools" ,python2-setuptools))))))
7517e73c
LF
7713
7714(define-public python-pytest-subtesthack
7715 (package
7716 (name "python-pytest-subtesthack")
7717 (version "0.1.1")
7718 (source (origin
7719 (method url-fetch)
7720 (uri (pypi-uri "pytest-subtesthack" version))
7721 (sha256
7722 (base32
7723 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
7724 (build-system python-build-system)
7725 (native-inputs
7726 `(;; setuptools required for python-2 variant
7727 ("python-setuptools" ,python-setuptools)))
7728 (propagated-inputs
7729 `(("python-pytest" ,python-pytest)))
7730 (synopsis "Set-up and tear-down fixtures for unit tests")
7731 (description "This plugin allows you to set up and tear down fixtures within
7732unit test functions that use @code{py.test}. This is useful for using
7733@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
7734function multiple times, without setting up or tearing down fixture state as is
7735normally the case.")
7736 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 7737 (license license:unlicense)))
7517e73c
LF
7738
7739(define-public python2-pytest-subtesthack
7740 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
7741
7742(define-public python2-xdo
7743 (package
7744 (name "python2-xdo")
7745 (version "0.2")
7746 (source (origin
7747 (method url-fetch)
7748 (uri (string-append
7749 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7750 "python-xdo_" version ".orig.tar.gz"))
7751 (sha256
7752 (base32
7753 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
7754 (build-system python-build-system)
7755 (arguments
7756 `(#:python ,python-2
7757 #:tests? #f)) ; no tests provided
7758 (inputs
7759 `(("xdotool" ,xdotool)
7760 ("libX11" ,libx11)))
7761 (home-page "https://tracker.debian.org/pkg/python-xdo")
7762 (synopsis "Python library for simulating X11 keyboard/mouse input")
7763 (description "Provides bindings to libxdo for manipulating X11 via simulated
7764input. (Note that this is mostly a legacy library; you may wish to look at
7765python-xdo for newer bindings.)")
3f641af0 7766 (license license:bsd-3)))
0bdc1671 7767
cb34dc6c
CAW
7768(define-public python-wtforms
7769 (package
7770 (name "python-wtforms")
7771 (version "2.1")
7772 (source
7773 (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "WTForms" version ".zip"))
7776 (sha256
7777 (base32
7778 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
7779 (build-system python-build-system)
7780 (native-inputs
7781 `(("unzip" ,unzip)))
7782 (home-page "http://wtforms.simplecodes.com/")
7783 (synopsis
7784 "Form validation and rendering library for Python web development")
7785 (description
7786 "WTForms is a flexible forms validation and rendering library
7787for Python web development. It is very similar to the web form API
7788available in Django, but is a standalone package.")
3f641af0 7789 (license license:bsd-3)
cb34dc6c
CAW
7790 (properties `((python2-variant . ,(delay python2-wtforms))))))
7791
7792(define-public python2-wtforms
7793 (package
7794 (inherit (package-with-python2
7795 (strip-python2-variant python-wtforms)))
7796 (inputs `(("python2-setuptools" ,python2-setuptools)))))
50aaec25
DT
7797
7798(define-public python-mako
7799 (package
7800 (name "python-mako")
7801 (version "1.0.3")
7802 (source
7803 (origin
7804 (method url-fetch)
7805 (uri (pypi-uri "Mako" version))
7806 (sha256
7807 (base32
7808 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
7809 (build-system python-build-system)
7810 (native-inputs
7811 `(("python-markupsafe" ,python-markupsafe)
7812 ("python-mock" ,python-mock)
7813 ("python-nose" ,python-nose)))
7814 (home-page "http://www.makotemplates.org/")
7815 (synopsis "Templating language for Python")
7816 (description "Mako is a templating language for Python that compiles
7817templates into Python modules.")
7818 (license license:expat)
7819 (properties `((python2-variant . ,(delay python2-mako))))))
7820
7821(define-public python2-mako
7822 (let ((base (package-with-python2
7823 (strip-python2-variant python-mako))))
7824 (package
7825 (inherit base)
7826 (native-inputs
7827 (cons `("python2-setuptools" ,python2-setuptools)
7828 (package-native-inputs base))))))
ae00a41f
CAW
7829
7830(define-public python-waitress
7831 (package
7832 (name "python-waitress")
7833 (version "0.8.10")
7834 (source
7835 (origin
7836 (method url-fetch)
7837 (uri (pypi-uri "waitress" version))
7838 (sha256
7839 (base32
7840 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
7841 (build-system python-build-system)
7842 (home-page "https://github.com/Pylons/waitress")
7843 (synopsis "Waitress WSGI server")
7844 (description "Waitress is meant to be a production-quality pure-Python WSGI
7845server with very acceptable performance.")
3f641af0 7846 (license license:zpl2.1)
ae00a41f
CAW
7847 (properties `((python2-variant . ,(delay python2-waitress))))))
7848
7849(define-public python2-waitress
7850 (package
7851 (inherit (package-with-python2
7852 (strip-python2-variant python-waitress)))
7853 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
778a284b
CAW
7854
7855(define-public python-wsgiproxy2
7856 (package
7857 (name "python-wsgiproxy2")
7858 (version "0.4.2")
7859 (source
7860 (origin
7861 (method url-fetch)
7862 (uri (pypi-uri "WSGIProxy2" version ".zip"))
7863 (sha256
7864 (base32
7865 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
7866 (build-system python-build-system)
7867 (native-inputs
7868 `(("unzip" ,unzip)
7869 ("python-nose" ,python-nose)
7870 ("python-coverage" ,python-coverage)))
7871 (propagated-inputs
7872 `(("python-six" ,python-six)
7873 ("python-webob" ,python-webob)))
7874 (home-page
7875 "https://github.com/gawel/WSGIProxy2/")
7876 (synopsis "WSGI Proxy with various http client backends")
7877 (description "WSGI turns HTTP requests into WSGI function calls.
7878WSGIProxy turns WSGI function calls into HTTP requests.
7879It also includes code to sign requests and pass private data,
7880and to spawn subprocesses to handle requests.")
7881 (license license:expat)
7882 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
7883
7884(define-public python2-wsgiproxy2
7885 (let ((wsgiproxy2 (package-with-python2
7886 (strip-python2-variant python-wsgiproxy2))))
7887 (package
7888 (inherit wsgiproxy2)
7889 (inputs `(("python2-setuptools" ,python2-setuptools)
7890 ,@(package-inputs wsgiproxy2))))))
bb7518b1
CAW
7891
7892(define-public python-pastedeploy
7893 (package
7894 (name "python-pastedeploy")
7895 (version "1.5.2")
7896 (source
7897 (origin
7898 (method url-fetch)
7899 (uri (pypi-uri "PasteDeploy" version))
7900 (sha256
7901 (base32
7902 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
7903 (build-system python-build-system)
7904 (native-inputs
7905 `(("python-nose" ,python-nose)))
7906 (propagated-inputs
7907 ;; This package uses pkg_resources, part of setuptools, during runtime,
7908 ;; hence why not a native-input.
7909 `(("python-setuptools" ,python-setuptools)))
7910 (home-page "http://pythonpaste.org/deploy/")
7911 (synopsis
7912 "Load, configure, and compose WSGI applications and servers")
7913 (description
7914 "This tool provides code to load WSGI applications and servers from URIs;
7915these URIs can refer to Python Eggs for INI-style configuration files. Paste
7916Script provides commands to serve applications based on this configuration
7917file.")
7918 (license license:expat)))
7919
7920(define-public python2-pastedeploy
7921 (package-with-python2 python-pastedeploy))
1cf53652 7922
c4a7904c
CAW
7923(define-public python-paste
7924 (package
7925 (name "python-paste")
7926 (version "2.0.2")
7927 (source
7928 (origin
7929 (method url-fetch)
7930 (uri (pypi-uri "Paste" version))
7931 (sha256
7932 (base32
7933 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
7934 (patches (search-patches "python-paste-remove-website-test.patch"
7935 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
7936 (build-system python-build-system)
7937 (native-inputs
7938 `(("python-nose" ,python-nose)))
7939 (propagated-inputs
7940 `(;; Uses pkg_resources provided by setuptools internally.
7941 ("python-setuptools" ,python-setuptools)
7942 ("python-six" ,python-six)))
7943 (arguments
7944 '(;; Tests don't pass on Python 3, but work fine on Python 2.
7945 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
7946 ;; but is usable enough for the minimal amount it's used in MediaGoblin
7947 ;; still... things should be better by the next Paste release.)
7948 #:tests? #f))
7949 (home-page "http://pythonpaste.org")
7950 (synopsis
7951 "Python web development tools, focusing on WSGI")
7952 (description
7953 "Paste provides a variety of web development tools and middleware which
7954can be nested together to build web applications. Paste's design closely
7955follows ideas flowing from WSGI (Web Standard Gateway Interface).")
7956 (license license:expat)
7957 (properties `((python2-variant . ,(delay python2-paste))))))
7958
7959(define-public python2-paste
7960 (let ((paste (package-with-python2
7961 (strip-python2-variant python-paste))))
7962 (package
7963 (inherit paste)
7964 (arguments
7965 ;; Tests are back for Python 2!
7966 `(#:tests? #t
7967 ,@(package-arguments paste))))))
7968
a8f20f63
CAW
7969(define-public python-pastescript
7970 (package
7971 (name "python-pastescript")
7972 (version "2.0.2")
7973 (source
7974 (origin
7975 (method url-fetch)
7976 (uri (pypi-uri "PasteScript" version))
7977 (sha256
7978 (base32
7979 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
7980 (build-system python-build-system)
7981 (native-inputs
7982 `(("python-nose" ,python-nose)))
7983 (propagated-inputs
7984 `(;; Uses pkg_resources provided by setuptools internally.
7985 ("python-setuptools" ,python-setuptools)
7986 ("python-paste" ,python-paste)
7987 ("python-pastedeploy" ,python-pastedeploy)))
7988 (home-page "http://pythonpaste.org/script/")
7989 (arguments
7990 '(;; Unfortunately, this requires the latest unittest2,
7991 ;; but that requires traceback2 which requires linecache2 which requires
7992 ;; unittest2. So we're skipping tests for now.
7993 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
7994 ;; so in theory we could get around this situation somehow.)
7995 #:tests? #f))
7996 (synopsis
7997 "Pluggable command line tool for serving web applications and more")
7998 (description
7999 "PasteScript is a plugin-friendly command line tool which provides a
8000variety of features, from launching web applications to bootstrapping project
8001layouts.")
8002 (license license:expat)))
8003
8004(define-public python2-pastescript
8005 (package-with-python2 python-pastescript))
8006
1cf53652
CAW
8007(define-public python-pyquery
8008 (package
8009 (name "python-pyquery")
aab76e80 8010 (version "1.2.13")
1cf53652
CAW
8011 (source
8012 (origin
8013 (method url-fetch)
8014 (uri (pypi-uri "pyquery" version))
8015 (sha256
8016 (base32
aab76e80 8017 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652
CAW
8018 (build-system python-build-system)
8019 (propagated-inputs
8020 `(("python-lxml" ,python-lxml)
8021 ("python-cssselect" ,python-cssselect)))
8022 (home-page "https://github.com/gawel/pyquery")
8023 (synopsis "Make jQuery-like queries on xml documents")
8024 (description "pyquery allows you to make jQuery queries on xml documents.
8025The API is as much as possible the similar to jQuery. pyquery uses lxml for
8026fast xml and html manipulation.")
3f641af0 8027 (license license:bsd-3)
1cf53652
CAW
8028 (properties `((python2-variant . ,(delay python2-pyquery))))))
8029
8030(define-public python2-pyquery
8031 (let ((pyquery (package-with-python2
8032 (strip-python2-variant python-pyquery))))
8033 (package
8034 (inherit pyquery)
8035 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
aa6313d6
CAW
8036
8037(define-public python-webtest
8038 (package
8039 (name "python-webtest")
8040 (version "2.0.20")
8041 (source
8042 (origin
8043 (method url-fetch)
8044 (uri (pypi-uri "WebTest" version))
8045 (sha256
8046 (base32
8047 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8048 (build-system python-build-system)
8049 (arguments
8050 `(;; Unfortunately we have to disable tests!
8051 ;; This release of WebTest is pinned to python-nose < 1.3,
8052 ;; but older versions of python-nose are plagued with the following
8053 ;; bug(s), which rears its ugly head during test execution:
8054 ;; https://github.com/nose-devs/nose/issues/759
8055 ;; https://github.com/nose-devs/nose/pull/811
8056 #:tests? #f))
8057 ;; Commented out code is no good, but in this case, once tests
8058 ;; are ready to be enabled again, we should put the following
8059 ;; in place:
8060 ;; (native-inputs
8061 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8062 ;; ; but see above comment
8063 ;; ("python-coverage" ,python-coverage)
8064 ;; ("python-mock" ,python-mock)
8065 ;; ("python-pastedeploy" ,python-pastedeploy)
8066 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8067 ;; ("python-pyquery" ,python-pyquery)))
8068 (propagated-inputs
8069 `(("python-waitress" ,python-waitress)
8070 ("python-webob" ,python-webob)
8071 ("python-six" ,python-six)
8072 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8073 (home-page "http://webtest.pythonpaste.org/")
8074 (synopsis "Helper to test WSGI applications")
8075 (description "Webtest allows you to test your Python web applications
8076without starting an HTTP server. It supports anything that supports the
8077minimum of WSGI.")
8078 (license license:expat)
8079 (properties `((python2-variant . ,(delay python2-webtest))))))
8080
8081(define-public python2-webtest
8082 (let ((webtest (package-with-python2
8083 (strip-python2-variant python-webtest))))
8084 (package
8085 (inherit webtest)
8086 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8087 ,@(package-native-inputs webtest))))))
4cb122cd
CAW
8088
8089(define-public python-anyjson
8090 (package
8091 (name "python-anyjson")
8092 (version "0.3.3")
8093 (source
8094 (origin
8095 (method url-fetch)
8096 (uri (pypi-uri "anyjson" version))
8097 (sha256
8098 (base32
8099 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8100 (build-system python-build-system)
8101 (arguments
8102 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8103 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8104 ;; whatever) so this transformation needs to be done before the tests
8105 ;; can be run. Maybe we could add a build step to transform beforehand
8106 ;; but it could be annoying/difficult.
8107 ;; We can enable tests for the Python 2 version, though, and do below.
8108 #:tests? #f))
8109 (home-page "http://bitbucket.org/runeh/anyjson/")
8110 (synopsis
8111 "Wraps best available JSON implementation in a common interface")
8112 (description
8113 "Anyjson loads whichever is the fastest JSON module installed
8114and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8115 (license license:bsd-3)
4cb122cd
CAW
8116 (properties `((python2-variant . ,(delay python2-anyjson))))))
8117
8118(define-public python2-anyjson
8119 (let ((anyjson (package-with-python2
8120 (strip-python2-variant python-anyjson))))
8121 (package
8122 (inherit anyjson)
8123 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8124 #:tests? #t
8125 ,@(package-arguments anyjson)))
8126 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8127 ("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8128
8129(define-public python-amqp
8130 (package
8131 (name "python-amqp")
8132 (version "1.4.9")
8133 (source
8134 (origin
8135 (method url-fetch)
8136 (uri (pypi-uri "amqp" version))
8137 (sha256
8138 (base32
8139 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8140 (build-system python-build-system)
8141 (native-inputs
8142 `(("python-nose" ,python-nose)
8143 ("python-mock" ,python-mock)))
8144 (home-page "http://github.com/celery/py-amqp")
8145 (synopsis
8146 "Low-level AMQP client for Python (fork of amqplib)")
8147 (description
8148 "This is a fork of amqplib which was originally written by Barry Pederson.
8149It is maintained by the Celery project, and used by kombu as a pure python
8150alternative when librabbitmq is not available.")
3f641af0 8151 (license license:lgpl2.1+)
8dfceab7
CAW
8152 (properties `((python2-variant . ,(delay python2-amqp))))))
8153
8154(define-public python2-amqp
8155 (let ((amqp (package-with-python2
8156 (strip-python2-variant python-amqp))))
8157 (package
8158 (inherit amqp)
8159 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8160 ;; unmaintained. Weirdly, does not do this on the python 3
8161 ;; version?
8162 #:tests? #f
8163 ,@(package-arguments amqp)))
8164 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8165 ,@(package-native-inputs amqp))))))
7d387305
CAW
8166
8167(define-public python-kombu
8168 (package
8169 (name "python-kombu")
8170 (version "3.0.33")
8171 (source
8172 (origin
8173 (method url-fetch)
8174 (uri (pypi-uri "kombu" version))
8175 (sha256
8176 (base32
8177 "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5"))))
8178 (build-system python-build-system)
8179 (native-inputs
8180 `(("python-mock" ,python-mock)
8181 ("python-nose" ,python-nose)))
8182 (propagated-inputs
8183 `(("python-anyjson" ,python-anyjson)
8184 ("python-amqp" ,python-amqp)))
8185 (home-page "http://kombu.readthedocs.org")
8186 (synopsis "Message passing library for Python")
8187 (description "The aim of Kombu is to make messaging in Python as easy as
8188possible by providing an idiomatic high-level interface for the AMQ protocol,
8189and also provide proven and tested solutions to common messaging problems.
8190AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8191message orientation, queuing, routing, reliability and security, for which the
8192RabbitMQ messaging server is the most popular implementation.")
3f641af0 8193 (license license:bsd-3)
7d387305
CAW
8194 (properties `((python2-variant . ,(delay python2-kombu))))))
8195
8196(define-public python2-kombu
8197 (let ((kombu (package-with-python2
8198 (strip-python2-variant python-kombu))))
8199 (package
8200 (inherit kombu)
8201 (inputs `(("python2-setuptools" ,python2-setuptools)
8202 ("python2-unittest2" ,python2-unittest2)
8203 ,@(package-inputs kombu))))))
b6f0b9fb
CAW
8204
8205(define-public python-billiard
8206 (package
8207 (name "python-billiard")
8208 (version "3.3.0.22")
8209 (source
8210 (origin
8211 (method url-fetch)
8212 (uri (pypi-uri "billiard" version))
8213 (sha256
8214 (base32
8215 "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj"))))
8216 (build-system python-build-system)
8217 (native-inputs
8218 `(("python-nose" ,python-nose)))
8219 (home-page "http://github.com/celery/billiard")
8220 (synopsis
8221 "Python multiprocessing fork with improvements and bugfixes")
8222 (description
8223 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8224multiprocessing package itself is a renamed and updated version of R Oudkerk's
8225pyprocessing package. This standalone variant is intended to be compatible with
8226Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 8227 (license license:bsd-3)
b6f0b9fb
CAW
8228 (properties `((python2-variant . ,(delay python2-billiard))))))
8229
8230(define-public python2-billiard
8231 (let ((billiard (package-with-python2
8232 (strip-python2-variant python-billiard))))
8233 (package
8234 (inherit billiard)
8235 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8236 ("python2-unittest2" ,python2-unittest2)
8237 ("python2-mock" ,python2-mock)
8238 ,@(package-native-inputs billiard))))))
22df6419
CAW
8239
8240(define-public python-celery
8241 (package
8242 (name "python-celery")
8243 (version "3.1.20")
8244 (source
8245 (origin
8246 (method url-fetch)
8247 (uri (pypi-uri "celery" version))
8248 (sha256
8249 (base32
8250 "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh"))))
8251 (build-system python-build-system)
8252 (native-inputs
8253 `(("python-nose" ,python-nose)))
a64cbb6f 8254 (inputs
22df6419 8255 `(("python-pytz" ,python-pytz)
a64cbb6f
EF
8256 ("python-amqp" ,python-amqp)
8257 ("python-anyjson" ,python-anyjson)
22df6419
CAW
8258 ("python-billiard" ,python-billiard)
8259 ("python-kombu" ,python-kombu)))
8260 (home-page "http://celeryproject.org")
8261 (synopsis "Distributed Task Queue")
8262 (description "Celery is an asynchronous task queue/job queue based on
8263distributed message passing. It is focused on real-time operation, but
8264supports scheduling as well. The execution units, called tasks, are executed
8265concurrently on a single or more worker servers using multiprocessing,
8266Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8267synchronously (wait until ready).")
3f641af0 8268 (license license:bsd-3)
22df6419
CAW
8269 (properties `((python2-variant . ,(delay python2-celery))))))
8270
8271(define-public python2-celery
8272 (let ((celery (package-with-python2
8273 (strip-python2-variant python-celery))))
8274 (package
8275 (inherit celery)
8276 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8277 ("python2-unittest2" ,python2-unittest2)
8278 ("python2-mock" ,python2-mock)
8279 ,@(package-native-inputs celery))))))
97e32948
CAW
8280
8281(define-public python-translitcodec
8282 (package
8283 (name "python-translitcodec")
8284 (version "0.4.0")
8285 (source
8286 (origin
8287 (method url-fetch)
8288 (uri (pypi-uri "translitcodec" version))
8289 (sha256
8290 (base32
8291 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8292 (build-system python-build-system)
8293 (arguments
8294 `(#:tests? #f)) ; no tests provided
8295 (home-page
8296 "https://github.com/claudep/translitcodec")
8297 (synopsis
8298 "Unicode to 8-bit charset transliteration codec")
8299 (description
8300 "This package contains codecs for transliterating ISO 10646 texts into
8301best-effort representations using smaller coded character sets (ASCII,
8302ISO 8859, etc.).")
8303 (license license:expat)
8304 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8305
8306(define-public python2-translitcodec
8307 (package
8308 (inherit (package-with-python2
8309 (strip-python2-variant python-translitcodec)))
8310 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0c3b90d4
CAW
8311
8312(define-public python-editor
8313 (package
8314 (name "python-editor")
8315 (version "0.5")
8316 (source
8317 (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "python-editor" version))
8320 (sha256
8321 (base32
8322 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8323 (build-system python-build-system)
8324 (home-page
8325 "https://github.com/fmoo/python-editor")
8326 (synopsis
8327 "Programmatically open an editor, capture the result")
8328 (description
8329 "python-editor is a library that provides the editor module for
8330programmatically interfacing with your system's $EDITOR.")
3f641af0 8331 (license license:asl2.0)
0c3b90d4
CAW
8332 (properties `((python2-variant . ,(delay python2-editor))))))
8333
8334(define-public python2-editor
8335 (package
8336 (inherit (package-with-python2
8337 (strip-python2-variant python-editor)))
8338 (inputs `(("python2-setuptools" ,python2-setuptools)))))
3276517c
LF
8339
8340(define-public python-sphinxcontrib-programoutput
8341 (package
8342 (name "python-sphinxcontrib-programoutput")
8343 (version "0.8")
8344 (source (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8347 (sha256
8348 (base32
8349 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8350 (build-system python-build-system)
8351 (propagated-inputs
8352 `(("python-docutils" ,python-docutils)
8353 ("python-sphinx" ,python-sphinx)))
8354 (synopsis "Sphinx extension to include program output")
8355 (description "A Sphinx extension to literally insert the output of arbitrary
8356commands into documents, helping you to keep your command examples up to date.")
8357 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
3f641af0 8358 (license license:bsd-2)
3276517c
LF
8359 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8360
8361(define-public python2-sphinxcontrib-programoutput
8362 (package
8363 (inherit (package-with-python2
8364 (strip-python2-variant python-sphinxcontrib-programoutput)))
8365 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
548d7165
LF
8366
8367(define-public python-sphinx-repoze-autointerface
8368 (package
8369 (name "python-sphinx-repoze-autointerface")
328ae341 8370 (version "0.8")
548d7165
LF
8371 (source (origin
8372 (method url-fetch)
8373 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8374 (sha256
8375 (base32
328ae341 8376 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
8377 (build-system python-build-system)
8378 (propagated-inputs
8379 `(("python-docutils" ,python-docutils)
8380 ("python-sphinx" ,python-sphinx)
8381 ("python-zope-interface" ,python-zope-interface)))
8382 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8383 (description "This package defines an extension for the Sphinx documentation
8384system. The extension allows generation of API documentation by
8385introspection of @code{zope.interface} instances in code.")
8386 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 8387 (license license:repoze)))
548d7165
LF
8388
8389(define-public python2-sphinx-repoze-autointerface
8390 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
8391
8392(define-public python-psycopg2
8393 (package
8394 (name "python-psycopg2")
8395 (version "2.6.1")
8396 (source
8397 (origin
8398 (method url-fetch)
8399 (uri (pypi-uri "psycopg2" version))
8400 (sha256
8401 (base32
8402 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8403 (build-system python-build-system)
8404 (arguments
8405 ;; Tests would require a postgresql database "psycopg2_test"
8406 ;; and a running postgresql database management service.
8407 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8408 (inputs
8409 `(("postgresql" ,postgresql))) ; libpq
8410 (home-page "http://initd.org/psycopg/")
8411 (synopsis "Python PostgreSQL adapter")
8412 (description
8413 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
3f641af0 8414 (license license:lgpl3+)
b31fbea5
DM
8415 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8416
8417(define-public python2-psycopg2
8418 (package
8419 (inherit (package-with-python2
8420 (strip-python2-variant python-psycopg2)))
8421 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
eed1a61f
LF
8422
8423(define-public python-vobject
8424 (package
8425 (name "python-vobject")
9bed9b15 8426 (version "0.9.2")
eed1a61f
LF
8427 (source (origin
8428 (method url-fetch)
8429 (uri (pypi-uri "vobject" version))
8430 (sha256
8431 (base32
9bed9b15 8432 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f
LF
8433 (build-system python-build-system)
8434 (inputs
8435 `(("python-dateutil-2" ,python-dateutil-2)
8436 ("python-pyicu" ,python-pyicu)))
8437 (synopsis "Parse and generate vCard and vCalendar files")
8438 (description "Vobject is intended to be a full featured Python package for
8439parsing and generating vCard and vCalendar files. Currently, iCalendar files
8440are supported and well tested. vCard 3.0 files are supported, and all data
8441should be imported, but only a few components are understood in a sophisticated
8442way.")
8443 (home-page "http://eventable.github.io/vobject/")
3f641af0 8444 (license license:asl2.0)
eed1a61f
LF
8445 (properties `((python2-variant . ,(delay python2-vobject))))))
8446
8447(define-public python2-vobject
8448 (package
8449 (inherit (package-with-python2
8450 (strip-python2-variant python-vobject)))
8451 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
cedac813
LF
8452
8453(define-public python-munkres
8454 (package
8455 (name "python-munkres")
8456 (version "1.0.7")
8457 (source (origin
8458 (method url-fetch)
8459 (uri (pypi-uri "munkres" version))
8460 (sha256
8461 (base32
8462 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8463 (build-system python-build-system)
8464 (arguments
8465 '(#:tests? #f)) ; no test suite
8466 (home-page "http://software.clapper.org/munkres/")
8467 (synopsis "Implementation of the Munkres algorithm")
8468 (description "The Munkres module provides an implementation of the Munkres
8469algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8470useful for solving the Assignment Problem.")
3f641af0 8471 (license license:bsd-3)))
cedac813
LF
8472
8473(define-public python2-munkres
8474 (package-with-python2 python-munkres))
f3b3d78f
LF
8475
8476(define-public python-flask
8477 (package
8478 (name "python-flask")
8479 (version "0.10.1")
8480 (source (origin
8481 (method url-fetch)
8482 (uri (pypi-uri "Flask" version))
8483 (sha256
8484 (base32
8485 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8486 (build-system python-build-system)
8487 (propagated-inputs
8488 `(("python-itsdangerous" ,python-itsdangerous)
8489 ("python-jinja2" ,python-jinja2)
8490 ("python-werkzeug" ,python-werkzeug)))
8491 (home-page "https://github.com/mitsuhiko/flask/")
8492 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8493 (description "Flask is a micro web framework based on the Werkzeug toolkit
8494and Jinja2 template engine. It is called a micro framework because it does not
8495presume or force a developer to use a particular tool or library.")
3f641af0 8496 (license license:bsd-3)
f3b3d78f
LF
8497 (properties `((python2-variant . ,(delay python2-flask))))))
8498
8499(define-public python2-flask
8500 (package (inherit (package-with-python2
8501 (strip-python2-variant python-flask)))
8502 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
603d665b
LF
8503
8504(define-public python-cookies
8505 (package
8506 (name "python-cookies")
8507 (version "2.2.1")
8508 (source (origin
8509 (method url-fetch)
8510 (uri (pypi-uri "cookies" version))
8511 (sha256
8512 (base32
8513 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8514 (build-system python-build-system)
8515 (arguments
8516 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8517 #:tests? #f))
8518 (native-inputs
8519 `(("python-pytest" ,python2-pytest)))
8520 (synopsis "HTTP cookie parser and renderer")
8521 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8522Python.")
8523 (home-page "https://gitlab.com/sashahart/cookies")
8524 (license license:expat)
8525 (properties `((python2-variant . ,(delay python2-cookies))))))
8526
8527(define-public python2-cookies
8528 (let ((cookies (package-with-python2
8529 (strip-python2-variant python-cookies))))
8530 (package (inherit cookies)
8531 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8532 ,@(package-native-inputs cookies))))))
0efde7d6
LF
8533
8534(define-public python-responses
8535 (package
8536 (name "python-responses")
8537 (version "0.5.1")
8538 (source (origin
8539 (method url-fetch)
8540 (uri (pypi-uri "responses" version))
8541 (sha256
8542 (base32
8543 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8544 (build-system python-build-system)
8545 (arguments
8546 `(;; Test suite is not distributed:
8547 ;; https://github.com/getsentry/responses/issues/38
8548 #:tests? #f))
8549 (native-inputs
8550 `(("python-cookies" ,python-cookies)
8551 ("python-mock" ,python-mock)))
8552 (propagated-inputs
8553 `(("python-requests" ,python-requests)
8554 ("python-six" ,python-six)))
8555 (home-page "https://github.com/getsentry/responses")
8556 (synopsis "Utility for mocking out the `requests` Python library")
8557 (description "A utility library for mocking out the `requests` Python
8558library.")
3f641af0 8559 (license license:asl2.0)
0efde7d6
LF
8560 (properties `((python2-variant . ,(delay python2-responses))))))
8561
8562(define-public python2-responses
8563 (let ((responses (package-with-python2
8564 (strip-python2-variant python-responses))))
8565 (package (inherit responses)
8566 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8567 ,@(package-native-inputs responses))))))
76b94885
LF
8568
8569(define-public python-pathlib
8570 (package
8571 (name "python-pathlib")
8572 (version "1.0.1")
8573 (source (origin
8574 (method url-fetch)
8575 (uri (pypi-uri "pathlib" version))
8576 (sha256
8577 (base32
8578 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8579 (build-system python-build-system)
8580 (arguments
8581 `(#:phases
8582 (modify-phases %standard-phases
8583 (replace 'check
8584 (lambda _ (zero? (system* "python" "./test_pathlib.py")))))))
8585 (home-page "https://pathlib.readthedocs.org/")
8586 (synopsis "Object-oriented filesystem paths")
8587 (description "Pathlib offers a set of classes to handle filesystem paths.
8588It offers the following advantages over using string objects:
8589
8590@enumerate
8591@item No more cumbersome use of os and os.path functions. Everything can
8592be done easily through operators, attribute accesses, and method calls.
8593@item Embodies the semantics of different path types. For example,
8594comparing Windows paths ignores casing.
8595@item Well-defined semantics, eliminating any inconsistencies or
8596ambiguities (forward vs. backward slashes, etc.).
8597@end enumerate\n")
8598 (license license:expat)))
8599
8600(define-public python2-pathlib
8601 (package-with-python2 python-pathlib))
25a7db0a
LF
8602
8603(define-public python-jellyfish
8604 (package
8605 (name "python-jellyfish")
8606 (version "0.5.3")
8607 (source (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "jellyfish" version))
8610 (sha256
8611 (base32
8612 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
8613 (build-system python-build-system)
8614 (native-inputs
8615 `(("python-pytest" ,python-pytest)))
8616 (home-page "https://github.com/jamesturk/jellyfish")
8617 (synopsis "Approximate and phonetic matching of strings")
8618 (description "Jellyfish uses a variety of string comparison and phonetic
8619encoding algorithms to do fuzzy string matching.")
3f641af0 8620 (license license:bsd-2)
25a7db0a
LF
8621 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8622
8623(define-public python2-jellyfish
8624 (let ((jellyfish (package-with-python2
8625 (strip-python2-variant python-jellyfish))))
8626 (package (inherit jellyfish)
8627 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8628 ("python2-unicodecsv" ,python2-unicodecsv)
8629 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
8630
8631(define-public python2-unicodecsv
8632 (package
8633 (name "python2-unicodecsv")
8634 (version "0.14.1")
8635 (source (origin
8636 (method url-fetch)
8637 ;; The test suite is not included in the PyPi release.
8638 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8639 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8640 "archive/" version ".tar.gz"))
8641 (file-name (string-append name "-" version ".tar.gz"))
8642 (sha256
8643 (base32
8644 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8645 (build-system python-build-system)
8646 (arguments
8647 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8648 #:python ,python-2))
8649 (native-inputs
8650 `(("python2-setuptools" ,python2-setuptools)
8651 ("python2-unittest2" ,python2-unittest2)))
8652 (home-page "https://github.com/jdunck/python-unicodecsv")
8653 (synopsis "Unicode CSV module for Python 2")
8654 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8655module, adding support for Unicode strings.")
3f641af0 8656 (license license:bsd-2)))
064503aa
LF
8657
8658(define-public python-rarfile
8659 (package
8660 (name "python-rarfile")
8661 (version "2.7")
8662 (source (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "rarfile" version))
8665 (sha256
8666 (base32
8667 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
8668 ;; https://github.com/markokr/rarfile/pull/17/
fc1adab1 8669 (patches (search-patches "python-rarfile-fix-tests.patch"))))
064503aa
LF
8670 (build-system python-build-system)
8671 (arguments
8672 '(#:phases
8673 (modify-phases %standard-phases
8674 (replace 'check
8675 ;; Many tests fail, but the installation proceeds.
8676 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8677 (native-inputs
8678 `(("which" ,which))) ; required for tests
8679 (propagated-inputs
8680 `(("libarchive" ,libarchive)))
8681 (home-page "https://github.com/markokr/rarfile")
8682 (synopsis "RAR archive reader for Python")
8683 (description "This is Python module for RAR archive reading. The interface
8684is made as zipfile like as possible.")
3f641af0 8685 (license license:isc)))
064503aa
LF
8686
8687(define-public python2-rarfile
8688 (package-with-python2 python-rarfile))
daeeea71
CM
8689
8690(define-public python-magic
8691 (package
8692 (name "python-magic")
8693 (version "0.4.3")
8694 (source
8695 (origin
8696 (method url-fetch)
8697 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
8698 version ".tar.gz"))
8699 (sha256
8700 (base32
8701 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
8702 (file-name (string-append name "-" version "-checkout"))))
8703 (build-system python-build-system)
8704 (arguments
8705 ;; The tests are unreliable, so don't run them. The tests fail
8706 ;; under Python3 because they were written for Python2 and
8707 ;; contain import statements that do not work in Python3. One of
8708 ;; the tests fails under Python2 because its assertions are
8709 ;; overly stringent; it relies on comparing output strings which
8710 ;; are brittle and can change depending on the version of
8711 ;; libmagic being used and the system on which the test is
8712 ;; running. In my case, under GuixSD 0.10.0, only one test
8713 ;; failed, and it seems to have failed only because the version
8714 ;; of libmagic that is packaged in Guix outputs a slightly
8715 ;; different (but not wrong) string than the one that the test
8716 ;; expected.
8717 '(#:tests? #f
8718 #:phases (modify-phases %standard-phases
8719 ;; Replace a specific method call with a hard-coded
8720 ;; path to the necessary libmagic.so file in the
8721 ;; store. If we don't do this, then the method call
8722 ;; will fail to find the libmagic.so file, which in
8723 ;; turn will cause any application using
8724 ;; python-magic to fail.
8725 (add-before 'build 'hard-code-path-to-libmagic
8726 (lambda* (#:key inputs #:allow-other-keys)
8727 (let ((file (assoc-ref inputs "file")))
8728 (substitute* "magic.py"
8729 (("ctypes.util.find_library\\('magic'\\)")
8730 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
8731 #t)))
8732 (add-before 'install 'disable-egg-compression
8733 (lambda _
8734 (let ((port (open-file "setup.cfg" "a")))
8735 (display "\n[easy_install]\nzip_ok = 0\n"
8736 port)
8737 (close-port port)
8738 #t))))))
daeeea71
CM
8739 (native-inputs
8740 `(("python-setuptools" ,python-setuptools)))
8741 (inputs
8742 ;; python-magic needs to be able to find libmagic.so.
8743 `(("file" ,file)))
8744 (home-page "https://github.com/ahupp/python-magic")
8745 (synopsis "File type identification using libmagic")
8746 (description
8747 "This module uses ctypes to access the libmagic file type
8748identification library. It makes use of the local magic database and
8749supports both textual and MIME-type output. Note that this module and
8750the python-file module both provide a \"magic.py\" file; these two
8751modules, which are different and were developed separately, both serve
8752the same purpose: to provide Python bindings for libmagic.")
8753 (license license:expat)))
8754
8755(define-public python2-magic
8756 (package-with-python2 python-magic))
12af303f
CM
8757
8758(define-public python2-s3cmd
8759 (package
8760 (name "python2-s3cmd")
8761 (version "1.6.1")
8762 (source
8763 (origin
8764 (method url-fetch)
de67e922 8765 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
8766 "s3cmd-" version ".tar.gz"))
8767 (sha256
8768 (base32
8769 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8770 (build-system python-build-system)
8771 (arguments
8772 ;; s3cmd is written for python2 only and contains no tests.
8773 `(#:python ,python-2
8774 #:tests? #f))
8775 (native-inputs
8776 `(("python2-setuptools" ,python2-setuptools)))
8777 (inputs
8778 `(("python2-dateutil" ,python2-dateutil)
8779 ;; The python-file package also provides a magic.py module.
8780 ;; This is an unfortunate state of affairs; however, s3cmd
8781 ;; fails to install if it cannot find specifically the
8782 ;; python-magic package. Thus we include it, instead of using
8783 ;; python-file. Ironically, s3cmd sometimes works better
8784 ;; without libmagic bindings at all:
8785 ;; https://github.com/s3tools/s3cmd/issues/198
8786 ("python2-magic" ,python2-magic)))
8787 (home-page "http://s3tools.org/s3cmd")
8788 (synopsis "Command line tool for S3-compatible storage services")
8789 (description
8790 "S3cmd is a command line tool for uploading, retrieving and managing data
8791in storage services that are compatible with the Amazon Simple Storage
8792Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8793GnuPG encryption, and more. It also supports management of Amazon's
8794CloudFront content delivery network.")
3f641af0 8795 (license license:gpl2+)))
4323a5f0
AE
8796
8797(define-public python-pkgconfig
8798 (package
8799 (name "python-pkgconfig")
8800 (version "1.1.0")
8801 (source
8802 (origin
8803 (method url-fetch)
8804 (uri (pypi-uri "pkgconfig" version))
8805 (sha256
8806 (base32
8807 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8808 (build-system python-build-system)
8809 (native-inputs
8810 `(("python-nose" ,python-nose)
8811 ("python-setuptools" ,python-setuptools)))
8812 (inputs
8813 `(("pkg-config" ,pkg-config)))
8814 (arguments
8815 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8816 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8817 #:tests? #f
8818 ;; Prevent creation of the egg. This works around
8819 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
8820 #:configure-flags '("--single-version-externally-managed" "--root=/")
8821 ;; Hard-code the path to pkg-config.
8822 #:phases
8823 (modify-phases %standard-phases
8824 (add-before
8825 'build 'patch
8826 (lambda _
8827 (substitute* "pkgconfig/pkgconfig.py"
8828 (("cmd = 'pkg-config")
8829 (string-append "cmd = '" (which "pkg-config"))))
8830 #t)))))
8831 (home-page "http://github.com/matze/pkgconfig")
8832 (synopsis "Python interface for pkg-config")
8833 (description "This module provides a Python interface to pkg-config. It
8834can be used to find all pkg-config packages, check if a package exists,
8835check if a package meets certain version requirements, query CFLAGS and
8836LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 8837 (license license:expat)))
4323a5f0
AE
8838
8839(define-public python2-pkgconfig
8840 (package-with-python2 python-pkgconfig))
8841
2e697322
BW
8842(define-public python-bz2file
8843 (package
8844 (name "python-bz2file")
8845 (version "0.98")
8846 (source
8847 (origin
8848 (method url-fetch)
8849 (uri (pypi-uri "bz2file" version))
8850 (sha256
8851 (base32
8852 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8853 (build-system python-build-system)
8854 (arguments
124df723 8855 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
8856 (home-page "https://github.com/nvawda/bz2file")
8857 (synopsis "Read and write bzip2-compressed files")
8858 (description
8859 "Bz2file is a Python library for reading and writing bzip2-compressed
8860files. It contains a drop-in replacement for the I/O interface in the
8861standard library's @code{bz2} module, including features from the latest
8862development version of CPython that are not available in older releases.")
3f641af0 8863 (license license:asl2.0)
2e697322
BW
8864 (properties `((python2-variant . ,(delay python2-bz2file))))))
8865
8866(define-public python2-bz2file
8867 (let ((base (package-with-python2
8868 (strip-python2-variant python-bz2file))))
8869 (package
8870 (inherit base)
8871 (native-inputs
124df723
BW
8872 `(("python2-setuptools" ,python2-setuptools)))
8873 (arguments
752bb447
BW
8874 `(#:python ,python-2
8875 #:phases
124df723
BW
8876 (modify-phases %standard-phases
8877 ;; 'python setup.py test' does not work as of 0.98.
8878 ;; There is only the one test file, so we run it directly.
8879 (replace 'check
8880 (lambda _ (zero? (system* "python"
8881 "test_bz2file.py"))))))))))
2e697322 8882
da4ac1aa
BW
8883(define-public python-future
8884 (package
8885 (name "python-future")
8886 (version "0.15.2")
8887 (source
8888 (origin
8889 (method url-fetch)
8890 (uri (pypi-uri "future" version))
8891 (sha256
8892 (base32
8893 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
8894 (build-system python-build-system)
8895 ;; Many tests connect to the network or are otherwise flawed.
8896 ;; https://github.com/PythonCharmers/python-future/issues/210
8897 (arguments
8898 `(#:tests? #f))
8899 (home-page "http://python-future.org")
8900 (synopsis "Single-source support for Python 3 and 2")
8901 (description
8902 "@code{python-future} is the missing compatibility layer between Python 2 and
8903Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8904to support both Python 2 and Python 3 with minimal overhead.")
8905 (license license:expat)
8906 (properties `((python2-variant . ,(delay python2-future))))))
8907
8908(define-public python2-future
8909 (let ((base (package-with-python2
8910 (strip-python2-variant python-future))))
8911 (package
8912 (inherit base)
8913 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
8914
8e451885
AE
8915(define-public python-cysignals
8916 (package
8917 (name "python-cysignals")
8918 (version "1.1.0")
8919 (source
8920 (origin
8921 (method url-fetch)
8922 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8923 (sha256
8924 (base32
8925 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8926 (build-system python-build-system)
8927 (native-inputs
8928 `(("python-cython" ,python-cython)
8929 ("python-setuptools" ,python-setuptools)
8930 ("python-sphinx" ,python-sphinx)))
8931 (inputs
8932 `(("pari-gp" ,pari-gp)))
8933 (arguments
8934 `(#:modules ((guix build python-build-system)
8935 ((guix build gnu-build-system) #:prefix gnu:)
8936 (guix build utils))
8937 ;; FIXME: Tests are executed after installation and currently fail
8938 ;; when not installing into standard locations; the author is working
8939 ;; on a fix.
8940 #:tests? #f
8941 #:phases
8942 (modify-phases %standard-phases
8943 (add-before
8944 'build 'configure
8945 (assoc-ref gnu:%standard-phases 'configure)))))
8946 (home-page
8947 "https://github.com/sagemath/cysignals")
8948 (synopsis
8949 "Handling of interrupts and signals for Cython")
8950 (description
8951 "The cysignals package provides mechanisms to handle interrupts (and
8952other signals and errors) in Cython code, using two related approaches,
8953for mixed Cython/Python code or external C libraries and pure Cython code,
8954respectively.")
3f641af0 8955 (license license:lgpl3+)))
8e451885
AE
8956
8957(define-public python2-cysignals
8958 (package-with-python2 python-cysignals))
8959
63bcec71
DM
8960(define-public python2-shedskin
8961 (package
8962 (name "python2-shedskin")
8963 (version "0.9.4")
8964 (source
8965 (origin
8966 (method url-fetch)
8967 (uri (string-append "https://github.com/shedskin/shedskin/"
8968 "releases/download/v" version
8969 "/shedskin-" version ".tgz"))
8970 (sha256
8971 (base32
8972 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8973 (build-system python-build-system)
8974 (arguments
8975 `(#:python ,python-2
8976 #:phases (modify-phases %standard-phases
8977 (add-after 'unpack 'fix-resulting-include-libs
8978 (lambda* (#:key inputs #:allow-other-keys)
8979 (let ((libgc (assoc-ref inputs "libgc"))
8980 (pcre (assoc-ref inputs "pcre")))
8981 (substitute* "shedskin/makefile.py"
8982 (("variable == 'CCFLAGS':[ ]*")
8983 (string-append "variable == 'CCFLAGS':\n"
8984 " line += ' -I " pcre "/include"
8985 " -I " libgc "/include'"))
8986 (("variable == 'LFLAGS':[ ]*")
8987 (string-append "variable == 'LFLAGS':\n"
8988 " line += ' -L" pcre "/lib"
8989 " -L " libgc "/lib'")))
8990 #t))))))
8991 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
8992 (inputs `(("pcre" ,pcre)
8993 ("libgc" ,libgc)))
8994 (home-page "https://shedskin.github.io/")
8995 (synopsis "Experimental Python-2 to C++ Compiler")
8996 (description (string-append "This is an experimental compiler for a subset of
8997Python. It generates C++ code and a Makefile."))
3f641af0 8998 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
8999
9000(define-public python2-rope
9001 (package
9002 (name "python2-rope")
9003 (version "0.10.3")
9004 (source
9005 (origin
9006 (method url-fetch)
9007 (uri (pypi-uri "rope" version))
9008 (sha256
9009 (base32
9010 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9011 (arguments
9012 ;; Rope is currently python-2 only.
9013 ;; https://github.com/python-rope/rope/issues/57
9014 `(#:python ,python-2))
9015 (build-system python-build-system)
9016 (native-inputs
9017 `(("python2-unittest2" ,python2-unittest2)
9018 ("python2-setuptools" ,python2-setuptools)))
9019 (home-page "https://github.com/python-rope/rope")
9020 (synopsis "Refactoring library for Python")
9021 (description "Rope is a refactoring library for Python. It facilitates
9022the renaming, moving and extracting of attributes, functions, modules, fields
9023and parameters in Python 2 source code. These refactorings can also be applied
9024to occurences in strings and comments.")
3f641af0 9025 (license license:gpl2)))
6ba8ca17
9026
9027(define-public python-py3status
9028 (package
9029 (name "python-py3status")
9030 (version "2.9")
9031 (source
9032 (origin
9033 (method url-fetch)
9034 (uri (pypi-uri "py3status" version))
9035 (sha256
9036 (base32
9037 "09y7h8rjay5kzwk5akq7f5f9wqnvjkxhivck04hdc8ny1nw3vqzp"))))
9038 (build-system python-build-system)
9039 (native-inputs
9040 `(("python-setuptools" ,python-setuptools)))
9041 (home-page "https://github.com/ultrabug/py3status")
9042 (synopsis "Extensible i3status wrapper written in Python")
9043 (description "py3status is an i3status wrapper which extends i3status
9044functionality in a modular way, allowing you to extend your panel with your
9045own code, responding to click events and updating clock every second.")
3f641af0 9046 (license license:bsd-3)))
b8fdbca3
HG
9047
9048(define-public python-tblib
9049 (package
9050 (name "python-tblib")
9051 (version "1.3.0")
9052 (source (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "tblib" version))
9055 (sha256 (base32
9056 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9057 (build-system python-build-system)
9058 (arguments
9059 `(#:phases
9060 (modify-phases %standard-phases
9061 (replace 'check
9062 (lambda _
9063 ;; Upstream runs tests after installation and the package itself
9064 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9065 ;; found.
9066 (setenv "PYTHONPATH"
9067 (string-append (getcwd) "/build/lib:"
9068 (getenv "PYTHONPATH")))
9069 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9070 (native-inputs
9071 `(("python-pytest" ,python-pytest)
9072 ("python-setuptools" ,python-setuptools)
9073 ("python-six" ,python-six)))
9074 (home-page "https://github.com/ionelmc/python-tblib")
9075 (synopsis "Traceback serialization library")
9076 (description
9077 "Traceback serialization allows you to:
9078
9079@enumerate
9080@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9081different processes. This allows better error handling when running code over
9082multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9083
9084@item Parse traceback strings and raise with the parsed tracebacks.
9085@end itemize")
3f641af0 9086 (license license:bsd-3)))
b8fdbca3
HG
9087
9088(define-public python2-tblib
9089 (package-with-python2 python-tblib))
1a024de4
HG
9090
9091(define-public python-sqlparse
9092 (package
9093 (name "python-sqlparse")
9094 (version "0.1.19")
9095 (source (origin
9096 (method url-fetch)
9097 (uri (pypi-uri "sqlparse" version))
9098 (sha256
9099 (base32
9100 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9101 (build-system python-build-system)
9102 (arguments
9103 `(#:phases
9104 (modify-phases %standard-phases
9105 (replace 'check
9106 (lambda* _
9107 ;; setup.py-integrated 2to3 only affects the build files, but
9108 ;; py.test is using the source files. So we need to convert them
9109 ;; manually.
9110 (when (zero? (system* "python3"))
9111 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9112 (zero? (system* "py.test")))))))
9113 (native-inputs
9114 `(("python-pytest" ,python-pytest)
9115 ("python-setuptools" ,python-setuptools)))
9116 (home-page "https://github.com/andialbrecht/sqlparse")
9117 (synopsis "Non-validating SQL parser")
9118 (description "Sqlparse is a non-validating SQL parser for Python. It
9119provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9120 (license license:bsd-3)))
1a024de4
HG
9121
9122(define-public python2-sqlparse
9123 (package-with-python2 python-sqlparse))
68b9d242
SB
9124
9125(define-public python-greenlet
9126 (package
9127 (name "python-greenlet")
9128 (version "0.4.9")
9129 (source (origin
9130 (method url-fetch)
9131 (uri (pypi-uri "greenlet" version))
9132 (sha256
9133 (base32
9134 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9135 (build-system python-build-system)
9136 (native-inputs
9137 `(("python-setuptools" ,python-setuptools)))
9138 (home-page "https://greenlet.readthedocs.io/")
9139 (synopsis "Lightweight in-process concurrent programming")
9140 (description
9141 "Greenlet package is a spin-off of Stackless, a version of CPython
9142that supports micro-threads called \"tasklets\". Tasklets run
9143pseudo-concurrently (typically in a single or a few OS-level threads) and
9144are synchronized with data exchanges on \"channels\".")
3f641af0 9145 (license (list license:psfl license:expat))))
68b9d242
SB
9146
9147(define-public python2-greenlet
9148 (package-with-python2 python-greenlet))
d79a343b
SB
9149
9150(define-public python-gevent
9151 (package
9152 (name "python-gevent")
9153 (version "1.1.1")
9154 (source (origin
9155 (method url-fetch)
9156 (uri (pypi-uri "gevent" version))
9157 (sha256
9158 (base32
9159 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9160 (modules '((guix build utils)))
9161 (snippet
9162 '(begin
9163 ;; unbunding libev and c-ares
9164 (for-each delete-file-recursively '("libev" "c-ares"))
9165 ;; fixing testsuite
9166 (call-with-output-file "greentest/__init__.py" noop)
9167 (substitute* "greentest/testrunner.py"
9168 (("import util") "from . import util")
9169 (("from util import log") "from .util import log"))))))
9170 (build-system python-build-system)
9171 (propagated-inputs
9172 `(("python-greenlet" ,python-greenlet)))
9173 (native-inputs
9174 `(("python-setuptools" ,python-setuptools)
9175 ("python-six" ,python-six)))
9176 (inputs
9177 `(("c-ares" ,c-ares)
9178 ("libev" ,libev)))
9179 (home-page "http://www.gevent.org/")
9180 (synopsis "Coroutine-based network library")
9181 (description
9182 "gevent is a coroutine-based Python networking library that uses greenlet
9183to provide a high-level synchronous API on top of the libev event loop.")
9184 (license license:expat)))
9185
9186(define-public python2-gevent
9187 (package-with-python2 python-gevent))
da3aeeb6
SB
9188
9189(define-public python-twisted
9190 (package
9191 (name "python-twisted")
9192 (version "16.2.0")
9193 (source (origin
9194 (method url-fetch)
8ea8e8d3 9195 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9196 (sha256
9197 (base32
9198 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9199 (build-system python-build-system)
9200 (native-inputs
45912170
SB
9201 `(("python-setuptools" ,python-setuptools)))
9202 (propagated-inputs
9203 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
9204 (home-page "https://twistedmatrix.com/")
9205 (synopsis "Asynchronous networking framework written in Python")
9206 (description
9207 "Twisted is an extensible framework for Python programming, with special
9208focus on event-based network programming and multiprotocol integration.")
9209 (license license:expat)))
9210
9211(define-public python2-twisted
9212 (package-with-python2 python-twisted))
d0b6fed6
DM
9213
9214(define-public python-ply
9215 (package
9216 (name "python-ply")
9217 (version "3.8")
9218 (source
9219 (origin
9220 (method url-fetch)
9221 (uri (string-append
9222 "https://pypi.python.org/packages/"
9223 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9224 "/ply-" version ".tar.gz"))
9225 (sha256
9226 (base32
9227 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9228 (build-system python-build-system)
9229 (home-page "http://www.dabeaz.com/ply/")
9230 (synopsis "Python Lex & Yacc")
9231 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9232It uses LR parsing and does extensive error checking.")
3f641af0 9233 (license license:bsd-3)
d0b6fed6
DM
9234 (properties `((python2-variant . ,(delay python2-ply))))))
9235
9236(define-public python2-ply
9237 (package
9238 (inherit (package-with-python2
9239 (strip-python2-variant python-ply)))
9240 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
d951bd54
SB
9241
9242(define-public python-tabulate
9243 (package
9244 (name "python-tabulate")
9245 (version "0.7.5")
9246 (source (origin
9247 (method url-fetch)
9248 (uri (pypi-uri "tabulate" version))
9249 (sha256
9250 (base32
9251 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9252 ;; Fix tests
9253 (modules '((guix build utils)))
9254 (snippet '(substitute* '("test/test_cli.py"
9255 "test/test_input.py"
9256 "test/test_output.py"
9257 "test/test_regression.py")
9258 (("from common") "from nose.tools")))))
9259 (build-system python-build-system)
9260 (native-inputs
9261 `(("python-setuptools" ,python-setuptools)
9262 ;; For testing
9263 ("python-nose" ,python-nose)))
9264 (home-page "https://bitbucket.org/astanin/python-tabulate")
9265 (synopsis "Pretty-print tabular data")
9266 (description
9267 "Tabulate is a library and command-line utility to pretty-print tabular
9268data in Python.")
9269 (license license:expat)))
9270
9271(define-public python2-tabulate
9272 (package-with-python2 python-tabulate))
1c4c8a33
SB
9273
9274(define-public python-kazoo
9275 (package
9276 (name "python-kazoo")
9277 (version "2.2.1")
9278 (source
9279 (origin
9280 (method url-fetch)
9281 (uri (pypi-uri "kazoo" version))
9282 (sha256
9283 (base32
9284 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9285 (build-system python-build-system)
9286 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9287 (native-inputs
c18899e8
SB
9288 `(("python-setuptools" ,python-setuptools)))
9289 (propagated-inputs
9290 `(("python-six" ,python-six)))
1c4c8a33
SB
9291 (home-page "https://kazoo.readthedocs.org")
9292 (synopsis "High-level Zookeeper client library")
9293 (description
9294 "Kazoo is a Python client library for the Apache Zookeeper distributed
9295application service. It is designed to be easy to use and to avoid common
9296programming errors.")
3f641af0 9297 (license license:asl2.0)))
1c4c8a33
SB
9298
9299(define-public python2-kazoo
9300 (package-with-python2 python-kazoo))
45dda35e
SB
9301
9302(define-public python-pykafka
9303 (package
9304 (name "python-pykafka")
9305 (version "2.4.0")
9306 (source (origin
9307 (method url-fetch)
c6bccf71
EF
9308 (uri (string-append
9309 "https://pypi.python.org/packages/8b/3e/"
9310 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9311 "pykafka-" version ".tar.gz"))
45dda35e
SB
9312 (sha256
9313 (base32
9314 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9315 (build-system python-build-system)
9316 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9317 (native-inputs
c8fa3d9b
SB
9318 `(("python-setuptools" ,python-setuptools)))
9319 (propagated-inputs
45dda35e
SB
9320 `(("python-gevent" ,python-gevent)
9321 ("python-kazoo" ,python-kazoo)
45dda35e
SB
9322 ("python-tabulate" ,python-tabulate)))
9323 (inputs
9324 `(("librdkafka" ,librdkafka)))
9325 (home-page "https://pykafka.readthedocs.io/")
9326 (synopsis "Apache Kafka client for Python")
9327 (description
9328 "PyKafka is a client for the Apache Kafka distributed messaging system.
9329It includes Python implementations of Kafka producers and consumers, which
9330are optionally backed by a C extension built on librdkafka.")
3f641af0 9331 (license license:asl2.0)))
45dda35e
SB
9332
9333(define-public python2-pykafka
9334 (package-with-python2 python-pykafka))
a44fd439
DM
9335
9336(define-public python-wcwidth
9337 (package
9338 (name "python-wcwidth")
9339 (version "0.1.6")
9340 (source
9341 (origin
9342 (method url-fetch)
9343 (uri (string-append
9344 "https://pypi.python.org/packages/"
9345 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9346 "wcwidth-" version ".tar.gz"))
9347 (sha256
9348 (base32
9349 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9350 (build-system python-build-system)
9351 (home-page "https://github.com/jquast/wcwidth")
66e07664 9352 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
9353 (description "Wcwidth measures the number of terminal column cells of
9354wide-character codes. It is useful for those implementing a terminal emulator,
9355or programs that carefully produce output to be interpreted by one. It is a
9356Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9357specified in POSIX.1-2001 and POSIX.1-2008.")
e4875826
LF
9358 (license license:expat)
9359 (properties `((python2-variant . ,(delay python2-wcwidth))))))
a44fd439
DM
9360
9361(define-public python2-wcwidth
9362 (package
9363 (inherit (package-with-python2
9364 (strip-python2-variant python-wcwidth)))
9365 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
0de78c95
DP
9366
9367(define-public python2-jsonrpclib
9368 (package
9369 (name "python2-jsonrpclib")
9370 (version "0.1.7")
9371 (source (origin
9372 (method url-fetch)
9373 (uri (string-append
9374 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9375 "jsonrpclib-" version ".tar.gz"))
9376 (sha256
9377 (base32
9378 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9379 (build-system python-build-system)
9380 (native-inputs
9381 `(("python2-setuptools" ,python2-setuptools)))
9382 (arguments
9383 `(#:tests? #f
9384 #:python ,python-2))
9385 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9386 (synopsis "Implementation of JSON-RPC specification for Python")
9387 (description
9388 "This library is an implementation of the JSON-RPC specification.
9389It supports both the original 1.0 specification, as well as the
9390new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9391etc.")
3f641af0 9392 (license license:asl2.0)))
9250b0f3
SB
9393
9394(define-public python-chai
9395 (package
9396 (name "python-chai")
9397 (version "1.1.1")
9398 (source (origin
9399 (method url-fetch)
9400 (uri (pypi-uri "chai" version))
9401 (sha256
9402 (base32
9403 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9404 (build-system python-build-system)
9405 (native-inputs
9406 `(("python-setuptools" ,python-setuptools)))
9407 (home-page "https://github.com/agoragames/chai")
9408 (synopsis "Mocking framework for Python")
9409 (description
9410 "Chai provides an api for mocking, stubbing and spying your python
9411objects, patterned after the Mocha library for Ruby.")
3f641af0 9412 (license license:bsd-3)))
9250b0f3
SB
9413
9414(define-public python2-chai
9415 (package-with-python2 python-chai))
9416
ae43baa8
SB
9417(define-public python-arrow
9418 (package
9419 (name "python-arrow")
9420 (version "0.8.0")
9421 (source (origin
9422 (method url-fetch)
9423 (uri (pypi-uri "arrow" version))
9424 (sha256
9425 (base32
9426 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
9427 (build-system python-build-system)
9428 (native-inputs
9429 `(("python-setuptools" ,python-setuptools)
ae43baa8
SB
9430 ;; For testing
9431 ("python-chai" ,python-chai)
9432 ("python-simplejson" ,python-simplejson)))
36aed736
SB
9433 (propagated-inputs
9434 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
9435 (home-page "https://github.com/crsmithdev/arrow/")
9436 (synopsis "Dates and times for Python")
9437 (description
9438 "Arrow is a Python library to creating, manipulating, formatting and
9439converting dates, times, and timestamps. It implements and updates the
9440datetime type.")
3f641af0 9441 (license license:asl2.0)))
ae43baa8
SB
9442
9443(define-public python2-arrow
9444 (package-with-python2 python-arrow))
9445
1f2b62a4
SB
9446(define-public python-inflection
9447 (package
9448 (name "python-inflection")
9449 (version "0.3.1")
9450 (source
9451 (origin (method url-fetch)
9452 (uri (pypi-uri "inflection" version))
9453 (sha256
9454 (base32
9455 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9456 (build-system python-build-system)
9457 (native-inputs
9458 `(("python-setuptools" ,python-setuptools)))
9459 (home-page "http://github.com/jpvanhal/inflection")
9460 (synopsis "Python string transformation library")
9461 (description
9462 "Inflection is a string transformation library. It singularizes
9463and pluralizes English words, and transforms strings from CamelCase to
9464underscored string.")
9465 (license license:expat)))
9466
9467(define-public python2-inflection
9468 (package-with-python2 python-inflection))
9469
18995566
SB
9470(define-public python-pylev
9471 (package
9472 (name "python-pylev")
9473 (version "1.3.0")
9474 (source (origin
9475 (method url-fetch)
9476 (uri (pypi-uri "pylev" version))
9477 (sha256
9478 (base32
9479 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9480 (build-system python-build-system)
9481 (native-inputs
9482 `(("python-setuptools" ,python-setuptools)))
9483 (home-page "http://github.com/toastdriven/pylev")
9484 (synopsis "Levenshtein distance implementation in Python")
9485 (description "Pure Python Levenshtein implementation, based off the
9486Wikipedia code samples at
9487@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 9488 (license license:bsd-3)))
18995566
SB
9489
9490(define-public python2-pylev
9491 (package-with-python2 python-pylev))
9492
f5deff7a
SB
9493(define-public python-cleo
9494 (package
9495 (name "python-cleo")
9496 (version "0.4.1")
9497 (source (origin
9498 (method url-fetch)
9499 (uri (pypi-uri "cleo" version))
9500 (sha256
9501 (base32
9502 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
9503 (build-system python-build-system)
9504 (native-inputs
9403150a 9505 `(("python-setuptools" ,python-setuptools)
f5deff7a
SB
9506 ;; For testing
9507 ("python-mock" ,python-mock)
9508 ("python-pytest" ,python-pytest)))
9403150a
SB
9509 (propagated-inputs
9510 `(("python-psutil" ,python-psutil)
9511 ("python-pylev" ,python-pylev)))
f5deff7a
SB
9512 (home-page "https://github.com/sdispater/cleo")
9513 (synopsis "Command-line arguments library for Python")
9514 (description
9515 "Cleo allows you to create command-line commands with signature in
9516docstring and colored output.")
9517 (license license:expat)))
9518
9519(define-public python2-cleo
9520 (package-with-python2 python-cleo))
9521
77cadb43
SB
9522(define-public python-lazy-object-proxy
9523 (package
9524 (name "python-lazy-object-proxy")
9525 (version "1.2.2")
9526 (source (origin
9527 (method url-fetch)
9528 (uri (pypi-uri "lazy-object-proxy" version))
9529 (sha256
9530 (base32
9531 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9532 (build-system python-build-system)
9533 (native-inputs
9534 `(("python-setuptools" ,python-setuptools)))
9535 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9536 (synopsis "Lazy object proxy for python")
9537 (description
9538 "Lazy object proxy is an object that wraps a callable but defers the call
9539until the object is actually required, and caches the result of said call.")
3f641af0 9540 (license license:bsd-2)))
77cadb43
SB
9541
9542(define-public python2-lazy-object-proxy
9543 (package-with-python2 python-lazy-object-proxy))
9544
5477e05f
SB
9545(define-public python-dnspython
9546 (package
9547 (name "python-dnspython")
9548 (version "1.14.0")
9549 (source (origin
9550 (method url-fetch)
9551 (uri (string-append "http://www.dnspython.org/kits/"
9552 version "/dnspython-" version ".tar.gz"))
9553 (sha256
9554 (base32
9555 "1z472r63gdqsxhsxj3plr5vs478yf4303vrqxxpsccc940g441hl"))))
9556 (build-system python-build-system)
9557 (arguments '(#:tests? #f)) ; XXX: requires internet access
9558 (native-inputs
9559 `(("python-setuptools" ,python-setuptools)))
9560 (home-page "http://www.dnspython.org")
9561 (synopsis "DNS toolkit for Python")
9562 (description
9563 "dnspython is a DNS toolkit for Python. It supports almost all record
9564types. It can be used for queries, zone transfers, and dynamic updates.
9565It supports TSIG authenticated messages and EDNS0.")
9566 (license license:expat)))
9567
9568(define-public python2-dnspython
9569 (package-with-python2 python-dnspython))
9570
22711e25
SB
9571(define-public python-email-validator
9572 (package
9573 (name "python-email-validator")
9574 (version "1.0.1")
9575 (source
9576 (origin (method url-fetch)
9577 (uri (pypi-uri "email_validator" version))
9578 (sha256
9579 (base32
9580 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
9581 (build-system python-build-system)
9582 (arguments
9583 '(#:phases
9584 (modify-phases %standard-phases
9585 (add-before 'build 'use-dnspython
9586 (lambda _
9587 (substitute* "setup.py"
9588 (("dnspython3") "dnspython"))
9589 #t)))))
9590 (native-inputs
d42560bd
SB
9591 `(("python-setuptools" ,python-setuptools)))
9592 (propagated-inputs
22711e25 9593 `(("python-dnspython" ,python-dnspython)
d42560bd 9594 ("python-idna" ,python-idna)))
22711e25
SB
9595 (home-page "https://github.com/JoshData/python-email-validator")
9596 (synopsis "Email address validation library for Python")
9597 (description
9598 "This library validates email address syntax and deliverability.")
3f641af0 9599 (license license:cc0)))
22711e25
SB
9600
9601(define-public python2-email-validator
9602 (package-with-python2 python-email-validator))
9603
8987d91e
SB
9604(define-public python-ukpostcodeparser
9605 (package
9606 (name "python-ukpostcodeparser")
9607 (version "1.0.3")
9608 (source (origin
9609 (method url-fetch)
9610 (uri (pypi-uri "UkPostcodeParser" version))
9611 (sha256
9612 (base32
9613 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9614 (build-system python-build-system)
9615 (native-inputs
9616 `(("python-setuptools" ,python-setuptools)))
9617 (home-page "https://github.com/hamstah/ukpostcodeparser")
9618 (synopsis "UK Postcode parser for Python")
9619 (description
9620 "This library provides the @code{parse_uk_postcode} function for
9621parsing UK postcodes.")
9622 (license license:expat)))
9623
9624(define-public python2-ukpostcodeparser
9625 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
9626
9627(define-public python-fake-factory
9628 (package
9629 (name "python-fake-factory")
9630 (version "0.5.7")
9631 (source (origin
9632 (method url-fetch)
9633 (uri (pypi-uri "fake-factory" version))
9634 (sha256
9635 (base32
9636 "1chmarnrdzn4r017n8qlic0m0bbnhw04s3hkwribjvm3mqpb6pa0"))))
9637 (build-system python-build-system)
9638 (arguments
9639 '(#:phases
9640 (modify-phases %standard-phases
9641 (add-before 'check 'disable-failing-test
9642 ;; XXX: faker/tests/ne_np/__init__.py, line 40, in test_names
9643 ;; first_name, last_name = name.split()
9644 ;; ValueError: too many values to unpack (expected 2)
9645 (lambda _
9646 (delete-file "faker/tests/ne_np/__init__.py")
9647 #t)))))
9648 (native-inputs
bbcd7297 9649 `(("python-setuptools" ,python-setuptools)
ea92ae01
SB
9650 ;; For testing
9651 ("python-email-validator" ,python-email-validator)
9652 ("python-mock" ,python-mock)
9653 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
9654 (propagated-inputs
9655 `(("python-dateutil" ,python-dateutil-2)
9656 ("python-six" ,python-six)))
ea92ae01
SB
9657 (home-page "http://github.com/joke2k/faker")
9658 (synopsis "Python package that generates fake data")
9659 (description
9660 "Faker is a Python package that generates fake data such as names,
9661addresses, and phone numbers.")
9662 (license license:expat)
9663 (properties `((python2-variant . ,(delay python2-fake-factory))))))
9664
9665(define-public python2-fake-factory
9666 (let ((base (package-with-python2 (strip-python2-variant
9667 python-fake-factory))))
9668 (package
9669 (inherit base)
24c9aa18 9670 (propagated-inputs
ea92ae01 9671 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 9672 ,@(package-propagated-inputs base))))))
ea92ae01 9673
b49504fd
SB
9674(define-public python-pyaml
9675 (package
9676 (name "python-pyaml")
9677 (version "15.8.2")
9678 (source (origin
9679 (method url-fetch)
9680 (uri (pypi-uri "pyaml" version))
9681 (sha256
9682 (base32
9683 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
9684 (build-system python-build-system)
9685 (native-inputs
9686 `(("python-setuptools" ,python-setuptools)))
9687 (propagated-inputs
9688 `(("python-pyyaml" ,python-pyyaml)))
9689 (home-page "https://github.com/mk-fg/pretty-yaml")
9690 (synopsis "YAML pretty-print library for Python")
9691 (description
9692 "pyaml is a PyYAML based python module to produce pretty and readable
9693YAML-serialized data.")
3f641af0 9694 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
9695
9696(define-public python2-pyaml
9697 (package-with-python2 python-pyaml))
9698
347175a2
SB
9699(define-public python-flexmock
9700 (package
9701 (name "python-flexmock")
9702 (version "0.10.2")
9703 (source (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "flexmock" version))
9706 (sha256
9707 (base32
9708 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
9709 (build-system python-build-system)
9710 (native-inputs
9711 `(("python-setuptools" ,python-setuptools)))
9712 (home-page "https://flexmock.readthedocs.org")
9713 (synopsis "Testing library for Python")
9714 (description
9715 "flexmock is a testing library for Python that makes it easy to create
9716mocks, stubs and fakes.")
3f641af0 9717 (license license:bsd-3)))
347175a2
SB
9718
9719(define-public python2-flexmock
9720 (package-with-python2 python-flexmock))
9721
5a744191
SB
9722(define-public python-orator
9723 (package
9724 (name "python-orator")
9725 (version "0.8.2")
9726 (source (origin
9727 (method url-fetch)
9728 (uri (pypi-uri "orator" version))
9729 (sha256
9730 (base32
9731 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
9732 (build-system python-build-system)
9733 (arguments '(#:tests? #f)) ; no tests
9734 (native-inputs
b2676030
SB
9735 `(("python-setuptools" ,python-setuptools)))
9736 (propagated-inputs
5a744191
SB
9737 `(("python-arrow" ,python-arrow)
9738 ("python-blinker" ,python-blinker)
9739 ("python-cleo" ,python-cleo)
9740 ("python-fake-factory" ,python-fake-factory)
9741 ("python-inflection" ,python-inflection)
9742 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
9743 ("python-pyaml" ,python-pyaml)
5a744191
SB
9744 ("python-simplejson" ,python-simplejson)
9745 ("python-wrapt" ,python-wrapt)))
9746 (home-page "https://orator-orm.com/")
9747 (synopsis "ActiveRecord ORM for Python")
9748 (description
9749 "Orator provides a simple ActiveRecord-like Object Relational Mapping
9750implementation for Python.")
9751 (license license:expat)
9752 (properties `((python2-variant . ,(delay python2-orator))))))
9753
9754(define-public python2-orator
9755 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
9756 (package
9757 (inherit base)
06961617 9758 (propagated-inputs
5a744191 9759 `(("python2-ipaddress" ,python2-ipaddress)
06961617 9760 ,@(package-propagated-inputs base))))))
f4155188
DM
9761
9762(define-public python-prompt-toolkit
9763 (package
9764 (name "python-prompt-toolkit")
9765 (version "1.0.3")
9766 (source
9767 (origin
9768 (method url-fetch)
9769 (uri (string-append
9770 "https://pypi.python.org/packages/"
9771 "8d/de/412f23919929c01e6b55183e124623f705e4b91796d3d2dce2cb53d595ad/"
9772 "prompt_toolkit-" version ".tar.gz"))
9773 (sha256
9774 (base32
9775 "18lbmmkyjf509klc3217lq0x863pfzix779zx5kp9lms1iph4pl0"))))
9776 (build-system python-build-system)
9777 (inputs `(("python-wcwidth" ,python-wcwidth)
9778 ("python-pygments" ,python-pygments)))
9779 (native-inputs `(("python-six" ,python-six)))
9780 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9781 (synopsis "Library for building command line interfaces in Python")
9782 (description
9783 "Prompt-Toolkit is a library for building interactive command line
9784interfaces in Python. It's like GNU Readline but it also features syntax
9785highlighting while typing, out-of-the-box multi-line input editing, advanced
9786code completion, incremental search, support for Chinese double-width
9787characters, mouse support, and auto suggestions.")
3f641af0 9788 (license license:bsd-3)
f4155188
DM
9789 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
9790
9791(define-public python2-prompt-toolkit
9792 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
9793 (package
9794 (inherit base)
9795 (native-inputs
9796 `(("python2-setuptools" ,python2-setuptools)
9797 ,@(package-native-inputs base))))))
a502dfbf
DM
9798
9799(define-public python-jedi
9800 (package
9801 (name "python-jedi")
9802 (version "0.9.0")
9803 (source
9804 (origin
9805 (method url-fetch)
9806 (uri (pypi-uri "jedi" version))
9807 (sha256
9808 (base32
9809 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
9810 (build-system python-build-system)
9811 (home-page "https://github.com/davidhalter/jedi")
9812 (synopsis
9813 "Autocompletion for Python that can be used for text editors")
9814 (description
9815 "Jedi is an autocompletion tool for Python that can be used for text editors.")
9816 (license license:expat)
9817 (properties `((python2-variant . ,(delay python2-jedi))))))
9818
9819(define-public python2-jedi
9820 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
9821 (package
9822 (inherit base)
9823 (native-inputs
9824 `(("python2-setuptools" ,python2-setuptools)
9825 ,@(package-native-inputs base))))))
c2f0dc6e
DM
9826
9827(define-public ptpython
9828 (package
9829 (name "ptpython")
9830 (version "0.34")
9831 (source (origin
9832 (method url-fetch)
9833 (uri (pypi-uri "ptpython" version))
9834 (sha256
9835 (base32
9836 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9837 (build-system python-build-system)
9838 (inputs
9839 `(("python-docopt" ,python-docopt)
9840 ("python-jedi" ,python-jedi)
9841 ("python-prompt-toolkit" ,python-prompt-toolkit)
9842 ("python-pygments" ,python-pygments)
9843 ("python-setuptools" ,python-setuptools)))
9844 (home-page "https://github.com/jonathanslenders/ptpython")
9845 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9846 (description
9847 "ptpython is a Python read-eval-print loop with IDE-like features.
9848It supports syntax highlighting, multiline editing, autocompletion, mouse,
9849color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9850etc.")
3f641af0 9851 (license license:bsd-3)
c2f0dc6e
DM
9852 (properties `((python2-variant . ,(delay ptpython-2))))))
9853
9854(define-public ptpython-2
9855 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9856 (package
9857 (inherit base)
9858 (name "ptpython2"))))
b227f0be 9859
9860(define-public python-stem
9861 (package
9862 (name "python-stem")
9863 (version "1.4.1b")
9864 (source
9865 (origin
9866 (method url-fetch)
9867 (uri (pypi-uri "stem" version ".tar.bz2"))
9868 (sha256
9869 (base32
9870 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
9871 (build-system python-build-system)
9872 (arguments
9873 `(#:phases
9874 (modify-phases %standard-phases
9875 (replace 'check
9876 (lambda _
9877 (zero? (system* "./run_tests.py" "--unit")))))))
9878 (native-inputs
9879 `(("python-mock" ,python-mock)
9880 ("python-pep8" ,python-pep8)
9881 ("python-pyflakes" ,python-pyflakes)))
9882 (inputs
9883 `(("python-pycrypto" ,python-pycrypto)))
9884 (home-page "https://stem.torproject.org/")
9885 (synopsis
9886 "Python controller library that allows applications to interact with Tor")
9887 (description
9888 "Stem is a Python controller library for Tor. With it you can use Tor's
9889control protocol to script against the Tor process and read descriptor data
9890relays publish about themselves.")
3f641af0 9891 (license license:lgpl3)))
b227f0be 9892
9893(define-public python2-stem
9894 (package-with-python2 python-stem))
517a6c0c
DM
9895
9896(define-public python-pyserial
9897 (package
9898 (name "python-pyserial")
9899 (version "3.1.1")
9900 (source
9901 (origin
9902 (method url-fetch)
9903 (uri (pypi-uri "pyserial" version))
9904 (sha256
9905 (base32
9906 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9907 (build-system python-build-system)
9908 (home-page
9909 "https://github.com/pyserial/pyserial")
9910 (synopsis "Python Serial Port Bindings")
9911 (description "@code{pyserial} provide serial port bindings for Python. It
9912supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9913and/or Xon/Xoff. The port is accessed in RAW mode.")
3f641af0 9914 (license license:bsd-3)
517a6c0c
DM
9915 (properties `((python2-variant . ,(delay python2-pyserial))))))
9916
9917(define-public python2-pyserial
9918 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
9919 (package
9920 (inherit base)
9921 (native-inputs
9922 `(("python2-setuptools" ,python2-setuptools)
9923 ,@(package-native-inputs base))))))
6eb7af2a
DJ
9924
9925(define-public python-kivy
9926 (package
9927 (name "python-kivy")
9928 (version "1.9.1")
9929 (source
9930 (origin
9931 (method url-fetch)
9932 (uri (pypi-uri "kivy" version))
9933 (file-name (string-append name "-" version ".tar.gz"))
9934 (sha256
9935 (base32
9936 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
9937 (build-system python-build-system)
9938 (arguments
9939 `(#:tests? #f ; Tests require many optional packages
9940 #:phases
9941 (modify-phases %standard-phases
9942 (replace 'build (lambda _ (zero? (system* "make" "force"))))
9943 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9944 (lambda* (#:key inputs #:allow-other-keys)
9945 (setenv "KIVY_SDL2_PATH"
9946 (string-append (assoc-ref inputs "sdl-union")
9947 "/include/SDL2"))
9948 #t)))))
9949 (native-inputs
9950 `(("pkg-config" ,pkg-config)))
9951 (inputs
9952 `(("python-cython" ,python-cython)
9953 ("gstreamer" ,gstreamer)
9954 ("mesa" ,mesa)
9955 ("sdl-union"
9956 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9957 (home-page "http://kivy.org")
9958 (synopsis
9959 "Multitouch application framework")
9960 (description
9961 "A software library for rapid development of
9962hardware-accelerated multitouch applications.")
9963 (license license:expat)))
9964
9965(define-public python2-kivy
9966 (package-with-python2 python-kivy))
9967
9968(define-public python-kivy-next
9969 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9970 (revision "1"))
9971 (package (inherit python-kivy)
9972 (name "python-kivy-next")
d80a71eb 9973 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
9974 (string-take commit 7)))
9975 (source
9976 (origin
9977 (method git-fetch)
9978 (uri (git-reference
9979 (url "https://github.com/kivy/kivy")
9980 (commit commit)))
9981 (file-name (string-append name "-" version "-checkout"))
9982 (sha256
9983 (base32
9984 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9985
9986(define-public python2-kivy-next
9987 (package-with-python2 python-kivy-next))
8794bd8b
DC
9988
9989(define-public python-binaryornot
9990 (package
9991 (name "python-binaryornot")
9992 (version "0.4.0")
9993 (source (origin
9994 (method url-fetch)
9995 (uri (pypi-uri "binaryornot" version))
9996 (sha256
9997 (base32
9998 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9999 (build-system python-build-system)
10000 (inputs
10001 `(("python-chardet" ,python-chardet)
10002 ("python-hypothesis" ,python-hypothesis)))
10003 (home-page "https://github.com/audreyr/binaryornot")
10004 (synopsis "Package to check if a file is binary or text")
10005 (description "Ultra-lightweight pure Python package to check if a file is
10006binary or text.")
10007 (license license:bsd-3)
10008 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10009
10010(define-public python2-binaryornot
10011 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10012 (package (inherit base)
10013 (native-inputs
10014 `(("python2-setuptools" ,python2-setuptools)
10015 ,@(package-native-inputs base)))
10016 (inputs
10017 `(("python2-enum34" ,python2-enum34)
10018 ,@(package-inputs base))))))
a9ac982a
DC
10019
10020(define-public python-nltk
10021 (package
10022 (name "python-nltk")
10023 (version "3.2.1")
10024 (source (origin
10025 (method url-fetch)
10026 (uri (pypi-uri "nltk" version))
10027 (sha256
10028 (base32
10029 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10030 (build-system python-build-system)
10031 (home-page "http://nltk.org/")
10032 (synopsis "Natural Language Toolkit")
10033 (description "It provides interfaces to over 50 corpora and lexical
10034resources such as WordNet, along with a suite of text processing libraries
10035for classification, tokenization, stemming, tagging, parsing, and semantic
10036reasoning, wrappers for natural language processing libraries.")
10037 (license license:asl2.0)
10038 (properties `((python2-variant . ,(delay python2-nltk))))))
10039
10040(define-public python2-nltk
10041 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10042 (package (inherit base)
10043 (native-inputs
10044 `(("python2-setuptools" ,python2-setuptools)
10045 ,@(package-native-inputs base))))))
691cd90d
DC
10046
10047(define-public python-pymongo
10048 (package
10049 (name "python-pymongo")
10050 (version "3.3.0")
10051 (source (origin
10052 (method url-fetch)
10053 (uri (pypi-uri "pymongo" version))
10054 (sha256
10055 (base32
10056 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10057 (build-system python-build-system)
10058 (inputs
10059 `(("python-certifi" ,python-certifi)))
10060 (home-page "http://github.com/mongodb/mongo-python-driver")
10061 (synopsis "Python driver for MongoDB")
10062 (description "Python driver for MongoDB.")
10063 (license license:asl2.0)
10064 (properties `((python2-variant . ,(delay python2-pymongo))))))
10065
10066(define-public python2-pymongo
10067 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10068 (package (inherit base)
10069 (native-inputs
10070 `(("python2-setuptools" ,python2-setuptools)
10071 ,@(package-native-inputs base))))))
6a6c9d43
DC
10072
10073(define-public python-sh
10074 (package
10075 (name "python-sh")
10076 (version "1.11")
10077 (source (origin
10078 (method url-fetch)
10079 (uri (pypi-uri "sh" version))
10080 (sha256
10081 (base32
10082 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10083 (build-system python-build-system)
10084 (arguments
10085 `(#:tests? #f)) ; no tests
10086 (home-page "https://github.com/amoffat/sh")
10087 (synopsis "Python subprocess interface")
10088 (description "Abstracts process invocation by providing a function
10089interface for programs.")
10090 (license license:expat)
10091 (properties `((python2-variant . ,(delay python2-sh))))))
10092
10093(define-public python2-sh
10094 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10095 (package (inherit base)
10096 (native-inputs
10097 `(("python2-setuptools" ,python2-setuptools)
10098 ,@(package-native-inputs base))))))
05b59190
DC
10099
10100(define-public python-schematics
10101 (package
10102 (name "python-schematics")
10103 (version "1.1.1")
10104 (source
10105 (origin
10106 (method url-fetch)
10107 (uri (string-append
10108 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10109 (file-name (string-append name "-" version ".tar.gz"))
10110 (sha256
10111 (base32
10112 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10113 (build-system python-build-system)
10114 (inputs
10115 `(("python-six" ,python-six)))
10116 (arguments
10117 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10118 ; version requirements (eg python-coveralls)
10119 (home-page "https://github.com/schematics/schematics")
10120 (synopsis "Python Data Structures for Humans")
10121 (description "Python Data Structures for Humans.")
10122 (license license:bsd-3)
10123 (properties `((python2-variant . ,(delay python2-schematics))))))
10124
10125(define-public python2-schematics
10126 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
10127 (package (inherit base)
10128 (native-inputs
10129 `(("python2-setuptools" ,python2-setuptools)
10130 ,@(package-native-inputs base))))))
d6907ff7
DC
10131
10132(define-public python-publicsuffix
10133 (package
10134 (name "python-publicsuffix")
10135 (version "1.1.0")
10136 (source (origin
10137 (method url-fetch)
10138 (uri (pypi-uri "publicsuffix" version))
10139 (sha256
10140 (base32
10141 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10142 (build-system python-build-system)
10143 (arguments
10144 `(#:tests? #f)) ; tests use the internet
10145 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10146 (synopsis "Get suffix for a domain name")
10147 (description "Get a public suffix for a domain name using the Public Suffix
10148List.")
10149 (license license:expat)
10150 (properties `((python2-variant . ,(delay python2-nltk))))))
10151
10152(define-public python2-publicsuffix
10153 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
10154 (package (inherit base)
10155 (native-inputs
10156 `(("python2-setuptools" ,python2-setuptools)
10157 ,@(package-native-inputs base))))))
b2319996
DC
10158
10159(define-public python-publicsuffix2
10160 (package
10161 (name "python-publicsuffix2")
10162 (version "2.20160621")
10163 (source
10164 (origin
10165 (method url-fetch)
10166 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10167 (sha256
10168 (base32
10169 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10170 (build-system python-build-system)
10171 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10172 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10173 (description "Get a public suffix for a domain name using the Public Suffix
10174List. Forked from and using the same API as the publicsuffix package.")
10175 (license (list license:expat license:mpl2.0))
10176 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
10177
10178(define-public python2-publicsuffix2
10179 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
10180 (package (inherit base)
10181 (native-inputs
10182 `(("python2-setuptools" ,python2-setuptools)
10183 ,@(package-native-inputs base))))))
81f1515d
DC
10184
10185(define-public python-url
10186 (package
10187 (name "python-url")
10188 (version "0.2.0")
10189 (source (origin
10190 (method url-fetch)
10191 (uri (pypi-uri "url" version))
10192 (sha256
10193 (base32
10194 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10195 (build-system python-build-system)
10196 (inputs
10197 `(("python-publicsuffix" ,python-publicsuffix)))
10198 (native-inputs
10199 `(("python-coverage" ,python-coverage)
10200 ("python-nose" ,python-nose)))
10201 (arguments
10202 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10203 (home-page "http://github.com/seomoz/url-py")
10204 (synopsis "URL Parsing")
10205 (description "Library for parsing urls.")
10206 (license license:expat)
10207 (properties `((python2-variant . ,(delay python2-url))))))
10208
10209(define-public python2-url
10210 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10211 (package (inherit base)
10212 (inputs
10213 `(("python2-publicsuffix" ,python2-publicsuffix)))
10214 (native-inputs
10215 `(("python2-setuptools" ,python2-setuptools)
10216 ,@(package-native-inputs base))))))
974ee2c1
TS
10217
10218(define-public python-freezegun
10219 (package
10220 (name "python-freezegun")
10221 (version "0.3.7")
10222 (source
10223 (origin
10224 (method url-fetch)
10225 (uri (pypi-uri "freezegun" version))
10226 (sha256
10227 (base32
10228 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10229 (build-system python-build-system)
10230 (native-inputs
10231 `(("python-mock" ,python-mock)
10232 ("python-nose" ,python-nose)
10233 ("python-coverage" ,python-coverage)
10234 ("python-dateutil-2" ,python-dateutil-2)))
10235 (inputs
10236 `(("python-six" ,python-six)))
10237 (arguments
10238 `(#:phases (modify-phases %standard-phases
10239 ;; The tests are normally executed via `make test`, but the PyPi
10240 ;; package does not include the Makefile.
10241 (replace 'check
10242 (lambda _
10243 (zero? (system* "nosetests" "./tests/")))))))
10244 (home-page "https://github.com/spulec/freezegun")
10245 (synopsis "Test utility for mocking the datetime module")
10246 (description
10247 "FreezeGun is a library that allows your python tests to travel through
10248time by mocking the datetime module.")
10249 (license license:asl2.0)))
10250
10251(define-public python2-freezegun
10252 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
10253 (package (inherit base)
10254 (native-inputs
10255 `(("python2-setuptools" ,python2-setuptools)
10256 ,@(package-native-inputs base))))))