gnu: Add slurm.
[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>
03411993 4;;; Copyright © 2013, 2014, 2015 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>
ad320b20 10;;; Copyright © 2015 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>
03f964a5 19;;; Copyright © 2015 Chris Marusich <cmmarusich@gmail.com>
a01b6da7
NK
20;;;
21;;; This file is part of GNU Guix.
22;;;
23;;; GNU Guix is free software; you can redistribute it and/or modify it
24;;; under the terms of the GNU General Public License as published by
25;;; the Free Software Foundation; either version 3 of the License, or (at
26;;; your option) any later version.
27;;;
28;;; GNU Guix is distributed in the hope that it will be useful, but
29;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31;;; GNU General Public License for more details.
32;;;
33;;; You should have received a copy of the GNU General Public License
34;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
1ffa7090 36(define-module (gnu packages python)
011b18c3 37 #:use-module ((guix licenses)
45203542 38 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
b8050e71 39 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
7517e73c
LF
40 isc mpl2.0 psfl public-domain unlicense x11-style
41 zpl2.1))
bd3fa666 42 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
3fdc99da 43 #:use-module (gnu packages)
89b2e0b0 44 #:use-module (gnu packages attr)
d96034ed 45 #:use-module (gnu packages backup)
1ffa7090 46 #:use-module (gnu packages compression)
4ed20663 47 #:use-module (gnu packages databases)
5e1c9367 48 #:use-module (gnu packages file)
4ed20663 49 #:use-module (gnu packages fontutils)
4ed20663
AE
50 #:use-module (gnu packages gcc)
51 #:use-module (gnu packages ghostscript)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gtk)
421a80a2 54 #:use-module (gnu packages icu4c)
c937562e 55 #:use-module (gnu packages image)
4ed20663 56 #:use-module (gnu packages imagemagick)
b10ab723 57 #:use-module (gnu packages libffi)
89b2e0b0 58 #:use-module (gnu packages linux)
0da98533 59 #:use-module (gnu packages maths)
4ed20663 60 #:use-module (gnu packages multiprecision)
45203542 61 #:use-module (gnu packages networking)
be7134bf 62 #:use-module (gnu packages ncurses)
c9b1b4f9 63 #:use-module (gnu packages pcre)
4ed20663 64 #:use-module (gnu packages perl)
b10ab723 65 #:use-module (gnu packages pkg-config)
4ed20663 66 #:use-module (gnu packages readline)
c9b1b4f9 67 #:use-module (gnu packages statistics)
1c65314c
FB
68 #:use-module (gnu packages texlive)
69 #:use-module (gnu packages texinfo)
cc2b77df 70 #:use-module (gnu packages tls)
8d12be1e 71 #:use-module (gnu packages web)
ce0614dd 72 #:use-module (gnu packages base)
26b307e2 73 #:use-module (gnu packages xml)
6fa14469 74 #:use-module (gnu packages xorg)
0bdc1671 75 #:use-module (gnu packages xdisorg)
4ed20663 76 #:use-module (gnu packages zip)
afa181ff 77 #:use-module (gnu packages tcl)
a01b6da7
NK
78 #:use-module (guix packages)
79 #:use-module (guix download)
ea5456c8 80 #:use-module (guix git-download)
11bb85a1 81 #:use-module (guix utils)
acc26ff1 82 #:use-module (guix build-system gnu)
d8c4998f 83 #:use-module (guix build-system cmake)
898238b9 84 #:use-module (guix build-system python)
1c65314c
FB
85 #:use-module (guix build-system trivial)
86 #:use-module (srfi srfi-1))
a01b6da7 87
b24d1cfc 88(define-public python-2
a01b6da7
NK
89 (package
90 (name "python")
ff6f33cf 91 (version "2.7.10")
a01b6da7
NK
92 (source
93 (origin
94 (method url-fetch)
9b43a0ff 95 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
96 version "/Python-" version ".tar.xz"))
97 (sha256
98 (base32
6a20289d 99 "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw"))
dedc8320
LC
100 (patches (map search-patch
101 '("python-2.7-search-paths.patch"
9820a6d4 102 "python-2-deterministic-build-info.patch"
dedc8320 103 "python-2.7-source-date-epoch.patch")))))
02f0c3b2
LC
104 (outputs '("out"
105 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 106 (build-system gnu-build-system)
3fdc99da 107 (arguments
af807dea 108 `(#:tests? #f
ff6f33cf
ED
109 ;; 268 tests OK.
110 ;; 103 tests failed:
111 ;; test_distutils test_shutil test_signal test_site test_slice
112 ;; test_smtplib test_smtpnet test_socket test_socketserver
113 ;; test_softspace test_sort test_spwd test_sqlite test_ssl
114 ;; test_startfile test_stat test_str test_strftime test_string
115 ;; test_stringprep test_strop test_strptime test_strtod test_struct
116 ;; test_structmembers test_structseq test_subprocess test_sunau
117 ;; test_sunaudiodev test_sundry test_symtable test_syntax test_sys
118 ;; test_sys_setprofile test_sys_settrace test_sysconfig test_tarfile
119 ;; test_tcl test_telnetlib test_tempfile test_textwrap test_thread
120 ;; test_threaded_import test_threadedtempfile test_threading
121 ;; test_threading_local test_threadsignals test_time test_timeit
122 ;; test_timeout test_tk test_tokenize test_tools test_trace
123 ;; test_traceback test_transformer test_ttk_guionly test_ttk_textonly
124 ;; test_tuple test_typechecks test_ucn test_unary
125 ;; test_undocumented_details test_unicode test_unicode_file
126 ;; test_unicodedata test_univnewlines test_univnewlines2k test_unpack
127 ;; test_urllib test_urllib2 test_urllib2_localnet test_urllib2net
128 ;; test_urllibnet test_urlparse test_userdict test_userlist
129 ;; test_userstring test_uu test_uuid test_wait3 test_wait4
130 ;; test_warnings test_wave test_weakref test_weakset test_whichdb
131 ;; test_winreg test_winsound test_with test_wsgiref test_xdrlib
132 ;; test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc
133 ;; test_xpickle test_xrange test_zipfile test_zipfile64
134 ;; test_zipimport test_zipimport_support test_zlib
135 ;; 30 tests skipped:
136 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
137 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
138 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_crypt
139 ;; test_curses test_dl test_gdb test_gl test_idle test_imageop
140 ;; test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos
141 ;; test_macostools test_msilib test_nis test_ossaudiodev
142 ;; test_scriptpackages
143 ;; 6 skips unexpected on linux2:
144 ;; test_bsddb test_bsddb3 test_crypt test_gdb test_idle test_ioctl
145 ;; One of the typical errors:
146 ;; test_unicode
147 ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No
148 ;; such file or directory
af807dea 149 #:test-target "test"
3fdc99da 150 #:configure-flags
6a20289d
LC
151 (list "--enable-shared" ;allow embedding
152 "--with-system-ffi" ;build ctypes
153 (string-append "LDFLAGS=-Wl,-rpath="
154 (assoc-ref %outputs "out") "/lib"))
fd982732 155
d2cc9c7c
LC
156 #:modules ((ice-9 ftw) (ice-9 match)
157 (guix build utils) (guix build gnu-build-system))
fd982732 158 #:phases
46472ecd
MW
159 (modify-phases %standard-phases
160 (add-before
161 'configure 'patch-lib-shells
162 (lambda _
163 ;; Filter for existing files, since some may not exist in all
164 ;; versions of python that are built with this recipe.
165 (substitute* (filter file-exists?
166 '("Lib/subprocess.py"
167 "Lib/popen2.py"
168 "Lib/distutils/tests/test_spawn.py"
169 "Lib/test/test_subprocess.py"))
170 (("/bin/sh") (which "sh")))
dedc8320
LC
171
172 ;; Use zero as the timestamp in .pyc files so that builds are
173 ;; deterministic. TODO: Remove it when this variable is set in
174 ;; gnu-build-system.scm.
a665996f 175 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 176 #t))
5b4e2791
LC
177 (add-before 'configure 'do-not-record-configure-flags
178 (lambda* (#:key configure-flags #:allow-other-keys)
179 ;; Remove configure flags from the installed '_sysconfigdata.py'
180 ;; and 'Makefile' so we don't end up keeping references to the
181 ;; build tools.
182 ;;
183 ;; Preserve at least '--with-system-ffi' since otherwise the
184 ;; thing tries to build libffi, fails, and we end up with a
185 ;; Python that lacks ctypes.
186 (substitute* "configure"
187 (("^CONFIG_ARGS=.*$")
188 (format #f "CONFIG_ARGS='~a'\n"
189 (if (member "--with-system-ffi" configure-flags)
190 "--with-system-ffi"
191 ""))))
192 #t))
46472ecd
MW
193 (add-before
194 'check 'pre-check
195 (lambda _
196 ;; 'Lib/test/test_site.py' needs a valid $HOME
197 (setenv "HOME" (getcwd))
198 #t))
199 (add-after
200 'unpack 'set-source-file-times-to-1980
201 ;; XXX One of the tests uses a ZIP library to pack up some of the
202 ;; source tree, and fails with "ZIP does not support timestamps
203 ;; before 1980". Work around this by setting the file times in the
204 ;; source tree to sometime in early 1980.
205 (lambda _
206 (let ((circa-1980 (* 10 366 24 60 60)))
207 (ftw "." (lambda (file stat flag)
208 (utime file circa-1980 circa-1980)
209 #t))
02f0c3b2
LC
210 #t)))
211 (add-after 'install 'move-tk-inter
212 (lambda* (#:key outputs #:allow-other-keys)
213 ;; When Tkinter support is built move it to a separate output so
214 ;; that the main output doesn't contain a reference to Tcl/Tk.
215 (let ((out (assoc-ref outputs "out"))
216 (tk (assoc-ref outputs "tk")))
217 (when tk
218 (match (find-files out "tkinter.*\\.so")
219 ((tkinter.so)
220 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
221 ;; want it under TK/lib/pythonX.Y/site-packages.
222 (let* ((len (string-length out))
223 (target (string-append
224 tk "/"
225 (string-drop
226 (dirname (dirname tkinter.so))
227 len)
228 "/site-packages")))
229 (install-file tkinter.so target)
230 (delete-file tkinter.so)))))
231 #t))))))
a01b6da7 232 (inputs
3fdc99da
CR
233 `(("bzip2" ,bzip2)
234 ("gdbm" ,gdbm)
b10ab723 235 ("libffi" ,libffi) ; for ctypes
b88e1b0a 236 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 237 ("openssl" ,openssl)
3fdc99da 238 ("readline" ,readline)
afa181ff
LC
239 ("zlib" ,zlib)
240 ("tcl" ,tcl)
241 ("tk" ,tk))) ; for tkinter
b10ab723
CR
242 (native-inputs
243 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
244 (native-search-paths
245 (list (search-path-specification
246 (variable "PYTHONPATH")
af070955 247 (files '("lib/python2.7/site-packages")))))
a01b6da7 248 (home-page "http://python.org")
afa181ff 249 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
250 (description
251 "Python is a remarkably powerful dynamic programming language that
252is used in a wide variety of application domains. Some of its key
253distinguishing features include: clear, readable syntax; strong
254introspection capabilities; intuitive object orientation; natural
255expression of procedural code; full modularity, supporting hierarchical
256packages; exception-based error handling; and very high level dynamic
257data types.")
258 (license psfl)))
acc26ff1 259
b24d1cfc
AE
260(define-public python
261 (package (inherit python-2)
08c04509 262 (version "3.4.3")
717003e3
LC
263 (source (origin
264 (method url-fetch)
265 (uri (string-append "https://www.python.org/ftp/python/"
266 version "/Python-" version ".tar.xz"))
6a20289d
LC
267 (patches (map search-patch
268 '("python-fix-tests.patch"
269 ;; XXX Try removing this patch for python > 3.4.3
270 "python-disable-ssl-test.patch"
9820a6d4 271 "python-3-deterministic-build-info.patch"
6a20289d 272 "python-3-search-paths.patch")))
717003e3
LC
273 (patch-flags '("-p0"))
274 (sha256
275 (base32
08c04509 276 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
277 (arguments (substitute-keyword-arguments (package-arguments python-2)
278 ((#:tests? _) #t)))
1aebc0cb
AE
279 (native-search-paths
280 (list (search-path-specification
281 (variable "PYTHONPATH")
0e05d01e
SB
282 (files (list (string-append "lib/python"
283 (version-major+minor version)
284 "/site-packages"))))))))
f26a77ff 285
95288fcc
LC
286;; Minimal variants of Python, mostly used to break the cycle between Tk and
287;; Python (Tk -> libxcb -> Python.)
288
289(define-public python2-minimal
290 (package (inherit python-2)
291 (name "python-minimal")
02f0c3b2 292 (outputs '("out"))
95288fcc
LC
293 (arguments
294 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
295 ((#:configure-flags cf)
296 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
297 (inputs '()))) ;none of the optional dependencies
298
299(define-public python-minimal
898238b9 300 (package (inherit python)
95288fcc 301 (name "python-minimal")
02f0c3b2 302 (outputs '("out"))
95288fcc
LC
303 (arguments
304 (substitute-keyword-arguments (package-arguments python)
c5a05e31
LC
305 ((#:configure-flags cf)
306 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
307
308 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
309 ;; zlib is required by 'zipimport', used by pip.
310 (inputs `(("openssl" ,openssl)
311 ("zlib" ,zlib)))))
312
64cb064c
LC
313(define* (wrap-python3 python
314 #:optional
315 (name (string-append (package-name python) "-wrapper")))
898238b9 316 (package (inherit python)
95288fcc 317 (name name)
898238b9
AE
318 (source #f)
319 (build-system trivial-build-system)
02f0c3b2 320 (outputs '("out"))
3c0f2329 321 (propagated-inputs `(("python" ,python)))
898238b9
AE
322 (arguments
323 `(#:modules ((guix build utils))
324 #:builder
325 (begin
326 (use-modules (guix build utils))
327 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
328 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
329 (mkdir-p bin)
330 (for-each
331 (lambda (old new)
332 (symlink (string-append python old)
333 (string-append bin "/" new)))
334 `("python3", "pydoc3", "idle3")
335 `("python", "pydoc", "idle"))))))
0d56e3e1
LC
336 (synopsis "Wrapper for the Python 3 commands")
337 (description
338 "This package provides wrappers for the commands of Python@tie{}3.x such
339that they can be invoked under their usual name---e.g., @command{python}
340instead of @command{python3}.")))
341
95288fcc
LC
342(define-public python-wrapper (wrap-python3 python))
343(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 344
aaf625b8
RW
345(define-public python-psutil
346 (package
347 (name "python-psutil")
f56777be 348 (version "3.3.0")
aaf625b8
RW
349 (source
350 (origin
351 (method url-fetch)
f56777be 352 (uri (pypi-uri "psutil" version))
aaf625b8
RW
353 (sha256
354 (base32
f56777be 355 "11bd1555vf2ibjnmqf64im5cp55vcqfq45ccinm9ll3bs68na6s2"))))
aaf625b8
RW
356 (build-system python-build-system)
357 (native-inputs
358 `(("python-setuptools" ,python-setuptools)))
359 (home-page "https://pypi.python.org/pypi/psutil/")
360 (synopsis "Library for retrieving information on running processes")
361 (description
362 "psutil (Python system and process utilities) is a library for retrieving
363information on running processes and system utilization (CPU, memory, disks,
364network) in Python. It is useful mainly for system monitoring, profiling and
365limiting process resources and management of running processes. It implements
366many functionalities offered by command line tools such as: ps, top, lsof,
367netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
368pidof, tty, taskset, pmap.")
369 (license bsd-3)))
370
371(define-public python2-psutil
372 (package-with-python2 python-psutil))
898238b9 373
f9da1d8a
ED
374(define-public python-passlib
375 (package
376 (name "python-passlib")
690e8c66 377 (version "1.6.5")
f9da1d8a
ED
378 (source
379 (origin
380 (method url-fetch)
690e8c66 381 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
382 (sha256
383 (base32
690e8c66 384 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
f9da1d8a
ED
385 (build-system python-build-system)
386 (native-inputs
387 `(("python-nose" ,python-nose)
388 ("python-setuptools" ,python-setuptools)))
389 (inputs
390 `(("python-py-bcrypt" ,python-py-bcrypt)))
391 (arguments
392 `(#:phases
393 (alist-cons-before
394 'check 'set-PYTHON_EGG_CACHE
395 ;; some tests require access to "$HOME/.cython"
396 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
397 %standard-phases)))
398 (home-page "https://bitbucket.org/ecollins/passlib")
399 (synopsis
400 "Comprehensive password hashing framework")
401 (description
402 "Passlib is a password hashing library for Python 2 & 3, which provides
403cross-platform implementations of over 30 password hashing algorithms, as well
404as a framework for managing existing password hashes. It's designed to be
405useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
406to providing full-strength password hashing for multi-user application.")
407 (license bsd-3)))
408
409(define-public python2-passlib
410 (package-with-python2 python-passlib))
411
feb0d9c3
ED
412(define-public python-py-bcrypt
413 (package
414 (name "python-py-bcrypt")
415 (version "0.4")
416 (source
417 (origin
418 (method url-fetch)
419 (uri (string-append
420 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
421 version
422 ".tar.gz"))
423 (sha256
424 (base32
425 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
426 (build-system python-build-system)
427 (native-inputs
428 `(("python-setuptools" ,python-setuptools)))
429 (home-page "https://code.google.com/p/py-bcrypt")
430 (synopsis
431 "Bcrypt password hashing and key derivation")
432 (description
433 "A python wrapper of OpenBSD's Blowfish password hashing code. This
434system hashes passwords using a version of Bruce Schneier's Blowfish block
435cipher with modifications designed to raise the cost of off-line password
436cracking and frustrate fast hardware implementation. The computation cost of
437the algorithm is parametised, so it can be increased as computers get faster.
438The intent is to make a compromise of a password database less likely to
439result in an attacker gaining knowledge of the plaintext passwords (e.g. using
440John the Ripper).")
441 ;; "sha2.c" is under BSD-3;
442 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
443 ;; the rest is under ISC.
444 (license (list isc bsd-3 bsd-4))))
445
446(define-public python2-py-bcrypt
447 (package-with-python2 python-py-bcrypt))
448
449
429fdea1
ED
450(define-public python-paramiko
451 (package
452 (name "python-paramiko")
453 (version "1.15.2")
454 (source
455 (origin
456 (method url-fetch)
457 (uri (string-append
458 "https://pypi.python.org/packages/source/p/paramiko/paramiko-"
459 version
460 ".tar.gz"))
461 (sha256
462 (base32
463 "0mbfzm9zlrz6mla9xakrm8wkll3x035f9rj3c5pbgjzfldqscmjg"))))
464 (build-system python-build-system)
465 (native-inputs
466 `(("python-setuptools" ,python-setuptools)))
a3fc12da
CR
467 (propagated-inputs
468 `(("python-pycrypto" ,python-pycrypto)))
429fdea1 469 (inputs
a3fc12da 470 `(("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
471 (home-page "http://www.paramiko.org/")
472 (synopsis "SSHv2 protocol library")
473 (description "Paramiko is a python implementation of the SSHv2 protocol,
474providing both client and server functionality. While it leverages a Python C
475extension for low level cryptography (PyCrypto), Paramiko itself is a pure
476Python interface around SSH networking concepts.")
477 (license lgpl2.1+)))
478
479(define-public python2-paramiko
480 (package-with-python2 python-paramiko))
481
482
de73dbf6
ED
483(define-public python-httplib2
484 (package
485 (name "python-httplib2")
486 (version "0.9.1")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (string-append
491 "https://pypi.python.org/packages/source/h/httplib2/httplib2-"
492 version
493 ".tar.gz"))
494 (sha256
495 (base32
496 "1xc3clbrf77r0600kja71j7hk1218sjiq0gfmb8vjdajka8kjqxw"))))
497 (build-system python-build-system)
498 (native-inputs
499 `(("python-setuptools" ,python-setuptools)))
500 (home-page
501 "https://github.com/jcgregorio/httplib2")
502 (synopsis "Comprehensive HTTP client library")
503 (description
504 "A comprehensive HTTP client library supporting many features left out of
505other HTTP libraries.")
506 (license license:expat)))
507
508(define-public python2-httplib2
509 (package-with-python2 python-httplib2))
510
67039875
ED
511(define-public python-ecdsa
512 (package
513 (name "python-ecdsa")
514 (version "0.13")
515 (source
516 (origin
517 (method url-fetch)
518 (uri (string-append
519 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
520 version
521 ".tar.gz"))
522 (sha256
523 (base32
524 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
525 (build-system python-build-system)
526 (native-inputs
527 `(("python-setuptools" ,python-setuptools)))
528 (inputs
529 `(("openssl" ,openssl)))
530 (home-page
531 "http://github.com/warner/python-ecdsa")
532 (synopsis
533 "ECDSA cryptographic signature library (pure python)")
534 (description
535 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
536Curve Digital Signature Algorithm), implemented purely in Python. With this
537library, you can quickly create keypairs (signing key and verifying key), sign
538messages, and verify the signatures. The keys and signatures are very short,
539making them easy to handle and incorporate into other protocols.")
540 (license license:expat)))
541
542(define-public python2-ecdsa
543 (package-with-python2 python-ecdsa))
544
52323f32
ED
545(define-public python-ccm
546 (package
547 (name "python-ccm")
548 (version "2.0.4.1")
549 (source
550 (origin
551 (method url-fetch)
552 (uri (string-append
553 "https://pypi.python.org/packages/source/c/ccm/ccm-"
554 version
555 ".tar.gz"))
556 (sha256
557 (base32
558 "199jw221albs2iv6xczczq88fxnh0aw8hzmys8qkbzkd99dssng9"))))
559 (build-system python-build-system)
560 (native-inputs
561 `(("python-setuptools" ,python-setuptools)))
562 (inputs
563 `(("python-pyyaml" ,python-pyyaml)
564 ("python-six" ,python-six)))
565 (home-page "https://github.com/pcmanus/ccm")
566 (synopsis "Cassandra Cluster Manager")
567 (description "A script/library to create, launch and remove an Apache
568Cassandra cluster on localhost.")
569 (license asl2.0)))
570
571(define-public python2-ccm
572 (package-with-python2 python-ccm))
573
89114f39 574(define-public python-pytz
acc26ff1 575 (package
89114f39 576 (name "python-pytz")
b01bbbcf 577 (version "2015.7")
acc26ff1
CR
578 (source
579 (origin
580 (method url-fetch)
b01bbbcf 581 (uri (pypi-uri "pytz" version))
acc26ff1
CR
582 (sha256
583 (base32
b01bbbcf 584 "1spgdfp1ssya7v3kww7zp71xpj437skpqazcvqr3kr1p1brnw9lr"))))
acc26ff1 585 (build-system python-build-system)
8498b8cf 586 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 587 (home-page "http://pythonhosted.org/pytz")
9e771e3b 588 (synopsis "Python timezone library")
acc26ff1
CR
589 (description
590 "This library allows accurate and cross platform timezone calculations
591using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 592 (license license:expat)))
5ace6e2f 593
89114f39 594(define-public python2-pytz
11bb85a1 595 (package-with-python2 python-pytz))
89114f39 596
fc50e9c6 597
89114f39 598(define-public python-babel
5ace6e2f 599 (package
89114f39 600 (name "python-babel")
b850a6d8 601 (version "2.1.1")
5ace6e2f
CR
602 (source
603 (origin
604 (method url-fetch)
b850a6d8 605 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
606 (sha256
607 (base32
b850a6d8 608 "0j2jgfzj1a2m39pm2qc36fzr7a6p5ybwndi0xdzhi2p8zw7dbdkz"))))
5ace6e2f
CR
609 (build-system python-build-system)
610 (inputs
e1804763
AE
611 `(("python-pytz" ,python-pytz)
612 ("python-setuptools" ,python-setuptools)))
8498b8cf 613 (arguments `(#:tests? #f)) ; no test target
e1804763 614 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
615 (synopsis
616 "Tools for internationalizing Python applications")
617 (description
618 "Babel is composed of two major parts:
619- tools to build and work with gettext message catalogs
620- a Python interface to the CLDR (Common Locale Data Repository), providing
621access to various locale display names, localized number and date formatting,
622etc. ")
623 (license bsd-3)))
89114f39
AE
624
625(define-public python2-babel
11bb85a1 626 (package-with-python2 python-babel))
73adf220 627
ed377cc6
RW
628(define-public python2-backport-ssl-match-hostname
629 (package
630 (name "python2-backport-ssl-match-hostname")
f2d06d46 631 (version "3.5.0.1")
ed377cc6
RW
632 (source
633 (origin
634 (method url-fetch)
635 (uri (string-append
636 "https://pypi.python.org/packages/source/b/"
637 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
638 version ".tar.gz"))
639 (sha256
640 (base32
f2d06d46 641 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 642 (build-system python-build-system)
f2d06d46
EF
643 (arguments
644 `(#:python ,python-2
645 #:tests? #f)) ; no test target
ed377cc6
RW
646 (inputs
647 `(("python2-setuptools" ,python2-setuptools)))
f2d06d46
EF
648 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
649 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
650 (description
651 "This backport brings the ssl.match_hostname() function to users of
652earlier versions of Python. The function checks the hostname in the
653certificate returned by the server to which a connection has been established,
654and verifies that it matches the intended target hostname.")
655 (license psfl)))
656
ef5cbf9b
RW
657(define-public python-h5py
658 (package
659 (name "python-h5py")
660 (version "2.4.0")
661 (source
662 (origin
663 (method url-fetch)
664 (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
665 version ".tar.gz"))
666 (sha256
667 (base32
668 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
669 (build-system python-build-system)
797e1401
RW
670 (arguments
671 `(#:tests? #f ; no test target
672 #:phases
673 (modify-phases %standard-phases
674 (add-after 'unpack 'fix-hdf5-paths
675 (lambda* (#:key inputs #:allow-other-keys)
676 (let ((prefix (assoc-ref inputs "hdf5")))
677 (substitute* "setup_build.py"
678 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
679 (string-append "['" prefix "/lib" "']"))
680 (("'/opt/local/include', '/usr/local/include'")
681 (string-append "'" prefix "/include" "'")))
682 (substitute* "setup_configure.py"
683 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
684 (string-append "['" prefix "/lib" "']")))
685 #t))))))
3c4010b1
RW
686 (propagated-inputs
687 `(("python-numpy" ,python-numpy)))
ef5cbf9b 688 (inputs
3c4010b1 689 `(("hdf5" ,hdf5)))
ef5cbf9b 690 (native-inputs
3c4010b1 691 `(("python-cython" ,python-cython)))
ef5cbf9b
RW
692 (home-page "http://www.h5py.org/")
693 (synopsis "Read and write HDF5 files from Python")
694 (description
695 "The h5py package provides both a high- and low-level interface to the
696HDF5 library from Python. The low-level interface is intended to be a
697complete wrapping of the HDF5 API, while the high-level component supports
698access to HDF5 files, datasets and groups using established Python and NumPy
699concepts.")
700 (license bsd-3)))
701
702(define-public python2-h5py
703 (let ((h5py (package-with-python2 python-h5py)))
704 (package (inherit h5py)
3c4010b1 705 (propagated-inputs
ef5cbf9b
RW
706 `(("python2-numpy" ,python2-numpy)
707 ,@(alist-delete
708 "python-numpy"
3c4010b1 709 (package-propagated-inputs h5py)))))))
ef5cbf9b 710
c1448c69
EB
711(define-public python-lockfile
712 (package
713 (name "python-lockfile")
714 (version "0.9.1")
715 (source
716 (origin
717 (method url-fetch)
718 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
719 "lockfile-" version ".tar.gz"))
720 (sha256
721 (base32
722 "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
723 (build-system python-build-system)
724 (arguments '(#:test-target "check"))
725 (home-page "http://code.google.com/p/pylockfile/")
726 (synopsis "Platform-independent file locking module")
727 (description
728 "The lockfile package exports a LockFile class which provides a simple
729API for locking files.")
bd3fa666 730 (license license:expat)))
c1448c69
EB
731
732(define-public python2-lockfile
733 (package-with-python2 python-lockfile))
734
5a1a4bf6
EB
735(define-public python-mock
736 (package
737 (name "python-mock")
738 (version "1.0.1")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
743 "mock-" version ".tar.gz"))
744 (sha256
745 (base32
746 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
747 (build-system python-build-system)
748 (arguments '(#:test-target "check"))
07af3e5e 749 (home-page "http://code.google.com/p/mock/")
9e771e3b 750 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
751 (description
752 "Mock is a library for testing in Python. It allows you to replace parts
753of your system under test with mock objects and make assertions about how they
754have been used.")
bd3fa666 755 (license license:expat)))
5a1a4bf6
EB
756
757(define-public python2-mock
758 (package-with-python2 python-mock))
759
fc50e9c6 760
73adf220
AE
761(define-public python-setuptools
762 (package
763 (name "python-setuptools")
62a9a23b 764 (version "18.3.1")
73adf220
AE
765 (source
766 (origin
767 (method url-fetch)
768 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
769 version ".tar.gz"))
770 (sha256
771 (base32
62a9a23b 772 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 773 (build-system python-build-system)
d3d656c5
AE
774 ;; FIXME: Tests require pytest, which itself relies on setuptools.
775 ;; One could bootstrap with an internal untested setuptools.
73adf220 776 (arguments
824af8ca 777 `(#:tests? #f))
73adf220
AE
778 (home-page "https://pypi.python.org/pypi/setuptools")
779 (synopsis
780 "Library designed to facilitate packaging Python projects")
781 (description
782 "Setuptools is a fully-featured, stable library designed to facilitate
783packaging Python projects, where packaging includes:
784Python package and module definitions,
785distribution package metadata,
786test hooks,
787project installation,
788platform-specific details,
789Python 3 support.")
790 (license psfl)))
791
792(define-public python2-setuptools
793 (package-with-python2 python-setuptools))
fc50e9c6
AE
794
795
cafc3f5a
EB
796(define-public python-pycrypto
797 (package
798 (name "python-pycrypto")
799 (version "2.6.1")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (string-append "https://pypi.python.org/packages/source/p/"
804 "pycrypto/pycrypto-" version ".tar.gz"))
805 (sha256
806 (base32
807 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
808 (build-system python-build-system)
809 (native-inputs
810 `(("python-setuptools" ,python-setuptools)))
811 (inputs
812 `(("python" ,python)
813 ("gmp" ,gmp)))
814 (arguments
815 `(#:phases
816 (alist-cons-before
817 'build 'set-build-env
818 ;; pycrypto runs an autoconf configure script behind the scenes
819 (lambda _
820 (setenv "CONFIG_SHELL" (which "bash")))
821 %standard-phases)))
822 (home-page "http://www.pycrypto.org/")
823 (synopsis "Cryptographic modules for Python")
824 (description
825 "Pycrypto is a collection of both secure hash functions (such as SHA256
826and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 827etc.). The package is structured to make adding new modules easy.")
cafc3f5a
EB
828 (license public-domain)))
829
345f0611 830(define-public python2-pycrypto
1c0059da
EF
831 (let ((pycrypto (package-with-python2 python-pycrypto)))
832 (package (inherit pycrypto)
833 (inputs
834 `(("python" ,python-2)
835 ,@(alist-delete
836 "python"
837 (package-inputs pycrypto)))))))
345f0611 838
cafc3f5a
EB
839(define-public python-keyring
840 (package
841 (name "python-keyring")
664e6c3a 842 (version "5.7.1")
cafc3f5a
EB
843 (source
844 (origin
845 (method url-fetch)
664e6c3a 846 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
847 (sha256
848 (base32
664e6c3a 849 "1h7a1r9ick7wdd0xb5p63413nvjadna2xawrsvmklsl5ddhm5wrx"))))
cafc3f5a
EB
850 (build-system python-build-system)
851 (native-inputs
664e6c3a
EF
852 `(("python-setuptools" ,python-setuptools)
853 ("python-setuptools-scm" ,python-setuptools-scm)
cafc3f5a
EB
854 ("python-mock" ,python-mock)))
855 (inputs
856 `(("python-pycrypto" ,python-pycrypto)))
857 (arguments
664e6c3a 858 `(#:tests? #f)) ;TODO: tests require pytest
cafc3f5a
EB
859 (home-page "http://bitbucket.org/kang/python-keyring-lib")
860 (synopsis "Store and access your passwords safely")
861 (description
862 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 863service from python. It can be used in any application that needs safe
cafc3f5a
EB
864password storage.")
865 ;; "MIT" and PSF dual license
866 (license x11)))
867
d7af1069 868(define-public python2-keyring
44e30a76
EF
869 (let ((keyring (package-with-python2 python-keyring)))
870 (package (inherit keyring)
871 (inputs
872 `(("python2-pycrypto" ,python2-pycrypto))))))
d7af1069 873
a480bc41
EB
874(define-public python-six
875 (package
876 (name "python-six")
b6ab89ef 877 (version "1.10.0")
a480bc41
EB
878 (source
879 (origin
880 (method url-fetch)
b6ab89ef 881 (uri (pypi-uri "six" version))
a480bc41
EB
882 (sha256
883 (base32
b6ab89ef 884 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41
EB
885 (build-system python-build-system)
886 (inputs
887 `(("python-setuptools" ,python-setuptools)))
888 (home-page "http://pypi.python.org/pypi/six/")
889 (synopsis "Python 2 and 3 compatibility utilities")
890 (description
35b9e423 891 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
892functions for smoothing over the differences between the Python versions with
893the goal of writing Python code that is compatible on both Python versions.
35b9e423 894Six supports every Python version since 2.5. It is contained in only one
a480bc41
EB
895Python file, so it can be easily copied into your project.")
896 (license x11)))
897
0c20025c
AE
898(define-public python2-six
899 (package-with-python2 python-six))
900
cafc3f5a
EB
901(define-public python-dateutil-2
902 (package
903 (name "python-dateutil")
c2a9c1c0 904 (version "2.4.2")
cafc3f5a
EB
905 (source
906 (origin
907 (method url-fetch)
908 (uri (string-append "https://pypi.python.org/packages/source/p/"
909 name "/" name "-" version ".tar.gz"))
910 (sha256
911 (base32
c2a9c1c0 912 "0ggbm2z72p0nwjqgvpw8s5bqzwayqiqv2iws0x2a605m3mf4959y"))))
cafc3f5a
EB
913 (build-system python-build-system)
914 (inputs
915 `(("python-setuptools" ,python-setuptools)
916 ("python-six" ,python-six)))
917 (home-page "http://labix.org/python-dateutil")
918 (synopsis "Extensions to the standard datetime module")
919 (description
920 "The dateutil module provides powerful extensions to the standard
921datetime module, available in Python 2.3+.")
922 (license bsd-3)))
923
924(define-public python2-dateutil-2
925 (package-with-python2 python-dateutil-2))
926
fc50e9c6
AE
927(define-public python-dateutil
928 (package
929 (name "python-dateutil")
930 (version "1.5") ; last version for python < 3
931 (source
932 (origin
933 (method url-fetch)
cafc3f5a
EB
934 (uri (string-append "http://labix.org/download/python-dateutil/"
935 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
936 (sha256
937 (base32
938 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
939 (build-system python-build-system)
940 (inputs
941 `(("python-setuptools" ,python-setuptools)))
942 (home-page "http://labix.org/python-dateutil")
cafc3f5a 943 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
944 (description
945 "The dateutil module provides powerful extensions to the standard
946datetime module, available in Python 2.3+.")
947 (license psfl)))
948
949(define-public python2-dateutil
950 (package-with-python2 python-dateutil))
1d08c01f 951
cafc3f5a
EB
952(define-public python-parsedatetime
953 (package
954 (name "python-parsedatetime")
4df1e30d 955 (version "1.5")
cafc3f5a
EB
956 (source
957 (origin
958 (method url-fetch)
959 (uri (string-append "https://pypi.python.org/packages/source/p/"
960 "parsedatetime/parsedatetime-" version ".tar.gz"))
961 (sha256
962 (base32
4df1e30d 963 "1as0mm4ql3z0324nc9bys2s1ngh507i317p16b79rx86wlmvx9ix"))))
cafc3f5a
EB
964 (build-system python-build-system)
965 (native-inputs
966 `(("python-setuptools" ,python-setuptools)))
cafc3f5a
EB
967 (home-page "http://github.com/bear/parsedatetime/")
968 (synopsis
969 "Parse human-readable date/time text")
970 (description
e881752c 971 "Parse human-readable date/time text.")
cafc3f5a
EB
972 (license asl2.0)))
973
38b8f9b2
LF
974(define-public python2-parsedatetime
975 (package-with-python2 python-parsedatetime))
976
d072efcb
RW
977(define-public python-pandas
978 (package
979 (name "python-pandas")
1b96f069 980 (version "0.16.2")
d072efcb
RW
981 (source
982 (origin
1b96f069
RW
983 (method url-fetch)
984 (uri (pypi-uri "pandas" version))
985 (sha256
986 (base32 "10agmrkps8bi5948vwpipfxds5kj1d076m9i0nhaxwqiw7gm6670"))))
d072efcb
RW
987 (build-system python-build-system)
988 (arguments
989 `(;; Three tests fail:
990 ;; - test_read_google
991 ;; - test_read_yahoo
992 ;; - test_month_range_union_tz_dateutil
993 #:tests? #f))
994 (propagated-inputs
995 `(("python-numpy" ,python-numpy)
996 ("python-pytz" ,python-pytz)
997 ("python-dateutil" ,python-dateutil-2)))
998 (native-inputs
999 `(("python-nose" ,python-nose)
1000 ("python-setuptools" ,python-setuptools)))
1001 (home-page "http://pandas.pydata.org")
1002 (synopsis "Data structures for data analysis, time series, and statistics")
1003 (description
1004 "Pandas is a Python package providing fast, flexible, and expressive data
1005structures designed to make working with structured (tabular,
1006multidimensional, potentially heterogeneous) and time series data both easy
1007and intuitive. It aims to be the fundamental high-level building block for
1008doing practical, real world data analysis in Python.")
1009 (license bsd-3)))
1010
1011(define-public python2-pandas
3cbe7d5e
FB
1012 (let ((pandas (package-with-python2 python-pandas)))
1013 (package (inherit pandas)
1014 (propagated-inputs
1015 `(("python2-numpy" ,python2-numpy)
1016 ,@(alist-delete "python-numpy"
1017 (package-propagated-inputs pandas)))))))
d072efcb 1018
cafc3f5a
EB
1019(define-public python-tzlocal
1020 (package
1021 (name "python-tzlocal")
226d3331 1022 (version "1.2")
cafc3f5a
EB
1023 (source
1024 (origin
1025 (method url-fetch)
226d3331 1026 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1027 (sha256
1028 (base32
226d3331 1029 "12wsw2fl3adrqrwghasld57bhqdrzn0crblqrci1p5acd0ni53s3"))))
cafc3f5a 1030 (build-system python-build-system)
226d3331 1031 (propagated-inputs `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1032 (home-page "https://github.com/regebro/tzlocal")
1033 (synopsis
35b9e423 1034 "Local timezone information for Python")
cafc3f5a
EB
1035 (description
1036 "Tzlocal returns a tzinfo object with the local timezone information.
1037This module attempts to fix a glaring hole in pytz, that there is no way to
1038get the local timezone information, unless you know the zoneinfo name, and
1039under several distributions that's hard or impossible to figure out.")
1040 (license cc0)))
1041
be7134bf
RW
1042(define-public python-pysam
1043 (package
1044 (name "python-pysam")
1045 (version "0.8.1")
1046 (source
1047 (origin
1048 (method url-fetch)
1049 (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-"
1050 version ".tar.gz"))
1051 (sha256
1052 (base32
1053 "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459"))))
1054 (build-system python-build-system)
1055 (arguments
1056 `(#:tests? #f ; tests are excluded in the manifest
1057 #:phases
1058 (alist-cons-before
1059 'build 'set-flags
1060 (lambda _
1061 (setenv "LDFLAGS" "-lncurses")
1062 (setenv "CFLAGS" "-D_CURSES_LIB=1"))
1063 %standard-phases)))
1064 (inputs
1065 `(("python-cython" ,python-cython)
1066 ("python-setuptools" ,python-setuptools)
1067 ("ncurses" ,ncurses)
1068 ("zlib" ,zlib)))
1069 (home-page "https://github.com/pysam-developers/pysam")
1070 (synopsis "Python bindings to the SAMtools C API")
1071 (description
1072 "Pysam is a Python module for reading and manipulating files in the
1073SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It
1074also includes an interface for tabix.")
bd3fa666 1075 (license license:expat)))
be7134bf
RW
1076
1077(define-public python2-pysam
1078 (package-with-python2 python-pysam))
1d08c01f
AE
1079
1080(define-public python2-pysqlite
1081 (package
1082 (name "python2-pysqlite")
fe476868 1083 (version "2.8.1")
1d08c01f
AE
1084 (source
1085 (origin
1086 (method url-fetch)
fe476868 1087 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1088 (sha256
1089 (base32
fe476868 1090 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1091 (build-system python-build-system)
1092 (inputs
1093 `(("sqlite" ,sqlite)))
1094 (arguments
1095 `(#:python ,python-2 ; incompatible with Python 3
1096 #:tests? #f)) ; no test target
fe476868 1097 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1098 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1099 (description
1100 "Pysqlite provides SQLite bindings for Python that comply to the
1101Database API 2.0T.")
ed0cdf83 1102 (license license:zlib)))
1d08c01f 1103
2875caf5
AE
1104
1105(define-public python2-mechanize
1106 (package
1107 (name "python2-mechanize")
1108 (version "0.2.5")
1109 (source
1110 (origin
1111 (method url-fetch)
1112 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1113 version ".tar.gz"))
1114 (sha256
1115 (base32
1116 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1117 (build-system python-build-system)
1118 (inputs
1119 `(("python2-setuptools" ,python2-setuptools)))
1120 (arguments
1121 `(#:python ,python-2 ; apparently incompatible with Python 3
1122 #:tests? #f))
1123 ;; test fails with message
1124 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1125 ;; (python-3.3.2) or
1126 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1127 ;; (python-2.7.5).
1128 ;; The source code is from March 2011 and probably not up-to-date
1129 ;; with respect to python unit tests.
1130 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1131 (synopsis
1132 "Stateful programmatic web browsing in Python")
1133 (description
1134 "Mechanize implements stateful programmatic web browsing in Python,
1135after Andy Lester’s Perl module WWW::Mechanize.")
166191b3 1136 (license (non-copyleft "file://COPYING"
e881752c 1137 "See COPYING in the distribution."))))
2875caf5 1138
0352532e
AE
1139
1140(define-public python-simplejson
1141 (package
1142 (name "python-simplejson")
1143 (version "3.3.0")
1144 (source
1145 (origin
1146 (method url-fetch)
1147 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
1148 version ".tar.gz"))
1149 (sha256
1150 (base32
1151 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
1152 (build-system python-build-system)
1153 (home-page "http://simplejson.readthedocs.org/en/latest/")
1154 (synopsis
1155 "Json library for Python")
1156 (description
e881752c
AK
1157 "JSON (JavaScript Object Notation) is a subset of JavaScript
1158syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1159format.
0352532e
AE
1160
1161Simplejson exposes an API familiar to users of the standard library marshal
1162and pickle modules. It is the externally maintained version of the json
1163library contained in Python 2.6, but maintains compatibility with Python 2.5
1164and (currently) has significant performance advantages, even without using
1165the optional C extension for speedups. Simplejson is also supported on
1166Python 3.3+.")
1167 (license x11)))
1168
1169(define-public python2-simplejson
1170 (package-with-python2 python-simplejson))
421a80a2
AE
1171
1172
1173(define-public python2-pyicu
1174 (package
1175 (name "python2-pyicu")
569ac046 1176 (version "1.8")
421a80a2
AE
1177 (source
1178 (origin
1179 (method url-fetch)
1180 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1181 version ".tar.gz"))
1182 (sha256
1183 (base32
569ac046 1184 "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
421a80a2
AE
1185 (build-system python-build-system)
1186 (inputs
1187 `(("icu4c" ,icu4c)))
1188 (arguments
1189 `(#:python ,python-2 ; Python 3 works also, but needs special care for
1190 ; linking with libpython3.3m
1191 #:tests? #f)) ; no check target
1192 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1193 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1194 (description
1195 "PyICU is a python extension wrapping the ICU C++ API.")
1196 (license x11)))
cc20a22a
LC
1197
1198(define-public python2-dogtail
1199 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1200 ;; spaces in indentation" with Python 3.
1201 (package
1202 (name "python2-dogtail")
1203 (version "0.8.2")
1204 (source (origin
1205 (method url-fetch)
1206 (uri (string-append
1207 "https://fedorahosted.org/released/dogtail/dogtail-"
1208 version ".tar.gz"))
1209 (sha256
1210 (base32
1211 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1212 (build-system python-build-system)
1213 (arguments `(#:python ,python-2
1214 #:tests? #f)) ; invalid command "test"
1215 (home-page "https://fedorahosted.org/dogtail/")
1216 (synopsis "GUI test tool and automation framework written in ​Python")
1217 (description
35b9e423 1218 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1219It uses Accessibility (a11y) technologies to communicate with desktop
1220applications. dogtail scripts are written in Python and executed like any
1221other Python program.")
1222 (license gpl2+)))
515e6878 1223
011b18c3
LC
1224(define-public python2-empy
1225 (package
1226 (name "python2-empy")
1227 (version "3.3")
1228 (source (origin
1229 (method url-fetch)
1230 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1231 version ".tar.gz"))
1232 (sha256
1233 (base32
1234 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1235 (build-system python-build-system)
1236 (arguments
1237 `(#:python ,python-2
1238 #:phases (alist-replace
1239 'check
1240 (lambda _
1241 (zero? (system* "./test.sh")))
1242 %standard-phases)))
1243 (home-page "http://www.alcyone.com/software/empy/")
1244 (synopsis "Templating system for Python")
1245 (description
1246 "EmPy is a system for embedding Python expressions and statements in
1247template text; it takes an EmPy source file, processes it, and produces
1248output. This is accomplished via expansions, which are special signals to the
1cd4027c 1249EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1250EmPy can expand arbitrary Python expressions and statements in this way, as
1251well as a variety of special forms. Textual data not explicitly delimited in
1252this way is sent unaffected to the output, allowing Python to be used in
1253effect as a markup language. Also supported are callbacks via hooks,
1254recording and playback via diversions, and dynamic, chainable filters. The
1255system is highly configurable via command line options and embedded
1256commands.")
1257 (license lgpl2.1+)))
1258
8deeda0c
LC
1259(define-public python2-element-tree
1260 (package
1261 (name "python2-element-tree")
1262 (version "1.2.6")
1263 (source (origin
1264 (method url-fetch)
1265 (uri (string-append
1266 "http://effbot.org/media/downloads/elementtree-"
1267 version "-20050316.tar.gz"))
1268 (sha256
1269 (base32
1270 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1271 (build-system python-build-system)
1272 (arguments
1273 `(#:python ,python-2 ; seems to be part of Python 3
1274 #:tests? #f)) ; no 'test' sub-command
1275 (synopsis "Toolkit for XML processing in Python")
1276 (description
1277 "ElementTree is a Python library supporting lightweight XML processing.")
1278 (home-page "http://effbot.org/zone/element-index.htm")
1279 (license (x11-style "http://docs.python.org/2/license.html"
1280 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
12810.9.0 THROUGH 1.2\"."))))
1282
1283(define-public python2-pybugz
1284 (package
1285 (name "python2-pybugz")
1286 (version "0.6.11")
1287 (source (origin
1288 (method url-fetch)
1289 (uri (string-append
1290 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1291 version ".tar.gz"))
1292 (sha256
1293 (base32
6f194a1e
LC
1294 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1295 (patches (map search-patch
1296 (list "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/")
1309 (license gpl2)))
1310
a480bc41
EB
1311(define-public python-enum34
1312 (package
1313 (name "python-enum34")
1314 (version "1.0")
1315 (source
1316 (origin
1317 (method url-fetch)
1318 (uri (string-append "https://pypi.python.org/packages/source/e/"
1319 "enum34/enum34-" version ".tar.gz"))
1320 (sha256
1321 (base32
1322 "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq"))))
1323 (build-system python-build-system)
1324 (inputs
1325 `(("python-setuptools" ,python-setuptools)))
1326 (arguments
1327 `(#:phases
1328 (alist-replace
1329 'check
1330 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1331 %standard-phases)))
1332 (home-page "https://pypi.python.org/pypi/enum34")
1333 (synopsis "Backported Python 3.4 Enum")
1334 (description
1335 "Enum34 is the new Python stdlib enum module available in Python 3.4
1336backported for previous versions of Python from 2.4 to 3.3.")
1337 (license bsd-3)))
1338
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)
1355 ("python-parse" ,python-parse)
1356 ("python-enum34" ,python-enum34))) ;required for python<3.4
1357 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1358 (home-page "https://github.com/jenisys/parse_type")
1359 (synopsis "Extended parse module")
1360 (description
1361 "Parse_type extends the python parse module.")
1362 (license bsd-3)))
1363
1364(define-public python-parse
1365 (package
1366 (name "python-parse")
1367 (version "1.6.4")
1368 (source
1369 (origin
1370 (method url-fetch)
1371 (uri (string-append "https://pypi.python.org/packages/source/p/"
1372 "parse/parse-" version ".tar.gz"))
1373 (sha256
1374 (base32
1375 "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
1376 (build-system python-build-system)
1377 (arguments
1378 `(#:phases
1379 (alist-replace
1380 'check
1381 (lambda _ (zero? (system* "python" "test_parse.py")))
1382 %standard-phases)))
1383 (home-page "https://github.com/r1chardj0n3s/parse")
1384 (synopsis "Parse strings")
1385 (description
1386 "Parse strings using a specification based on the Python format()
1387syntax.")
1388 (license x11)))
1389
1390
515e6878
LC
1391(define-public scons
1392 (package
1393 (name "scons")
a3f61425 1394 (version "2.3.4")
515e6878
LC
1395 (source (origin
1396 (method url-fetch)
1397 (uri (string-append "mirror://sourceforge/scons/scons-"
1398 version ".tar.gz"))
1399 (sha256
1400 (base32
a3f61425 1401 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1402 (build-system python-build-system)
1403 (arguments
1404 ;; With Python 3.x, fails to build with a syntax error.
1405 `(#:python ,python-2
1406 #:tests? #f)) ; no 'python setup.py test' command
1407 (home-page "http://scons.org/")
1408 (synopsis "Software construction tool written in Python")
1409 (description
1410 "SCons is a software construction tool. Think of SCons as an improved,
1411cross-platform substitute for the classic Make utility with integrated
1412functionality similar to autoconf/automake and compiler caches such as ccache.
1413In short, SCons is an easier, more reliable and faster way to build
1414software.")
1415 (license x11)))
011b18c3 1416
c15a5c0e
DT
1417(define-public python-extras
1418 (package
1419 (name "python-extras")
1420 (version "0.0.3")
1421 (source
1422 (origin
1423 (method url-fetch)
1424 (uri (string-append
1425 "https://pypi.python.org/packages/source/e/extras/extras-"
1426 version ".tar.gz"))
1427 (sha256
1428 (base32
1429 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1430 (build-system python-build-system)
1431 (inputs
1432 `(("python-setuptools" ,python-setuptools)))
1433 (arguments
1434 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1435 '(#:tests? #f))
1436 (home-page "https://github.com/testing-cabal/extras")
1437 (synopsis "Useful extensions to the Python standard library")
1438 (description
1439 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1440 (license license:expat)))
c15a5c0e
DT
1441
1442(define-public python2-extras
1443 (package-with-python2 python-extras))
1444
56ea0efd
DT
1445(define-public python-mimeparse
1446 (package
1447 (name "python-mimeparse")
1448 (version "0.1.4")
1449 (source
1450 (origin
1451 (method url-fetch)
1452 (uri (string-append
1453 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1454 version ".tar.gz"))
1455 (sha256
1456 (base32
1457 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1458 (build-system python-build-system)
1459 (inputs
1460 `(("python-setuptools" ,python-setuptools)))
1461 (arguments
1462 '(#:tests? #f)) ; no setup.py test command
1463 (home-page
1464 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1465 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1466 (description
1467 "Mimeparse provides basic functions for parsing MIME type names and
1468matching them against a list of media-ranges.")
bd3fa666 1469 (license license:expat)))
56ea0efd
DT
1470
1471(define-public python2-mimeparse
1472 (package-with-python2 python-mimeparse))
1473
4435427e
DT
1474(define-public python-nose
1475 (package
1476 (name "python-nose")
f7cb9841 1477 (version "1.3.7")
4435427e
DT
1478 (source
1479 (origin
1480 (method url-fetch)
f7cb9841 1481 (uri (pypi-uri "nose" version))
4435427e
DT
1482 (sha256
1483 (base32
f7cb9841 1484 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e
DT
1485 (build-system python-build-system)
1486 (inputs
1487 `(("python-setuptools" ,python-setuptools)))
1488 (arguments
1489 '(#:tests? #f)) ; FIXME: test suite fails
1490 (home-page "http://readthedocs.org/docs/nose/")
1491 (synopsis "Python testing library")
1492 (description
1493 "Nose extends the unittest library to make testing easier.")
1494 (license lgpl2.0+)))
1495
1496(define-public python2-nose
1497 (package-with-python2 python-nose))
1498
6cd9c356
DT
1499(define-public python-unittest2
1500 (package
1501 (name "python-unittest2")
1502 (version "0.5.1")
1503 (source
1504 (origin
1505 (method url-fetch)
1506 (uri (string-append
1507 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1508 version ".tar.gz"))
1509 (sha256
1510 (base32
1511 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1512 (build-system python-build-system)
1513 (inputs
1514 `(("python-setuptools" ,python-setuptools)))
1515 (home-page "http://pypi.python.org/pypi/unittest2")
1516 (synopsis "Python unit testing library")
1517 (description
1518 "Unittest2 is a replacement for the unittest module in the Python
1519standard library.")
1520 (license psfl)))
1521
1522(define-public python2-unittest2
1523 (package (inherit python-unittest2)
1524 (name "python2-unittest2")
1525 (version "0.5.1")
1526 (source
1527 (origin
1528 (method url-fetch)
1529 (uri (string-append
1530 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1531 version ".tar.gz"))
1532 (sha256
1533 (base32
1534 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1535 (inputs
7957fe6c 1536 `(("python2-setuptools" ,python2-setuptools)))
6cd9c356
DT
1537 (arguments
1538 `(#:python ,python-2
1539 #:tests? #f)))) ; no setup.py test command
1540
542ad60f
DT
1541(define-public python-py
1542 (package
1543 (name "python-py")
71c8a804 1544 (version "1.4.31")
542ad60f
DT
1545 (source
1546 (origin
1547 (method url-fetch)
71c8a804 1548 (uri (pypi-uri "py" version))
542ad60f
DT
1549 (sha256
1550 (base32
71c8a804 1551 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f
DT
1552 (build-system python-build-system)
1553 (inputs
1554 `(("python-setuptools" ,python-setuptools)))
1555 (home-page "http://pylib.readthedocs.org/")
1556 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1557 (description
1558 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1559code introspection, and logging.")
bd3fa666 1560 (license license:expat)))
542ad60f
DT
1561
1562(define-public python2-py
1563 (package-with-python2 python-py))
1564
855d4761
DT
1565(define-public python-pytest
1566 (package
1567 (name "python-pytest")
1568 (version "2.6.1")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (string-append
1573 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1574 version ".tar.gz"))
1575 (sha256
1576 (base32
1577 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1578 (modules '((guix build utils)))
1579 (snippet
1580 ;; One of the tests involves the /usr directory, so it fails.
1581 '(substitute* "testing/test_argcomplete.py"
1582 (("def test_remove_dir_prefix\\(self\\):")
1583 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1584 (build-system python-build-system)
1585 (inputs
1586 `(("python-setuptools" ,python-setuptools)
1587 ("python-py" ,python-py)
1588 ("python-nose" ,python-nose)
1589 ("python-mock" ,python-mock)))
1590 (home-page "http://pytest.org")
1591 (synopsis "Python testing library")
1592 (description
1593 "Pytest is a testing tool that provides auto-discovery of test modules
1594and functions, detailed info on failing assert statements, modular fixtures,
1595and many external plugins.")
bd3fa666 1596 (license license:expat)))
855d4761
DT
1597
1598(define-public python2-pytest
1599 (package-with-python2 python-pytest))
1600
358c3d61
EF
1601(define-public python-pytest-cov
1602 (package
1603 (name "python-pytest-cov")
1604 (version "2.2.0")
1605 (source
1606 (origin
1607 (method url-fetch)
1608 (uri (pypi-uri "pytest-cov" version))
1609 (sha256
1610 (base32
1611 "1lf9jsmhqk5nc4w3kzwglmdzjvmi7ajvrsnwv826j3bn0wzx8c92"))))
10468636
EF
1612 (build-system python-build-system)
1613 (propagated-inputs
1614 `(("python-coverage" ,python-coverage)
1615 ("python-pytest" ,python-pytest)))
1616 (native-inputs
1617 `(("python-setuptools" ,python-setuptools)))
1618 (home-page "https://github.com/pytest-dev/pytest-cov")
1619 (synopsis "Pytest plugin for measuring coverage")
1620 (description
1621 "Pytest-cov produces coverage reports. It supports centralised testing and
1622distributed testing in both @code{load} and @code{each} modes. It also
1623supports coverage of subprocesses.")
358c3d61
EF
1624 (license license:expat)))
1625
1626(define-public python2-pytest-cov
1627 (package-with-python2 python-pytest-cov))
1628
6784f2e3
RW
1629(define-public python-pytest-runner
1630 (package
1631 (name "python-pytest-runner")
1632 (version "2.6.2")
1633 (source
1634 (origin
1635 (method url-fetch)
1636 (uri (string-append "https://pypi.python.org/packages/source/p/"
1637 "pytest-runner/pytest-runner-"
1638 version ".tar.gz"))
1639 (sha256
1640 (base32
1641 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1642 (build-system python-build-system)
1643 (arguments
1644 `(#:phases
1645 (modify-phases %standard-phases
1646 ;; The fancy way of setting the version with setuptools_scm does not
1647 ;; seem to work here.
1648 (add-after 'unpack 'set-version
1649 (lambda _
1650 (substitute* "docs/conf.py"
1651 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1652 (string-append "version = \"" ,version "\"")))
1653 #t)))))
1654 (native-inputs
1655 `(("python-pytest" ,python-pytest)
d50d097d 1656 ("python-setuptools" ,python-setuptools)
6784f2e3
RW
1657 ("python-setuptools-scm" ,python-setuptools-scm)))
1658 (home-page "https://bitbucket.org/pytest-dev/pytest-runner")
1659 (synopsis "Invoke py.test as a distutils command")
1660 (description
1661 "This package provides a @command{pytest-runner} command that
1662@file{setup.py} files can use to run tests.")
1663 (license license:expat)))
1664
1665(define-public python2-pytest-runner
1666 (package-with-python2 python-pytest-runner))
1667
84d24017
DT
1668(define-public python-scripttest
1669 (package
1670 (name "python-scripttest")
1671 (version "1.3")
1672 (source
1673 (origin
1674 (method url-fetch)
1675 (uri (string-append
1676 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1677 version ".tar.gz"))
1678 (sha256
1679 (base32
1680 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1681 (build-system python-build-system)
1682 (inputs
1683 `(("python-setuptools" ,python-setuptools)
1684 ("python-pytest" ,python-pytest)))
1685 (home-page "http://pythonpaste.org/scripttest/")
1686 (synopsis "Python library to test command-line scripts")
1687 (description "Scripttest is a Python helper library for testing
1688interactive command-line applications. With it you can run a script in a
1689subprocess and see the output as well as any file modifications.")
bd3fa666 1690 (license license:expat)))
84d24017
DT
1691
1692(define-public python2-scripttest
1693 (package-with-python2 python-scripttest))
1694
d8fa80e1
DT
1695(define-public python-testtools
1696 (package
1697 (name "python-testtools")
1698 (version "1.0.0")
1699 (source
1700 (origin
1701 (method url-fetch)
1702 (uri (string-append
1703 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1704 version ".tar.gz"))
1705 (sha256
1706 (base32
1707 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1708 (build-system python-build-system)
0e88cbf8
CR
1709 (propagated-inputs
1710 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1711 (inputs
1712 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1713 ("python-extras" ,python-extras)))
1714 (home-page "https://github.com/testing-cabal/testtools")
1715 (synopsis
1716 "Extensions to the Python standard library unit testing framework")
1717 (description
1718 "Testtools extends the Python standard library unit testing framework to
1719provide matchers, more debugging information, and cross-Python
1720compatibility.")
1721 (license psfl)))
1722
1723(define-public python2-testtools
1724 (package-with-python2 python-testtools))
1725
5bf3afea
DT
1726(define-public python-testscenarios
1727 (package
1728 (name "python-testscenarios")
1729 (version "0.4")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (string-append
1734 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1735 version ".tar.gz"))
1736 (sha256
1737 (base32
1738 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1739 (build-system python-build-system)
1740 (inputs
1741 `(("python-setuptools" ,python-setuptools)
1742 ("python-testtools" ,python-testtools)
1743 ("python-mimeparse" ,python-mimeparse)))
1744 (home-page "https://launchpad.net/testscenarios")
1745 (synopsis "Pyunit extension for dependency injection")
1746 (description
1747 "Testscenarios provides clean dependency injection for Python unittest
1748style tests.")
1749 (license (list bsd-3 asl2.0)))) ; at the user's option
1750
1751(define-public python2-testscenarios
1752 (package-with-python2 python-testscenarios))
1753
dac79ecc
DT
1754(define-public python-testresources
1755 (package
1756 (name "python-testresources")
1757 (version "0.2.7")
1758 (source
1759 (origin
1760 (method url-fetch)
1761 (uri (string-append
1762 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1763 version ".tar.gz"))
1764 (sha256
1765 (base32
1766 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1767 (build-system python-build-system)
1768 (inputs
1769 `(("python-setuptools" ,python-setuptools)))
1770 (home-page "https://launchpad.net/testresources")
1771 (synopsis
1772 "Pyunit extension for managing test resources")
1773 (description
1774 "Testresources is an extension to Python's unittest to allow declarative
1775use of resources by test cases.")
1776 (license (list bsd-3 asl2.0)))) ; at the user's option
1777
1778(define-public python2-testresources
1779 (package-with-python2 python-testresources))
1780
070ab058
DT
1781(define-public python-subunit
1782 (package
1783 (name "python-subunit")
1784 (version "0.0.21")
1785 (source
1786 (origin
1787 (method url-fetch)
1788 (uri (string-append
1789 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1790 version ".tar.gz"))
1791 (sha256
1792 (base32
1793 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1794 (build-system python-build-system)
1795 (inputs
1796 `(("python-setuptools" ,python-setuptools)
1797 ("python-testtools" ,python-testtools)
1798 ("python-mimeparse" ,python-mimeparse)
1799 ("python-testscenarios" ,python-testscenarios)))
1800 (home-page "http://launchpad.net/subunit")
1801 (synopsis "Python implementation of the subunit protocol")
1802 (description
1803 "Python-subunit is a Python implementation of the subunit test streaming
1804protocol.")
1805 (license (list bsd-3 asl2.0)))) ; at the user's option
1806
1807(define-public python2-subunit
1808 (package-with-python2 python-subunit))
1809
7787ef76
CR
1810;; Recent versions of python-fixtures need a recent version of python-pbr,
1811;; which needs a recent version of python-fixtures. To fix this circular
1812;; dependency, we keep old versions of python-fixtures and python-pbr to
1813;; bootstrap the whole thing:
1814;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1815;; - python-pbr-0.11 is used to build python-fixtures
1816;; - python-fixtures is used to build python-pbr
1817(define-public python-fixtures-0.3.16
cd49454b
DT
1818 (package
1819 (name "python-fixtures")
1820 (version "0.3.16")
1821 (source
1822 (origin
1823 (method url-fetch)
1824 (uri (string-append
1825 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1826 version ".tar.gz"))
1827 (sha256
1828 (base32
1829 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1830 (build-system python-build-system)
1831 (inputs
1832 `(("python-setuptools" ,python-setuptools)))
1833 (arguments
1834 '(#:tests? #f)) ; no setup.py test command
1835 (home-page "https://launchpad.net/python-fixtures")
1836 (synopsis "Python test fixture library")
1837 (description
1838 "Fixtures provides a way to create reusable state, useful when writing
1839Python tests.")
1840 (license (list bsd-3 asl2.0)))) ; at user's option
1841
7787ef76
CR
1842(define-public python2-fixtures-0.3.16
1843 (package-with-python2 python-fixtures-0.3.16))
1844
1845(define-public python-pbr-0.11
1846 (package
1847 (name "python-pbr")
1848 (version "0.11.0")
1849 (source
1850 (origin
1851 (method url-fetch)
1852 (uri (string-append
1853 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1854 version ".tar.gz"))
1855 (sha256
1856 (base32
1857 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1858 (build-system python-build-system)
1859 (arguments
1860 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1861 (inputs
1862 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1863 ("python-pip" ,python-pip)
1864 ("python-setuptools" ,python-setuptools)))
1865 (home-page "https://launchpad.net/pbr")
1866 (synopsis "Change the default behavior of Python’s setuptools")
1867 (description
1868 "Python Build Reasonableness (PBR) is a library that injects some useful
1869and sensible default behaviors into your setuptools run.")
1870 (license asl2.0)))
1871
1872(define-public python2-pbr-0.11
1873 (package-with-python2 python-pbr-0.11))
1874
1875(define-public python-fixtures
1876 (package
1877 (name "python-fixtures")
13fcc6df 1878 (version "1.4.0")
7787ef76
CR
1879 (source
1880 (origin
1881 (method url-fetch)
13fcc6df 1882 (uri (pypi-uri "fixtures" version))
7787ef76
CR
1883 (sha256
1884 (base32
13fcc6df 1885 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
1886 (build-system python-build-system)
1887 (propagated-inputs
1888 `(("python-six" ,python-six)
1889 ("python-pbr-0.11" ,python-pbr-0.11)))
1890 (inputs
1891 `(("python-pip" ,python-pip)
1892 ("python-setuptools" ,python-setuptools)
1893 ;; Tests
1894 ("python-testtools" ,python-testtools)))
1895 (arguments
1896 '(#:tests? #f)) ; no setup.py test command
1897 (home-page "https://launchpad.net/python-fixtures")
1898 (synopsis "Python test fixture library")
1899 (description
1900 "Fixtures provides a way to create reusable state, useful when writing
1901Python tests.")
1902 (license (list bsd-3 asl2.0)))) ; at user's option
1903
cd49454b
DT
1904(define-public python2-fixtures
1905 (package-with-python2 python-fixtures))
1906
b24a0c00
DT
1907(define-public python-testrepository
1908 (package
1909 (name "python-testrepository")
1910 (version "0.0.20")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (string-append
1915 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1916 version ".tar.gz"))
1917 (sha256
1918 (base32
1919 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1920 (build-system python-build-system)
05de40c5 1921 (propagated-inputs
7787ef76 1922 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
05de40c5 1923 ("python-testtools" ,python-testtools)))
b24a0c00
DT
1924 (inputs
1925 `(("python-setuptools" ,python-setuptools)
b24a0c00 1926 ("python-subunit" ,python-subunit)
b24a0c00
DT
1927 ("python-mimeparse" ,python-mimeparse)))
1928 (home-page "https://launchpad.net/testrepository")
1929 (synopsis "Database for Python test results")
1930 (description "Testrepository provides a database of test results which can
1931be used as part of a developer's workflow to check things such as what tests
1932have failed since the last commit or what tests are currently failing.")
1933 (license (list bsd-3 asl2.0)))) ; at user's option
1934
1935(define-public python2-testrepository
1936 (package-with-python2 python-testrepository))
1937
243a009a
DT
1938(define-public python-coverage
1939 (package
1940 (name "python-coverage")
82a3c582 1941 (version "4.0.3")
243a009a
DT
1942 (source
1943 (origin
1944 (method url-fetch)
82a3c582 1945 (uri (pypi-uri "coverage" version))
243a009a
DT
1946 (sha256
1947 (base32
82a3c582 1948 "0qjlja8ny4gcfp8abqfwdrvr8qw9kr69lkja0b4cqqbsdmdjgcc5"))))
243a009a
DT
1949 (build-system python-build-system)
1950 (inputs
1951 `(("python-setuptools" ,python-setuptools)))
1952 (home-page "http://nedbatchelder.com/code/coverage")
1953 (synopsis "Code coverage measurement for Python")
1954 (description
1955 "Coverage measures code coverage, typically during test execution. It
1956uses the code analysis tools and tracing hooks provided in the Python standard
1957library to determine which lines are executable, and which have been
1958executed.")
1959 (license bsd-3)))
1960
1961(define-public python2-coverage
1962 (package-with-python2 python-coverage))
1963
041358fb
DT
1964(define-public python-discover
1965 (package
1966 (name "python-discover")
1967 (version "0.4.0")
1968 (source
1969 (origin
1970 (method url-fetch)
1971 (uri (string-append
1972 "https://pypi.python.org/packages/source/d/discover/discover-"
1973 version ".tar.gz"))
1974 (sha256
1975 (base32
1976 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1977 (build-system python-build-system)
1978 (inputs
1979 `(("python-setuptools" ,python-setuptools)))
1980 (home-page "http://pypi.python.org/pypi/discover/")
1981 (synopsis
1982 "Python test discovery for unittest")
1983 (description
1984 "Discover provides test discovery for unittest, a feature that has been
e881752c 1985backported from Python 2.7 for Python 2.4+.")
041358fb
DT
1986 (license bsd-3)))
1987
1988(define-public python2-discover
1989 (package-with-python2 python-discover))
1990
a480bc41
EB
1991(define-public behave
1992 (package
1993 (name "behave")
1994 (version "1.2.4")
1995 (source (origin
1996 (method url-fetch)
1997 (uri (string-append "https://pypi.python.org/packages/source/b/"
1998 name "/" name "-" version ".tar.gz"))
1999 (sha256
2000 (base32
2001 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
2002 (build-system python-build-system)
2003 (inputs
2004 `(("python-setuptools" ,python-setuptools)
2005 ("python-six" ,python-six)
2006 ("python-enum43" ,python-enum34)
2007 ("python-parse" ,python-parse)
2008 ("python-parse-type" ,python-parse-type)))
2009 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2010 ;PyHamcrest>=1.8
2011 (home-page "http://github.com/behave/behave")
2012 (synopsis "Python behavior-driven development")
2013 (description
2014 "Behave is a tool for behavior-driven development in python.
2015Behavior-driven development (or BDD) is an agile software development
2016technique that encourages collaboration between developers, QA and
2017non-technical or business participants in a software project. Behave uses
2018tests written in a natural language style, backed up by Python code.")
2019 (license x11)))
c7303d3c
DT
2020
2021(define-public python-exif-read
2022 (package
2023 (name "python-exif-read")
2a2d0981 2024 (version "2.1.2")
c7303d3c
DT
2025 (source (origin
2026 (method url-fetch)
2a2d0981 2027 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2028 (sha256
2029 (base32
2a2d0981 2030 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c
DT
2031 (build-system python-build-system)
2032 (inputs
2033 `(("python-setuptools" ,python-setuptools)))
2034 (arguments `(#:tests? #f)) ; no tests
2035 (home-page "https://github.com/ianare/exif-py")
2036 (synopsis "Python library to extract EXIF data from image files")
2037 (description
2038 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2039files.")
2040 (license bsd-3)))
2041
2042(define-public python2-exif-read
2043 (package-with-python2 python-exif-read))
d5f89b22
DT
2044
2045(define-public python-pyld
2046 (package
2047 (name "python-pyld")
af1ab773 2048 (version "0.6.8")
d5f89b22
DT
2049 (source (origin
2050 (method url-fetch)
af1ab773 2051 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2052 (sha256
2053 (base32
af1ab773 2054 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
d5f89b22
DT
2055 (build-system python-build-system)
2056 (inputs
2057 `(("python-setuptools" ,python-setuptools)))
2058 (arguments `(#:tests? #f)) ; no tests
2059 (home-page "http://github.com/digitalbazaar/pyld")
2060 (synopsis "Python implementation of the JSON-LD specification")
2061 (description
2062 "PyLD is an implementation of the JSON-LD specification.")
2063 (license bsd-3)))
2064
2065(define-public python2-pyld
2066 (package-with-python2 python-pyld))
3a1f9a68
DT
2067
2068(define-public python-certifi
2069 (package
2070 (name "python-certifi")
9a41f443 2071 (version "2015.11.20.1")
3a1f9a68
DT
2072 (source (origin
2073 (method url-fetch)
9a41f443 2074 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2075 (sha256
2076 (base32
9a41f443 2077 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
3a1f9a68
DT
2078 (build-system python-build-system)
2079 (inputs
2080 `(("python-setuptools" ,python-setuptools)))
2081 (arguments `(#:tests? #f)) ; no tests
2082 (home-page "http://python-requests.org/")
2083 (synopsis "Python CA certificate bundle")
2084 (description
2085 "Certifi is a Python library that contains a CA certificate bundle, which
2086is used by the Requests library to verify HTTPS requests.")
2087 (license asl2.0)))
2088
2089(define-public python2-certifi
2090 (package-with-python2 python-certifi))
e6cfbd36 2091
12c270dd
RW
2092(define-public python-click
2093 (package
2094 (name "python-click")
5bd88cf1 2095 (version "6.2")
12c270dd
RW
2096 (source
2097 (origin
2098 (method url-fetch)
5bd88cf1 2099 (uri (pypi-uri "click" version))
12c270dd 2100 (sha256
5bd88cf1 2101 (base32 "10kavbisnk9m93jl2wi34pw7ryr2qbxshh2cysxwxd7bymqgz87v"))))
12c270dd
RW
2102 (build-system python-build-system)
2103 (native-inputs
2104 `(("python-setuptools" ,python-setuptools)))
2105 (home-page "http://click.pocoo.org")
2106 (synopsis "Command line library for Python")
2107 (description
2108 "Click is a Python package for creating command line interfaces in a
2109composable way with as little code as necessary. Its name stands for
2110\"Command Line Interface Creation Kit\". It's highly configurable but comes
2111with sensible defaults out of the box.")
2112 (license bsd-3)))
2113
2114(define-public python2-click
2115 (package-with-python2 python-click))
2116
addc808d
EF
2117(define-public python-wheel
2118 (package
2119 (name "python-wheel")
2120 (version "0.26.0")
e1ba0749
EF
2121 (source
2122 (origin
2123 (method url-fetch)
2124 (uri (pypi-uri "wheel" version))
2125 (sha256
2126 (base32
2127 "032k1ajijbqnv0z0k88bhf75mdimi18fcmm28mss90610lw3bbga"))))
2128 (build-system python-build-system)
2129 (native-inputs
2130 `(("python-setuptools" ,python-setuptools)
2131 ("python-jsonschema" ,python-jsonschema)
2132 ("python-pytest-cov" ,python-pytest-cov)))
2133 (home-page "https://bitbucket.org/pypa/wheel/")
2134 (synopsis "Format for built Python packages")
2135 (description
2136 "A wheel is a ZIP-format archive with a specially formatted filename and
2137the @code{.whl} extension. It is designed to contain all the files for a PEP
2138376 compatible install in a way that is very close to the on-disk format. Many
2139packages will be properly installed with only the @code{Unpack} step and the
2140unpacked archive preserves enough information to @code{Spread} (copy data and
2141scripts to their final locations) at any later time. Wheel files can be
2142installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2143 (license license:expat)
2144 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2145
2146(define-public python2-wheel
8ad4ae20
LF
2147 (let ((wheel (package-with-python2
2148 (strip-python2-variant python-wheel))))
264ae686 2149 (package (inherit wheel)
8ad4ae20
LF
2150 (native-inputs `(("python2-functools32" ,python2-functools32)
2151 ,@(package-native-inputs wheel))))))
2152
addc808d 2153
ae641128 2154(define-public python-requests
e6cfbd36 2155 (package
ae641128 2156 (name "python-requests")
5d691657 2157 (version "2.8.1")
e6cfbd36
DT
2158 (source (origin
2159 (method url-fetch)
5d691657 2160 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2161 (sha256
2162 (base32
5d691657 2163 "0ny2nr1sqr4hcn3903ghmh7w2yni8shlfv240a8c9p6wyidqvzl4"))))
e6cfbd36 2164 (build-system python-build-system)
5d691657
EF
2165 (native-inputs
2166 `(("python-setuptools" ,python-setuptools)))
2167 (propagated-inputs
2168 `(("python-py" ,python-py)
2169 ("python-pytest" ,python-pytest)
2170 ("python-pytest-cov" ,python-pytest-cov)
2171 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2172 (home-page "http://python-requests.org/")
2173 (synopsis "Python HTTP library")
2174 (description
2175 "Requests is a Python HTTP client library. It aims to be easier to use
2176than Python’s urllib2 library.")
2177 (license asl2.0)))
864b5211 2178
e9005180
DT
2179;; Some software requires an older version of Requests, notably Docker
2180;; Compose.
2181(define-public python-requests-2.7
2182 (package (inherit python-requests)
2183 (version "2.7.0")
2184 (source (origin
2185 (method url-fetch)
2186 (uri (pypi-uri "requests" version))
2187 (sha256
2188 (base32
2189 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2190
ae641128 2191(define-public python2-requests
8ad4ae20 2192 (package-with-python2 python-requests))
ae641128 2193
ea521b42
DT
2194(define-public python-vcversioner
2195 (package
2196 (name "python-vcversioner")
2197 (version "2.14.0.0")
2198 (source
2199 (origin
2200 (method url-fetch)
2201 (uri (pypi-uri "vcversioner" version))
2202 (sha256
2203 (base32
2204 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2205 (build-system python-build-system)
2206 (inputs
2207 `(("python-setuptools" ,python-setuptools)))
2208 (synopsis "Python library for version number discovery")
2209 (description "Vcversioner is a Python library that inspects tagging
2210information in a variety of version control systems in order to discover
2211version numbers.")
2212 (home-page "https://github.com/habnabit/vcversioner")
2213 (license isc)))
2214
2215(define-public python2-vcversioner
2216 (package-with-python2 python-vcversioner))
ae641128 2217
864b5211
DT
2218(define-public python-jsonschema
2219 (package
2220 (name "python-jsonschema")
b3667afb 2221 (version "2.5.1")
864b5211
DT
2222 (source (origin
2223 (method url-fetch)
2224 (uri
2225 (string-append
2226 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2227 version ".tar.gz"))
2228 (sha256
2229 (base32
b3667afb 2230 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211
DT
2231 (build-system python-build-system)
2232 (inputs
b3667afb
DT
2233 `(("python-setuptools" ,python-setuptools)
2234 ("python-vcversioner" ,python-vcversioner)))
864b5211
DT
2235 (home-page "http://github.com/Julian/jsonschema")
2236 (synopsis "Implementation of JSON Schema for Python")
2237 (description
2238 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2239 (license license:expat)
2240 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2241
2242(define-public python2-jsonschema
a14600ec
LF
2243 (let ((jsonschema (package-with-python2
2244 (strip-python2-variant python-jsonschema))))
264ae686
EF
2245 (package (inherit jsonschema)
2246 (inputs
2247 `(("python2-functools32" ,python2-functools32)
2248 ,@(package-inputs jsonschema))))))
850189b8
DT
2249
2250(define-public python-unidecode
2251 (package
2252 (name "python-unidecode")
8925d4f3 2253 (version "0.04.18")
850189b8
DT
2254 (source (origin
2255 (method url-fetch)
8925d4f3 2256 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2257 (sha256
2258 (base32
8925d4f3 2259 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8
DT
2260 (build-system python-build-system)
2261 (inputs
2262 `(("python-setuptools" ,python-setuptools)))
2263 (home-page "https://pypi.python.org/pypi/Unidecode")
2264 (synopsis "ASCII transliterations of Unicode text")
2265 (description
2266 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2267useful when integrating with legacy code that doesn't support Unicode, or for
2268ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2269machine identifiers from human-readable Unicode strings that should still be
2270somewhat intelligeble.")
2271 (license gpl2+)))
2272
2273(define-public python2-unidecode
2274 (package-with-python2 python-unidecode))
6d45fef4
DT
2275
2276(define-public python-pyjwt
2277 (package
2278 (name "python-pyjwt")
eb31d4b4 2279 (version "1.4.0")
6d45fef4
DT
2280 (source
2281 (origin
2282 (method url-fetch)
eb31d4b4 2283 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2284 (sha256
2285 (base32
eb31d4b4 2286 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2287 (build-system python-build-system)
eb31d4b4
EF
2288 (native-inputs
2289 `(("python-setuptools" ,python-setuptools)
2290 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2291 (arguments
2292 '(#:tests? #f)) ; test suite doesn't work
2293 (home-page "http://github.com/progrium/pyjwt")
2294 (synopsis "JSON Web Token implementation in Python")
2295 (description
2296 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2297 (license license:expat)))
6d45fef4
DT
2298
2299(define-public python2-pyjwt
2300 (package-with-python2 python-pyjwt))
2301
2cec1f6f
DT
2302(define-public python-oauthlib
2303 (package
2304 (name "python-oauthlib")
bde2171d 2305 (version "1.0.3")
2cec1f6f
DT
2306 (source (origin
2307 (method url-fetch)
bde2171d 2308 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2309 (sha256
2310 (base32
bde2171d 2311 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2312 (build-system python-build-system)
bde2171d 2313 (native-inputs
2cec1f6f 2314 `(("python-setuptools" ,python-setuptools)
bde2171d 2315 ("python-coverage", python-coverage)
2cec1f6f
DT
2316 ("python-nose" ,python-nose)
2317 ("python-mock" ,python-mock)))
bde2171d
EF
2318 (inputs
2319 `(("python-blinker" ,python-blinker)
2320 ("python-cryptography" ,python-cryptography)
2321 ("python-pyjwt" ,python-pyjwt)))
2cec1f6f
DT
2322 (home-page "https://github.com/idan/oauthlib")
2323 (synopsis "OAuth implementation for Python")
2324 (description
2325 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2326OAuth request-signing logic.")
2327 (license bsd-3)))
2328
2329(define-public python2-oauthlib
2330 (let ((base (package-with-python2 python-oauthlib)))
2331 (package
2332 (inherit base)
2cec1f6f 2333 (inputs
0066de6f
EF
2334 `(("python2-unittest2" ,python2-unittest2)
2335 ("python2-cryptography" ,python2-cryptography)
2336 ,@(alist-delete "python-cryptography"
2337 (package-inputs base)))))))
ec5dbb5c
DT
2338
2339(define-public python-itsdangerous
2340 (package
2341 (name "python-itsdangerous")
2342 (version "0.24")
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (string-append
2347 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2348 version ".tar.gz"))
2349 (sha256
2350 (base32
2351 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2352 (build-system python-build-system)
2353 (inputs
2354 `(("python-setuptools" ,python-setuptools)))
2355 (home-page "http://github.com/mitsuhiko/itsdangerous")
2356 (synopsis "Python library for passing data to/from untrusted environments")
2357 (description
2358 "Itsdangerous provides various helpers to pass trusted data to untrusted
2359environments and back.")
2360 (license bsd-3)))
2361
2362(define-public python2-itsdangerous
2363 (package-with-python2 python-itsdangerous))
5731cae3 2364
8d12be1e
RW
2365(define-public python-pyyaml
2366 (package
2367 (name "python-pyyaml")
2368 (version "3.11")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (string-append
2373 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2374 version ".tar.gz"))
2375 (sha256
2376 (base32
2377 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2378 (build-system python-build-system)
2379 (inputs
2380 `(("libyaml" ,libyaml)))
2381 (native-inputs
2382 `(("python-setuptools" ,python-setuptools)))
2383 (home-page "http://pyyaml.org/wiki/PyYAML")
2384 (synopsis "YAML parser and emitter for Python")
2385 (description
2386 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2387complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2388API, and sensible error messages. PyYAML supports standard YAML tags and
2389provides Python-specific tags that allow to represent an arbitrary Python
2390object.")
2391 (license license:expat)))
2392
2393(define-public python2-pyyaml
2394 (package-with-python2 python-pyyaml))
2395
5731cae3
DT
2396(define-public python-virtualenv
2397 (package
2398 (name "python-virtualenv")
17804240 2399 (version "13.1.2")
5731cae3
DT
2400 (source
2401 (origin
2402 (method url-fetch)
17804240 2403 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2404 (sha256
2405 (base32
17804240 2406 "1p732accxwqfjbdna39k8w8lp9gyw91vr4kzkhm8mgfxikqqxg5a"))))
5731cae3 2407 (build-system python-build-system)
17804240
EF
2408 (arguments
2409 `(#:phases
2410 (modify-phases %standard-phases
2411 (replace 'check
2412 (lambda _ (zero? (system* "py.test")))))))
5731cae3
DT
2413 (inputs
2414 `(("python-setuptools" ,python-setuptools)
2415 ("python-mock" ,python-mock)
17804240 2416 ("python-pytest" ,python-pytest)))
5731cae3
DT
2417 (home-page "https://virtualenv.pypa.io/")
2418 (synopsis "Virtual Python environment builder")
2419 (description
2420 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2421 (license license:expat)))
5731cae3
DT
2422
2423(define-public python2-virtualenv
2424 (package-with-python2 python-virtualenv))
8176d4d5
DT
2425
2426(define-public python-markupsafe
2427 (package
2428 (name "python-markupsafe")
2429 (version "0.23")
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (string-append
2434 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2435 version ".tar.gz"))
2436 (sha256
2437 (base32
2438 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2439 (build-system python-build-system)
2440 (inputs
2441 `(("python-setuptools" ,python-setuptools)))
2442 (home-page "http://github.com/mitsuhiko/markupsafe")
2443 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2444 (description
2445 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2446for Python.")
2447 (license bsd-3)))
2448
2449(define-public python2-markupsafe
2450 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2451
2452(define-public python-jinja2
2453 (package
2454 (name "python-jinja2")
e98149b3 2455 (version "2.8")
fe34f0d1
DT
2456 (source
2457 (origin
2458 (method url-fetch)
e98149b3 2459 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2460 (sha256
2461 (base32
e98149b3 2462 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1
DT
2463 (build-system python-build-system)
2464 (inputs
2465 `(("python-setuptools" ,python-setuptools)
2466 ("python-markupsafe" ,python-markupsafe)))
2467 (home-page "http://jinja.pocoo.org/")
2468 (synopsis "Python template engine")
2469 (description
2470 "Jinja2 is a small but fast and easy to use stand-alone template engine
2471written in pure Python.")
2472 (license bsd-3)))
2473
2474(define-public python2-jinja2
2475 (package-with-python2 python-jinja2))
3580ab8b 2476
f7d17ac7
EE
2477(define-public python-pystache
2478 (package
2479 (name "python-pystache")
2480 (version "0.5.4")
2481 (source (origin
2482 (method url-fetch)
2483 (uri (pypi-uri "pystache" version))
2484 (sha256
2485 (base32
2486 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2487 (build-system python-build-system)
2488 (native-inputs
2489 `(("python-setuptools" ,python-setuptools)))
2490 (home-page "http://defunkt.io/pystache/")
2491 (synopsis "Python logic-less template engine")
2492 (description
2493 "Pystache is a Python implementation of the framework agnostic,
2494logic-free templating system Mustache.")
2495 (license license:expat)))
2496
2497(define-public python2-pystache
2498 (package-with-python2 python-pystache))
2499
1285119b
RW
2500(define-public python-joblib
2501 (package
2502 (name "python-joblib")
2503 (version "0.9.0b4")
2504 (source (origin
2505 (method url-fetch)
2506 (uri (string-append "https://pypi.python.org/packages/source/"
2507 "j/joblib/joblib-" version ".tar.gz"))
2508 (sha256
2509 (base32
2510 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2511 (build-system python-build-system)
2512 (native-inputs
2513 `(("python-setuptools" ,python-setuptools)
2514 ("python-nose" ,python-nose)))
2515 (home-page "http://pythonhosted.org/joblib/")
2516 (synopsis "Using Python functions as pipeline jobs")
2517 (description
2518 "Joblib is a set of tools to provide lightweight pipelining in Python.
2519In particular, joblib offers: transparent disk-caching of the output values
2520and lazy re-evaluation (memoize pattern), easy simple parallel computing
2521logging and tracing of the execution.")
2522 (license bsd-3)))
2523
2524(define-public python2-joblib
2525 (package-with-python2 python-joblib))
2526
3580ab8b
DT
2527(define-public python-docutils
2528 (package
2529 (name "python-docutils")
2530 (version "0.12")
2531 (source
2532 (origin
2533 (method url-fetch)
2534 (uri (string-append
2535 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2536 version ".tar.gz"))
2537 (sha256
2538 (base32
2539 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2540 (build-system python-build-system)
2541 (inputs
2542 `(("python-setuptools" ,python-setuptools)))
2543 (arguments
2544 '(#:tests? #f)) ; no setup.py test command
2545 (home-page "http://docutils.sourceforge.net/")
2546 (synopsis "Python Documentation Utilities")
2547 (description
2548 "Docutils is a modular system for processing documentation into useful
2549formats, such as HTML, XML, and LaTeX. For input Docutils supports
2550reStructuredText.")
2551 ;; Most of the source code is public domain, but some source files are
2552 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2553 (license (list public-domain psfl bsd-2 gpl3+))))
2554
2555(define-public python2-docutils
2556 (package-with-python2 python-docutils))
fb35b7c0
DT
2557
2558(define-public python-pygments
2559 (package
2560 (name "python-pygments")
9f442285 2561 (version "2.0.2")
fb35b7c0
DT
2562 (source
2563 (origin
2564 (method url-fetch)
9f442285 2565 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2566 (sha256
2567 (base32
9f442285 2568 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0
DT
2569 (build-system python-build-system)
2570 (inputs
2571 `(("python-setuptools" ,python-setuptools)))
2572 (home-page "http://pygments.org/")
2573 (synopsis "Syntax highlighting")
2574 (description
2575 "Pygments is a syntax highlighting package written in Python.")
2576 (license bsd-2)))
2577
2578(define-public python2-pygments
2579 (package-with-python2 python-pygments))
9dd6078d
DT
2580
2581(define-public python-sphinx
2582 (package
2583 (name "python-sphinx")
2584 (version "1.2.3")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (string-append
2589 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2590 version ".tar.gz"))
2591 (sha256
2592 (base32
2593 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2594 (build-system python-build-system)
2595 (inputs
2596 `(("python-setuptools" ,python-setuptools)
2597 ("python-jinja2" ,python-jinja2)
2598 ("python-docutils" ,python-docutils)
2599 ("python-pygments" ,python-pygments)))
2600 (home-page "http://sphinx-doc.org/")
2601 (synopsis "Python documentation generator")
2602 (description "Sphinx is a tool that makes it easy to create documentation
2603for Python projects or other documents consisting of multiple reStructuredText
2604sources.")
2605 (license bsd-3)))
2606
2607(define-public python2-sphinx
2608 (package-with-python2 python-sphinx))
6888830b 2609
ad320b20
RW
2610(define-public python-sphinx-rtd-theme
2611 (package
2612 (name "python-sphinx-rtd-theme")
2613 (version "0.1.6")
2614 (source
2615 (origin
2616 (method url-fetch)
2617 (uri (string-append "https://pypi.python.org/packages/source/s/"
2618 "sphinx_rtd_theme/sphinx_rtd_theme-"
2619 version ".tar.gz"))
2620 (sha256
2621 (base32
2622 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2623 (build-system python-build-system)
2624 (arguments
2625 `(;; With standard flags, the install phase attempts to create a zip'd
2626 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2627 ;; before 1980'
2628 #:configure-flags '("--single-version-externally-managed"
2629 "--record=sphinx-rtd-theme.txt")))
2630 (native-inputs
2631 `(("python-setuptools" ,python-setuptools)))
2632 (inputs
2633 `(("python-docutils" ,python-docutils)
2634 ("python-sphinx" ,python-sphinx)))
2635 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2636 (synopsis "ReadTheDocs.org theme for Sphinx")
2637 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2638 (license license:expat)))
ad320b20
RW
2639
2640(define-public python2-sphinx-rtd-theme
2641 (package-with-python2 python-sphinx-rtd-theme))
2642
f4de5b3b
CAW
2643(define-public python-feedgenerator
2644 (package
2645 (name "python-feedgenerator")
2646 (version "20150710.97185b7")
2647 (source
2648 ;; Using the git checkout for now because license file not added till
2649 ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
2650 (origin
2651 (method git-fetch)
2652 (uri (git-reference
2653 (url "https://github.com/dmdm/feedgenerator-py3k.git")
2654 (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
2655 (sha256
2656 (base32
2657 "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
2658 (arguments
2659 `(;; With standard flags, the install phase attempts to create a zip'd
2660 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2661 ;; before 1980'
2662 #:configure-flags '("--single-version-externally-managed"
2663 "--record=feedgenerator.txt")))
2664 (build-system python-build-system)
2665 (inputs
2666 `(("python-setuptools" ,python-setuptools)
2667 ("python-pytz" ,python-pytz)
2668 ("python-six" ,python-six)))
2669 (home-page
2670 "https://github.com/dmdm/feedgenerator-py3k.git")
2671 (synopsis
2672 "Standalone version of Django's Atom/RSS feed generator")
2673 (description
2674 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2675which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2676 (license bsd-3)))
2677
2678(define-public python2-feedgenerator
2679 (package-with-python2 python-feedgenerator))
2680
59ad30e3
CAW
2681(define-public python-blinker
2682 (package
2683 (name "python-blinker")
7fb9ff4d 2684 (version "1.4")
59ad30e3
CAW
2685 (source
2686 (origin
2687 (method url-fetch)
7fb9ff4d 2688 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2689 (sha256
2690 (base32
7fb9ff4d 2691 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3
CAW
2692 (build-system python-build-system)
2693 (native-inputs
2694 `(("python-setuptools" ,python-setuptools)))
2695 ;; No "test" command supplied to setuptools, so unless there's another way
2696 ;; to run tests, we're skipping them!
2697 (arguments '(#:tests? #f))
2698 (home-page "http://pythonhosted.org/blinker/")
2699 (synopsis "Fast, simple object-to-object and broadcast signaling")
2700 (description
2701 "Blinker provides a fast dispatching system that allows any number of
2702interested parties to subscribe to events, or \"signals\".")
2703 (license license:expat)))
2704
2705(define-public python2-blinker
2706 (package-with-python2 python-blinker))
2707
b8050e71
CAW
2708(define-public pelican
2709 (package
2710 (name "pelican")
11f97c27 2711 (version "3.6.3")
b8050e71
CAW
2712 (source
2713 (origin
2714 (method url-fetch)
11f97c27 2715 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2716 (sha256
2717 (base32
11f97c27 2718 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71
CAW
2719 (build-system python-build-system)
2720 (native-inputs
2721 `(("python-setuptools" ,python-setuptools)))
2722 (propagated-inputs
2723 `(("python-feedgenerator" ,python-feedgenerator)
2724 ("python-jinja2" ,python-jinja2)
2725 ("python-pygments" ,python-pygments)
2726 ("python-docutils" ,python-docutils)
2727 ("python-pytz" ,python-pytz)
2728 ("python-blinker" ,python-blinker)
2729 ("python-unidecode" ,python-unidecode)
2730 ("python-six" ,python-six)
2731 ("python-dateutil-2" ,python-dateutil-2)))
2732 (home-page "http://getpelican.com/")
2733 (arguments
2734 `(;; XXX Requires a lot more packages to do unit tests :P
2735 #:tests? #f
2736 #:phases (modify-phases %standard-phases
2737 (add-before
2738 'install 'adjust-requires
2739 ;; Since feedgenerator is installed from git, it doesn't
2740 ;; conform to the version requirements.
2741 ;;
2742 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2743 ;; version requirement so setuptools doesn't get confused.
2744 (lambda _
2745 (substitute* "setup.py"
2746 (("['\"]feedgenerator.*?['\"]")
2747 "'feedgenerator'")))))))
2748 (synopsis "Python-based static site publishing system")
2749 (description
2750 "Pelican is a tool to generate a static blog from reStructuredText,
2751Markdown input files, and more. Pelican uses Jinja2 for templating
2752and is very extensible.")
2753 (license agpl3+)))
2754
240ca4aa
RW
2755(define-public python-scikit-learn
2756 (package
2757 (name "python-scikit-learn")
be0a4c26 2758 (version "0.16.1")
240ca4aa
RW
2759 (source
2760 (origin
2761 (method url-fetch)
2762 (uri (string-append
2763 "https://github.com/scikit-learn/scikit-learn/archive/"
2764 version ".tar.gz"))
2765 (sha256
2766 (base32
be0a4c26 2767 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2768 (build-system python-build-system)
2769 (arguments
2770 `(#:phases
2771 (alist-cons-before
2f6b3d2e
RW
2772 'check 'set-HOME
2773 ;; some tests require access to "$HOME"
2774 (lambda _ (setenv "HOME" "/tmp"))
2775 ;; Tests can only be run after the library has been installed and not
2776 ;; within the source directory.
2777 (alist-cons-after
2778 'install 'check
2779 (lambda _
2780 (with-directory-excursion "/tmp"
2781 ;; With Python 3 one test of 3334 fails
2782 ;; (sklearn.tests.test_common.test_transformers); see
2783 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2784 (system* "nosetests" "-v" "sklearn")))
2785 (alist-delete 'check %standard-phases)))))
240ca4aa 2786 (inputs
2f6b3d2e 2787 `(("openblas" ,openblas)
240ca4aa
RW
2788 ("python-nose" ,python-nose)))
2789 (propagated-inputs
2790 `(("python-numpy" ,python-numpy)
2791 ("python-scipy" ,python-scipy)))
2792 (home-page "http://scikit-learn.org/")
2793 (synopsis "Machine Learning in Python")
2794 (description
2795 "Scikit-learn provides simple and efficient tools for data
2796mining and data analysis.")
2797 (license bsd-3)))
2798
2799(define-public python2-scikit-learn
2800 (let ((scikit (package-with-python2 python-scikit-learn)))
2801 (package (inherit scikit)
2802 (propagated-inputs
2803 `(("python2-numpy" ,python2-numpy)
2804 ("python2-scipy" ,python2-scipy)
2805 ,@(alist-delete
2806 "python-numpy"
2807 (alist-delete
2808 "python-scipy" (package-propagated-inputs scikit))))))))
2809
12f8f9bb
RW
2810(define-public python-scikit-image
2811 (package
2812 (name "python-scikit-image")
2813 (version "0.11.3")
2814 (source
2815 (origin
2816 (method url-fetch)
2817 (uri (string-append
2818 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2819 version ".tar.gz"))
2820 (sha256
2821 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2822 (build-system python-build-system)
2823 (propagated-inputs
2824 `(("python-matplotlib" ,python-matplotlib)
2825 ("python-networkx" ,python-networkx)
2826 ("python-numpy" ,python-numpy)
2827 ("python-scipy" ,python-scipy)
2828 ("python-six" ,python-six)
2829 ("python-pillow" ,python-pillow)))
2830 (native-inputs
2831 `(("python-cython" ,python-cython)
2832 ("python-setuptools" ,python-setuptools)))
2833 (home-page "http://scikit-image.org/")
2834 (synopsis "Image processing in Python")
2835 (description
e881752c 2836 "Scikit-image is a collection of algorithms for image processing.")
12f8f9bb
RW
2837 (license bsd-3)))
2838
2839(define-public python2-scikit-image
2840 (let ((scikit-image (package-with-python2 python-scikit-image)))
2841 (package (inherit scikit-image)
2842 (native-inputs
2843 `(("python2-mock" ,python2-mock)
2844 ,@(package-native-inputs scikit-image)))
2845 (propagated-inputs
2846 `(("python2-pytz" ,python2-pytz)
d9bc0bf8
FB
2847 ("python2-matplotlib" ,python2-matplotlib)
2848 ("python2-numpy" ,python2-numpy)
2849 ("python2-scipy" ,python2-scipy)
2850 ,@(fold alist-delete (package-propagated-inputs scikit-image)
2851 '("python-matplotlib" "python-numpy" "python-scipy")))))))
12f8f9bb 2852
5394a6a6
RW
2853(define-public python-redis
2854 (package
2855 (name "python-redis")
2856 (version "2.10.3")
2857 (source
2858 (origin
2859 (method url-fetch)
2860 (uri (string-append
2861 "https://pypi.python.org/packages/source/r/redis/redis-"
2862 version ".tar.gz"))
2863 (sha256
2864 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2865 (build-system python-build-system)
2866 ;; Tests require a running Redis server
2867 (arguments '(#:tests? #f))
2868 (native-inputs
2869 `(("python-setuptools" ,python-setuptools)
2870 ("python-pytest" ,python-pytest)))
2871 (home-page "https://github.com/andymccurdy/redis-py")
2872 (synopsis "Redis Python client")
2873 (description
2874 "This package provides a Python interface to the Redis key-value store.")
2875 (license license:expat)))
2876
2877(define-public python2-redis
2878 (package-with-python2 python-redis))
2879
748cef5b
RW
2880(define-public python-rq
2881 (package
2882 (name "python-rq")
2883 (version "0.5.2")
2884 (source
2885 (origin
2886 (method url-fetch)
2887 (uri (string-append
2888 "https://pypi.python.org/packages/source/r/rq/rq-"
2889 version ".tar.gz"))
2890 (sha256
2891 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2892 (build-system python-build-system)
2893 (propagated-inputs
2894 `(("python-click" ,python-click)
2895 ("python-redis" ,python-redis)))
2896 (native-inputs
2897 `(("python-setuptools" ,python-setuptools)))
2898 (home-page "http://python-rq.org/")
2899 (synopsis "Simple job queues for Python")
2900 (description
2901 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2902processing them in the background with workers. It is backed by Redis and it
2903is designed to have a low barrier to entry.")
2904 (license bsd-2)))
2905
2906(define-public python2-rq
2907 (package-with-python2 python-rq))
2908
6888830b
FB
2909(define-public python-cython
2910 (package
2911 (name "python-cython")
56918e26 2912 (version "0.23.4")
6888830b
FB
2913 (source
2914 (origin
2915 (method url-fetch)
56918e26 2916 (uri (pypi-uri "Cython" version))
6888830b
FB
2917 (sha256
2918 (base32
56918e26 2919 "13hdffhd37mx3gjby018xl179jaj957fy7kzi01crmimxvn2zi7y"))))
6888830b
FB
2920 (build-system python-build-system)
2921 ;; we need the full python package and not just the python-wrapper
2922 ;; because we need libpython3.3m.so
2923 (inputs
2924 `(("python" ,python)))
2925 (arguments
2926 `(#:phases
2927 (alist-cons-before
2928 'check 'set-HOME
2929 ;; some tests require access to "$HOME/.cython"
2930 (lambda* _ (setenv "HOME" "/tmp"))
2931 (alist-replace
2932 'check
2933 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2934 %standard-phases))))
2935 (home-page "http://cython.org/")
2936 (synopsis "C extensions for Python")
2937 (description "Cython is an optimising static compiler for both the Python
2938programming language and the extended Cython programming language. It makes
2939writing C extensions for Python as easy as Python itself.")
48b311b1
LC
2940 (license asl2.0)
2941 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
2942
2943(define-public python2-cython
48b311b1
LC
2944 (package (inherit (package-with-python2
2945 (strip-python2-variant python-cython)))
6888830b
FB
2946 (name "python2-cython")
2947 (inputs
2948 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
2949
2950;; This version of numpy is missing the documentation and is only used to
2951;; build matplotlib which is required to build numpy's documentation.
2952(define python-numpy-bootstrap
2953 (package
2954 (name "python-numpy-bootstrap")
ef9b4c04 2955 (version "1.10.4")
0da98533
FB
2956 (source
2957 (origin
2958 (method url-fetch)
2959 (uri (string-append "mirror://sourceforge/numpy"
2960 "/numpy-" version ".tar.gz"))
2961 (sha256
2962 (base32
ef9b4c04 2963 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
2964 (build-system python-build-system)
2965 (inputs
2966 `(("python-nose" ,python-nose)
cba256f8
RW
2967 ("openblas" ,openblas)
2968 ("lapack" ,lapack)))
0da98533 2969 (native-inputs
19afbea1 2970 `(("gfortran" ,gfortran)))
0da98533
FB
2971 (arguments
2972 `(#:phases
2973 (alist-cons-before
2974 'build 'set-environment-variables
2975 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
2976 (call-with-output-file "site.cfg"
2977 (lambda (port)
cba256f8
RW
2978 (format port
2979 "[openblas]
dbdfe515
RW
2980libraries = openblas
2981library_dirs = ~a/lib
2982include_dirs = ~a/include
cba256f8
RW
2983
2984[lapack]
2985lapack_libs = lapack
2986library_dirs = ~a/lib
2987include_dirs = ~a/include
2988"
2989 (assoc-ref inputs "openblas")
2990 (assoc-ref inputs "openblas")
2991 (assoc-ref inputs "lapack")
2992 (assoc-ref inputs "lapack"))))
dbdfe515
RW
2993 ;; Use "gcc" executable, not "cc".
2994 (substitute* "numpy/distutils/system_info.py"
2995 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2996 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2997 #t)
6a843168
FB
2998 ;; Tests can only be run after the library has been installed and not
2999 ;; within the source directory.
3000 (alist-cons-after
3001 'install 'check
89b5c60e 3002 (lambda _
6a843168 3003 (with-directory-excursion "/tmp"
89b5c60e 3004 (zero? (system* "python" "-c"
6a843168 3005 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
3006 (alist-delete
3007 'check
6a843168 3008 %standard-phases)))))
0da98533
FB
3009 (home-page "http://www.numpy.org/")
3010 (synopsis "Fundamental package for scientific computing with Python")
3011 (description "NumPy is the fundamental package for scientific computing
e881752c 3012with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3013object, sophisticated (broadcasting) functions, tools for integrating C/C++
3014and Fortran code, useful linear algebra, Fourier transform, and random number
3015capabilities.")
3016 (license bsd-3)))
3017
3018(define python2-numpy-bootstrap
3019 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3020
3a1bfe18
RW
3021(define-public python2-fastlmm
3022 (package
3023 (name "python2-fastlmm")
b074e7d4 3024 (version "0.2.21")
3a1bfe18
RW
3025 (source
3026 (origin
3027 (method url-fetch)
b074e7d4 3028 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3029 (sha256
3030 (base32
b074e7d4 3031 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3032 (build-system python-build-system)
3033 (arguments
3034 `(#:python ,python-2)) ; only Python 2.7 is supported
3035 (propagated-inputs
3036 `(("python2-numpy" ,python2-numpy)
3037 ("python2-scipy" ,python2-scipy)
3038 ("python2-matplotlib" ,python2-matplotlib)
3039 ("python2-pandas" ,python2-pandas)
3040 ("python2-scikit-learn" ,python2-scikit-learn)
3041 ("python2-cython" ,python2-cython)
3042 ("python2-pysnptools" ,python2-pysnptools)))
3043 (native-inputs
3044 `(("unzip" ,unzip)
3045 ("python2-mock" ,python2-mock)
3046 ("python2-setuptools" ,python2-setuptools)))
3047 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3048 (synopsis "Perform genome-wide association studies on large data sets")
3049 (description
3050 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3051Models, is a program for performing both single-SNP and SNP-set genome-wide
3052association studies (GWAS) on extremely large data sets.")
3053 (license asl2.0)))
3054
2ee8869a
FB
3055(define-public python-numpy
3056 (package (inherit python-numpy-bootstrap)
3057 (name "python-numpy")
3058 (outputs '("out" "doc"))
89b5c60e 3059 (inputs
2ee8869a
FB
3060 `(("which" ,which)
3061 ("python-setuptools" ,python-setuptools)
3062 ("python-matplotlib" ,python-matplotlib)
3063 ("python-sphinx" ,python-sphinx)
3064 ("python-pyparsing" ,python-pyparsing)
3065 ("python-numpydoc" ,python-numpydoc)
3066 ,@(package-inputs python-numpy-bootstrap)))
3067 (native-inputs
3068 `(("pkg-config" ,pkg-config)
3069 ("texlive" ,texlive)
3070 ("texinfo" ,texinfo)
3071 ("perl" ,perl)
3072 ,@(package-native-inputs python-numpy-bootstrap)))
3073 (arguments
89b5c60e 3074 `(,@(substitute-keyword-arguments
2ee8869a
FB
3075 (package-arguments python-numpy-bootstrap)
3076 ((#:phases phases)
3077 `(alist-cons-after
3078 'install 'install-doc
3079 (lambda* (#:key outputs #:allow-other-keys)
3080 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3081 (doc (string-append
3082 data "/doc/" ,name "-"
2ee8869a
FB
3083 ,(package-version python-numpy-bootstrap)))
3084 (info (string-append data "/info"))
3085 (html (string-append doc "/html"))
3086 (pyver ,(string-append "PYVER=")))
3087 (with-directory-excursion "doc"
3088 (mkdir-p html)
3089 (system* "make" "html" pyver)
3090 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3091 (system* "make" "-C" "build/latex"
2ee8869a
FB
3092 "all-pdf" "PAPER=a4" pyver)
3093 ;; FIXME: Generation of the info file fails.
3094 ;; (system* "make" "info" pyver)
3095 ;; (mkdir-p info)
3096 ;; (copy-file "build/texinfo/numpy.info"
3097 ;; (string-append info "/numpy.info"))
3098 (for-each (lambda (file)
3099 (copy-file (string-append "build/latex" file)
3100 (string-append doc file)))
3101 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3102 (with-directory-excursion "build/html"
3103 (for-each (lambda (file)
3104 (let* ((dir (dirname file))
3105 (tgt-dir (string-append html "/" dir)))
3106 (unless (equal? "." dir)
3107 (mkdir-p tgt-dir))
96c46210 3108 (install-file file html)))
2ee8869a
FB
3109 (find-files "." ".*"))))))
3110 ,phases)))))))
3111
764c077b 3112(define-public python2-numpy
57b7b8cd 3113 (package-with-python2 python-numpy))
2ee8869a 3114
15bfe6d6
FB
3115(define-public python-pyparsing
3116 (package
3117 (name "python-pyparsing")
e0669289 3118 (version "2.0.3")
15bfe6d6
FB
3119 (source
3120 (origin
3121 (method url-fetch)
3122 (uri (string-append "mirror://sourceforge/pyparsing"
3123 "/pyparsing-" version ".tar.gz"))
3124 (sha256
3125 (base32
e0669289 3126 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3127 (build-system python-build-system)
3128 (outputs '("out" "doc"))
3129 (arguments
3130 `(#:tests? #f ; no test target
3131 #:modules ((guix build python-build-system)
3132 (guix build utils))
3133 #:phases
3134 (alist-cons-after
3135 'install 'install-doc
3136 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3137 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3138 "/share/doc/" ,name "-" ,version))
3139 (html-doc (string-append doc "/html"))
3140 (examples (string-append doc "/examples")))
3141 (mkdir-p html-doc)
3142 (mkdir-p examples)
89b5c60e 3143 (for-each
15bfe6d6 3144 (lambda (dir tgt)
89b5c60e 3145 (map (lambda (file)
96c46210 3146 (install-file file tgt))
15bfe6d6
FB
3147 (find-files dir ".*")))
3148 (list "docs" "htmldoc" "examples")
3149 (list doc html-doc examples))))
3150 %standard-phases)))
3151 (home-page "http://pyparsing.wikispaces.com")
3152 (synopsis "Python parsing class library")
3153 (description
3154 "The pyparsing module is an alternative approach to creating and
3155executing simple grammars, vs. the traditional lex/yacc approach, or the use
3156of regular expressions. The pyparsing module provides a library of classes
3157that client code uses to construct the grammar directly in Python code.")
bd3fa666 3158 (license license:expat)))
15bfe6d6
FB
3159
3160(define-public python2-pyparsing
3161 (package-with-python2 python-pyparsing))
3162
ec00de35
FB
3163(define-public python-numpydoc
3164 (package
3165 (name "python-numpydoc")
3166 (version "0.5")
3167 (source
3168 (origin
3169 (method url-fetch)
89b5c60e 3170 (uri (string-append
ec00de35
FB
3171 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3172 version ".tar.gz"))
3173 (sha256
3174 (base32
5e4d8f67
AE
3175 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3176 (modules '((guix build utils)))
3177 (snippet
3178 '(begin
3179 ;; Drop a test requiring matplotlib, which we cannot add as an
3180 ;; input since it would create a circular dependency: Extend the
3181 ;; test for Python 3, where it is already dropped, to Python 2.
3182 (substitute* "numpydoc/tests/test_plot_directive.py"
3183 (("3") "2"))))))
ec00de35
FB
3184 (build-system python-build-system)
3185 (inputs
3186 `(("python-setuptools" ,python-setuptools)
3187 ("python-docutils" ,python-docutils)
3188 ("python-sphinx" ,python-sphinx)
3189 ("python-nose" ,python-nose)))
3190 (home-page "https://pypi.python.org/pypi/numpydoc")
3191 (synopsis
3192 "Numpy's Sphinx extensions")
3193 (description
3194 "Sphinx extension to support docstrings in Numpy format.")
3195 (license bsd-2)))
3196
3197(define-public python2-numpydoc
5e4d8f67 3198 (package-with-python2 python-numpydoc))
1c65314c 3199
1e656049
RW
3200(define-public python-numexpr
3201 (package
3202 (name "python-numexpr")
3203 (version "2.4.4")
3204 (source
3205 (origin
3206 (method url-fetch)
3207 (uri (string-append "https://pypi.python.org/packages/source/"
3208 "n/numexpr/numexpr-" version ".tar.gz"))
3209 (sha256
3210 (base32
3211 "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
3212 (build-system python-build-system)
3213 (arguments `(#:tests? #f)) ; no tests included
3214 (propagated-inputs
3215 `(("python-numpy" ,python-numpy)))
3216 (home-page "https://github.com/pydata/numexpr")
3217 (synopsis "Fast numerical expression evaluator for NumPy")
3218 (description
3219 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3220expressions that operate on arrays are accelerated and use less memory than
3221doing the same calculation in Python. In addition, its multi-threaded
3222capabilities can make use of all your cores, which may accelerate
3223computations, most specially if they are not memory-bounded (e.g. those using
3224transcendental functions).")
3225 (license license:expat)))
3226
3227(define-public python2-numexpr
3228 (let ((numexpr (package-with-python2 python-numexpr)))
3229 (package (inherit numexpr)
3230 ;; Make sure to use special packages for Python 2 instead
3231 ;; of those automatically rewritten by package-with-python2.
3232 (propagated-inputs
3233 `(("python2-numpy" ,python2-numpy)
3234 ,@(alist-delete "python-numpy"
3235 (package-propagated-inputs numexpr)))))))
3236
1c65314c
FB
3237(define-public python-matplotlib
3238 (package
3239 (name "python-matplotlib")
1bbc659f 3240 (version "1.4.3")
1c65314c
FB
3241 (source
3242 (origin
3243 (method url-fetch)
3244 (uri (string-append "mirror://sourceforge/matplotlib"
3245 "/matplotlib-" version ".tar.gz"))
3246 (sha256
3247 (base32
1bbc659f
FB
3248 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3249 (patches (list (search-patch "matplotlib-setupext-tk.patch")))))
1c65314c
FB
3250 (build-system python-build-system)
3251 (outputs '("out" "doc"))
25f9a068
FB
3252 (propagated-inputs ; the following packages are all needed at run time
3253 `(("python-pyparsing" ,python-pyparsing)
3254 ("python-pygobject" ,python-pygobject)
3255 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3256 ("python-tkinter" ,python "tk")
25f9a068
FB
3257 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3258 ;; from 'gtk+') provides the required 'typelib' files used by
3259 ;; 'gobject-introspection'. The location of these files is set with the
3260 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3261 ;; is done automatically by a 'native-search-path' procedure. However,
3262 ;; at run-time the user must set this variable as follows:
3263 ;;
3264 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3265 ("gtk+" ,gtk+)
3266 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3267 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3268 ;; object. For this reason we need to import both libraries.
3269 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3270 ("python-pycairo" ,python-pycairo)
3271 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
3272 (inputs
3273 `(("python-setuptools" ,python-setuptools)
3274 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3275 ("python-six" ,python-six)
3276 ("python-pytz" ,python-pytz)
3277 ("python-numpy" ,python-numpy-bootstrap)
3278 ("python-sphinx" ,python-sphinx)
3279 ("python-numpydoc" ,python-numpydoc)
3280 ("python-nose" ,python-nose)
3281 ("python-mock" ,python-mock)
3282 ("libpng" ,libpng)
3283 ("imagemagick" ,imagemagick)
3284 ("freetype" ,freetype)
25f9a068
FB
3285 ("cairo" ,cairo)
3286 ("glib" ,glib)
4e7a137a 3287 ("python-pillow" ,python-pillow)
1c65314c 3288 ;; FIXME: Add backends when available.
1c65314c
FB
3289 ;("python-wxpython" ,python-wxpython)
3290 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3291 ("tcl" ,tcl)
3292 ("tk" ,tk)))
1c65314c
FB
3293 (native-inputs
3294 `(("pkg-config" ,pkg-config)
3295 ("texlive" ,texlive)
3296 ("texinfo" ,texinfo)))
3297 (arguments
3298 `(#:phases
25f9a068
FB
3299 (alist-cons-before
3300 'build 'configure-environment
3301 (lambda* (#:key outputs inputs #:allow-other-keys)
3302 (let ((cairo (assoc-ref inputs "cairo"))
3303 (gtk+ (assoc-ref inputs "gtk+")))
3304 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3305 ;; has not effect.
25f9a068
FB
3306 (setenv "LD_LIBRARY_PATH"
3307 (string-append cairo "/lib:" gtk+ "/lib"))
3308 (setenv "HOME" (getcwd))
3309 (call-with-output-file "setup.cfg"
3310 (lambda (port)
1bbc659f
FB
3311 (format port "[directories]~%
3312basedirlist = ~a,~a~%
57b7b8cd 3313 [rc_options]~%
1bbc659f
FB
3314backend = TkAgg~%"
3315 (assoc-ref inputs "tcl")
3316 (assoc-ref inputs "tk"))))))
25f9a068
FB
3317 (alist-cons-after
3318 'install 'install-doc
3319 (lambda* (#:key outputs #:allow-other-keys)
3320 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3321 (doc (string-append data "/doc/" ,name "-" ,version))
3322 (info (string-append data "/info"))
3323 (html (string-append doc "/html")))
3324 (with-directory-excursion "doc"
25f9a068
FB
3325 ;; Produce pdf in 'A4' format.
3326 (substitute* (find-files "." "conf\\.py")
3327 (("latex_paper_size = 'letter'")
3328 "latex_paper_size = 'a4'"))
3329 (mkdir-p html)
3330 (mkdir-p info)
3331 ;; The doc recommends to run the 'html' target twice.
3332 (system* "python" "make.py" "html")
3333 (system* "python" "make.py" "html")
18b31516 3334 (copy-recursively "build/html" html)
25f9a068
FB
3335 (system* "python" "make.py" "latex")
3336 (system* "python" "make.py" "texinfo")
18b31516
FB
3337 (symlink (string-append html "/_images")
3338 (string-append info "/matplotlib-figures"))
3339 (with-directory-excursion "build/texinfo"
3340 (substitute* "matplotlib.texi"
3341 (("@image\\{([^,]*)" all file)
3342 (string-append "@image{matplotlib-figures/" file)))
3343 (symlink (string-append html "/_images")
3344 "./matplotlib-figures")
3345 (system* "makeinfo" "--no-split"
3346 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3347 (copy-file "build/texinfo/matplotlib.info"
3348 (string-append info "/matplotlib.info"))
3349 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3350 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3351 %standard-phases))))
1c65314c
FB
3352 (home-page "http://matplotlib.org")
3353 (synopsis "2D plotting library for Python")
3354 (description
3355 "Matplotlib is a Python 2D plotting library which produces publication
3356quality figures in a variety of hardcopy formats and interactive environments
3357across platforms. Matplotlib can be used in Python scripts, the python and
3358ipython shell, web application servers, and six graphical user interface
3359toolkits.")
57b7b8cd
LC
3360 (license psfl)
3361 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3362
764c077b 3363(define-public python2-matplotlib
57b7b8cd
LC
3364 (let ((matplotlib (package-with-python2
3365 (strip-python2-variant python-matplotlib))))
764c077b 3366 (package (inherit matplotlib)
88c26834
AE
3367 ;; Make sure to use special packages for Python 2 instead
3368 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3369 (propagated-inputs
7ca0dbc3 3370 `(("python2-pycairo" ,python2-pycairo)
764c077b 3371 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3372 ("python2-tkinter" ,python-2 "tk")
3373 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3374 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3375
0dde6232
RW
3376(define-public python2-pysnptools
3377 (package
3378 (name "python2-pysnptools")
3f2e9675 3379 (version "0.3.5")
0dde6232
RW
3380 (source
3381 (origin
3382 (method url-fetch)
3f2e9675 3383 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3384 (sha256
3385 (base32
3f2e9675 3386 "15f4j4w5q603i7mlphb5r6mb1mn33pqg81595fpjp158140yqx7b"))))
0dde6232
RW
3387 (build-system python-build-system)
3388 (arguments
3389 `(#:python ,python-2)) ; only Python 2.7 is supported
3390 (propagated-inputs
3391 `(("python2-numpy" ,python2-numpy)
3392 ("python2-scipy" ,python2-scipy)
3393 ("python2-pandas" ,python2-pandas)
3394 ("python2-cython" ,python2-cython)))
3395 (native-inputs
3396 `(("unzip" ,unzip)
3397 ("python2-setuptools" ,python2-setuptools)))
3398 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3399 (synopsis "Library for reading and manipulating genetic data")
3400 (description
3401 "PySnpTools is a library for reading and manipulating genetic data. It
3402can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3403those files. It can also efficiently manipulate ranges of integers using set
3404operators such as union, intersection, and difference.")
3405 (license asl2.0)))
3406
c9b1b4f9
RW
3407(define-public python-rpy2
3408 (package
3409 (name "python-rpy2")
ec3bcbc7 3410 (version "2.7.6")
c9b1b4f9
RW
3411 (source
3412 (origin
3413 (method url-fetch)
ec3bcbc7 3414 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3415 (sha256
3416 (base32
ec3bcbc7 3417 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9
RW
3418 (build-system python-build-system)
3419 (inputs
3420 `(("python-six" ,python-six)
3421 ("readline" ,readline)
3422 ("icu4c" ,icu4c)
3423 ("pcre" ,pcre)
3424 ("r" ,r)))
3425 (native-inputs
5ff6575b
RW
3426 `(("python-setuptools" ,python-setuptools)
3427 ("zlib" ,zlib)))
c9b1b4f9
RW
3428 (home-page "http://rpy.sourceforge.net/")
3429 (synopsis "Python interface to the R language")
3430 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3431low-level interface to R from Python, a proposed high-level interface,
3432including wrappers to graphical libraries, as well as R-like structures and
3433functions.")
3434 (license gpl3+)))
3435
3436(define-public python2-rpy2
3437 (let ((rpy2 (package-with-python2 python-rpy2)))
3438 (package (inherit rpy2)
3439 (native-inputs
3440 `(("python2-singledispatch" ,python2-singledispatch)
3441 ,@(package-native-inputs rpy2))))))
3442
bb986599
FB
3443(define-public python-scipy
3444 (package
3445 (name "python-scipy")
ba8a0824 3446 (version "0.16.0")
bb986599
FB
3447 (source
3448 (origin
3449 (method url-fetch)
3450 (uri (string-append "mirror://sourceforge/scipy"
da6ce3f1 3451 "/scipy-" version ".tar.xz"))
bb986599
FB
3452 (sha256
3453 (base32
ba8a0824 3454 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3455 (build-system python-build-system)
dd86c0d1 3456 (propagated-inputs
bb986599
FB
3457 `(("python-numpy" ,python-numpy)
3458 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3459 ("python-pyparsing" ,python-pyparsing)))
3460 (inputs
3461 `(("lapack" ,lapack)
719b01c1 3462 ("openblas" ,openblas)))
bb986599 3463 (native-inputs
dd86c0d1
RW
3464 `(("python-nose" ,python-nose)
3465 ("python-sphinx" ,python-sphinx)
5248d49e 3466 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3467 ("gfortran" ,gfortran)
bb986599
FB
3468 ("texlive" ,texlive)
3469 ("perl" ,perl)))
3470 (outputs '("out" "doc"))
3471 (arguments
3472 `(#:phases
3473 (alist-cons-before
719b01c1 3474 'build 'configure-openblas
bb986599 3475 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3476 (call-with-output-file "site.cfg"
3477 (lambda (port)
3478 (format port
3479 "[blas]
3480libraries = openblas
3481library_dirs = ~a/lib
3482include_dirs = ~a/include
3483[atlas]
3484library_dirs = ~a/lib
3485atlas_libs = openblas
3486"
3487 (assoc-ref inputs "openblas")
3488 (assoc-ref inputs "openblas")
3489 (assoc-ref inputs "openblas"))))
3490 #t)
bb986599
FB
3491 (alist-cons-after
3492 'install 'install-doc
3493 (lambda* (#:key outputs #:allow-other-keys)
3494 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3495 (doc (string-append data "/doc/" ,name "-" ,version))
3496 (html (string-append doc "/html"))
3497 (pyver ,(string-append "PYVER=")))
3498 (with-directory-excursion "doc"
bb986599
FB
3499 ;; Fix generation of images for mathematical expressions.
3500 (substitute* (find-files "source" "conf\\.py")
3501 (("pngmath_use_preview = True")
3502 "pngmath_use_preview = False"))
3503 (mkdir-p html)
3504 (system* "make" "html" pyver)
3505 (system* "make" "latex" "PAPER=a4" pyver)
3506 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3507 (copy-file "build/latex/scipy-ref.pdf"
3508 (string-append doc "/scipy-ref.pdf"))
3509 (with-directory-excursion "build/html"
3510 (for-each (lambda (file)
3511 (let* ((dir (dirname file))
3512 (tgt-dir (string-append html "/" dir)))
96c46210 3513 (install-file file html)))
bb986599
FB
3514 (find-files "." ".*"))))))
3515 ;; Tests can only be run after the library has been installed and not
3516 ;; within the source directory.
3517 (alist-cons-after
3518 'install 'check
89b5c60e 3519 (lambda _
bb986599
FB
3520 (with-directory-excursion "/tmp"
3521 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3522 (alist-delete
3523 'check
4f9ff21e
RW
3524 (alist-cons-after
3525 'unpack 'fix-tests
3526 (lambda _
3527 (substitute* "scipy/integrate/tests/test_quadpack.py"
3528 (("libm.so") "libm.so.6"))
3529 #t)
3530 %standard-phases)))))))
bb986599
FB
3531 (home-page "http://www.scipy.org/")
3532 (synopsis "The Scipy library provides efficient numerical routines")
3533 (description "The SciPy library is one of the core packages that make up
3534the SciPy stack. It provides many user-friendly and efficient numerical
3535routines such as routines for numerical integration and optimization.")
3536 (license bsd-3)))
3537
764c077b 3538(define-public python2-scipy
57b7b8cd 3539 (package-with-python2 python-scipy))
bb986599 3540
94914805
EB
3541(define-public python-sqlalchemy
3542 (package
3543 (name "python-sqlalchemy")
3544 (version "0.9.7")
3545 (source
3546 (origin
3547 (method url-fetch)
3548 (uri (string-append "https://pypi.python.org/packages/source/S/"
3549 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3550 (sha256
3551 (base32
3552 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
3553 (build-system python-build-system)
3554 (native-inputs
3555 `(("python-cython" ,python-cython) ;for c extensions
3556 ("python-pytest" ,python-pytest)
3557 ("python-mock" ,python-mock))) ;for tests
3558 (arguments
3559 `(#:phases (alist-replace
3560 'check
3561 (lambda _ (zero? (system* "py.test")))
3562 %standard-phases)))
3563 (home-page "http://www.sqlalchemy.org")
3564 (synopsis "Database abstraction library")
3565 (description
3566 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3567gives application developers the full power and flexibility of SQL. It
3568provides a full suite of well known enterprise-level persistence patterns,
3569designed for efficient and high-performing database access, adapted into a
3570simple and Pythonic domain language.")
3571 (license x11)))
3572
3573(define-public python2-sqlalchemy
3574 (package-with-python2 python-sqlalchemy))
c937562e 3575
1671c07c
EB
3576(define-public python-distutils-extra
3577 (package
3578 (name "python-distutils-extra")
3579 (version "2.38")
3580 (source
3581 (origin
3582 (method url-fetch)
3583 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3584 version "/+download/python-distutils-extra-"
3585 version ".tar.gz"))
3586 (sha256
3587 (base32
3588 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3589 (build-system python-build-system)
3590 (native-inputs
3591 `(("python-setuptools" ,python-setuptools)))
3592 (home-page "https://launchpad.net/python-distutils-extra/")
3593 (synopsis "Enhancements to Python's distutils")
3594 (description
3595 "The python-distutils-extra module enables you to easily integrate
3596gettext support, themed icons, and scrollkeeper-based documentation into
3597Python's distutils.")
3598 (license gpl2)))
3599
3600(define-public python2-distutils-extra
3601 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3602
3603(define-public python2-elib.intl
3604 (package
3605 (name "python2-elib.intl")
3606 (version "0.0.3")
3607 (source
3608 (origin
3609 ;; This project doesn't tag releases or publish tarballs, so we take
3610 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3611 (method git-fetch)
3612 (uri (git-reference
3613 (url "https://github.com/dieterv/elib.intl.git")
3614 (commit "d09997cfef")))
3615 (sha256
3616 (base32
3617 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3618 (build-system python-build-system)
3619 (native-inputs
3620 `(("python2-setuptools" ,python2-setuptools)))
3621 (arguments
3622 ;; incompatible with Python 3 (exception syntax)
3623 `(#:python ,python-2
3624 #:tests? #f
3625 ;; With standard flags, the install phase attempts to create a zip'd
3626 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3627 ;; before 1980'
3628 #:configure-flags '("--single-version-externally-managed"
3629 "--record=elib.txt")))
3630 (home-page "https://github.com/dieterv/elib.intl")
3631 (synopsis "Enhanced internationalization for Python")
3632 (description
3633 "The elib.intl module provides enhanced internationalization (I18N)
3634services for your Python modules and applications.")
3635 (license lgpl3+)))
3636
c937562e
EB
3637(define-public python-pillow
3638 (package
3639 (name "python-pillow")
16095d27 3640 (version "3.1.1")
c937562e
EB
3641 (source
3642 (origin
3643 (method url-fetch)
f1d9231d 3644 (uri (pypi-uri "Pillow" version))
c937562e
EB
3645 (sha256
3646 (base32
16095d27 3647 "1zwzakr5v0skdh0azp5cd6fwzbll5305dsk33k5jk570vv6lqvs8"))))
c937562e
EB
3648 (build-system python-build-system)
3649 (native-inputs
3650 `(("python-setuptools" ,python-setuptools)
3651 ("python-nose" ,python-nose)))
3652 (inputs
5ff408d9
SB
3653 `(("freetype" ,freetype)
3654 ("lcms" ,lcms)
c937562e
EB
3655 ("zlib" ,zlib)
3656 ("libjpeg" ,libjpeg)
3657 ("openjpeg" ,openjpeg)
5ff408d9
SB
3658 ("libtiff" ,libtiff)
3659 ("libwebp" ,libwebp)))
c937562e
EB
3660 (propagated-inputs
3661 `(;; Used at runtime for pkg_resources
3662 ("python-setuptools" ,python-setuptools)))
3663 (arguments
e5358a6b
LC
3664 `(#:phases (modify-phases %standard-phases
3665 (add-before
3666 'install 'disable-egg-compression
3667 (lambda _
3668 ;; Leave the .egg uncompressed since compressing it would
3669 ;; prevent the GC from identifying run-time dependencies.
3670 ;; See <http://bugs.gnu.org/20765>.
3671 (let ((port (open-file "setup.cfg" "a")))
3672 (display "\n[easy_install]\nzip_ok = 0\n"
3673 port)
3674 (close-port port)
3675 #t)))
3676 (add-after
3677 'install 'check-installed
3678 (lambda _
3679 (begin
3680 (setenv "HOME" (getcwd))
3681 (and (zero? (system* "python" "selftest.py"
3682 "--installed"))
3683 (zero? (system* "python" "test-installed.py"))))))
3684 (delete 'check))))
c937562e
EB
3685 (home-page "https://pypi.python.org/pypi/Pillow")
3686 (synopsis "Fork of the Python Imaging Library")
3687 (description
3688 "The Python Imaging Library adds image processing capabilities to your
3689Python interpreter. This library provides extensive file format support, an
3690efficient internal representation, and fairly powerful image processing
3691capabilities. The core image library is designed for fast access to data
3692stored in a few basic pixel formats. It should provide a solid foundation for
3693a general image processing tool.")
3694 (license (x11-style
3695 "http://www.pythonware.com/products/pil/license.htm"
3696 "The PIL Software License"))))
3697
3698(define-public python2-pillow
3699 (package-with-python2 python-pillow))
bb986599 3700
a415f036
FB
3701(define-public python-pycparser
3702 (package
3703 (name "python-pycparser")
38eb6919 3704 (version "2.14")
a415f036
FB
3705 (source
3706 (origin
3707 (method url-fetch)
38eb6919 3708 (uri (pypi-uri "pycparser" version))
a415f036
FB
3709 (sha256
3710 (base32
38eb6919 3711 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
3712 (outputs '("out" "doc"))
3713 (build-system python-build-system)
3714 (native-inputs
3715 `(("pkg-config" ,pkg-config)
3716 ("python-setuptools" ,python-setuptools)))
3717 (arguments
89b5c60e 3718 `(#:phases
a415f036
FB
3719 (alist-replace
3720 'check
3721 (lambda _
3722 (with-directory-excursion "tests"
3723 (zero? (system* "python" "all_tests.py"))))
3724 (alist-cons-after
3725 'install 'install-doc
3726 (lambda* (#:key outputs #:allow-other-keys)
3727 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3728 (doc (string-append data "/doc/" ,name "-" ,version))
3729 (examples (string-append doc "/examples")))
3730 (mkdir-p examples)
3731 (for-each (lambda (file)
3732 (copy-file (string-append "." file)
3733 (string-append doc file)))
3734 '("/README.rst" "/CHANGES" "/LICENSE"))
3735 (copy-recursively "examples" examples)))
3736 %standard-phases))))
3737 (home-page "https://github.com/eliben/pycparser")
3738 (synopsis "C parser in Python")
3739 (description
3740 "Pycparser is a complete parser of the C language, written in pure Python
3741using the PLY parsing library. It parses C code into an AST and can serve as
3742a front-end for C compilers or analysis tools.")
3743 (license bsd-3)))
3744
3745(define-public python2-pycparser
3746 (package-with-python2 python-pycparser))
57c3f716
FB
3747
3748(define-public python-cffi
3749 (package
3750 (name "python-cffi")
2d3a437c 3751 (version "1.4.2")
57c3f716
FB
3752 (source
3753 (origin
3754 (method url-fetch)
2d3a437c 3755 (uri (pypi-uri "cffi" version))
89b5c60e 3756 (sha256
2d3a437c 3757 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
3758 (build-system python-build-system)
3759 (outputs '("out" "doc"))
3760 (inputs
3761 `(("libffi" ,libffi)))
3762 (propagated-inputs ; required at run-time
3763 `(("python-pycparser" ,python-pycparser)))
3764 (native-inputs
3765 `(("pkg-config" ,pkg-config)
3766 ("python-sphinx" ,python-sphinx)
4179f952 3767 ("python-pytest" ,python-pytest)
57c3f716
FB
3768 ("python-setuptools" ,python-setuptools)))
3769 (arguments
4179f952 3770 `(#:phases
57c3f716
FB
3771 (alist-cons-after
3772 'install 'install-doc
3773 (lambda* (#:key outputs #:allow-other-keys)
3774 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3775 (doc (string-append data "/doc/" ,name "-" ,version))
3776 (html (string-append doc "/html")))
3777 (with-directory-excursion "doc"
3778 (system* "make" "html")
3779 (mkdir-p html)
3780 (copy-recursively "build/html" html))
3781 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3782 %standard-phases)))
3783 (home-page "http://cffi.readthedocs.org")
3784 (synopsis "Foreign function interface for Python")
3785 (description
3786 "Foreign Function Interface for Python calling C code.")
bd3fa666 3787 (license license:expat)))
57c3f716
FB
3788
3789(define-public python2-cffi
3790 (package-with-python2 python-cffi))
6fa14469
FB
3791
3792(define-public python-xcffib
3793 (package
3794 (name "python-xcffib")
3795 (version "0.1.9")
3796 (source
3797 (origin
3798 (method url-fetch)
3799 (uri (string-append "https://pypi.python.org/packages/source/x/"
3800 "xcffib/xcffib-" version ".tar.gz"))
3801 (sha256
3802 (base32
3803 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3804 (build-system python-build-system)
3805 (inputs
3806 `(("libxcb" ,libxcb)
3807 ("python-six" ,python-six)))
3808 (native-inputs
3809 `(("python-setuptools" ,python-setuptools)))
3810 (propagated-inputs
3811 `(("python-cffi" ,python-cffi))) ; used at run time
3812 (arguments
89b5c60e 3813 `(#:phases
6fa14469
FB
3814 (alist-cons-after
3815 'install 'install-doc
3816 (lambda* (#:key outputs #:allow-other-keys)
3817 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3818 "/doc/" ,name "-" ,version)))
3819 (mkdir-p doc)
3820 (copy-file "README.md"
3821 (string-append doc "/README.md"))))
3822 %standard-phases)))
3823 (home-page "https://github.com/tych0/xcffib")
3824 (synopsis "XCB Python bindings")
3825 (description
3826 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3827support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3828 (license license:expat)))
6fa14469
FB
3829
3830(define-public python2-xcffib
3831 (package-with-python2 python-xcffib))
3832
9e099723
FB
3833(define-public python-cairocffi
3834 (package
3835 (name "python-cairocffi")
3836 (version "0.6")
3837 (source
3838 (origin
3839 (method url-fetch)
3840 ;; The archive on pypi is missing the 'utils' directory!
3841 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3842 version ".tar.gz"))
f586c877 3843 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3844 (sha256
3845 (base32
3846 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3847 (build-system python-build-system)
3848 (outputs '("out" "doc"))
3849 (inputs
3850 `(("gdk-pixbuf" ,gdk-pixbuf)
3851 ("cairo" ,cairo)))
3852 (native-inputs
3853 `(("pkg-config" ,pkg-config)
3854 ("python-sphinx" ,python-sphinx)
3855 ("python-docutils" ,python-docutils)
3856 ("python-setuptools" ,python-setuptools)))
3857 (propagated-inputs
3858 `(("python-xcffib" ,python-xcffib))) ; used at run time
3859 (arguments
89b5c60e 3860 `(#:phases
9e099723
FB
3861 (alist-cons-after
3862 'install 'install-doc
3863 (lambda* (#:key inputs outputs #:allow-other-keys)
3864 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3865 (doc (string-append data "/doc/" ,name "-" ,version))
3866 (html (string-append doc "/html")))
89b5c60e 3867 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3868 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3869 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3870 (setenv "LANG" "en_US.UTF-8")
3871 (mkdir-p html)
3872 (for-each (lambda (file)
3873 (copy-file (string-append "." file)
3874 (string-append doc file)))
3875 '("/README.rst" "/CHANGES" "/LICENSE"))
3876 (system* "python" "setup.py" "build_sphinx")
3877 (copy-recursively "docs/_build/html" html)))
3878 %standard-phases)))
3879 (home-page "https://github.com/SimonSapin/cairocffi")
3880 (synopsis "Python bindings and object-oriented API for Cairo")
3881 (description
3882 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3883Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3884graphics library with support for multiple backends including image buffers,
3885PNG, PostScript, PDF, and SVG file output.")
3886 (license bsd-3)))
3887
3888(define-public python2-cairocffi
3889 (package-with-python2 python-cairocffi))
3890
3cff95cb
RW
3891(define-public python-decorator
3892 (package
3893 (name "python-decorator")
e21338be 3894 (version "4.0.6")
3cff95cb
RW
3895 (source
3896 (origin
3897 (method url-fetch)
e21338be 3898 (uri (pypi-uri "decorator" version))
3cff95cb 3899 (sha256
e21338be 3900 (base32 "1710cwsbwr8fkiq59w2min7rwgdz7ly51yz8l8yh1zbpfxcm8qhw"))))
3cff95cb
RW
3901 (build-system python-build-system)
3902 (arguments '(#:tests? #f)) ; no test target
3903 (native-inputs
3904 `(("python-setuptools" ,python-setuptools)))
3905 (home-page "http://pypi.python.org/pypi/decorator/")
3906 (synopsis "Python module to simplify usage of decorators")
3907 (description
3908 "The aim of the decorator module is to simplify the usage of decorators
3909for the average programmer, and to popularize decorators usage giving examples
3910of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3911etc. The core of this module is a decorator factory.")
3912 (license license:expat)))
3913
3914(define-public python2-decorator
3915 (package-with-python2 python-decorator))
3916
2c0499ad
RW
3917(define-public python-drmaa
3918 (package
3919 (name "python-drmaa")
3920 (version "0.7.6")
3921 (source
3922 (origin
3923 (method url-fetch)
3924 (uri (string-append
3925 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3926 version ".tar.gz"))
3927 (sha256
3928 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3929 (build-system python-build-system)
3930 ;; The test suite requires libdrmaa which is provided by the cluster
3931 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3932 ;; should be set to the path of the libdrmaa library.
3933 (arguments '(#:tests? #f))
3934 (native-inputs
3935 `(("python-nose" ,python-nose)
3936 ("python-setuptools" ,python-setuptools)))
3937 (home-page "https://pypi.python.org/pypi/drmaa")
3938 (synopsis "Python bindings for the DRMAA library")
3939 (description
3940 "A Python package for Distributed Resource Management (DRM) job
3941submission and control. This package is an implementation of the DRMAA 1.0
3942Python language binding specification.")
3943 (license bsd-3)))
3944
3945(define-public python2-drmaa
3946 (package-with-python2 python-drmaa))
3947
d05c6da0
RW
3948(define-public python-gridmap
3949 (package
3950 (name "python-gridmap")
3951 (version "0.13.0")
3952 (source
3953 (origin
3954 (method url-fetch)
3955 (uri (string-append
3956 "https://github.com/pygridtools/gridmap/archive/v"
3957 version ".tar.gz"))
3958 (file-name (string-append name "-" version ".tar.gz"))
3959 (sha256
3960 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3961 (build-system python-build-system)
3962 (inputs
3963 `(("python-psutil" ,python-psutil)
3964 ("python-drmaa" ,python-drmaa)
3965 ("python-pyzmq" ,python-pyzmq)))
3966 (native-inputs
3967 `(("python-setuptools" ,python-setuptools)))
3968 (home-page "https://github.com/pygridtools/gridmap")
3969 (synopsis "Create jobs on a cluster directly from Python")
3970 (description
3971 "Gridmap is a Python package to allow you to easily create jobs on the
3972cluster directly from Python. You can directly map Python functions onto the
3973cluster without needing to write any wrapper code yourself.")
3974 (license gpl3+)))
3975
3976(define-public python2-gridmap
3977 (package-with-python2 python-gridmap))
3978
cb6d5c54
RW
3979(define-public python-pexpect
3980 (package
3981 (name "python-pexpect")
3982 (version "3.3")
3983 (source
3984 (origin
3985 (method url-fetch)
3986 (uri (string-append "https://pypi.python.org/packages/source/p/"
3987 "pexpect/pexpect-" version ".tar.gz"))
3988 (sha256
3989 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
3990 (build-system python-build-system)
3991 (arguments
3992 `(#:phases
3993 (modify-phases %standard-phases
3994 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
3995 (native-inputs
3996 `(("python-nose" ,python-nose)))
3997 (home-page "http://pexpect.readthedocs.org/")
3998 (synopsis "Controlling interactive console applications")
3999 (description
4000 "Pexpect is a pure Python module for spawning child applications;
4001controlling them; and responding to expected patterns in their output.
4002Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4003child application and control it as if a human were typing commands.")
4004 (license isc)))
4005
4006(define-public python2-pexpect
4007 (package-with-python2 python-pexpect))
4008
229ad120
RW
4009(define-public python-setuptools-scm
4010 (package
4011 (name "python-setuptools-scm")
383af6b0 4012 (version "1.9.0")
229ad120
RW
4013 (source (origin
4014 (method url-fetch)
383af6b0 4015 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4016 (sha256
4017 (base32
383af6b0 4018 "0y24bl893zk6nrklbvdrlmpkalf214zjn6k1xrglljd29rrn4wxi"))))
229ad120 4019 (build-system python-build-system)
383af6b0 4020 (native-inputs `(("python-setuptools" ,python-setuptools)))
229ad120
RW
4021 (home-page "https://github.com/pypa/setuptools_scm/")
4022 (synopsis "Manage Python package versions in SCM metadata")
4023 (description
383af6b0 4024 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4025@dfn{software configuration management} (SCM) metadata instead of declaring
4026them as the version argument or in a SCM managed file.")
4027 (license license:expat)))
4028
4029(define-public python2-setuptools-scm
4030 (package-with-python2 python-setuptools-scm))
4031
b74270ee
RW
4032(define-public python-pathpy
4033 (package
4034 (name "python-pathpy")
4035 (version "8.1.1")
4036 (source
4037 (origin
4038 (method url-fetch)
4039 (uri (string-append "https://pypi.python.org/packages/source/p/"
4040 "path.py/path.py-" version ".tar.gz"))
4041 (sha256
4042 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4043 (build-system python-build-system)
4044 (propagated-inputs
4045 `(("python-appdirs" ,python-appdirs)))
4046 (native-inputs
553b709b
EF
4047 `(("python-setuptools" ,python-setuptools)
4048 ("python-setuptools-scm" ,python-setuptools-scm)
b74270ee
RW
4049 ("python-pytest" ,python-pytest)
4050 ("python-pytest-runner" ,python-pytest-runner)))
4051 (home-page "http://github.com/jaraco/path.py")
4052 (synopsis "Python module wrapper for built-in os.path")
4053 (description
4054 "@code{path.py} implements path objects as first-class entities, allowing
4055common operations on files to be invoked on those path objects directly.")
4056 (license license:expat)))
4057
4058(define-public python2-pathpy
4059 (package-with-python2 python-pathpy))
4060
0d34e01b
RW
4061(define-public python-pickleshare
4062 (package
4063 (name "python-pickleshare")
4064 (version "0.5")
4065 (source
4066 (origin
4067 (method url-fetch)
4068 (uri (string-append "https://pypi.python.org/packages/source/p/"
4069 "pickleshare/pickleshare-" version ".tar.gz"))
4070 (sha256
4071 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4072 (build-system python-build-system)
4073 (propagated-inputs
4074 `(("python-pathpy" ,python-pathpy)))
b72a4410
EF
4075 (native-inputs
4076 `(("python-setuptools" ,python-setuptools)))
0d34e01b
RW
4077 (home-page "https://github.com/vivainio/pickleshare")
4078 (synopsis "Tiny key value database with concurrency support")
4079 (description
4080 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4081Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4082shelve, many processes can access the database simultaneously. Changing a
4083value in database is immediately visible to other processes accessing the same
4084database. Concurrency is possible because the values are stored in separate
4085files. Hence the “database” is a directory where all files are governed by
4086PickleShare.")
4087 (license license:expat)))
4088
4089(define-public python2-pickleshare
4090 (package-with-python2 python-pickleshare))
4091
cd6e5189
RW
4092(define-public python-simplegeneric
4093 (package
4094 (name "python-simplegeneric")
4095 (version "0.8.1")
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (string-append "https://pypi.python.org/packages/source/s/"
4100 "simplegeneric/simplegeneric-" version ".zip"))
4101 (sha256
4102 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4103 (build-system python-build-system)
4104 (native-inputs
69b96e5e
RW
4105 `(("python-setuptools" ,python-setuptools)
4106 ("unzip" ,unzip)))
cd6e5189
RW
4107 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4108 (synopsis "Python module for simple generic functions")
4109 (description
4110 "The simplegeneric module lets you define simple single-dispatch generic
4111functions, akin to Python’s built-in generic functions like @code{len()},
4112@code{iter()} and so on. However, instead of using specially-named methods,
4113these generic functions use simple lookup tables, akin to those used by
4114e.g. @code{pickle.dump()} and other generic functions found in the Python
4115standard library.")
4116 (license zpl2.1)))
4117
4118(define-public python2-simplegeneric
4119 (package-with-python2 python-simplegeneric))
4120
ddc7d8ed
RW
4121(define-public python-ipython-genutils
4122 (package
4123 (name "python-ipython-genutils")
4124 (version "0.1.0")
4125 (source
4126 (origin
4127 (method url-fetch)
4128 (uri (string-append "https://pypi.python.org/packages/source/i/"
4129 "ipython_genutils/ipython_genutils-"
4130 version ".tar.gz"))
4131 (sha256
4132 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4133 (build-system python-build-system)
4134 (arguments `(#:tests? #f)) ; no tests
4135 (home-page "http://ipython.org")
4136 (synopsis "Vestigial utilities from IPython")
4137 (description
4138 "This package provides retired utilities from IPython.")
4139 (license bsd-3)))
4140
4141(define-public python2-ipython-genutils
4142 (package-with-python2 python-ipython-genutils))
4143
2b10eb48
RW
4144(define-public python-traitlets
4145 (package
4146 (name "python-traitlets")
4147 (version "4.0.0")
4148 (source
4149 (origin
4150 (method url-fetch)
4151 (uri (string-append "https://pypi.python.org/packages/source/t/"
4152 "traitlets/traitlets-" version ".tar.gz"))
4153 (sha256
4154 (base32
4155 "0fr3w2xwb46c591dp7zw02bgf4d21mjy9g6rhwc9bwd4ji50n50b"))))
4156 (build-system python-build-system)
4157 (arguments
4158 `(#:phases
4159 (modify-phases %standard-phases
4160 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4161 (propagated-inputs
4162 `(("python-ipython-genutils" ,python-ipython-genutils)
4163 ("python-decorator" ,python-decorator)))
4164 (native-inputs
4165 `(("python-nose" ,python-nose)))
4166 (home-page "http://ipython.org")
4167 (synopsis "Configuration system for Python applications")
4168 (description
4169 "Traitlets is a framework that lets Python classes have attributes with
4170type checking, dynamically calculated default values, and ‘on change’
4171callbacks. The package also includes a mechanism to use traitlets for
4172configuration, loading values from files or from command line arguments. This
4173is a distinct layer on top of traitlets, so you can use traitlets in your code
4174without using the configuration machinery.")
4175 (license bsd-3)))
4176
4177(define-public python2-traitlets
4178 (package-with-python2 python-traitlets))
4179
ae1ab9fe
FB
4180(define-public python-ipython
4181 (package
4182 (name "python-ipython")
3a0b1b9a 4183 (version "3.2.1")
ae1ab9fe
FB
4184 (source
4185 (origin
fceac880
FB
4186 (method url-fetch)
4187 (patches (list (search-patch "python-ipython-inputhook-ctype.patch")))
4188 (uri (string-append "https://pypi.python.org/packages/source/i/"
4189 "ipython/ipython-" version ".tar.gz"))
4190 (sha256
4191 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
4192 (build-system python-build-system)
4193 (outputs '("out" "doc"))
3a0b1b9a
FB
4194 (propagated-inputs
4195 `(("python-pyzmq" ,python-pyzmq)
4196 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
4197 (inputs
4198 `(("readline" ,readline)
3a0b1b9a 4199 ("which" ,which)
ae1ab9fe 4200 ("python-matplotlib" ,python-matplotlib)
5d26e542 4201 ("python-numpy" ,python-numpy)
ae1ab9fe 4202 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4203 ("python-jinja2" ,python-jinja2)
4204 ("python-mistune" ,python-mistune)
4205 ("python-jsonschema" ,python-jsonschema)
4206 ("python-pygments" ,python-pygments)
4207 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
4208 ("python-nose" ,python-nose)))
4209 (native-inputs
4210 `(("pkg-config" ,pkg-config)
4211 ("python-sphinx" ,python-sphinx)
4212 ("texlive" ,texlive)
4213 ("texinfo" ,texinfo)
4214 ("python-setuptools" ,python-setuptools)))
4215 (arguments
89b5c60e 4216 `(#:phases
3a0b1b9a
FB
4217 (modify-phases %standard-phases
4218 (add-after
4219 'install 'install-doc
4220 (lambda* (#:key inputs outputs #:allow-other-keys)
4221 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4222 (doc (string-append data "/doc/" ,name "-" ,version))
4223 (html (string-append doc "/html"))
4224 (man1 (string-append data "/man/man1"))
4225 (info (string-append data "/info"))
4226 (examples (string-append doc "/examples")))
afd3d931 4227 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
4228 (with-directory-excursion "docs"
4229 ;; FIXME: html and pdf fail to build
4230 ;; (system* "make" "html")
4231 ;; (system* "make" "pdf" "PAPER=a4")
4232 (system* "make" "info"))
4233 (copy-recursively "docs/man" man1)
4234 (copy-recursively "examples" examples)
4235 ;; (copy-recursively "docs/build/html" html)
4236 ;; (copy-file "docs/build/latex/ipython.pdf"
4237 ;; (string-append doc "/ipython.pdf"))
4238 (mkdir-p info)
4239 (copy-file "docs/build/texinfo/ipython.info"
4240 (string-append info "/ipython.info"))
4241 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4242 ;; Tests can only be run after the library has been installed and not
4243 ;; within the source directory.
4244 (delete 'check)
4245 (add-after
4246 'install 'check
4247 (lambda* (#:key outputs tests? #:allow-other-keys)
4248 (if tests?
4249 (with-directory-excursion "/tmp"
4250 (setenv "HOME" "/tmp/") ;; required by a test
4251 (zero? (system* (string-append (assoc-ref outputs "out")
4252 "/bin/iptest"))))
4253 #t)))
4254 (add-before
4255 'install 'fix-tests
4256 (lambda* (#:key inputs #:allow-other-keys)
4257 (substitute* "./IPython/utils/_process_posix.py"
4258 (("/usr/bin/env', 'which") (which "which")))
4259 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4260 (("#!/usr/bin/env python")
4261 (string-append "#!" (which "python"))))
4262 ;; Disable 1 failing test
4263 (substitute* "./IPython/core/tests/test_magic.py"
4264 (("def test_dirops\\(\\):" all)
4265 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4266 (home-page "http://ipython.org")
4267 (synopsis "IPython is a tool for interactive computing in Python")
4268 (description
4269 "IPython provides a rich architecture for interactive computing with:
4270Powerful interactive shells, a browser-based notebook, support for interactive
4271data visualization, embeddable interpreters and tools for parallel
4272computing.")
4273 (license bsd-3)))
4274
4275(define-public python2-ipython
4276 (let ((ipython (package-with-python2 python-ipython)))
3a0b1b9a
FB
4277 (package
4278 (inherit ipython)
4279 ;; FIXME: some tests are failing
4280 (arguments
4281 `(#:tests? #f ,@(package-arguments ipython)))
ae1ab9fe 4282 ;; Make sure we use custom python2-NAME packages.
3a0b1b9a 4283 ;; FIXME: add pyreadline once available.
667d90df
RW
4284 (propagated-inputs
4285 `(("python2-terminado" ,python2-terminado)
4286 ,@(alist-delete "python-terminado"
4287 (package-propagated-inputs ipython))))
89b5c60e 4288 (inputs
264ae686
EF
4289 `(("python2-jsonschema" ,python2-jsonschema)
4290 ("python2-mock" ,python2-mock)
3a0b1b9a 4291 ("python2-matplotlib" ,python2-matplotlib)
5587253a 4292 ("python2-numpy" ,python2-numpy)
264ae686 4293 ("python2-requests" ,python2-requests)
5587253a 4294 ,@(fold alist-delete (package-inputs ipython)
264ae686 4295 '("python-jsonschema" "python-matplotlib" "python-numpy" "python-requests")))))))
03411993
AE
4296
4297(define-public python-isodate
4298 (package
4299 (name "python-isodate")
4300 (version "0.5.1")
4301 (source
4302 (origin
4303 (method url-fetch)
4304 (uri (string-append
4305 "https://pypi.python.org/packages/source/i/isodate/isodate-"
4306 version
4307 ".tar.gz"))
4308 (sha256
4309 (base32
4310 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
4311 (build-system python-build-system)
4312 (inputs
4313 `(("python-setuptools" ,python-setuptools)))
4314 (home-page
4315 "http://cheeseshop.python.org/pypi/isodate")
4316 (synopsis
4317 "Python date parser and formatter")
4318 (description
4319 "Python-isodate is a python module for parsing and formatting
4320ISO 8601 dates, time and duration.")
4321 (license bsd-3)))
4322
4323(define-public python2-isodate
4324 (package-with-python2 python-isodate))
673ab897
AE
4325
4326(define-public python-html5lib
4327 (package
4328 (name "python-html5lib")
4329 (version "1.0b3")
4330 (source
4331 (origin
4332 (method url-fetch)
4333 (uri (string-append
4334 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
4335 version
4336 ".tar.gz"))
4337 (sha256
4338 (base32
4339 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
4340 (build-system python-build-system)
3dd75476
AE
4341 (propagated-inputs
4342 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
4343 (inputs
4344 `(("python-setuptools" ,python-setuptools)))
4345 (arguments
4346 `(#:test-target "check"))
4347 (home-page
4348 "https://github.com/html5lib/html5lib-python")
4349 (synopsis
4350 "Python HTML parser based on the WHATWG HTML specifcation")
4351 (description
4352 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4353and written in Python.")
bd3fa666 4354 (license license:expat)))
673ab897
AE
4355
4356(define-public python2-html5lib
4357 (package-with-python2 python-html5lib))
e99f4211
MW
4358
4359(define-public python-urwid
4360 (package
4361 (name "python-urwid")
4362 (version "1.3.0")
4363 (source
4364 (origin
4365 (method url-fetch)
b97c1bfd 4366 (uri (pypi-uri "urwid" version))
e99f4211
MW
4367 (sha256
4368 (base32
4369 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
4370 (build-system python-build-system)
b97c1bfd
LF
4371 (arguments
4372 `(#:phases
4373 (modify-phases %standard-phases
4374 ;; Disable failing test. Bug filed upstream:
4375 ;; https://github.com/wardi/urwid/issues/164
4376 ;; TODO: check again for python-urwid > 1.3.0 or python > 3.4.3.
4377 (add-after 'unpack 'disable-failing-test
4378 (lambda _
4379 (substitute* "urwid/tests/test_event_loops.py"
4380 (("test_remove_watch_file")
4381 "disable_remove_watch_file")))))))
e99f4211
MW
4382 (native-inputs `(("python-setuptools" ,python-setuptools)))
4383 (home-page "http://urwid.org")
4384 (synopsis "Console user interface library for Python")
4385 (description
4386 "Urwid is a curses-based UI/widget library for Python. It includes many
4387features useful for text console applications.")
4388 (license lgpl2.1+)))
4389
4390(define-public python2-urwid
4391 (package-with-python2 python-urwid))
d95a56c6
PAR
4392
4393(define-public python-dbus
4394 (package
4395 (name "python-dbus")
4396 (version "1.2.0")
4397 (source
4398 (origin
4399 (method url-fetch)
4400 (uri (string-append
4401 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4402 version ".tar.gz"))
4403 (sha256
4404 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4405 (build-system gnu-build-system)
6717c879
SB
4406 (arguments
4407 '(#:phases
4408 (modify-phases %standard-phases
4409 (add-before
4410 'check 'pre-check
4411 (lambda _
4412 ;; XXX: For the missing '/etc/machine-id'.
4413 (substitute* "test/run-test.sh"
4414 (("DBUS_FATAL_WARNINGS=1")
4415 "DBUS_FATAL_WARNINGS=0"))
4416 #t)))))
d95a56c6
PAR
4417 (native-inputs
4418 `(("pkg-config" ,pkg-config)))
4419 (inputs
4420 `(("python" ,python)
2e88d113 4421 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
4422 (synopsis "Python bindings for D-bus")
4423 (description "python-dbus provides bindings for libdbus, the reference
4424implementation of D-Bus.")
4425 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 4426 (license license:expat)))
b52af02b
MW
4427
4428(define-public python2-dbus
4429 (package (inherit python-dbus)
4430 (name "python2-dbus")
4431 (inputs `(("python" ,python-2)
4432 ,@(alist-delete "python"
4433 (package-inputs python-dbus)
4434 equal?)))
4435 ;; FIXME: on Python 2, the test_utf8 fails with:
4436 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4437 (arguments `(#:tests? #f))))
a6ac8332
AE
4438
4439(define-public python-apsw
4440 (package
4441 (name "python-apsw")
917708c2 4442 (version "3.9.2-r1")
a6ac8332
AE
4443 (source
4444 (origin
4445 (method url-fetch)
917708c2 4446 (uri (pypi-uri "apsw" version))
a6ac8332
AE
4447 (sha256
4448 (base32
917708c2 4449 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
4450 (build-system python-build-system)
4451 (inputs
4452 `(("python-setuptools" ,python-setuptools)
4453 ("sqlite" ,sqlite)))
4454 (arguments
4455 `(#:phases
4456 ;; swap check and install phases
4457 (alist-cons-after
4458 'install 'check
4459 (assoc-ref %standard-phases 'check)
4460 (alist-delete
4461 'check
4462 %standard-phases))))
4463 (home-page "https://github.com/rogerbinns/apsw/")
4464 (synopsis "Another Python SQLite Wrapper")
4465 (description "APSW is a Python wrapper for the SQLite
4466embedded relational database engine. In contrast to other wrappers such as
4467pysqlite it focuses on being a minimal layer over SQLite attempting just to
4468translate the complete SQLite API into Python.")
abde5f37 4469 (license license:zlib)))
a6ac8332
AE
4470
4471(define-public python2-apsw
4472 (package-with-python2 python-apsw))
26b307e2
AE
4473
4474(define-public python-lxml
4475 (package
4476 (name "python-lxml")
4477 (version "3.4.2")
4478 (source
4479 (origin
4480 (method url-fetch)
4481 (uri (string-append
4482 "https://pypi.python.org/packages/source/l/lxml/lxml-"
4483 version
4484 ".tar.gz"))
4485 (sha256
4486 (base32
4487 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
4488 (build-system python-build-system)
4489 (inputs
4490 `(("libxml2" ,libxml2)
4491 ("libxslt" ,libxslt)
4492 ("python-setuptools" ,python-setuptools)))
4493 (home-page "http://lxml.de/")
4494 (synopsis
4495 "Python XML processing library")
4496 (description
4497 "The lxml XML toolkit is a Pythonic binding for the C libraries
4498libxml2 and libxslt.")
4499 (license bsd-3))) ; and a few more, see LICENSES.txt
4500
4501(define-public python2-lxml
4502 (package-with-python2 python-lxml))
4ed20663 4503
bec07a7c
AE
4504(define-public python2-pil
4505 (package
4506 (name "python2-pil")
4507 (version "1.1.7")
4508 (source
4509 (origin
4510 (method url-fetch)
4511 (uri (string-append
4512 "http://effbot.org/downloads/Imaging-"
4513 version ".tar.gz"))
4514 (sha256
4515 (base32
516277cb
AE
4516 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
4517 (modules '((guix build utils)))
4518 (snippet
4519 ;; Adapt to newer freetype. As the package is unmaintained upstream,
4520 ;; there is no use in creating a patch and reporting it.
4521 '(substitute* "_imagingft.c"
4522 (("freetype/")
4523 "freetype2/")))))
bec07a7c
AE
4524 (build-system python-build-system)
4525 (inputs
4526 `(("freetype" ,freetype)
4527 ("libjpeg" ,libjpeg)
4528 ("libtiff" ,libtiff)
4529 ("python-setuptools" ,python-setuptools)
4530 ("zlib" ,zlib)))
4531 (arguments
4532 ;; Only the fork python-pillow works with Python 3.
4533 `(#:python ,python-2
4534 #:tests? #f ; no check target
4535 #:phases
4536 (alist-cons-before
4537 'build 'configure
4538 ;; According to README and setup.py, manual configuration is
4539 ;; the preferred way of "searching" for inputs.
4540 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
4541 (lambda* (#:key inputs #:allow-other-keys)
4542 (let ((jpeg (assoc-ref inputs "libjpeg"))
4543 (zlib (assoc-ref inputs "zlib"))
4544 (tiff (assoc-ref inputs "libtiff"))
4545 (freetype (assoc-ref inputs "freetype")))
4546 (substitute* "setup.py"
4547 (("JPEG_ROOT = None")
4548 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
4549 (("ZLIB_ROOT = None")
4550 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
4551 (("TIFF_ROOT = None")
4552 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
4553 (("FREETYPE_ROOT = None")
4554 (string-append "FREETYPE_ROOT = libinclude(\""
4555 freetype "\")")))))
4556 %standard-phases)))
4557 (home-page "http://www.pythonware.com/products/pil/")
4558 (synopsis "Python Imaging Library")
4559 (description "The Python Imaging Library (PIL) adds image processing
4560capabilities to the Python interpreter.")
4561 (license (x11-style
4562 "file://README"
4563 "See 'README' in the distribution."))))
092e86f5
AE
4564
4565(define-public python2-cssutils
4566 (package
4567 (name "python2-cssutils")
4568 (version "1.0")
4569 (source
4570 (origin
4571 (method url-fetch)
4572 (uri (string-append
4573 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4574 version
4575 ".zip"))
4576 (sha256
4577 (base32
4578 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4579 (build-system python-build-system)
4580 (native-inputs
4581 `(("python2-mock" ,python2-mock) ; for the tests
4582 ("unzip" ,unzip))) ; for unpacking the source
4583 (inputs
4584 `(("python2-setuptools" ,python2-setuptools)))
4585 (arguments
4586 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4587 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4588 ))
092e86f5
AE
4589 (home-page "http://cthedot.de/cssutils/")
4590 (synopsis
4591 "CSS Cascading Style Sheets library for Python")
4592 (description
4593 "Cssutils is a Python package for parsing and building CSS
4594Cascading Style Sheets. Currently it provides a DOM only and no rendering
4595options.")
4596 (license lgpl3+)))
880ff77c
AE
4597
4598(define-public python-cssselect
4599 (package
4600 (name "python-cssselect")
4601 (version "0.9.1")
4602 (source
4603 (origin
4604 (method url-fetch)
4605 (uri (string-append
4606 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4607 version
4608 ".tar.gz"))
4609 (sha256
4610 (base32
4611 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4612 (build-system python-build-system)
4613 (inputs
4614 `(("python-setuptools" ,python-setuptools)))
4615 (arguments
4616 ;; tests fail with message
4617 ;; AttributeError: 'module' object has no attribute 'tests'
4618 `(#:tests? #f))
4619 (home-page
4620 "https://pythonhosted.org/cssselect/")
4621 (synopsis
4622 "CSS3 selector parser and translator to XPath 1.0")
4623 (description
4624 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4625them to XPath 1.0 expressions. Such expressions can be used in lxml or
4626another XPath engine to find the matching elements in an XML or HTML document.")
4627 (license bsd-3)))
4628
4629(define-public python2-cssselect
4630 (package-with-python2 python-cssselect))
60357f99
AE
4631
4632(define-public python-netifaces
4633 (package
4634 (name "python-netifaces")
4635 (version "0.10.4")
4636 (source
4637 (origin
4638 (method url-fetch)
4639 (uri (string-append
4640 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4641 version
4642 ".tar.gz"))
4643 (sha256
4644 (base32
4645 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4646 (build-system python-build-system)
4647 (inputs
4648 `(("python-setuptools" ,python-setuptools)))
4649 (home-page
4650 "https://bitbucket.org/al45tair/netifaces")
4651 (synopsis
4652 "Python module for portable network interface information")
4653 (description
4654 "Netifaces is a Python module providing information on network
4655interfaces in an easy and portable manner.")
4656 (license license:expat)))
4657
4658(define-public python2-netifaces
4659 (package-with-python2 python-netifaces))
92cb152b 4660
32f77c04
RW
4661(define-public python-networkx
4662 (package
4663 (name "python-networkx")
4664 (version "1.9.1")
4665 (source
4666 (origin
4667 (method url-fetch)
4668 (uri (string-append
4669 "https://pypi.python.org/packages/source/n/networkx/networkx-"
4670 version ".tar.gz"))
4671 (sha256
4672 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
4673 (build-system python-build-system)
4674 ;; python-decorator is needed at runtime
4675 (propagated-inputs
4676 `(("python-decorator" ,python-decorator)))
4677 (native-inputs
4678 `(("python-setuptools" ,python-setuptools)
4679 ("python-nose" ,python-nose)))
4680 (home-page "http://networkx.github.io/")
4681 (synopsis "Python module for creating and manipulating graphs and networks")
4682 (description
4683 "NetworkX is a Python package for the creation, manipulation, and study
4684of the structure, dynamics, and functions of complex networks.")
4685 (license bsd-3)))
4686
4687(define-public python2-networkx
4688 (package-with-python2 python-networkx))
4689
92cb152b
RW
4690(define-public snakemake
4691 (package
4692 (name "snakemake")
4693 (version "3.2.1")
4694 (source
4695 (origin
4696 (method url-fetch)
4697 (uri (string-append
4698 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4699 version ".tar.gz"))
4700 (sha256
4701 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4702 (build-system python-build-system)
4703 (inputs `(("python-setuptools" ,python-setuptools)))
4704 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4705 (synopsis "Python-based execution environment for make-like workflows")
4706 (description
4707 "Snakemake aims to reduce the complexity of creating workflows by
4708providing a clean and modern domain specific specification language (DSL) in
4709Python style, together with a fast and comfortable execution environment.")
4710 (license license:expat)))
a1920bc9 4711
35de1fbd
RW
4712(define-public python-seaborn
4713 (package
4714 (name "python-seaborn")
4715 (version "0.5.1")
4716 (source
4717 (origin
4718 (method url-fetch)
4719 (uri (string-append
4720 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
4721 version ".tar.gz"))
4722 (sha256
4723 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
4724 (build-system python-build-system)
4725 (propagated-inputs
4726 `(("python-pandas" ,python-pandas)
4727 ("python-matplotlib" ,python-matplotlib)
4728 ("python-scipy" ,python-scipy)))
4729 (native-inputs
4730 `(("python-setuptools" ,python-setuptools)))
4731 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4732 (synopsis "Statistical data visualization")
4733 (description
4734 "Seaborn is a library for making attractive and informative statistical
4735graphics in Python. It is built on top of matplotlib and tightly integrated
4736with the PyData stack, including support for numpy and pandas data structures
4737and statistical routines from scipy and statsmodels.")
4738 (license bsd-3)))
4739
4740(define-public python2-seaborn
4741 (let ((seaborn (package-with-python2 python-seaborn)))
4742 (package (inherit seaborn)
4743 (propagated-inputs
4744 `(("python2-pytz" ,python2-pytz)
dab8ebd9
FB
4745 ("python2-pandas" ,python2-pandas)
4746 ("python2-matplotlib" ,python2-matplotlib)
4747 ("python2-scipy" ,python2-scipy))))))
35de1fbd 4748
90fc547f
RW
4749(define-public python-sympy
4750 (package
4751 (name "python-sympy")
4752 (version "0.7.6")
4753 (source
4754 (origin
4755 (method url-fetch)
4756 (uri (string-append
4757 "https://github.com/sympy/sympy/releases/download/sympy-"
4758 version "/sympy-" version ".tar.gz"))
4759 (sha256
4760 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4761 (build-system python-build-system)
4762 (native-inputs
4763 `(("python-setuptools" ,python-setuptools)))
4764 (home-page "http://www.sympy.org/")
4765 (synopsis "Python library for symbolic mathematics")
4766 (description
4767 "SymPy is a Python library for symbolic mathematics. It aims to become a
4768full-featured computer algebra system (CAS) while keeping the code as simple
4769as possible in order to be comprehensible and easily extensible.")
4770 (license bsd-3)))
4771
4772(define-public python2-sympy
4773 (package-with-python2 python-sympy))
4774
a1920bc9
FB
4775(define-public python-testlib
4776 (package
4777 (name "python-testlib")
4778 (version "0.6.5")
4779 (source
4780 (origin
4781 (method url-fetch)
4782 (uri (string-append
4783 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4784 version ".zip"))
4785 (sha256
4786 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4787 (build-system python-build-system)
4788 (inputs
4789 `(("python-setuptools" ,python-setuptools)))
4790 (native-inputs
4791 `(("unzip" ,unzip)))
4792 (arguments
4793 `(#:phases
4794 (alist-replace
4795 'unpack
4796 (lambda* (#:key inputs outputs #:allow-other-keys)
4797 (let ((unzip (string-append (assoc-ref inputs "unzip")
4798 "/bin/unzip"))
4799 (source (assoc-ref inputs "source")))
4800 (and (zero? (system* unzip source))
4801 (chdir (string-append "testlib-" ,version)))))
4802 %standard-phases)))
4803 (synopsis "Python micro test suite harness")
4804 (description "A micro unittest suite harness for Python.")
4805 (home-page "https://github.com/trentm/testlib")
1cb9c006 4806 (license license:expat)))
a1920bc9
FB
4807
4808(define-public python2-testlib
4809 (package-with-python2 python-testlib))
db62afa5
LC
4810
4811(define-public python2-xlib
4812 (package
4813 (name "python2-xlib")
4814 (version "0.14")
4815 (source (origin
4816 (method url-fetch)
4817 (uri (string-append "mirror://sourceforge/python-xlib/"
4818 "python-xlib-" version ".tar.gz"))
4819 (sha256
4820 (base32
4821 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4822 (build-system python-build-system)
4823 (arguments
4824 `(#:python ,python-2 ;Python 2 only
4825 #:tests? #f)) ;no tests
4826 (inputs
4827 `(("python-setuptools" ,python-setuptools)))
4828 (home-page "http://python-xlib.sourceforge.net/")
4829 (synopsis "Python X11 client library")
4830 (description
4831 "The Python X Library is intended to be a fully functional X client
4832library for Python programs. It is useful to implement low-level X clients.
4833It is written entirely in Python.")
4834 (license gpl2+)))
0234ca06
DT
4835
4836(define-public python-singledispatch
4837 (package
4838 (name "python-singledispatch")
4839 (version "3.4.0.3")
4840 (source
4841 (origin
4842 (method url-fetch)
4843 (uri (string-append
4844 "https://pypi.python.org/packages/source/s/singledispatch/"
4845 "singledispatch-" version ".tar.gz"))
4846 (sha256
4847 (base32
4848 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4849 (build-system python-build-system)
4850 (native-inputs
4851 `(("python-setuptools" ,python-setuptools)))
4852 (propagated-inputs
4853 `(("python-six" ,python-six)))
4854 (home-page
4855 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4856 (synopsis "Backport of singledispatch feature from Python 3.4")
4857 (description
4858 "This library brings functools.singledispatch from Python 3.4 to Python
48592.6-3.3.")
4860 (license license:expat)))
4861
4862(define-public python2-singledispatch
4863 (package-with-python2 python-singledispatch))
feaae484 4864
310d218f
RW
4865(define-public python-tornado
4866 (package
4867 (name "python-tornado")
4868 (version "4.1")
4869 (source
4870 (origin
4871 (method url-fetch)
4872 (uri (string-append
4873 "https://pypi.python.org/packages/source/t/tornado/"
4874 "tornado-" version ".tar.gz"))
4875 (sha256
4876 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4877 (build-system python-build-system)
4878 (inputs
4879 `(("python-certifi" ,python-certifi)))
4880 (native-inputs
4881 `(("python-setuptools" ,python-setuptools)))
f4a4a718 4882 (home-page "http://www.tornadoweb.org/")
310d218f
RW
4883 (synopsis "Python web framework and asynchronous networking library")
4884 (description
4885 "Tornado is a Python web framework and asynchronous networking library,
4886originally developed at FriendFeed. By using non-blocking network I/O,
4887Tornado can scale to tens of thousands of open connections, making it ideal
4888for long polling, WebSockets, and other applications that require a long-lived
4889connection to each user.")
4890 (license asl2.0)))
4891
4892(define-public python2-tornado
4893 (let ((tornado (package-with-python2 python-tornado)))
4894 (package (inherit tornado)
4895 (inputs
4896 `(("python2-backport-ssl-match-hostname"
4897 ,python2-backport-ssl-match-hostname)
4898 ,@(package-inputs tornado))))))
4899
feaae484
SB
4900(define-public python-waf
4901 (package
4902 (name "python-waf")
4903 (version "1.8.8")
4904 (source (origin
4905 (method url-fetch)
4906 (uri (string-append "https://waf.io/"
4907 "waf-" version ".tar.bz2"))
4908 (sha256
4909 (base32
4910 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4911 (build-system python-build-system)
4912 (arguments
4913 '(#:phases
4914 (modify-phases %standard-phases
4915 (replace 'build
4916 (lambda _
4917 (zero? (begin
4918 (system* "python" "waf-light" "configure")
4919 (system* "python" "waf-light" "build")))))
4920 (replace 'check
4921 (lambda _
4922 (zero? (system* "python" "waf" "--version"))))
4923 (replace 'install
4924 (lambda _
4925 (copy-file "waf" %output))))))
4926 (home-page "https://waf.io/")
4927 (synopsis "Python-based build system")
4928 (description
4929 "Waf is a Python-based framework for configuring, compiling and installing
4930applications.")
4931 (license bsd-3)))
4932
4933(define-public python2-waf
4934 (package-with-python2 python-waf))
45203542
RW
4935
4936(define-public python-pyzmq
4937 (package
4938 (name "python-pyzmq")
3655ee76 4939 (version "15.1.0")
45203542
RW
4940 (source
4941 (origin
4942 (method url-fetch)
3655ee76 4943 (uri (pypi-uri "pyzmq" version))
45203542 4944 (sha256
3655ee76 4945 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
4946 (build-system python-build-system)
4947 (arguments
4948 `(#:configure-flags
4949 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4950 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4951 ;; --inplace' for 'python setup.py test' to work.
4952 #:tests? #f))
4953 (inputs
4954 `(("zeromq" ,zeromq)))
4955 (native-inputs
4956 `(("pkg-config" ,pkg-config)
4957 ("python-nose" ,python-nose)
4958 ("python-setuptools" ,python-setuptools)))
4959 (home-page "http://github.com/zeromq/pyzmq")
4960 (synopsis "Python bindings for 0MQ")
4961 (description
4962 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4963 (license bsd-4)))
4964
4965(define-public python2-pyzmq
4966 (package-with-python2 python-pyzmq))
d889e6c4
CR
4967
4968(define-public python-pep8
4969 (package
4970 (name "python-pep8")
4971 (version "1.6.2")
4972 (source
4973 (origin
4974 (method url-fetch)
4975 (uri (string-append
4976 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4977 version
4978 ".tar.gz"))
4979 (sha256
4980 (base32
4981 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
4982 (build-system python-build-system)
4983 (inputs
4984 `(("python-setuptools" ,python-setuptools)))
4985 (home-page "http://pep8.readthedocs.org/")
4986 (synopsis "Python style guide checker")
4987 (description
4988 "This tools checks Python code against some of the style conventions in
4989PEP 8.")
4990 (license license:expat)))
4991
4992(define-public python2-pep8
4993 (package-with-python2 python-pep8))
e31d7f44
CR
4994
4995(define-public python-pyflakes
4996 (package
4997 (name "python-pyflakes")
2abc3972 4998 (version "1.0.0")
e31d7f44
CR
4999 (source
5000 (origin
5001 (method url-fetch)
2abc3972 5002 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5003 (sha256
5004 (base32
2abc3972 5005 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44
CR
5006 (build-system python-build-system)
5007 (inputs
5008 `(("python-setuptools" ,python-setuptools)))
5009 (home-page
5010 "https://github.com/pyflakes/pyflakes")
5011 (synopsis "Passive checker of Python programs")
5012 (description
5013 "Pyflakes statically checks Python source code for common errors.")
5014 (license license:expat)))
a59e017c 5015
7261d9eb
CR
5016(define-public python2-pyflakes
5017 (package-with-python2 python-pyflakes))
5018
a59e017c
CR
5019(define-public python-mccabe
5020 (package
5021 (name "python-mccabe")
5022 (version "0.3.1")
5023 (source
5024 (origin
5025 (method url-fetch)
5026 (uri (string-append
5027 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
5028 version
5029 ".tar.gz"))
5030 (sha256
5031 (base32
5032 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
5033 (build-system python-build-system)
5034 (inputs
5035 `(("python-setuptools" ,python-setuptools)))
5036 (home-page "https://github.com/flintwork/mccabe")
5037 (synopsis "McCabe checker, plugin for flake8")
5038 (description
5039 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5040complexity of Python source code.")
7362371d 5041 (license license:expat)))
a59e017c
CR
5042
5043(define-public python2-mccabe
5044 (package-with-python2 python-mccabe))
e8df8f47 5045
7477fbb1
CR
5046(define-public python-mccabe-0.2.1
5047 (package (inherit python-mccabe)
5048 (version "0.2.1")
5049 (source
5050 (origin
5051 (method url-fetch)
5052 (uri (pypi-uri "mccabe" version))
5053 (sha256
5054 (base32
5055 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5056
5057(define-public python2-mccabe-0.2.1
5058 (package-with-python2 python-mccabe-0.2.1))
5059
e8df8f47
CR
5060;; Flake8 2.4.1 requires an older version of pep8.
5061;; This should be removed ASAP.
5062(define-public python-pep8-1.5.7
5063 (package (inherit python-pep8)
5064 (version "1.5.7")
5065 (source
5066 (origin
5067 (method url-fetch)
5068 (uri (string-append
5069 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5070 version
5071 ".tar.gz"))
5072 (sha256
5073 (base32
5074 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5075
5076(define-public python2-pep8-1.5.7
5077 (package-with-python2 python-pep8-1.5.7))
5078
5079;; Flake8 2.4.1 requires an older version of pyflakes.
5080;; This should be removed ASAP.
5081(define-public python-pyflakes-0.8.1
5082 (package (inherit python-pyflakes)
5083 (version "0.8.1")
5084 (source
5085 (origin
5086 (method url-fetch)
5087 (uri (string-append
5088 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5089 version
5090 ".tar.gz"))
5091 (sha256
5092 (base32
5093 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5094
5095(define-public python2-pyflakes-0.8.1
7261d9eb 5096 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5097
5098(define-public python-flake8
5099 (package
5100 (name "python-flake8")
1b995533 5101 (version "2.5.1")
e8df8f47
CR
5102 (source
5103 (origin
5104 (method url-fetch)
1b995533 5105 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5106 (sha256
5107 (base32
1b995533 5108 "00sn2g5ydriv5anbipcrprpv797kh4q8rfa75w3fc7v7n14fv2j4"))))
e8df8f47
CR
5109 (build-system python-build-system)
5110 (inputs
5111 `(("python-setuptools" ,python-setuptools)
5112 ("python-pep8" ,python-pep8-1.5.7)
5113 ("python-pyflakes" ,python-pyflakes-0.8.1)
5114 ("python-mccabe" ,python-mccabe)
5115 ("python-mock" ,python-mock)
5116 ("python-nose" ,python-nose)))
5117 (home-page "https://gitlab.com/pycqa/flake8")
5118 (synopsis
5119 "The modular source code checker: pep8, pyflakes and co")
5120 (description
5121 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5122 (license license:expat)))
5123
5124(define-public python2-flake8
5125 (package-with-python2 python-flake8))
61b9ac53 5126
abf21efc
CR
5127;; This will only be needed by the python-hacking package and will not be
5128;; necessary once python-hacking > 0.10.2 is released.
5129(define-public python-flake8-2.2.4
5130 (package (inherit python-flake8)
5131 (inputs
5132 `(("python-setuptools" ,python-setuptools)
5133 ("python-pep8" ,python-pep8-1.5.7)
5134 ("python-pyflakes" ,python-pyflakes-0.8.1)
5135 ("python-mccabe" ,python-mccabe-0.2.1)
5136 ("python-mock" ,python-mock)
5137 ("python-nose" ,python-nose)))
5138 (version "2.2.4")
5139 (source
5140 (origin
5141 (method url-fetch)
5142 (uri (pypi-uri "flake8" version))
5143 (sha256
5144 (base32
5145 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5146
5147(define-public python2-flake8-2.2.4
5148 (package-with-python2 python-flake8-2.2.4))
5149
61b9ac53
FB
5150(define-public python-mistune
5151 (package
5152 (name "python-mistune")
5153 (version "0.7")
5154 (source
5155 (origin
5156 (method url-fetch)
5157 (uri (string-append
5158 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5159 version
5160 ".tar.gz"))
5161 (sha256
5162 (base32
5163 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5164 (build-system python-build-system)
5165 (inputs
5166 `(("python-setuptools" ,python-setuptools)
5167 ("python-nose" ,python-nose)
5168 ("python-cython" ,python-cython)))
5169 (home-page "https://github.com/lepture/mistune")
5170 (synopsis "Markdown parser in pure Python")
5171 (description "This package provides a fast markdown parser in pure
5172Python.")
5173 (license bsd-3)))
5174
5175(define-public python2-mistune
5176 (package-with-python2 python-mistune))
6d992d07 5177
b9893908
EE
5178(define-public python-markdown
5179 (package
5180 (name "python-markdown")
5181 (version "2.6.5")
5182 (source
5183 (origin
5184 (method url-fetch)
5185 (uri (pypi-uri "Markdown" version))
5186 (sha256
5187 (base32
5188 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5189 (build-system python-build-system)
5190 (arguments
5191 `(#:phases
5192 (modify-phases %standard-phases
5193 (replace 'check
5194 (lambda _
5195 (zero? (system* "python" "run-tests.py")))))))
5196 (native-inputs
5197 `(("python-nose" ,python-nose)
5198 ("python-pyyaml" ,python-pyyaml)))
5199 (home-page "https://pythonhosted.org/Markdown/")
5200 (synopsis "Python implementation of Markdown")
5201 (description
5202 "This package provides a Python implementation of John Gruber's
5203Markdown. The library features international input, various Markdown
5204extensions, and several HTML output formats. A command line wrapper
5205markdown_py is also provided to convert Markdown files to HTML.")
5206 (license bsd-3)))
5207
5208(define-public python2-markdown
5209 (package-with-python2 python-markdown))
5210
6d992d07
FB
5211(define-public python-ptyprocess
5212 (package
5213 (name "python-ptyprocess")
5214 (version "0.5")
5215 (source
5216 (origin
5217 (method url-fetch)
5218 (uri (string-append
5219 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5220 version ".tar.gz"))
5221 (sha256
5222 (base32
5223 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5224 (build-system python-build-system)
5225 (inputs
5226 `(("python-setuptools" ,python-setuptools)
5227 ("python-nose" ,python-nose)))
5228 (arguments
5229 `(#:phases
5230 (modify-phases %standard-phases
5231 (replace 'check
5232 (lambda _
5233 (zero? (system* "nosetests")))))))
5234 (home-page "https://github.com/pexpect/ptyprocess")
5235 (synopsis "Run a subprocess in a pseudo terminal")
5236 (description
5237 "This package provides a Python library used to launch a subprocess in a
5238pseudo terminal (pty), and interact with both the process and its pty.")
5239 (license isc)))
5240
5241(define-public python2-ptyprocess
5242 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5243
5244(define-public python-terminado
5245 (package
5246 (name "python-terminado")
5247 (version "0.5")
5248 (source
5249 (origin
5250 (method url-fetch)
5251 (uri (string-append
5252 "https://pypi.python.org/packages/source/t/terminado/terminado-"
5253 version ".tar.gz"))
5254 (sha256
5255 (base32
5256 "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
5257 (build-system python-build-system)
5258 (propagated-inputs
5259 `(("python-tornado" ,python-tornado)
5260 ("python-ptyprocess" ,python-ptyprocess)))
5261 (inputs
5262 `(("python-setuptools" ,python-setuptools)
5263 ("python-nose" ,python-nose)))
5264 (arguments
5265 `(#:phases
5266 (modify-phases %standard-phases
5267 (replace 'check
5268 (lambda _
5269 (zero? (system* "nosetests")))))))
5270 (home-page "https://github.com/takluyver/terminado")
5271 (synopsis "Terminals served to term.js using Tornado websockets")
5272 (description "This package provides a Tornado websocket backend for the
5273term.js Javascript terminal emulator library.")
5274 (license bsd-2)))
5275
5276(define-public python2-terminado
5277 (let ((terminado (package-with-python2 python-terminado)))
5278 (package (inherit terminado)
5279 (propagated-inputs
5280 `(("python2-tornado" ,python2-tornado)
5281 ("python2-backport-ssl-match-hostname"
5282 ,python2-backport-ssl-match-hostname)
5283 ,@(alist-delete "python-tornado"
5284 (package-propagated-inputs terminado)))))))
5faa5ce4 5285
d582eaac
SB
5286(define-public python-fonttools
5287 (package
5288 (name "python-fonttools")
5289 (version "2.5")
5290 (source (origin
5291 (method url-fetch)
5292 (uri (string-append
5293 "https://pypi.python.org/packages/source/F/FontTools/"
5294 "fonttools-" version ".tar.gz"))
5295 (sha256
5296 (base32
5297 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5298 (build-system python-build-system)
5299 (arguments '(#:test-target "check"))
5300 (propagated-inputs
5301 ;; XXX: module not found if setuptools is not available.
5302 `(("python-setuptools" ,python-setuptools)))
5303 (home-page "http://github.com/behdad/fonttools")
5304 (synopsis "Tools to manipulate font files")
5305 (description
5306 "FontTools/TTX is a library to manipulate font files from Python. It
5307supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5308of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5309also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5310from an XML-based format.")
5311 (license (non-copyleft "file://LICENSE.txt"
5312 "See LICENSE.txt in the distribution."))))
5313
5314(define-public python2-fonttools
5315 (package-with-python2 python-fonttools))
75710da6 5316
5faa5ce4
RW
5317(define-public python-ly
5318 (package
5319 (name "python-ly")
b6b07d9d 5320 (version "0.9.3")
5faa5ce4
RW
5321 (source
5322 (origin
5323 (method url-fetch)
5324 (uri (string-append
5325 "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
5326 version ".tar.gz"))
5327 (sha256
5328 (base32
b6b07d9d 5329 "1y6ananq8fia4y4m5id6gvsrm68bzpzd1y46pfzvawic0wjg2l0l"))))
5faa5ce4
RW
5330 (build-system python-build-system)
5331 (native-inputs
5332 `(("python-setuptools" ,python-setuptools)))
5333 (synopsis "Tool and library for manipulating LilyPond files")
5334 (description "This package provides a Python library to parse, manipulate
5335or create documents in LilyPond format. A command line program ly is also
5336provided that can be used to do various manipulations with LilyPond files.")
5337 (home-page "https://pypi.python.org/pypi/python-ly")
5338 (license gpl2+)))
7e7b27d9
CR
5339
5340(define-public python-appdirs
5341 (package
5342 (name "python-appdirs")
5343 (version "1.4.0")
5344 (source
5345 (origin
5346 (method url-fetch)
5347 (uri (string-append
5348 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5349 version
5350 ".tar.gz"))
5351 (sha256
5352 (base32
5353 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5354 (build-system python-build-system)
5355 (inputs
5356 `(("python-setuptools" ,python-setuptools)))
5357 (home-page "http://github.com/ActiveState/appdirs")
5358 (synopsis
5359 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5360 (description
5361 "This module provides a portable way of finding out where user data
5362should be stored on various operating systems.")
5363 (license license:expat)))
5364
5365(define-public python2-appdirs
5366 (package-with-python2 python-appdirs))
89b2e0b0
LF
5367
5368(define-public python-llfuse
5369 (package
5370 (name "python-llfuse")
5371 (version "0.41")
5372 (source (origin
5373 (method url-fetch)
5374 (uri (string-append
5375 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5376 "llfuse-" version ".tar.bz2"))
5377 (sha256
5378 (base32
5379 "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
5380 (build-system python-build-system)
5381 (inputs
5382 `(("fuse" ,fuse)
5383 ("attr" ,attr)))
5384 (native-inputs
5385 `(("pkg-config" ,pkg-config)
5386 ("python-setuptools" ,python-setuptools)))
5387 (synopsis "Python bindings for FUSE")
5388 (description
5389 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5390 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5391 ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
5392 ;; The rest of the package is licensed under LGPL2.0 or later.
5393 (license (list license:expat lgpl2.0+))))
5394
5395(define-public python2-llfuse
5396 (package-with-python2 python-llfuse))
641c9871
LF
5397
5398(define-public python-msgpack
5399 (package
5400 (name "python-msgpack")
5401 (version "0.4.6")
5402 (source (origin
5403 (method url-fetch)
5404 (uri (string-append
5405 "https://pypi.python.org/packages/source/m/"
5406 "msgpack-python/msgpack-python-" version ".tar.gz"))
5407 (sha256
5408 (base32
5409 "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
5410 (build-system python-build-system)
5411 (native-inputs
5412 `(("python-setuptools" ,python-setuptools)))
5413 (synopsis "MessagePack (de)serializer")
5414 (description "MessagePack is a fast, compact binary serialization format,
5415suitable for similar data to JSON. This package provides CPython bindings for
5416reading and writing MessagePack data.")
5417 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5418 (license asl2.0)))
5419
5420(define-public python2-msgpack
5421 (package-with-python2 python-msgpack))
6e5e39f4
CR
5422
5423(define-public python-netaddr
5424 (package
5425 (name "python-netaddr")
5426 (version "0.7.18")
5427 (source
5428 (origin
5429 (method url-fetch)
5430 (uri (string-append
5431 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5432 version
5433 ".tar.gz"))
5434 (sha256
5435 (base32
5436 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5437 (build-system python-build-system)
5438 (arguments `(#:tests? #f)) ;; No tests.
5439 (inputs
5440 `(("python-setuptools" ,python-setuptools)))
5441 (home-page "https://github.com/drkjam/netaddr/")
5442 (synopsis "Pythonic manipulation of network addresses")
5443 (description
5444 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5445and MAC network addresses.")
5446 (license bsd-3)))
5447
5448(define-public python2-netaddr
5449 (package-with-python2 python-netaddr))
8c692a52
CR
5450
5451(define-public python-wrapt
5452 (package
5453 (name "python-wrapt")
5454 (version "1.10.5")
5455 (source
5456 (origin
5457 (method url-fetch)
5458 (uri (string-append
5459 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5460 version
5461 ".tar.gz"))
5462 (sha256
5463 (base32
5464 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5465 (build-system python-build-system)
5466 (arguments
5467 ;; Tests are not included in the tarball, they are only available in the
5468 ;; git repository.
5469 `(#:tests? #f))
5470 (inputs
5471 `(("python-setuptools" ,python-setuptools)))
5472 (home-page "https://github.com/GrahamDumpleton/wrapt")
5473 (synopsis "Module for decorators, wrappers and monkey patching")
5474 (description
5475 "The aim of the wrapt module is to provide a transparent object proxy for
5476 Python, which can be used as the basis for the construction of function
5477 wrappers and decorator functions.")
5478 (license bsd-2)))
5479
5480(define-public python2-wrapt
5481 (package-with-python2 python-wrapt))
b85c85be
CR
5482
5483(define-public python-iso8601
5484 (package
5485 (name "python-iso8601")
5486 (version "0.1.10")
5487 (source
5488 (origin
5489 (method url-fetch)
5490 (uri (string-append
5491 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
5492 version
5493 ".tar.gz"))
5494 (sha256
5495 (base32
5496 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
5497 (build-system python-build-system)
5498 (inputs
5499 `(("python-setuptools" ,python-setuptools)))
5500 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5501 (synopsis "Module to parse ISO 8601 dates")
5502 (description
5503 "This module parses the most common forms of ISO 8601 date strings (e.g.
5504@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5505 (license license:expat)))
5506
5507(define-public python2-iso8601
5508 (package-with-python2 python-iso8601))
5e412b63
CR
5509
5510(define-public python-monotonic
5511 (package
5512 (name "python-monotonic")
5513 (version "0.3")
5514 (source
5515 (origin
5516 (method url-fetch)
5517 (uri (string-append
5518 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5519 version
5520 ".tar.gz"))
5521 (sha256
5522 (base32
5523 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5524 (build-system python-build-system)
5525 (inputs
5526 `(("python-setuptools" ,python-setuptools)))
5527 (home-page "https://github.com/atdt/monotonic")
5528 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5529 (description
5530 "This module provides a monotonic() function which returns the value (in
5531fractional seconds) of a clock which never goes backwards.")
5532 (license asl2.0)))
5533
5534(define-public python2-monotonic
5535 (package-with-python2 python-monotonic))
de34afac
CR
5536
5537(define-public python-webob
5538 (package
5539 (name "python-webob")
b8834c21 5540 (version "1.5.1")
de34afac
CR
5541 (source
5542 (origin
5543 (method url-fetch)
b8834c21 5544 (uri (pypi-uri "WebOb" version))
de34afac
CR
5545 (sha256
5546 (base32
b8834c21 5547 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac
CR
5548 (build-system python-build-system)
5549 (inputs
5550 `(("python-nose" ,python-nose)
5551 ("python-setuptools" ,python-setuptools)))
5552 (home-page "http://webob.org/")
5553 (synopsis "WSGI request and response object")
5554 (description
5555 "WebOb provides wrappers around the WSGI request environment, and an
5556object to help create WSGI responses.")
5557 (license license:expat)))
5558
5559(define-public python2-webob
5560 (package-with-python2 python-webob))
350ba0a3 5561
02a8a187
BW
5562(define-public python-xlrd
5563 (package
5564 (name "python-xlrd")
5565 (version "0.9.4")
5566 (source (origin
5567 (method url-fetch)
5568 (uri (string-append "https://pypi.python.org/packages/source/x/"
5569 "xlrd/xlrd-" version ".tar.gz"))
5570 (sha256
5571 (base32
5572 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5573 (build-system python-build-system)
5574 (arguments
5575 `(#:phases
5576 (modify-phases %standard-phases
5577 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5578 ;; run tests instead for now.
5579 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5580 (native-inputs `(("python-nose" ,python-nose)
5581 ("python-setuptools" ,python-setuptools)))
5582 (home-page "http://www.python-excel.org/")
5583 (synopsis "Library for extracting data from Excel files")
5584 (description "This packages provides a library to extract data from
5585spreadsheets using Microsoft Excel® proprietary file formats @samp{.xls} and
5586@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5587Unicode-aware. It is not intended as an end-user tool.")
5588 (license bsd-3)))
5589
5590(define-public python2-xlrd
5591 (package-with-python2 python-xlrd))
5592
350ba0a3
CR
5593(define-public python-prettytable
5594 (package
5595 (name "python-prettytable")
5596 (version "0.7.2")
5597 (source
5598 (origin
5599 (method url-fetch)
5600 (uri (string-append
5601 "https://pypi.python.org/packages/source/P/PrettyTable/"
5602 "prettytable-" version ".tar.bz2"))
5603 (sha256
5604 (base32
5605 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5606 (build-system python-build-system)
5607 (inputs
5608 `(("python-setuptools" ,python-setuptools)))
5609 (home-page "http://code.google.com/p/prettytable/")
5610 (synopsis "Display tabular data in an ASCII table format")
5611 (description
5612 "A library designed to represent tabular data in visually appealing ASCII
5613tables. PrettyTable allows for selection of which columns are to be printed,
5614independent alignment of columns (left or right justified or centred) and
5615printing of sub-tables by specifying a row range.")
5616 (license bsd-3)))
5617
5618(define-public python2-prettytable
5619 (package-with-python2 python-prettytable))
7a8ac75a
RW
5620
5621(define-public python-pyasn1
5622 (package
5623 (name "python-pyasn1")
5624 (version "0.1.8")
5625 (source
5626 (origin
5627 (method url-fetch)
5628 (uri (string-append "https://pypi.python.org/packages/source/p/"
5629 "pyasn1/pyasn1-" version ".tar.gz"))
5630 (sha256
5631 (base32
5632 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5633 (build-system python-build-system)
5634 (home-page "http://pyasn1.sourceforge.net/")
5635 (synopsis "ASN.1 types and codecs")
5636 (description
5637 "This is an implementation of ASN.1 types and codecs in Python. It is
5638suitable for a wide range of protocols based on the ASN.1 specification.")
5639 (license bsd-2)))
5640
5641(define-public python2-pyasn1
5642 (package-with-python2 python-pyasn1))
9a49a535 5643
5988c299
EF
5644(define-public python-pyasn1-modules
5645 (package
5646 (name "python-pyasn1-modules")
5647 (version "0.0.8")
5648 (source
5649 (origin
5650 (method url-fetch)
5651 (uri (pypi-uri "pyasn1-modules" version))
5652 (sha256
5653 (base32
5654 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
5655 (build-system python-build-system)
5656 (native-inputs
5657 `(("python-setuptools" ,python-setuptools)))
5658 (propagated-inputs
5659 `(("python-pyasn1" ,python-pyasn1)))
5660 (home-page "http://sourceforge.net/projects/pyasn1/")
5661 (synopsis "ASN.1 codec implementations")
5662 (description
5663 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
5664implementations of ASN.1-based codecs and protocols.")
5665 (license bsd-3)))
5666
5667(define-public python2-pyasn1-modules
5668 (package-with-python2 python-pyasn1-modules))
5669
9a49a535
RW
5670(define-public python2-ipaddress
5671 (package
5672 (name "python2-ipaddress")
5673 (version "1.0.14")
5674 (source
5675 (origin
5676 (method url-fetch)
5677 (uri (string-append "https://pypi.python.org/packages/source/i/"
5678 "ipaddress/ipaddress-" version ".tar.gz"))
5679 (sha256
5680 (base32
5681 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5682 (build-system python-build-system)
5683 (arguments
5684 `(#:tests? #f ; no tests
5685 #:python ,python-2))
5686 (home-page "https://github.com/phihag/ipaddress")
5687 (synopsis "IP address manipulation library")
5688 (description
5689 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5690in Python. This library is used to create, poke at, and manipulate IPv4 and
5691IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5692module to older versions of Python.")
5693 (license psfl)))
3f00e078
RW
5694
5695(define-public python-idna
5696 (package
5697 (name "python-idna")
5698 (version "2.0")
5699 (source
5700 (origin
5701 (method url-fetch)
5702 (uri (string-append "https://pypi.python.org/packages/source/i/"
5703 "idna/idna-" version ".tar.gz"))
5704 (sha256
5705 (base32
5706 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5707 (build-system python-build-system)
5708 (native-inputs
5709 `(("python-setuptools" ,python-setuptools)))
5710 (home-page "https://github.com/kjd/idna")
5711 (synopsis "Internationalized domain names in applications")
5712 (description
5713 "This is a library to support the Internationalised Domain Names in
5714Applications (IDNA) protocol as specified in RFC 5891. This version of the
5715protocol is often referred to as “IDNA2008” and can produce different results
5716from the earlier standard from 2003. The library is also intended to act as a
5717suitable drop-in replacement for the “encodings.idna” module that comes with
5718the Python standard library but currently only supports the older 2003
5719specification.")
5720 (license bsd-4)))
5721
5722(define-public python2-idna
5723 (package-with-python2 python-idna))
36ebf972
RW
5724
5725(define-public python-pretend
5726 (package
5727 (name "python-pretend")
5728 (version "1.0.8")
5729 (source
5730 (origin
5731 (method url-fetch)
5732 (uri (string-append "https://pypi.python.org/packages/source/p/"
5733 "pretend/pretend-" version ".tar.gz"))
5734 (sha256
5735 (base32
5736 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5737 (build-system python-build-system)
5738 (native-inputs
5739 `(("python-setuptools" ,python-setuptools)))
5740 (home-page "https://github.com/alex/pretend")
5741 (synopsis "Library for stubbing in Python")
5742 (description
5743 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5744technique for writing tests. You may hear the term mixed up with mocks,
5745fakes, or doubles. Basically, a stub is an object that returns pre-canned
5746responses, rather than doing any computation.")
5747 (license bsd-3)))
5748
5749(define-public python2-pretend
5750 (package-with-python2 python-pretend))
aa759a51
RW
5751
5752(define-public python-cryptography-vectors
5753 (package
5754 (name "python-cryptography-vectors")
b39b33e8 5755 (version "1.2.2")
aa759a51
RW
5756 (source
5757 (origin
5758 (method url-fetch)
5759 (uri (string-append "https://pypi.python.org/packages/source/c/"
5760 "cryptography-vectors/cryptography_vectors-"
5761 version ".tar.gz"))
5762 (sha256
5763 (base32
b39b33e8 5764 "1zg47fzzn30mgkkbwrxqqcfq9crgabcmxyiy106n9404wbhfjkkl"))))
aa759a51
RW
5765 (build-system python-build-system)
5766 (native-inputs
5767 `(("python-setuptools" ,python-setuptools)))
5768 (home-page "https://github.com/pyca/cryptography")
5769 (synopsis "Test vectors for the cryptography package.")
5770 (description
5771 "This package contains test vectors for the cryptography package.")
5772 ;; Distributed under either BSD-3 or ASL2.0
5773 (license (list bsd-3 asl2.0))))
5774
5775(define-public python2-cryptography-vectors
5776 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
5777
5778(define-public python-cryptography
5779 (package
5780 (name "python-cryptography")
ce6c13ee 5781 (version "1.2.2")
88b47cb0
RW
5782 (source
5783 (origin
5784 (method url-fetch)
ce6c13ee 5785 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
5786 (sha256
5787 (base32
ce6c13ee 5788 "0rvaha7ymgbqkzbxk7xmj67k5b3hbp8w8cn3m5z776vd22wrq89z"))))
88b47cb0
RW
5789 (build-system python-build-system)
5790 (inputs
5791 `(("openssl" ,openssl)))
5792 (propagated-inputs
5793 `(("python-cffi" ,python-cffi)
5794 ("python-six" ,python-six)
5795 ("python-pyasn1" ,python-pyasn1)
5796 ("python-enum34" ,python-enum34)
5797 ("python-idna" ,python-idna)
5798 ("python-iso8601" ,python-iso8601)))
5799 (native-inputs
5800 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 5801 ("python-hypothesis" ,python-hypothesis)
88b47cb0
RW
5802 ("python-setuptools" ,python-setuptools)
5803 ("python-pretend" ,python-pretend)
ce6c13ee
EF
5804 ("python-pyasn1" ,python-pyasn1)
5805 ("python-pyasn1-modules" ,python-pyasn1-modules)
88b47cb0
RW
5806 ("python-pytest" ,python-pytest)))
5807 (home-page "https://github.com/pyca/cryptography")
5808 (synopsis "Cryptographic recipes and primitives for Python")
5809 (description
5810 "cryptography is a package which provides cryptographic recipes and
5811primitives to Python developers. It aims to be the “cryptographic standard
5812library” for Python. The package includes both high level recipes, and low
5813level interfaces to common cryptographic algorithms such as symmetric ciphers,
5814message digests and key derivation functions.")
5815 ;; Distributed under either BSD-3 or ASL2.0
519e2f4f
LF
5816 (license (list bsd-3 asl2.0))
5817 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
5818
5819(define-public python2-cryptography
519e2f4f
LF
5820 (let ((crypto (package-with-python2
5821 (strip-python2-variant python-cryptography))))
88b47cb0
RW
5822 (package (inherit crypto)
5823 (propagated-inputs
5824 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
5825 ("python2-backport-ssl-match-hostname"
5826 ,python2-backport-ssl-match-hostname)
88b47cb0 5827 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
5828
5829(define-public python-pyopenssl
5830 (package
5831 (name "python-pyopenssl")
5832 (version "0.15.1")
5833 (source
5834 (origin
5835 (method url-fetch)
5836 (uri (string-append "https://pypi.python.org/packages/source/p/"
5837 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5838 (sha256
5839 (base32
5840 "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
5841 (build-system python-build-system)
5842 (arguments
5843 `(#:phases
5844 (modify-phases %standard-phases
5845 (add-after 'unpack 'fix-tests
5846 (lambda* (#:key inputs #:allow-other-keys)
5847 (substitute* "OpenSSL/test/test_ssl.py"
5848 (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
5849 "return True")
5850 ;; FIXME: disable broken test
5851 (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
5852 (substitute* "OpenSSL/test/test_crypto.py"
5853 (("command = b\"openssl \"")
5854 (string-append "command = b\""
5855 (assoc-ref inputs "openssl")
5856 "/bin/openssl" " \""))
5857 ;; FIXME: disable four broken tests
5858 (("test_der") "disabled__der")
5859 (("test_digest") "disabled__digest")
5860 (("test_get_extension") "disabled__get_extension")
5861 (("test_extension_count") "disabled__extension_count"))
5862 #t)))))
5863 (propagated-inputs
5864 `(("python-cryptography" ,python-cryptography)
5865 ("python-six" ,python-six)))
5866 (inputs
5867 `(("openssl" ,openssl)))
5868 (native-inputs
5869 `(("python-setuptools" ,python-setuptools)))
5870 (home-page "https://github.com/pyca/pyopenssl")
5871 (synopsis "Python wrapper module around the OpenSSL library")
5872 (description
5873 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5874library.")
5875 (license asl2.0)))
5876
5877(define-public python2-pyopenssl
519e2f4f 5878 (package-with-python2 python-pyopenssl))
643725a1
CR
5879
5880(define-public python-pip
5881 (package
5882 (name "python-pip")
6fb54e3b 5883 (version "8.0.2")
643725a1
CR
5884 (source
5885 (origin
5886 (method url-fetch)
6fb54e3b 5887 (uri (pypi-uri "pip" version))
643725a1
CR
5888 (sha256
5889 (base32
6fb54e3b 5890 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1
CR
5891 (build-system python-build-system)
5892 (inputs
5893 `(("python-setuptools" ,python-setuptools)
5894 ("python-virtualenv" ,python-virtualenv)
5895 ;; Tests
5896 ("python-mock" ,python-mock)
5897 ("python-pytest" ,python-pytest)
5898 ("python-scripttest" ,python-scripttest)))
5899 (home-page "https://pip.pypa.io/")
5900 (synopsis
5901 "Package manager for Python software")
5902 (description
5903 "Pip is a package manager for Python software, that finds packages on the
5904Python Package Index (PyPI).")
5905 (license license:expat)))
5906
5907(define-public python2-pip
5908 (package-with-python2 python-pip))
d8c4998f
LC
5909
5910(define-public python-tlsh
5911 (package
5912 (name "python-tlsh")
99b00dc7 5913 (version "3.4.4")
d8c4998f
LC
5914 (home-page "https://github.com/trendmicro/tlsh")
5915 (source (origin
99b00dc7
EF
5916 (method url-fetch)
5917 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
5918 version ".tar.gz"))
d8c4998f
LC
5919 (sha256
5920 (base32
99b00dc7
EF
5921 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
5922 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
5923 (build-system cmake-build-system)
5924 (arguments
5925 '(#:out-of-source? #f
5926 #:phases (modify-phases %standard-phases
5927 (replace
5928 'install
5929 (lambda* (#:key outputs #:allow-other-keys)
5930 ;; Build and install the Python bindings. The underlying
5931 ;; C++ library is apparently not meant to be installed.
5932 (let ((out (assoc-ref outputs "out")))
5933 (with-directory-excursion "py_ext"
5934 (and (system* "python" "setup.py" "build")
5935 (system* "python" "setup.py" "install"
5936 (string-append "--prefix=" out))))))))))
5937 (inputs `(("python" ,python-wrapper))) ;for the bindings
5938 (synopsis "Fuzzy matching library for Python")
5939 (description
5940 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
5941Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
5942value which can be used for similarity comparisons. Similar objects have
5943similar hash values, which allows for the detection of similar objects by
5944comparing their hash values. The byte stream should have a sufficient amount
5945of complexity; for example, a byte stream of identical bytes will not generate
5946a hash value.")
5947 (license asl2.0)))
5948
5949(define-public python2-tlsh
5950 (package
5951 (inherit python-tlsh)
5952 (name "python2-tlsh")
5953 (inputs `(("python" ,python-2)))))
d96034ed
LC
5954
5955(define-public python-libarchive-c
5956 (package
5957 (name "python-libarchive-c")
03fd001c 5958 (version "2.2")
d96034ed
LC
5959 (source (origin
5960 (method url-fetch)
03fd001c 5961 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
5962 (sha256
5963 (base32
03fd001c 5964 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
5965 (build-system python-build-system)
5966 (arguments
5967 '(#:phases (modify-phases %standard-phases
5968 (add-before
5969 'build 'reference-libarchive
5970 (lambda* (#:key inputs #:allow-other-keys)
5971 ;; Retain the absolute file name of libarchive.so.
5972 (let ((libarchive (assoc-ref inputs "libarchive")))
5973 (substitute* "libarchive/ffi.py"
5974 (("find_library\\('archive'\\)")
5975 (string-append "'" libarchive
5976 "/lib/libarchive.so'"))))
5977
5978 ;; Do not make a compressed egg (see
5979 ;; <http://bugs.gnu.org/20765>).
5980 (let ((port (open-file "setup.cfg" "a")))
5981 (display "\n[easy_install]\nzip_ok = 0\n"
5982 port)
5983 (close-port port)
5984 #t))))))
5985 (inputs
5986 `(("python-setuptools" ,python-setuptools)
5987 ("libarchive" ,libarchive)))
5988 (home-page "https://github.com/Changaco/python-libarchive-c")
5989 (synopsis "Python interface to libarchive")
5990 (description
5991 "This package provides Python bindings to libarchive, a C library to
5992access possibly compressed archives in many different formats. It uses
5993Python's @code{ctypes} foreign function interface (FFI).")
5994 (license lgpl2.0+)))
5995
5996(define-public python2-libarchive-c
5997 (package-with-python2 python-libarchive-c))
5e1c9367
LC
5998
5999(define-public python-file
6000 (package
6001 (inherit file)
6002 (name "python-file")
6003 (build-system python-build-system)
6004 (arguments
6005 '(#:tests? #f ;no tests
6006 #:phases (modify-phases %standard-phases
6007 (add-before 'build 'change-directory
6008 (lambda _
6009 (chdir "python")
6010 #t))
6011 (add-before 'build 'set-library-file-name
6012 (lambda* (#:key inputs #:allow-other-keys)
6013 (let ((file (assoc-ref inputs "file")))
6014 (substitute* "magic.py"
6015 (("find_library\\('magic'\\)")
6016 (string-append "'" file "/lib/libmagic.so'")))
6017 #t))))))
6018 (inputs `(("file" ,file)))
6019 (self-native-input? #f)
6020 (synopsis "Python bindings to the libmagic file type guesser")))
6021
6022(define-public python2-file
6023 (package-with-python2 python-file))
85d4aeac
LC
6024
6025(define-public python-debian
6026 (package
6027 (name "python-debian")
6028 (version "0.1.23")
6029 (source
6030 (origin
6031 (method url-fetch)
6032 (uri (string-append
6033 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6034 version ".tar.gz"))
6035 (sha256
6036 (base32
6037 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6038 (build-system python-build-system)
6039 (inputs
6040 `(("python-six" ,python-six)))
6041 (native-inputs
6042 `(("python-setuptools" ,python-setuptools)))
6043 (home-page "http://packages.debian.org/sid/python-debian")
6044 (synopsis "Debian package related modules")
6045 (description
5c7bdc9a
LC
6046 ;; XXX: Use @enumerate instead of @itemize to work around
6047 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6048 "This package provides Python modules that abstract many formats of
6049Debian-related files, such as:
6050
5c7bdc9a 6051@enumerate
85d4aeac
LC
6052@item Debtags information;
6053@item @file{debian/changelog} files;
6054@item packages files, pdiffs;
6055@item control files of single or multiple RFC822-style paragraphs---e.g.
6056 @file{debian/control}, @file{.changes}, @file{.dsc};
6057@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6058 contained files and meta-information.
5c7bdc9a 6059@end enumerate\n")
85d4aeac
LC
6060
6061 ;; Modules are either GPLv2+ or GPLv3+.
6062 (license gpl3+)))
6063
6064(define-public python2-debian
6065 (package-with-python2 python-debian))
816a6538
LC
6066
6067(define-public python-chardet
6068 (package
6069 (name "python-chardet")
6070 (version "2.3.0")
6071 (source
6072 (origin
6073 (method url-fetch)
6074 (uri (string-append
6075 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6076 version
6077 ".tar.gz"))
6078 (sha256
6079 (base32
6080 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6081 (build-system python-build-system)
6082 (native-inputs
6083 `(("python-setuptools" ,python-setuptools)))
6084 (home-page "https://github.com/chardet/chardet")
6085 (synopsis "Universal encoding detector for Python 2 and 3")
6086 (description
6087 "This package provides @code{chardet}, a Python module that can
6088automatically detect a wide range of file encodings.")
6089 (license lgpl2.1+)))
6090
6091(define-public python2-chardet
6092 (package-with-python2 python-chardet))
2fc5f186 6093
1872f1bb
KM
6094(define-public python-docopt
6095 (package
6096 (name "python-docopt")
6097 (version "0.6.2")
6098 (source
6099 (origin
6100 (method url-fetch)
6101 ;; The release on PyPI does not include tests.
6102 (uri (string-append
6103 "https://github.com/docopt/docopt/archive/"
6104 version ".tar.gz"))
6105 (file-name (string-append name "-" version ".tar.gz"))
6106 (sha256
6107 (base32
6108 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6109 (build-system python-build-system)
6110 (native-inputs
6111 `(("python-pytest" ,python-pytest)
6112 ("python-setuptools" ,python-setuptools)))
6113 (arguments
6114 `(#:phases (alist-replace
6115 'check
6116 (lambda _ (zero? (system* "py.test")))
6117 %standard-phases)))
6118 (home-page "http://docopt.org")
6119 (synopsis "Command-line interface description language for Python")
6120 (description "This library allows the user to define a command-line
6121interface from a program's help message rather than specifying it
6122programatically with command-line parsers like @code{getopt} and
6123@code{argparse}.")
6124 (license license:expat)))
6125
6126(define-public python2-docopt
6127 (package-with-python2 python-docopt))
6128
2fc5f186
LF
6129(define-public python-zope-event
6130 (package
6131 (name "python-zope-event")
6132 (version "4.1.0")
6133 (source
6134 (origin
6135 (method url-fetch)
6136 (uri (string-append "https://pypi.python.org/packages/source/z"
6137 "/zope.event/zope.event-" version ".tar.gz"))
6138 (sha256
6139 (base32
6140 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6141 (build-system python-build-system)
6142 (inputs
6143 `(("python-setuptools" ,python-setuptools)))
6144 (home-page "http://pypi.python.org/pypi/zope.event")
6145 (synopsis "Event publishing system for Python")
6146 (description "Zope.event provides an event publishing API, intended for
6147use by applications which are unaware of any subscribers to their events. It
6148is a simple event-dispatching system on which more sophisticated event
6149dispatching systems can be built.")
6150 (license zpl2.1)))
6151
6152(define-public python2-zope-event
6153 (package-with-python2 python-zope-event))
97abe268
LF
6154
6155(define-public python-zope-interface
6156 (package
6157 (name "python-zope-interface")
6158 (version "4.1.3")
6159 (source
6160 (origin
6161 (method url-fetch)
6162 (uri (string-append "https://pypi.python.org/packages/source/z"
6163 "/zope.interface/zope.interface-" version ".tar.gz"))
6164 (sha256
6165 (base32
6166 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6167 (build-system python-build-system)
6168 (propagated-inputs
6169 `(("python-zope-event" ,python-zope-event)))
6170 (home-page "https://github.com/zopefoundation/zope.interface")
6171 (synopsis "Python implementation of the \"design by contract\"
6172methodology")
6173 (description "Zope.interface provides an implementation of \"object
6174interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6175conforming to a given API or contract.")
6176 (license zpl2.1)))
6177
6178(define-public python2-zope-interface
6179 (package-with-python2 python-zope-interface))
81f2373c
LF
6180
6181(define-public python-zope-exceptions
6182 (package
6183 (name "python-zope-exceptions")
6184 (version "4.0.8")
6185 (source
6186 (origin
6187 (method url-fetch)
6188 (uri (string-append "https://pypi.python.org/packages/source/z"
6189 "/zope.exceptions/zope.exceptions-"
6190 version ".tar.gz"))
6191 (sha256
6192 (base32
6193 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6194 (build-system python-build-system)
6195 (arguments
6196 '(#:tests? #f)) ; circular dependency with zope.testrunner
6197 (propagated-inputs
6198 `(("python-zope-interface" ,python-zope-interface)))
6199 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6200 (synopsis "Zope exceptions")
6201 (description "Zope.exceptions provides general-purpose exception types
6202that have uses outside of the Zope framework.")
6203 (license zpl2.1)))
6204
6205(define-public python2-zope-exceptions
6206 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
6207
6208(define-public python-zope-testing
6209 (package
6210 (name "python-zope-testing")
6211 (version "4.5.0")
6212 (source
6213 (origin
6214 (method url-fetch)
6215 (uri (string-append "https://pypi.python.org/packages/source/z"
6216 "/zope.testing/zope.testing-" version ".tar.gz"))
6217 (sha256
6218 (base32
6219 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6220 (build-system python-build-system)
6221 (native-inputs
6222 `(("python-zope-exceptions" ,python-zope-exceptions)))
6223 (propagated-inputs
6224 `(("python-zope-interface" ,python-zope-interface)))
6225 (home-page "http://pypi.python.org/pypi/zope.testing")
6226 (synopsis "Zope testing helpers")
6227 (description "Zope.testing provides a number of testing utilities for HTML
6228forms, HTTP servers, regular expressions, and more.")
6229 (license zpl2.1)))
6230
6231(define-public python2-zope-testing
6232 (package-with-python2 python-zope-testing))
01614c4f
LF
6233
6234(define-public python-zope-testrunner
6235 (package
6236 (name "python-zope-testrunner")
6237 (version "4.4.9")
6238 (source
6239 (origin
6240 (method url-fetch)
6241 (uri (string-append "https://pypi.python.org/packages/source/z"
6242 "/zope.testrunner/zope.testrunner-"
6243 version ".zip"))
6244 (sha256
6245 (base32
6246 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6247 (build-system python-build-system)
6248 (native-inputs
6249 `(("python-six" ,python-six)
6250 ("python-zope-exceptions" ,python-zope-exceptions)
6251 ("python-zope-testing" ,python-zope-testing)
6252 ("unzip" ,unzip)))
6253 (propagated-inputs
6254 `(("python-zope-interface" ,python-zope-interface)))
6255 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6256 (synopsis "Zope testrunner script")
6257 (description "Zope.testrunner provides a script for running Python
6258tests.")
6259 (license zpl2.1)))
6260
6261(define-public python2-zope-testrunner
6262 (let ((base (package-with-python2 python-zope-testrunner)))
6263 (package
6264 (inherit base)
6265 (native-inputs
6266 (append (package-native-inputs base)
6267 `(("python2-subunit" ,python2-subunit)
6268 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
6269
6270(define-public python-zope-i18nmessageid
6271 (package
6272 (name "python-zope-i18nmessageid")
6273 (version "4.0.3")
6274 (source
6275 (origin
6276 (method url-fetch)
6277 (uri (string-append
6278 "https://pypi.python.org/packages/source/z"
6279 "/zope.i18nmessageid/zope.i18nmessageid-"
6280 version ".tar.gz"))
6281 (sha256
6282 (base32
6283 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6284 (build-system python-build-system)
6285 (inputs
6286 `(("python-setuptools" ,python-setuptools)))
6287 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6288 (synopsis "Message identifiers for internationalization")
6289 (description "Zope.i18nmessageid provides facilities for declaring
6290internationalized messages within program source text.")
6291 (license zpl2.1)))
6292
6293(define-public python2-zope-i18nmessageid
6294 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
6295
6296(define-public python-zope-schema
6297 (package
6298 (name "python-zope-schema")
6299 (version "4.4.2")
6300 (source
6301 (origin
6302 (method url-fetch)
6303 (uri (string-append "https://pypi.python.org/packages/source/z"
6304 "/zope.schema/zope.schema-" version ".tar.gz"))
6305 (sha256
6306 (base32
6307 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6308 (build-system python-build-system)
6309 (propagated-inputs
6310 `(("python-zope-event" ,python-zope-event)
6311 ("python-zope-interface" ,python-zope-interface)))
6312 (native-inputs
6313 `(("python-zope-testing" ,python-zope-testing)))
6314 (home-page "http://pypi.python.org/pypi/zope.schema")
6315 (synopsis "Zope data schemas")
6316 (description "Zope.scheme provides extensions to zope.interface for
6317defining data schemas.")
6318 (license zpl2.1)))
6319
6320(define-public python2-zope-schema
6321 (package-with-python2 python-zope-schema))
fbac9b17
LF
6322
6323(define-public python-zope-configuration
6324 (package
6325 (name "python-zope-configuration")
6326 (version "4.0.3")
6327 (source (origin
6328 (method url-fetch)
6329 (uri (string-append "https://pypi.python.org/packages/source/z"
6330 "/zope.configuration/zope.configuration-"
6331 version ".tar.gz"))
6332 (sha256
6333 (base32
6334 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6335 (build-system python-build-system)
6336 (propagated-inputs
6337 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6338 ("python-zope-schema" ,python-zope-schema)))
6339 (home-page "http://pypi.python.org/pypi/zope.configuration")
6340 (synopsis "Zope Configuration Markup Language")
6341 (description "Zope.configuration implements ZCML, the Zope Configuration
6342Markup Language.")
6343 (license zpl2.1)))
6344
6345(define-public python2-zope-configuration
6346 (package-with-python2 python-zope-configuration))
2ad52086
LF
6347
6348(define-public python-zope-proxy
6349 (package
6350 (name "python-zope-proxy")
6351 (version "4.1.6")
6352 (source
6353 (origin
6354 (method url-fetch)
6355 (uri (string-append "https://pypi.python.org/packages/source/z"
6356 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6357 (sha256
6358 (base32
6359 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6360 (build-system python-build-system)
6361 (propagated-inputs
6362 `(("python-zope-interface" ,python-zope-interface)))
6363 (home-page "http://pypi.python.org/pypi/zope.proxy")
6364 (synopsis "Generic, transparent proxies")
6365 (description "Zope.proxy provides generic, transparent proxies for Python.
6366Proxies are special objects which serve as mostly-transparent wrappers around
6367another object, intervening in the apparent behavior of the wrapped object
6368only when necessary to apply the policy (e.g., access checking, location
6369brokering, etc.) for which the proxy is responsible.")
6370 (license zpl2.1)))
6371
6372(define-public python2-zope-proxy
6373 (package-with-python2 python-zope-proxy))
f404b5ea
LF
6374
6375(define-public python-zope-location
6376 (package
6377 (name "python-zope-location")
6378 (version "4.0.3")
6379 (source
6380 (origin
6381 (method url-fetch)
6382 (uri (string-append "https://pypi.python.org/packages/source/z"
6383 "/zope.location/zope.location-" version ".tar.gz"))
6384 (sha256
6385 (base32
6386 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6387 (build-system python-build-system)
6388 (native-inputs
6389 `(("python-zope-proxy" ,python-zope-proxy)
6390 ("python-zope-schema" ,python-zope-schema)))
6391 (home-page "http://pypi.python.org/pypi/zope.location/")
6392 (synopsis "Zope location library")
6393 (description "Zope.location implements the concept of \"locations\" in
6394Zope3, which are are special objects that have a structural location.")
6395 (license zpl2.1)))
6396
6397(define-public python2-zope-location
6398 (package-with-python2 python-zope-location))
d4b77f36
LF
6399
6400(define-public python-zope-security
6401 (package
6402 (name "python-zope-security")
6403 (version "4.0.3")
6404 (source
6405 (origin
6406 (method url-fetch)
6407 (uri (string-append "https://pypi.python.org/packages/source/z"
6408 "/zope.security/zope.security-" version ".tar.gz"))
6409 (sha256
6410 (base32
6411 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6412 (build-system python-build-system)
6413 (propagated-inputs
6414 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6415 ("python-zope-component" ,python-zope-component)
6416 ("python-zope-location" ,python-zope-location)
6417 ("python-zope-proxy" ,python-zope-proxy)
6418 ("python-zope-schema" ,python-zope-schema)
6419 ("python-zope-testrunner" ,python-zope-testrunner)
6420 ("python-zope-testing" ,python-zope-testing)))
6421 (home-page "http://pypi.python.org/pypi/zope.security")
6422 (synopsis "Zope security framework")
6423 (description "Zope.security provides a generic mechanism to implement
6424security policies on Python objects.")
6425 (license zpl2.1)))
6426
6427(define-public python2-zope-security
04417662
EF
6428 (let ((zope-security (package-with-python2 python-zope-security)))
6429 (package (inherit zope-security)
6430 (propagated-inputs
6431 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6432 ,@(alist-delete
6433 "python-zope-testrunner"
6434 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
6435
6436(define-public python-zope-component
6437 (package
6438 (name "python-zope-component")
6439 (version "4.2.2")
6440 (source
6441 (origin
6442 (method url-fetch)
6443 (uri (string-append "https://pypi.python.org/packages/source/z"
6444 "/zope.component/zope.component-" version ".tar.gz"))
6445 (sha256
6446 (base32
6447 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6448 (build-system python-build-system)
6449 (arguments
6450 ;; Skip tests due to circular dependency with python-zope-security.
6451 '(#:tests? #f))
6452 (native-inputs
6453 `(("python-zope-testing" ,python-zope-testing)))
6454 (propagated-inputs
6455 `(("python-zope-event" ,python-zope-event)
6456 ("python-zope-interface" ,python-zope-interface)
6457 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6458 ("python-zope-configuration" ,python-zope-configuration)))
6459 (home-page "https://github.com/zopefoundation/zope.component")
6460 (synopsis "Zope Component Architecture")
6461 (description "Zope.component represents the core of the Zope Component
6462Architecture. Together with the zope.interface package, it provides
6463facilities for defining, registering and looking up components.")
6464 (license zpl2.1)))
6465
6466(define-public python2-zope-component
6467 (package-with-python2 python-zope-component))
3859ac12 6468
b5f218be
LF
6469(define-public python2-pythondialog
6470 (package
6471 (name "python2-pythondialog")
6472 (version "3.3.0")
6473 (source
6474 (origin
6475 (method url-fetch)
6476 (uri (string-append "https://pypi.python.org/packages/source/p/"
6477 "python2-pythondialog/python2-pythondialog-"
6478 version ".tar.gz"))
6479 (sha256
6480 (base32
6481 "1yhkagsh99bfi592ymczf8rnw8rk6n9hdqy3dd98m3yrx8zmjvry"))))
6482 (build-system python-build-system)
6483 (arguments
6484 `(#:phases
6485 (modify-phases %standard-phases
6486 (add-after 'unpack 'patch-path
6487 (lambda* (#:key inputs #:allow-other-keys)
6488 (let* ((dialog (assoc-ref inputs "dialog")))
6489 ;; Since this library really wants to grovel the search path, we
6490 ;; must hardcode dialog's store path into it.
6491 (substitute* "dialog.py"
6492 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6493 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6494 #t))))
6495 #:python ,python-2
6496 #:tests? #f)) ; no test suite
6497 (propagated-inputs
6498 `(("dialog" ,dialog)))
6499 (home-page "http://pythondialog.sourceforge.net/")
6500 (synopsis "Python interface to the UNIX dialog utility")
6501 (description "A Python wrapper for the dialog utility. Its purpose is to
6502provide an easy to use, pythonic and comprehensive Python interface to dialog.
6503This allows one to make simple text-mode user interfaces on Unix-like systems")
6504 (license lgpl2.1)))
6505
3859ac12
LF
6506(define-public python-pyrfc3339
6507 (package
6508 (name "python-pyrfc3339")
d9aa097b 6509 (version "1.0")
3859ac12
LF
6510 (source
6511 (origin
6512 (method url-fetch)
d9aa097b 6513 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
6514 (sha256
6515 (base32
d9aa097b 6516 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
6517 (build-system python-build-system)
6518 (propagated-inputs
6519 `(("python-pytz" ,python-pytz)))
6520 (native-inputs
6521 `(("python-nose" ,python-nose)
6522 ("python-setuptools" ,python-setuptools)))
6523 (home-page "https://github.com/kurtraschke/pyRFC3339")
6524 (synopsis "Python timestamp library")
6525 (description "Python library for generating and parsing RFC 3339-compliant
6526timestamps.")
6527 (license license:expat)))
6528
6529(define-public python2-pyrfc3339
6530 (package-with-python2 python-pyrfc3339))
5eea2005
LF
6531
6532(define-public python-werkzeug
6533 (package
6534 (name "python-werkzeug")
6535 (version "0.11.2")
6536 (source
6537 (origin
6538 (method url-fetch)
6539 (uri (string-append "https://pypi.python.org/packages/source/W/Werkzeug"
6540 "/Werkzeug-" version ".tar.gz"))
6541 (file-name (string-append name "-" version ".tar.gz"))
6542 (sha256
6543 (base32
6544 "1gzwn1lkl90f3l1nzzxr7vjhm21qk8f837i8rvny5a209fcrhkzb"))))
6545 (build-system python-build-system)
6546 (native-inputs
6547 `(("python-pytest" ,python-pytest)))
6548 (home-page "http://werkzeug.pocoo.org/")
6549 (synopsis "Utilities for WSGI applications")
6550 (description "One of the most advanced WSGI utility modules. It includes a
6551powerful debugger, full-featured request and response objects, HTTP utilities to
6552handle entity tags, cache control headers, HTTP dates, cookie handling, file
6553uploads, a powerful URL routing system and a bunch of community-contributed
6554addon modules.")
6555 (license x11)))
6556
6557(define-public python2-werkzeug
6558 (package-with-python2 python-werkzeug))
99fffa8a
LF
6559
6560(define-public python-configobj
6561 (package
6562 (name "python-configobj")
6563 (version "5.0.6")
6564 (source (origin
6565 (method url-fetch)
6566 (uri (string-append
6567 "https://pypi.python.org/packages/source/c/configobj/"
6568 "configobj-" version ".tar.gz"))
6569 (sha256
6570 (base32
6571 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6572 ;; Patch setup.py so it looks for python-setuptools, which is
6573 ;; required to parse the keyword 'install_requires' in setup.py.
6574 (patches (list (search-patch "python-configobj-setuptools.patch")))))
6575 (build-system python-build-system)
6576 (native-inputs
6577 `(("python-setuptools" ,python-setuptools)
6578 ("python-six" ,python-six)))
6579 (synopsis "Config file reading, writing and validation")
6580 (description "ConfigObj is a simple but powerful config file reader and
6581writer: an ini file round tripper. Its main feature is that it is very easy to
6582use, with a straightforward programmer’s interface and a simple syntax for
6583config files.")
6584 (home-page "https://github.com/DiffSK/configobj")
6585 (license bsd-3)))
6586
6587(define-public python2-configobj
6588 (package-with-python2 python-configobj))
79e8a291
LF
6589
6590(define-public python-configargparse
6591 (package
6592 (name "python-configargparse")
6593 (version "0.10.0")
6594 (source (origin
6595 (method url-fetch)
6596 (uri (string-append
6597 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6598 "ConfigArgParse-" version ".tar.gz"))
6599 (sha256
6600 (base32
6601 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6602 (build-system python-build-system)
6603 (arguments
6604 ;; FIXME: Bug in test suite filed upstream:
6605 ;; https://github.com/bw2/ConfigArgParse/issues/32
6606 '(#:tests? #f))
6607 (synopsis "Replacement for argparse")
6608 (description "A drop-in replacement for argparse that allows options to also
6609be set via config files and/or environment variables.")
6610 (home-page "https://github.com/bw2/ConfigArgParse")
6611 (license license:expat)))
6612
6613(define-public python2-configargparse
6614 (package-with-python2 python-configargparse))
ab41f979
LF
6615
6616(define-public python-ndg-httpsclient
6617 (package
6618 (name "python-ndg-httpsclient")
6619 (version "0.4.0")
6620 (source (origin
6621 (method url-fetch)
6622 (uri (string-append
6623 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6624 "ndg_httpsclient-" version ".tar.gz"))
6625 (sha256
6626 (base32
6627 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6628 (build-system python-build-system)
6629 (propagated-inputs
6630 `(("python-pyopenssl" ,python-pyopenssl)))
6631 (synopsis "HTTPS support for Python's httplib and urllib2")
6632 (description "This is a HTTPS client implementation for httplib and urllib2
6633based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6634over the default provided with Python and importantly enables full verification
6635of the SSL peer.")
6636 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6637 (license bsd-3)))
6638
6639;; python2-openssl requires special care, so package-with-python2 is
6640;; insufficient.
6641(define-public python2-ndg-httpsclient
6642 (package (inherit python-ndg-httpsclient)
6643 (name "python2-ndg-httpsclient")
6644 (arguments `(#:python ,python-2))
6645 (propagated-inputs
6646 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
6647
6648(define-public python-contextlib2
6649 (package
6650 (name "python-contextlib2")
6651 (version "0.4.0")
6652 (source
6653 (origin
6654 (method url-fetch)
6655 (uri (pypi-uri "contextlib2" version))
6656 (sha256
6657 (base32
6658 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6659 (build-system python-build-system)
6660 (arguments
6661 `(#:phases
6662 (modify-phases %standard-phases
6663 (replace 'check
6664 (lambda _ (zero?
6665 (system*
6666 "python" "test_contextlib2.py", "-v")))))))
6667 (home-page "http://contextlib2.readthedocs.org/")
6668 (synopsis "Tools for decorators and context managers")
6669 (description "This module is primarily a backport of the Python
66703.2 contextlib to earlier Python versions. Like contextlib, it
6671provides utilities for common tasks involving decorators and context
6672managers. It also contains additional features that are not part of
6673the standard library.")
6674 (license psfl)))
6675
6676(define-public python2-contextlib2
6677 (package-with-python2 python-contextlib2))
210bf497
DT
6678
6679(define-public python-texttable
6680 (package
6681 (name "python-texttable")
6682 (version "0.8.4")
6683 (source
6684 (origin
6685 (method url-fetch)
6686 (uri (pypi-uri "texttable" version))
6687 (sha256
6688 (base32
6689 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
6690 (build-system python-build-system)
6691 (arguments '(#:tests? #f)) ; no tests
6692 (home-page "https://github.com/foutaise/texttable/")
6693 (synopsis "Python module for creating simple ASCII tables")
6694 (description "Texttable is a Python module for creating simple ASCII
6695tables.")
6696 (license lgpl2.1+)))
6697
6698(define-public python2-texttable
6699 (package-with-python2 python-texttable))
67c52bb3
DT
6700
6701(define-public python-websocket-client
6702 (package
6703 (name "python-websocket-client")
6704 (version "0.34.0")
6705 (source
6706 (origin
6707 (method url-fetch)
6708 (uri (string-append "https://pypi.python.org/packages/source/w"
6709 "/websocket-client/websocket_client-"
6710 version ".tar.gz"))
6711 (sha256
6712 (base32
6713 "1prdx6d49f1cff17kzj15bnz09palfdgc1m5dkq9jd4mr90n4ak8"))))
6714 (build-system python-build-system)
6715 (native-inputs
6716 `(("python-six" ,python-six))) ; for tests
6717 (inputs
6718 `(("python-setuptools" ,python-setuptools)))
6719 (home-page "https://github.com/liris/websocket-client")
6720 (synopsis "WebSocket client for Python")
6721 (description "The Websocket-client module provides the low level APIs for
6722WebSocket usage in Python programs.")
6723 (license lgpl2.1+)))
6724
6725(define-public python2-websocket-client
6726 (package-with-python2 python-websocket-client))
5c6eea2a
LF
6727
6728(define-public python-atomicwrites
6729 (package
6730 (name "python-atomicwrites")
6731 (version "0.1.8")
6732 (source (origin
6733 (method url-fetch)
6734 (uri (pypi-uri "atomicwrites" version))
6735 (sha256
6736 (base32
6737 "13nwk0gw0yb61pnf5vxs3fvhav6q3zrf08x9ggc93bnk5fsssx1j"))))
6738 (build-system python-build-system)
6739 (synopsis "Atomic file writes in Python")
6740 (description "Library for atomic file writes using platform dependent tools
6741for atomic filesystem operations.")
6742 (home-page "https://github.com/untitaker/python-atomicwrites")
6743 (license license:expat)))
561bb3cb
LF
6744
6745(define-public python-requests-toolbelt
6746 (package
6747 (name "python-requests-toolbelt")
6748 (version "0.5.0")
6749 (source (origin
6750 (method url-fetch)
6751 (uri (pypi-uri "requests-toolbelt" version))
6752 (sha256
6753 (base32
6754 "1kbms1s52dhb98vbpaprr15b0ijdbqp500lpfsyjccpd8cjkyngk"))))
6755 (build-system python-build-system)
6756 (propagated-inputs
6757 `(("python-requests" ,python-requests)))
6758 (synopsis "Extensions to python-requests")
6759 (description "This is a toolbelt of useful classes and functions to be used
6760with python-requests.")
6761 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
6762 (license asl2.0)))
d1deb90b
LF
6763
6764(define-public python-click-threading
6765 (package
6766 (name "python-click-threading")
6767 (version "0.1.2")
6768 (source (origin
6769 (method url-fetch)
6770 (uri (pypi-uri "click-threading" version))
6771 (sha256
6772 (base32
6773 "0jmrv4334lfxa2ss53c06dafdwqbk1pb3ihd26izn5igw1bm8145"))))
6774 (build-system python-build-system)
6775 (propagated-inputs
6776 `(("python-click" ,python-click)))
6777 (synopsis "Utilities for multithreading in Click")
6778 (description "This package provides utilities for multithreading in Click
6779applications.")
6780 (home-page "https://github.com/click-contrib/click-threading")
6781 (license license:expat)))
7b17cab9
LF
6782
6783(define-public python-click-log
6784 (package
6785 (name "python-click-log")
6786 (version "0.1.1")
6787 (source (origin
6788 (method url-fetch)
6789 (uri (pypi-uri "click-log" version))
6790 (sha256
6791 (base32
6792 "1z3jdwjmwax159zrnyx830xa968rfqrpkm04ad5xqyh0269ydiqb"))))
6793 (build-system python-build-system)
6794 (propagated-inputs
6795 `(("python-click" ,python-click)))
6796 (synopsis "Logging for click applications")
6797 (description "This package provides a Python library for logging Click
6798applications.")
6799 (home-page "https://github.com/click-contrib/click-log")
6800 (license license:expat)))
7b3a4ee4
LF
6801
6802(define-public python-apipkg
6803 (package
6804 (name "python-apipkg")
6805 (version "1.4")
6806 (source (origin
6807 (method url-fetch)
6808 (uri (pypi-uri "apipkg" version))
6809 (sha256
6810 (base32
6811 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
6812 (build-system python-build-system)
6813 (native-inputs
6814 `(("unzip" ,unzip)))
6815 (propagated-inputs
6816 `(("python-pytest" ,python-pytest)))
6817 (synopsis "Namespace control and lazy-import mechanism")
6818 (description "With apipkg you can control the exported namespace of a Python
6819package and greatly reduce the number of imports for your users. It is a small
6820pure Python module that works on virtually all Python versions.")
6821 (home-page "https://bitbucket.org/hpk42/apipkg")
6822 (license license:expat)))
848964fe
LF
6823
6824(define-public python-execnet
6825 (package
6826 (name "python-execnet")
6827 (version "1.4.1")
6828 (source (origin
6829 (method url-fetch)
6830 (uri (pypi-uri "execnet" version))
6831 (sha256
6832 (base32
6833 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
6834 (build-system python-build-system)
6835 (native-inputs
6836 `(("python-setuptools-scm" ,python-setuptools-scm)))
6837 (propagated-inputs
6838 `(("python-apipkg" ,python-apipkg)))
6839 (synopsis "Rapid multi-Python deployment")
6840 (description "Execnet provides a share-nothing model with
6841channel-send/receive communication for distributing execution across many
6842Python interpreters across version, platform and network barriers. It has a
6843minimal and fast API targetting the following uses:
6844@enumerate
6845@item distribute tasks to (many) local or remote CPUs
6846@item write and deploy hybrid multi-process applications
6847@item write scripts to administer multiple environments
6848@end enumerate")
6849 (home-page "http://codespeak.net/execnet/")
6850 (license license:expat)))
6720dbb4
LF
6851
6852;;; The software provided by this package was integrated into pytest 2.8.
6853(define-public python-pytest-cache
6854 (package
6855 (name "python-pytest-cache")
6856 (version "1.0")
6857 (source (origin
6858 (method url-fetch)
6859 (uri (pypi-uri "pytest-cache" version))
6860 (sha256
6861 (base32
6862 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
6863 (build-system python-build-system)
6864 (propagated-inputs
6865 `(("python-execnet" ,python-execnet)))
6866 (synopsis "Py.test plugin with mechanisms for caching across test runs")
6867 (description "The pytest-cache plugin provides tools to rerun failures from
6868the last py.test invocation.")
6869 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
6870 (license license:expat)))
d7e729fe
LF
6871
6872(define-public python-pytest-localserver
6873 (package
6874 (name "python-pytest-localserver")
6875 (version "0.3.4")
6876 (source (origin
6877 (method url-fetch)
6878 (uri (pypi-uri "pytest-localserver" version ".zip"))
6879 (sha256
6880 (base32
6881 "050q505a7gnsz7vqidw0w5dvxjb2flzi7z734agpjzmsl85c2bcx"))))
6882 (build-system python-build-system)
6883 (arguments
6884 `(#:phases (modify-phases %standard-phases
6885 (replace 'check
6886 (lambda _
6887 (zero? (system* "py.test" "--genscript=runtests.py"))
6888 (zero? (system* "py.test")))))))
6889 (native-inputs
6890 `(("unzip" ,unzip)))
6891 (propagated-inputs
6892 `(("python-pytest" ,python-pytest)
6893 ("python-requests" ,python-requests)
6894 ("python-six" ,python-six)
6895 ("python-werkzeug" ,python-werkzeug)))
6896 (synopsis "Py.test plugin to test server connections locally")
6897 (description "Pytest-localserver is a plugin for the pytest testing
6898framework which enables you to test server connections locally.")
6899 (home-page "https://pypi.python.org/pypi/pytest-localserver")
6900 (license license:expat)))
28cecbb7
LF
6901
6902(define-public python-wsgi-intercept
6903 (package
6904 (name "python-wsgi-intercept")
6905 (version "0.10.3")
6906 (source (origin
6907 (method url-fetch)
6908 (uri (pypi-uri "wsgi_intercept" version))
6909 (sha256
6910 (base32
6911 "0xyfchacywb1mql84270mcidsqc5ssyspd18yacjk82x2xc68h0r"))))
6912 (build-system python-build-system)
6913 (native-inputs
6914 `(("python-pytest" ,python-pytest)))
6915 (propagated-inputs
6916 `(("python-httplib2" ,python-httplib2)
6917 ("python-requests" ,python-requests)))
6918 (synopsis "Puts a WSGI application in place of a real URI for testing")
6919 (description "Wsgi_intercept installs a WSGI application in place of a real
6920URI for testing. Testing a WSGI application normally involves starting a
6921server at a local host and port, then pointing your test code to that address.
6922Instead, this library lets you intercept calls to any specific host/port
6923combination and redirect them into a WSGI application importable by your test
6924program. Thus, you can avoid spawning multiple processes or threads to test
6925your Web app.")
6926 (home-page "https://github.com/cdent/wsgi-intercept")
6927 (license license:expat)))
89b8a551
LF
6928
6929(define-public python-pytest-xprocess
6930 (package
6931 (name "python-pytest-xprocess")
6932 (version "0.9.1")
6933 (source (origin
6934 (method url-fetch)
6935 (uri (pypi-uri "pytest-xprocess" version))
6936 (sha256
6937 (base32
6938 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
6939 (build-system python-build-system)
6940 (propagated-inputs
6941 `(("python-pytest" ,python-pytest)
6942 ("python-pytest-cache" ,python-pytest-cache)
6943 ("python-psutil" ,python-psutil)))
6944 (synopsis "Pytest plugin to manage external processes across test runs")
6945 (description "Pytest-xprocess is an experimental py.test plugin for managing
6946processes across test runs.")
6947 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
6948 (license license:expat)))
5c299bf0
LF
6949
6950(define-public python-icalendar
6951 (package
6952 (name "python-icalendar")
6953 (version "3.9.1")
6954 (source (origin
6955 (method url-fetch)
6956 (uri (pypi-uri "icalendar" version))
6957 (sha256
6958 (base32
6959 "0fhrczdj3jxy5bvswphp3vys7vwv5c9bpwg7asykqwa3z6253q6q"))))
6960 (build-system python-build-system)
6961 (propagated-inputs
6962 `(("python-dateutil-2" ,python-dateutil-2)
6963 ("python-pytz" ,python-pytz)))
6964 (synopsis "Python library for parsing iCalendar files")
6965 (description "The icalendar package is a parser/generator of iCalendar
6966files for use with Python.")
6967 (home-page "https://github.com/collective/icalendar")
6968 (license bsd-2)))
6bbbb53e
LF
6969
6970(define-public python-sphinxcontrib-newsfeed
6971 (package
6972 (name "python-sphinxcontrib-newsfeed")
6973 (version "0.1.4")
6974 (source (origin
6975 (method url-fetch)
6976 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
6977 (sha256
6978 (base32
6979 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
6980 (build-system python-build-system)
6981 (propagated-inputs
6982 `(("python-docutils" ,python-docutils)
6983 ("python-sphinx" ,python-sphinx)))
6984 (synopsis "News Feed extension for Sphinx")
6985 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
6986Blog, News or Announcements section to a Sphinx website.")
6987 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
6988 (license bsd-2)))
2216e15c
SB
6989
6990(define-public python-args
6991 (package
6992 (name "python-args")
6993 (version "0.1.0")
6994 (source (origin
6995 (method url-fetch)
6996 (uri (pypi-uri "args" version))
6997 (sha256
6998 (base32
6999 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7000 (build-system python-build-system)
7001 (inputs
7002 `(("python-setuptools" ,python-setuptools)))
7003 (home-page "https://github.com/kennethreitz/args")
7004 (synopsis "Command-line argument parser")
7005 (description
7006 "This library provides a Python module to parse command-line arguments.")
7007 (license bsd-3)))
7008
7009(define-public python2-args
7010 (package-with-python2 python-args))
c06a3de9
SB
7011
7012(define-public python-clint
7013 (package
7014 (name "python-clint")
7015 (version "0.5.1")
7016 (source (origin
7017 (method url-fetch)
7018 (uri (pypi-uri "clint" version))
7019 (sha256
7020 (base32
7021 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7022 (build-system python-build-system)
7023 (inputs
7024 `(("python-args" ,python-args)
7025 ("python-setuptools" ,python-setuptools)))
7026 (home-page "https://github.com/kennethreitz/clint")
7027 (synopsis "Command-line interface tools")
7028 (description
7029 "Clint is a Python module filled with a set of tools for developing
7030command-line applications, including tools for colored and indented
7031output, progress bar display, and pipes.")
7032 (license isc)))
7033
7034(define-public python2-clint
7035 (package-with-python2 python-clint))
4ecdeef8
SB
7036
7037(define-public python-astor
7038 (package
7039 (name "python-astor")
7040 (version "0.5")
7041 (source (origin
7042 (method url-fetch)
7043 (uri (pypi-uri "astor" version))
7044 (sha256
7045 (base32
7046 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7047 (build-system python-build-system)
7048 (inputs
7049 `(("python-setuptools" ,python-setuptools)))
7050 (home-page "https://github.com/berkerpeksag/astor")
7051 (synopsis "Read and write Python ASTs")
7052 (description
7053 "Astor is designed to allow easy manipulation of Python source via the
7054Abstract Syntax Tree.")
7055 (license bsd-3)))
7056
7057(define-public python2-astor
7058 (package-with-python2 python-astor))
e224b7d0
SB
7059
7060(define-public python-rply
7061 (package
7062 (name "python-rply")
7063 (version "0.7.4")
7064 (source (origin
7065 (method url-fetch)
7066 (uri (pypi-uri "rply" version))
7067 (sha256
7068 (base32
7069 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7070 (build-system python-build-system)
7071 (inputs
7072 `(("python-appdirs" ,python-appdirs)
7073 ("python-setuptools" ,python-setuptools)))
7074 (home-page "https://github.com/alex/rply")
7075 (synopsis "Parser generator for Python")
7076 (description
7077 "This package provides a pure Python based parser generator, that also
7078works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7079with a new public API, and RPython support.")
7080 (license bsd-3)))
7081
7082(define-public python2-rply
7083 (package-with-python2 python-rply))
c3e919d7
SB
7084
7085(define-public python-hy
7086 (package
7087 (name "python-hy")
7088 (version "0.11.1")
7089 (source (origin
7090 (method url-fetch)
7091 (uri (pypi-uri "hy" version))
7092 (sha256
7093 (base32
7094 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7095 (build-system python-build-system)
7096 (inputs
7097 `(("python-astor" ,python-astor)
7098 ("python-clint" ,python-clint)
7099 ("python-rply" ,python-rply)
7100 ("python-setuptools" ,python-setuptools)))
7101 (home-page "http://hylang.org/")
7102 (synopsis "Lisp frontend to Python")
7103 (description
7104 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7105its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7106Python at your fingertips, in Lisp form.")
7107 (license license:expat)))
7108
7109(define-public python2-hy
7110 (package-with-python2 python-hy))
7a5b944e 7111
81f7f297
EF
7112(define-public python-rauth
7113 (package
7114 (name "python-rauth")
7115 (version "0.7.2")
7116 (source
7117 (origin
7118 (method url-fetch)
7119 (uri (pypi-uri "rauth" version))
7120 (sha256
7121 (base32
7122 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7123 (build-system python-build-system)
7124 (arguments
7125 `(#:test-target "check"))
7126 (native-inputs
7127 `(("python-setuptools" ,python-setuptools)))
7128 (propagated-inputs
7129 `(("python-requests" ,python-requests)))
7130 (home-page "https://github.com/litl/rauth")
7131 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7132 (description
7133 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7134provides service wrappers for convenient connection initialization and
7135authenticated session objects providing things like keep-alive.")
7136 (license license:expat)))
7137
7138(define-public python2-rauth
7139 (let ((rauth (package-with-python2 python-rauth)))
7140 (package (inherit rauth)
264ae686 7141 (propagated-inputs `(("python2-requests" ,python2-requests)))
81f7f297
EF
7142 (native-inputs
7143 `(("python2-unittest2", python2-unittest2)
7144 ,@(package-native-inputs rauth))))))
7145
1abe448d
EF
7146(define-public python2-functools32
7147 (package
7148 (name "python2-functools32")
7149 (version "3.2.3-2")
7150 (source
7151 (origin
7152 (method url-fetch)
7153 (uri (pypi-uri "functools32" version))
7154 (sha256
7155 (base32
7156 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7157 (build-system python-build-system)
7158 (arguments
7159 `(#:python ,python-2
7160 #:tests? #f)) ; no test target
7161 (native-inputs
7162 `(("python2-setuptools" ,python2-setuptools)))
7163 (home-page "https://github.com/MiCHiLU/python-functools32")
7164 (synopsis
7165 "Backport of the functools module from Python 3.2.3")
7166 (description
7167 "This package is a backport of the @code{functools} module from Python
71683.2.3 for use with older versions of Python and PyPy.")
7169 (license license:expat)))
7170
7a5b944e
EF
7171(define-public python-futures
7172 (package
7173 (name "python-futures")
7174 (version "3.0.3")
7175 (source
7176 (origin
7177 (method url-fetch)
7178 (uri (pypi-uri "futures" version))
7179 (sha256
7180 (base32
7181 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7182 (build-system python-build-system)
7183 (native-inputs
7184 `(("python-setuptools" ,python-setuptools)))
7185 (home-page "https://github.com/agronholm/pythonfutures")
7186 (synopsis
7187 "Backport of the concurrent.futures package from Python 3.2")
7188 (description
7189 "The concurrent.futures module provides a high-level interface for
7190asynchronously executing callables. This package backports the
7191concurrent.futures package from Python 3.2")
7192 (license bsd-3)))
7193
7194(define-public python2-futures
7195 (package-with-python2 python-futures))
c18f6368
EF
7196
7197(define-public python-urllib3
7198 (package
7199 (name "python-urllib3")
7200 (version "1.13.1")
7201 (source
7202 (origin
7203 (method url-fetch)
7204 (uri (pypi-uri "urllib3" version))
7205 (sha256
7206 (base32
7207 "10rrbr6c6k7j5dvfsyj4b2gsgxg9gggnn708qixf6ll57xqivfkf"))))
7208 (build-system python-build-system)
7209 (arguments `(#:tests? #f))
7210 (native-inputs
7211 `(("python-setuptools" ,python-setuptools)
7212 ;; some packages for tests
7213 ("python-nose" ,python-nose)
7214 ("python-mock" ,python-mock)
7215 ("python-tornado" ,python-tornado)))
7216 (propagated-inputs
7217 `(;; packages for https security
7218 ("python-certifi" ,python-certifi)
7219 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7220 ("python-pyasn1" ,python-pyasn1)
7221 ("python-pyopenssl" ,python-pyopenssl)))
7222 (home-page "http://urllib3.readthedocs.org/")
7223 (synopsis "HTTP library with thread-safe connection pooling")
7224 (description
7225 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7226can reuse the same socket connection for multiple requests, it can POST files,
7227supports url redirection and retries, and also gzip and deflate decoding.")
7228 (license license:expat)))
7229
7230(define-public python2-urllib3
7231 (package-with-python2 python-urllib3))
2b2f2fc1
DT
7232
7233(define-public python-colorama
7234 (package
7235 (name "python-colorama")
7236 (version "0.3.3")
7237 (source
7238 (origin
7239 (method url-fetch)
7240 (uri (pypi-uri "colorama" version))
7241 (sha256
7242 (base32
7243 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7244 (build-system python-build-system)
7245 (inputs
7246 `(("python-setuptools" ,python-setuptools)))
7247 (synopsis "colored terminal text rendering for Python")
7248 (description "Colorama is a Python library for rendering colored terminal
7249text.")
7250 (home-page "https://pypi.python.org/pypi/colorama")
7251 (license bsd-3)))
7252
7253(define-public python2-colorama
7254 (package-with-python2 python-colorama))
f5bcec6e
DT
7255
7256(define-public python-rsa
7257 (package
7258 (name "python-rsa")
7259 (version "3.2")
7260 (source
7261 (origin
7262 (method url-fetch)
7263 (uri (pypi-uri "rsa" version))
7264 (sha256
7265 (base32
7266 "0xwp929g7lvb1sghxfpqlxvgg96qcwqdbhh27sjplx30n3xp3wrh"))))
7267 (build-system python-build-system)
7268 (inputs
7269 `(("python-pyasn1" ,python-pyasn1)
7270 ("python-setuptools" ,python-setuptools)))
7271 (synopsis "Pure-Python RSA implementation")
7272 (description "Python-RSA is a pure-Python RSA implementation. It supports
7273encryption and decryption, signing and verifying signatures, and key
7274generation according to PKCS#1 version 1.5. It can be used as a Python
7275library as well as on the command line.")
7276 (home-page "http://stuvel.eu/rsa")
7277 (license asl2.0)))
7278
7279(define-public python2-rsa
7280 (package-with-python2 python-rsa))
c0aacfa5
DT
7281
7282(define-public python-pluggy
7283 (package
7284 (name "python-pluggy")
7285 (version "0.3.1")
7286 (source
7287 (origin
7288 (method url-fetch)
7289 (uri (pypi-uri "pluggy" version))
7290 (sha256
7291 (base32
7292 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7293 (build-system python-build-system)
7294 (inputs
7295 `(("python-setuptools" ,python-setuptools)))
7296 (synopsis "Plugin and hook calling mechanism for Python")
7297 (description "Pluggy is an extraction of the plugin manager as used by
7298Pytest but stripped of Pytest specific details.")
7299 (home-page "https://pypi.python.org/pypi/pluggy")
7300 (license license:expat)))
7301
7302(define-public python2-pluggy
7303 (package-with-python2 python-pluggy))
a4af21ca
DT
7304
7305(define-public python-tox
7306 (package
7307 (name "python-tox")
7308 (version "2.3.1")
7309 (source
7310 (origin
7311 (method url-fetch)
7312 (uri (pypi-uri "tox" version))
7313 (sha256
7314 (base32
7315 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7316 (build-system python-build-system)
7317 (arguments
7318 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7319 ;; pytest breaks other packages.
7320 '(#:tests? #f))
7321 (inputs
7322 `(("python-setuptools" ,python-setuptools)
7323 ("python-pluggy" ,python-pluggy)
7324 ("python-py" ,python-py)
7325 ("python-virtualenv" ,python-virtualenv)
7326 ("python-pytest" ,python-pytest)))
7327 (home-page "http://tox.testrun.org/")
7328 (synopsis "Virtualenv-based automation of test activities")
7329 (description "Tox is a generic virtualenv management and test command line
7330tool. It can be used to check that a package installs correctly with
7331different Python versions and interpreters, or run tests in each type of
7332supported environment, or act as a frontend to continuous integration
7333servers.")
7334 (license license:expat)))
7335
7336(define-public python2-tox
7337 (package-with-python2 python-tox))
ba9da248
DT
7338
7339(define-public python-jmespath
7340 (package
7341 (name "python-jmespath")
7342 (version "0.9.0")
7343 (source
7344 (origin
7345 (method url-fetch)
7346 (uri (pypi-uri "jmespath" version))
7347 (sha256
7348 (base32
7349 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7350 (build-system python-build-system)
7351 (inputs
7352 `(("python-setuptools" ,python-setuptools)))
7353 (synopsis "JSON Matching Expressions")
7354 (description "JMESPath (pronounced “james path”) is a Python library that
7355allows one to declaratively specify how to extract elements from a JSON
7356document.")
7357 (home-page "https://github.com/jmespath/jmespath.py")
7358 (license license:expat)))
7359
7360(define-public python2-jmespath
7361 (package-with-python2 python-jmespath))
935fcd5c
DT
7362
7363(define-public python-botocore
7364 (package
7365 (name "python-botocore")
7366 (version "1.3.17")
7367 (source
7368 (origin
7369 (method url-fetch)
7370 (uri (pypi-uri "botocore" version))
7371 (sha256
7372 (base32
7373 "08vpvdixx1c1lfv6vzjig68bpiir7wfyhzf49ysxgvhbprg5ra0w"))))
7374 (build-system python-build-system)
7375 (inputs
7376 `(("python-dateutil" ,python-dateutil-2)
7377 ("python-docutils" ,python-docutils)
7378 ("python-mock" ,python-mock)
7379 ("python-nose" ,python-nose)
7380 ("python-setuptools" ,python-setuptools)
7381 ("python-tox" ,python-tox)
7382 ("python-wheel" ,python-wheel)
7383 ("python-jmespath" ,python-jmespath)))
7384 (home-page "https://github.com/boto/botocore")
7385 (synopsis "Low-level interface to AWS")
7386 (description "Botocore is a Python library that provides a low-level
7387interface to the Amazon Web Services (AWS) API.")
7388 (license asl2.0)))
7389
7390(define-public python2-botocore
7391 (package-with-python2 python-botocore))
f861b8b8
DT
7392
7393(define-public awscli
7394 (package
7395 (name "awscli")
7396 (version "1.9.17")
7397 (source
7398 (origin
7399 (method url-fetch)
7400 (uri (string-append
7401 "https://pypi.python.org/packages/source/a/awscli/awscli-"
7402 version ".tar.gz"))
7403 (sha256
7404 (base32
7405 "1nj7jqvlpq57hfhby1njsbf8303gapa3njc4dramr6p3ffzvfi2i"))))
7406 (build-system python-build-system)
7407 (inputs
7408 `(("python-colorama" ,python-colorama)
7409 ("python-docutils" ,python-docutils)
7410 ("python-mock" ,python-mock)
7411 ("python-nose" ,python-nose)
7412 ("python-rsa" ,python-rsa)
7413 ("python-setuptools" ,python-setuptools)
7414 ("python-sphinx" ,python-sphinx)
7415 ("python-tox" ,python-tox)
7416 ("python-wheel" ,python-wheel)
7417 ("python-botocore" ,python-botocore)))
7418 (home-page "http://aws.amazon.com/cli/")
7419 (synopsis "Command line client for AWS")
7420 (description "AWS CLI provides a unified command line interface to the
7421Amazon Web Services (AWS) API.")
7422 (license asl2.0)))
6a44697d
LF
7423
7424(define-public python-hypothesis
7425 (package
7426 (name "python-hypothesis")
7427 (version "2.0.0")
7428 (source (origin
7429 (method url-fetch)
7430 (uri (pypi-uri "hypothesis" version))
7431 (sha256
7432 (base32
7433 "1la6mfpvcn640gs2v35iv8b4sh6xdhp9j5ghay0jd86c9n4fkgxr"))))
7434 (build-system python-build-system)
7435 (native-inputs
7436 `(;; setuptools required for python-2 variant
7437 ("python-setuptools" ,python-setuptools)))
7438 (propagated-inputs
7439 `(("python-flake8" ,python-flake8)
7440 ("python-pytest" ,python-pytest)))
7441 (synopsis "Library for property based testing")
7442 (description "Hypothesis is a library for testing your Python code against a
7443much larger range of examples than you would ever want to write by hand. It’s
7444based on the Haskell library, Quickcheck, and is designed to integrate
7445seamlessly into your existing Python unit testing work flow.")
7446 (home-page "https://github.com/DRMacIver/hypothesis")
7447 (license mpl2.0)))
7448
7449(define-public python2-hypothesis
7450 (package-with-python2 python-hypothesis))
7517e73c
LF
7451
7452(define-public python-pytest-subtesthack
7453 (package
7454 (name "python-pytest-subtesthack")
7455 (version "0.1.1")
7456 (source (origin
7457 (method url-fetch)
7458 (uri (pypi-uri "pytest-subtesthack" version))
7459 (sha256
7460 (base32
7461 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
7462 (build-system python-build-system)
7463 (native-inputs
7464 `(;; setuptools required for python-2 variant
7465 ("python-setuptools" ,python-setuptools)))
7466 (propagated-inputs
7467 `(("python-pytest" ,python-pytest)))
7468 (synopsis "Set-up and tear-down fixtures for unit tests")
7469 (description "This plugin allows you to set up and tear down fixtures within
7470unit test functions that use @code{py.test}. This is useful for using
7471@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
7472function multiple times, without setting up or tearing down fixture state as is
7473normally the case.")
7474 (home-page "https://github.com/untitaker/pytest-subtesthack/")
7475 (license unlicense)))
7476
7477(define-public python2-pytest-subtesthack
7478 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
7479
7480(define-public python2-xdo
7481 (package
7482 (name "python2-xdo")
7483 (version "0.2")
7484 (source (origin
7485 (method url-fetch)
7486 (uri (string-append
7487 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7488 "python-xdo_" version ".orig.tar.gz"))
7489 (sha256
7490 (base32
7491 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
7492 (build-system python-build-system)
7493 (arguments
7494 `(#:python ,python-2
7495 #:tests? #f)) ; no tests provided
7496 (inputs
7497 `(("xdotool" ,xdotool)
7498 ("libX11" ,libx11)))
7499 (home-page "https://tracker.debian.org/pkg/python-xdo")
7500 (synopsis "Python library for simulating X11 keyboard/mouse input")
7501 (description "Provides bindings to libxdo for manipulating X11 via simulated
7502input. (Note that this is mostly a legacy library; you may wish to look at
7503python-xdo for newer bindings.)")
7504 (license bsd-3)))
7505
cb34dc6c
CAW
7506(define-public python-wtforms
7507 (package
7508 (name "python-wtforms")
7509 (version "2.1")
7510 (source
7511 (origin
7512 (method url-fetch)
7513 (uri (pypi-uri "WTForms" version ".zip"))
7514 (sha256
7515 (base32
7516 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
7517 (build-system python-build-system)
7518 (native-inputs
7519 `(("unzip" ,unzip)))
7520 (home-page "http://wtforms.simplecodes.com/")
7521 (synopsis
7522 "Form validation and rendering library for Python web development")
7523 (description
7524 "WTForms is a flexible forms validation and rendering library
7525for Python web development. It is very similar to the web form API
7526available in Django, but is a standalone package.")
7527 (license bsd-3)
7528 (properties `((python2-variant . ,(delay python2-wtforms))))))
7529
7530(define-public python2-wtforms
7531 (package
7532 (inherit (package-with-python2
7533 (strip-python2-variant python-wtforms)))
7534 (inputs `(("python2-setuptools" ,python2-setuptools)))))