gnu: python: Build the tkinter module.
[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>
da6dd842 3;;; Copyright © 2013, 2014, 2015 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>
f4de5b3b 11;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
89b2e0b0 13;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
a01b6da7
NK
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
1ffa7090 30(define-module (gnu packages python)
011b18c3 31 #:use-module ((guix licenses)
45203542 32 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
b8050e71 33 gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
feb0d9c3 34 isc psfl public-domain x11-style))
bd3fa666 35 #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
3fdc99da 36 #:use-module (gnu packages)
89b2e0b0 37 #:use-module (gnu packages attr)
1ffa7090 38 #:use-module (gnu packages compression)
4ed20663 39 #:use-module (gnu packages databases)
4ed20663 40 #:use-module (gnu packages fontutils)
3fdc99da 41 #:use-module (gnu packages gdbm)
4ed20663
AE
42 #:use-module (gnu packages gcc)
43 #:use-module (gnu packages ghostscript)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gtk)
421a80a2 46 #:use-module (gnu packages icu4c)
c937562e 47 #:use-module (gnu packages image)
4ed20663 48 #:use-module (gnu packages imagemagick)
b10ab723 49 #:use-module (gnu packages libffi)
89b2e0b0 50 #:use-module (gnu packages linux)
0da98533 51 #:use-module (gnu packages maths)
4ed20663 52 #:use-module (gnu packages multiprecision)
45203542 53 #:use-module (gnu packages networking)
be7134bf 54 #:use-module (gnu packages ncurses)
c9b1b4f9 55 #:use-module (gnu packages pcre)
4ed20663 56 #:use-module (gnu packages perl)
b10ab723 57 #:use-module (gnu packages pkg-config)
4ed20663 58 #:use-module (gnu packages readline)
c9b1b4f9 59 #:use-module (gnu packages statistics)
1c65314c
FB
60 #:use-module (gnu packages texlive)
61 #:use-module (gnu packages texinfo)
cc2b77df 62 #:use-module (gnu packages tls)
8d12be1e 63 #:use-module (gnu packages web)
ce0614dd 64 #:use-module (gnu packages base)
26b307e2 65 #:use-module (gnu packages xml)
6fa14469 66 #:use-module (gnu packages xorg)
4ed20663 67 #:use-module (gnu packages zip)
afa181ff 68 #:use-module (gnu packages tcl)
a01b6da7
NK
69 #:use-module (guix packages)
70 #:use-module (guix download)
ea5456c8 71 #:use-module (guix git-download)
11bb85a1 72 #:use-module (guix utils)
acc26ff1 73 #:use-module (guix build-system gnu)
898238b9 74 #:use-module (guix build-system python)
1c65314c
FB
75 #:use-module (guix build-system trivial)
76 #:use-module (srfi srfi-1))
a01b6da7 77
b24d1cfc 78(define-public python-2
a01b6da7
NK
79 (package
80 (name "python")
ff6f33cf 81 (version "2.7.10")
a01b6da7
NK
82 (source
83 (origin
84 (method url-fetch)
9b43a0ff 85 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
86 version "/Python-" version ".tar.xz"))
87 (sha256
88 (base32
ff6f33cf 89 "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw"))))
a01b6da7 90 (build-system gnu-build-system)
3fdc99da 91 (arguments
af807dea 92 `(#:tests? #f
ff6f33cf
ED
93 ;; 268 tests OK.
94 ;; 103 tests failed:
95 ;; test_distutils test_shutil test_signal test_site test_slice
96 ;; test_smtplib test_smtpnet test_socket test_socketserver
97 ;; test_softspace test_sort test_spwd test_sqlite test_ssl
98 ;; test_startfile test_stat test_str test_strftime test_string
99 ;; test_stringprep test_strop test_strptime test_strtod test_struct
100 ;; test_structmembers test_structseq test_subprocess test_sunau
101 ;; test_sunaudiodev test_sundry test_symtable test_syntax test_sys
102 ;; test_sys_setprofile test_sys_settrace test_sysconfig test_tarfile
103 ;; test_tcl test_telnetlib test_tempfile test_textwrap test_thread
104 ;; test_threaded_import test_threadedtempfile test_threading
105 ;; test_threading_local test_threadsignals test_time test_timeit
106 ;; test_timeout test_tk test_tokenize test_tools test_trace
107 ;; test_traceback test_transformer test_ttk_guionly test_ttk_textonly
108 ;; test_tuple test_typechecks test_ucn test_unary
109 ;; test_undocumented_details test_unicode test_unicode_file
110 ;; test_unicodedata test_univnewlines test_univnewlines2k test_unpack
111 ;; test_urllib test_urllib2 test_urllib2_localnet test_urllib2net
112 ;; test_urllibnet test_urlparse test_userdict test_userlist
113 ;; test_userstring test_uu test_uuid test_wait3 test_wait4
114 ;; test_warnings test_wave test_weakref test_weakset test_whichdb
115 ;; test_winreg test_winsound test_with test_wsgiref test_xdrlib
116 ;; test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc
117 ;; test_xpickle test_xrange test_zipfile test_zipfile64
118 ;; test_zipimport test_zipimport_support test_zlib
119 ;; 30 tests skipped:
120 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
121 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
122 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_crypt
123 ;; test_curses test_dl test_gdb test_gl test_idle test_imageop
124 ;; test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos
125 ;; test_macostools test_msilib test_nis test_ossaudiodev
126 ;; test_scriptpackages
127 ;; 6 skips unexpected on linux2:
128 ;; test_bsddb test_bsddb3 test_crypt test_gdb test_idle test_ioctl
129 ;; One of the typical errors:
130 ;; test_unicode
131 ;; test test_unicode crashed -- <type 'exceptions.OSError'>: [Errno 2] No
132 ;; such file or directory
af807dea 133 #:test-target "test"
3fdc99da
CR
134 #:configure-flags
135 (let ((bz2 (assoc-ref %build-inputs "bzip2"))
136 (gdbm (assoc-ref %build-inputs "gdbm"))
b10ab723 137 (libffi (assoc-ref %build-inputs "libffi"))
b88e1b0a 138 (sqlite (assoc-ref %build-inputs "sqlite"))
3fdc99da
CR
139 (openssl (assoc-ref %build-inputs "openssl"))
140 (readline (assoc-ref %build-inputs "readline"))
1f434457 141 (zlib (assoc-ref %build-inputs "zlib"))
afa181ff
LC
142 (tk (assoc-ref %build-inputs "tk"))
143 (tcl (assoc-ref %build-inputs "tcl"))
1f434457 144 (out (assoc-ref %outputs "out")))
fd982732 145 (list "--enable-shared" ; allow embedding
b10ab723 146 "--with-system-ffi" ; build ctypes
afa181ff
LC
147
148 ;; configure/setup.py doesn't use pkg-config to find Tcl/Tk.
149 (string-append "--with-tcltk-includes=-I" tk "/include -I"
150 tcl "/include")
151 (string-append "--with-tcltk-libs=-L" tk "/lib -ltk" ""
152 ,(version-prefix (package-version tk) 2)
153 " -L" tcl "/lib -ltcl"
154 ,(version-prefix (package-version tcl) 2))
155
fd982732 156 (string-append "CPPFLAGS="
3fdc99da
CR
157 "-I" bz2 "/include "
158 "-I" gdbm "/include "
b88e1b0a 159 "-I" sqlite "/include "
3fdc99da
CR
160 "-I" openssl "/include "
161 "-I" readline "/include "
162 "-I" zlib "/include")
163 (string-append "LDFLAGS="
164 "-L" bz2 "/lib "
165 "-L" gdbm "/lib "
b10ab723 166 "-L" libffi "/lib "
b88e1b0a 167 "-L" sqlite "/lib "
3fdc99da
CR
168 "-L" openssl "/lib "
169 "-L" readline "/lib "
1f434457
MW
170 "-L" zlib "/lib "
171 "-Wl,-rpath=" out "/lib")))
fd982732 172
46472ecd
MW
173 #:modules ((ice-9 ftw)
174 ,@%gnu-build-system-modules)
fd982732 175 #:phases
46472ecd
MW
176 (modify-phases %standard-phases
177 (add-before
178 'configure 'patch-lib-shells
179 (lambda _
180 ;; Filter for existing files, since some may not exist in all
181 ;; versions of python that are built with this recipe.
182 (substitute* (filter file-exists?
183 '("Lib/subprocess.py"
184 "Lib/popen2.py"
185 "Lib/distutils/tests/test_spawn.py"
186 "Lib/test/test_subprocess.py"))
187 (("/bin/sh") (which "sh")))
188 #t))
14f8dae6
LC
189 (add-before
190 'install 'do-not-record-configure-flags
191 (lambda _
192 ;; Remove configure flags from '_sysconfigdata.py' so we don't
193 ;; end up keeping references to the build tools.
194 (substitute* (find-files "." "sysconfigdata\\.py$")
195 (("'CONFIG_ARGS':.*")
196 "'CONFIG_ARGS': \"\",\n"))
197 #t))
198 (add-after
199 'install 'do-not-record-configure-flags-in-makefile
200 (lambda* (#:key outputs #:allow-other-keys)
201 ;; Likewise.
202 (let ((out (assoc-ref outputs "out")))
203 (substitute* (find-files out "^Makefile$")
204 (("^CONFIG_ARGS[[:blank:]]*=.*$")
205 "CONFIG_ARGS =\n"))
206 #t)))
46472ecd
MW
207 (add-before
208 'check 'pre-check
209 (lambda _
210 ;; 'Lib/test/test_site.py' needs a valid $HOME
211 (setenv "HOME" (getcwd))
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
224 #t))))))
a01b6da7 225 (inputs
3fdc99da
CR
226 `(("bzip2" ,bzip2)
227 ("gdbm" ,gdbm)
b10ab723 228 ("libffi" ,libffi) ; for ctypes
b88e1b0a 229 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 230 ("openssl" ,openssl)
3fdc99da 231 ("readline" ,readline)
afa181ff
LC
232 ("zlib" ,zlib)
233 ("tcl" ,tcl)
234 ("tk" ,tk))) ; for tkinter
b10ab723
CR
235 (native-inputs
236 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
237 (native-search-paths
238 (list (search-path-specification
239 (variable "PYTHONPATH")
af070955 240 (files '("lib/python2.7/site-packages")))))
a01b6da7 241 (home-page "http://python.org")
afa181ff 242 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
243 (description
244 "Python is a remarkably powerful dynamic programming language that
245is used in a wide variety of application domains. Some of its key
246distinguishing features include: clear, readable syntax; strong
247introspection capabilities; intuitive object orientation; natural
248expression of procedural code; full modularity, supporting hierarchical
249packages; exception-based error handling; and very high level dynamic
250data types.")
251 (license psfl)))
acc26ff1 252
b24d1cfc
AE
253(define-public python
254 (package (inherit python-2)
08c04509 255 (version "3.4.3")
717003e3
LC
256 (source (origin
257 (method url-fetch)
258 (uri (string-append "https://www.python.org/ftp/python/"
259 version "/Python-" version ".tar.xz"))
4c50e5ab
MW
260 (patches (list (search-patch "python-fix-tests.patch")
261 ;; XXX Try removing this patch for python > 3.4.3
262 (search-patch "python-disable-ssl-test.patch")))
717003e3
LC
263 (patch-flags '("-p0"))
264 (sha256
265 (base32
08c04509 266 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
1f434457
MW
267 (arguments (substitute-keyword-arguments (package-arguments python-2)
268 ((#:tests? _) #t)))
1aebc0cb
AE
269 (native-search-paths
270 (list (search-path-specification
271 (variable "PYTHONPATH")
0e05d01e
SB
272 (files (list (string-append "lib/python"
273 (version-major+minor version)
274 "/site-packages"))))))))
f26a77ff 275
95288fcc
LC
276;; Minimal variants of Python, mostly used to break the cycle between Tk and
277;; Python (Tk -> libxcb -> Python.)
278
279(define-public python2-minimal
280 (package (inherit python-2)
281 (name "python-minimal")
282 (arguments
283 (substitute-keyword-arguments (package-arguments python-2)
284 ((#:configure-flags _)
285 `(list "--enable-shared"
286 (string-append "LDFLAGS=-Wl,-rpath="
287 (assoc-ref %outputs "out") "/lib")))))
288 (inputs '()))) ;none of the optional dependencies
289
290(define-public python-minimal
291 (package (inherit python)
292 (name "python-minimal")
293 (arguments
294 (substitute-keyword-arguments (package-arguments python)
295 ((#:configure-flags _)
296 `(let ((openssl (assoc-ref %build-inputs "openssl"))
297 (zlib (assoc-ref %build-inputs "zlib"))
298 (out (assoc-ref %outputs "out")))
299 (list "--enable-shared"
300 (string-append "CPPFLAGS="
301 "-I" openssl "/include "
302 "-I" zlib "/include ")
303 (string-append "LDFLAGS="
304 "-L" openssl "/lib "
305 "-L" zlib "/lib "
306 "-Wl,-rpath=" out "/lib"))))))
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
313(define* (wrap-python3 python #:optional (name "python-wrapper"))
898238b9 314 (package (inherit python)
95288fcc 315 (name name)
898238b9
AE
316 (source #f)
317 (build-system trivial-build-system)
3c0f2329 318 (propagated-inputs `(("python" ,python)))
898238b9
AE
319 (arguments
320 `(#:modules ((guix build utils))
321 #:builder
322 (begin
323 (use-modules (guix build utils))
324 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
325 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
326 (mkdir-p bin)
327 (for-each
328 (lambda (old new)
329 (symlink (string-append python old)
330 (string-append bin "/" new)))
331 `("python3", "pydoc3", "idle3")
332 `("python", "pydoc", "idle"))))))
0d56e3e1
LC
333 (synopsis "Wrapper for the Python 3 commands")
334 (description
335 "This package provides wrappers for the commands of Python@tie{}3.x such
336that they can be invoked under their usual name---e.g., @command{python}
337instead of @command{python3}.")))
338
95288fcc
LC
339(define-public python-wrapper (wrap-python3 python))
340(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 341
aaf625b8
RW
342(define-public python-psutil
343 (package
344 (name "python-psutil")
345 (version "3.0.1")
346 (source
347 (origin
348 (method url-fetch)
349 (uri (string-append
350 "https://pypi.python.org/packages/source/p/psutil/psutil-"
351 version ".tar.gz"))
352 (sha256
353 (base32
354 "00c8h1mzqysih99z8pnbmdv117d2naldf11yjy50dhykxsf3n89z"))))
355 (build-system python-build-system)
356 (native-inputs
357 `(("python-setuptools" ,python-setuptools)))
358 (home-page "https://pypi.python.org/pypi/psutil/")
359 (synopsis "Library for retrieving information on running processes")
360 (description
361 "psutil (Python system and process utilities) is a library for retrieving
362information on running processes and system utilization (CPU, memory, disks,
363network) in Python. It is useful mainly for system monitoring, profiling and
364limiting process resources and management of running processes. It implements
365many functionalities offered by command line tools such as: ps, top, lsof,
366netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
367pidof, tty, taskset, pmap.")
368 (license bsd-3)))
369
370(define-public python2-psutil
371 (package-with-python2 python-psutil))
898238b9 372
f9da1d8a
ED
373(define-public python-passlib
374 (package
375 (name "python-passlib")
376 (version "1.6.2")
377 (source
378 (origin
379 (method url-fetch)
380 (uri (string-append
381 "https://pypi.python.org/packages/source/p/passlib/passlib-"
382 version
383 ".tar.gz"))
384 (sha256
385 (base32
386 "0b9rd161b3mmiwd7nx1v599yh9sp07mlfwac65sjy9qn1l0gd1z9"))))
387 (build-system python-build-system)
388 (native-inputs
389 `(("python-nose" ,python-nose)
390 ("python-setuptools" ,python-setuptools)))
391 (inputs
392 `(("python-py-bcrypt" ,python-py-bcrypt)))
393 (arguments
394 `(#:phases
395 (alist-cons-before
396 'check 'set-PYTHON_EGG_CACHE
397 ;; some tests require access to "$HOME/.cython"
398 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
399 %standard-phases)))
400 (home-page "https://bitbucket.org/ecollins/passlib")
401 (synopsis
402 "Comprehensive password hashing framework")
403 (description
404 "Passlib is a password hashing library for Python 2 & 3, which provides
405cross-platform implementations of over 30 password hashing algorithms, as well
406as a framework for managing existing password hashes. It's designed to be
407useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
408to providing full-strength password hashing for multi-user application.")
409 (license bsd-3)))
410
411(define-public python2-passlib
412 (package-with-python2 python-passlib))
413
feb0d9c3
ED
414(define-public python-py-bcrypt
415 (package
416 (name "python-py-bcrypt")
417 (version "0.4")
418 (source
419 (origin
420 (method url-fetch)
421 (uri (string-append
422 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
423 version
424 ".tar.gz"))
425 (sha256
426 (base32
427 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
428 (build-system python-build-system)
429 (native-inputs
430 `(("python-setuptools" ,python-setuptools)))
431 (home-page "https://code.google.com/p/py-bcrypt")
432 (synopsis
433 "Bcrypt password hashing and key derivation")
434 (description
435 "A python wrapper of OpenBSD's Blowfish password hashing code. This
436system hashes passwords using a version of Bruce Schneier's Blowfish block
437cipher with modifications designed to raise the cost of off-line password
438cracking and frustrate fast hardware implementation. The computation cost of
439the algorithm is parametised, so it can be increased as computers get faster.
440The intent is to make a compromise of a password database less likely to
441result in an attacker gaining knowledge of the plaintext passwords (e.g. using
442John the Ripper).")
443 ;; "sha2.c" is under BSD-3;
444 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
445 ;; the rest is under ISC.
446 (license (list isc bsd-3 bsd-4))))
447
448(define-public python2-py-bcrypt
449 (package-with-python2 python-py-bcrypt))
450
451
429fdea1
ED
452(define-public python-paramiko
453 (package
454 (name "python-paramiko")
455 (version "1.15.2")
456 (source
457 (origin
458 (method url-fetch)
459 (uri (string-append
460 "https://pypi.python.org/packages/source/p/paramiko/paramiko-"
461 version
462 ".tar.gz"))
463 (sha256
464 (base32
465 "0mbfzm9zlrz6mla9xakrm8wkll3x035f9rj3c5pbgjzfldqscmjg"))))
466 (build-system python-build-system)
467 (native-inputs
468 `(("python-setuptools" ,python-setuptools)))
469 (inputs
470 `(("python-ecdsa" ,python-ecdsa)
471 ("python-pycrypto" ,python-pycrypto)))
472 (home-page "http://www.paramiko.org/")
473 (synopsis "SSHv2 protocol library")
474 (description "Paramiko is a python implementation of the SSHv2 protocol,
475providing both client and server functionality. While it leverages a Python C
476extension for low level cryptography (PyCrypto), Paramiko itself is a pure
477Python interface around SSH networking concepts.")
478 (license lgpl2.1+)))
479
480(define-public python2-paramiko
481 (package-with-python2 python-paramiko))
482
483
de73dbf6
ED
484(define-public python-httplib2
485 (package
486 (name "python-httplib2")
487 (version "0.9.1")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (string-append
492 "https://pypi.python.org/packages/source/h/httplib2/httplib2-"
493 version
494 ".tar.gz"))
495 (sha256
496 (base32
497 "1xc3clbrf77r0600kja71j7hk1218sjiq0gfmb8vjdajka8kjqxw"))))
498 (build-system python-build-system)
499 (native-inputs
500 `(("python-setuptools" ,python-setuptools)))
501 (home-page
502 "https://github.com/jcgregorio/httplib2")
503 (synopsis "Comprehensive HTTP client library")
504 (description
505 "A comprehensive HTTP client library supporting many features left out of
506other HTTP libraries.")
507 (license license:expat)))
508
509(define-public python2-httplib2
510 (package-with-python2 python-httplib2))
511
67039875
ED
512(define-public python-ecdsa
513 (package
514 (name "python-ecdsa")
515 (version "0.13")
516 (source
517 (origin
518 (method url-fetch)
519 (uri (string-append
520 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
521 version
522 ".tar.gz"))
523 (sha256
524 (base32
525 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
526 (build-system python-build-system)
527 (native-inputs
528 `(("python-setuptools" ,python-setuptools)))
529 (inputs
530 `(("openssl" ,openssl)))
531 (home-page
532 "http://github.com/warner/python-ecdsa")
533 (synopsis
534 "ECDSA cryptographic signature library (pure python)")
535 (description
536 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
537Curve Digital Signature Algorithm), implemented purely in Python. With this
538library, you can quickly create keypairs (signing key and verifying key), sign
539messages, and verify the signatures. The keys and signatures are very short,
540making them easy to handle and incorporate into other protocols.")
541 (license license:expat)))
542
543(define-public python2-ecdsa
544 (package-with-python2 python-ecdsa))
545
52323f32
ED
546(define-public python-ccm
547 (package
548 (name "python-ccm")
549 (version "2.0.4.1")
550 (source
551 (origin
552 (method url-fetch)
553 (uri (string-append
554 "https://pypi.python.org/packages/source/c/ccm/ccm-"
555 version
556 ".tar.gz"))
557 (sha256
558 (base32
559 "199jw221albs2iv6xczczq88fxnh0aw8hzmys8qkbzkd99dssng9"))))
560 (build-system python-build-system)
561 (native-inputs
562 `(("python-setuptools" ,python-setuptools)))
563 (inputs
564 `(("python-pyyaml" ,python-pyyaml)
565 ("python-six" ,python-six)))
566 (home-page "https://github.com/pcmanus/ccm")
567 (synopsis "Cassandra Cluster Manager")
568 (description "A script/library to create, launch and remove an Apache
569Cassandra cluster on localhost.")
570 (license asl2.0)))
571
572(define-public python2-ccm
573 (package-with-python2 python-ccm))
574
89114f39 575(define-public python-pytz
acc26ff1 576 (package
89114f39 577 (name "python-pytz")
acc26ff1
CR
578 (version "2013b")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append "https://launchpad.net/pytz/main/" version
583 "/+download/pytz-" version ".tar.bz2"))
584 (sha256
585 (base32
586 "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5"))))
587 (build-system python-build-system)
8498b8cf 588 (arguments `(#:tests? #f)) ; no test target
acc26ff1 589 (home-page "https://launchpad.net/pytz")
9e771e3b 590 (synopsis "Python timezone library")
acc26ff1
CR
591 (description
592 "This library allows accurate and cross platform timezone calculations
593using Python 2.4 or higher and provides access to the Olson timezone database.")
594 (license x11)))
5ace6e2f 595
89114f39 596(define-public python2-pytz
11bb85a1 597 (package-with-python2 python-pytz))
89114f39 598
fc50e9c6 599
89114f39 600(define-public python-babel
5ace6e2f 601 (package
89114f39 602 (name "python-babel")
e1804763 603 (version "1.3")
5ace6e2f
CR
604 (source
605 (origin
606 (method url-fetch)
e1804763 607 (uri (string-append "https://pypi.python.org/packages/source/B/Babel/Babel-"
5ace6e2f
CR
608 version ".tar.gz"))
609 (sha256
610 (base32
e1804763 611 "0bnin777lc53nxd1hp3apq410jj5wx92n08h7h4izpl4f4sx00lz"))))
5ace6e2f
CR
612 (build-system python-build-system)
613 (inputs
e1804763
AE
614 `(("python-pytz" ,python-pytz)
615 ("python-setuptools" ,python-setuptools)))
8498b8cf 616 (arguments `(#:tests? #f)) ; no test target
e1804763 617 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
618 (synopsis
619 "Tools for internationalizing Python applications")
620 (description
621 "Babel is composed of two major parts:
622- tools to build and work with gettext message catalogs
623- a Python interface to the CLDR (Common Locale Data Repository), providing
624access to various locale display names, localized number and date formatting,
625etc. ")
626 (license bsd-3)))
89114f39
AE
627
628(define-public python2-babel
11bb85a1 629 (package-with-python2 python-babel))
73adf220 630
ed377cc6
RW
631(define-public python2-backport-ssl-match-hostname
632 (package
633 (name "python2-backport-ssl-match-hostname")
634 (version "3.4.0.2")
635 (source
636 (origin
637 (method url-fetch)
638 (uri (string-append
639 "https://pypi.python.org/packages/source/b/"
640 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
641 version ".tar.gz"))
642 (sha256
643 (base32
644 "1bnn47ipvhy49n0m50v27lp4xj6sqdkdw676ypd7pawsn1zhwh87"))))
645 (build-system python-build-system)
646 (arguments `(#:python ,python-2))
647 (inputs
648 `(("python2-setuptools" ,python2-setuptools)))
649 (home-page "https://pypi.python.org/pypi/backports.ssl_match_hostname")
650 (synopsis "Backport of ssl.match_hostname() function from Python 3.4")
651 (description
652 "This backport brings the ssl.match_hostname() function to users of
653earlier versions of Python. The function checks the hostname in the
654certificate returned by the server to which a connection has been established,
655and verifies that it matches the intended target hostname.")
656 (license psfl)))
657
ef5cbf9b
RW
658(define-public python-h5py
659 (package
660 (name "python-h5py")
661 (version "2.4.0")
662 (source
663 (origin
664 (method url-fetch)
665 (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
666 version ".tar.gz"))
667 (sha256
668 (base32
669 "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
670 (build-system python-build-system)
671 (inputs
672 `(("python-cython" ,python-cython)
673 ("python-numpy" ,python-numpy)
674 ("hdf5" ,hdf5)))
675 (native-inputs
676 `(("python-setuptools" ,python-setuptools)))
677 (arguments `(#:tests? #f)) ; no test target
678 (home-page "http://www.h5py.org/")
679 (synopsis "Read and write HDF5 files from Python")
680 (description
681 "The h5py package provides both a high- and low-level interface to the
682HDF5 library from Python. The low-level interface is intended to be a
683complete wrapping of the HDF5 API, while the high-level component supports
684access to HDF5 files, datasets and groups using established Python and NumPy
685concepts.")
686 (license bsd-3)))
687
688(define-public python2-h5py
689 (let ((h5py (package-with-python2 python-h5py)))
690 (package (inherit h5py)
691 (inputs
692 `(("python2-numpy" ,python2-numpy)
693 ,@(alist-delete
694 "python-numpy"
695 (package-inputs h5py)))))))
696
c1448c69
EB
697(define-public python-lockfile
698 (package
699 (name "python-lockfile")
700 (version "0.9.1")
701 (source
702 (origin
703 (method url-fetch)
704 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
705 "lockfile-" version ".tar.gz"))
706 (sha256
707 (base32
708 "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
709 (build-system python-build-system)
710 (arguments '(#:test-target "check"))
711 (home-page "http://code.google.com/p/pylockfile/")
712 (synopsis "Platform-independent file locking module")
713 (description
714 "The lockfile package exports a LockFile class which provides a simple
715API for locking files.")
bd3fa666 716 (license license:expat)))
c1448c69
EB
717
718(define-public python2-lockfile
719 (package-with-python2 python-lockfile))
720
5a1a4bf6
EB
721(define-public python-mock
722 (package
723 (name "python-mock")
724 (version "1.0.1")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
729 "mock-" version ".tar.gz"))
730 (sha256
731 (base32
732 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
733 (build-system python-build-system)
734 (arguments '(#:test-target "check"))
07af3e5e 735 (home-page "http://code.google.com/p/mock/")
9e771e3b 736 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
737 (description
738 "Mock is a library for testing in Python. It allows you to replace parts
739of your system under test with mock objects and make assertions about how they
740have been used.")
bd3fa666 741 (license license:expat)))
5a1a4bf6
EB
742
743(define-public python2-mock
744 (package-with-python2 python-mock))
745
fc50e9c6 746
73adf220
AE
747(define-public python-setuptools
748 (package
749 (name "python-setuptools")
62a9a23b 750 (version "18.3.1")
73adf220
AE
751 (source
752 (origin
753 (method url-fetch)
754 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
755 version ".tar.gz"))
756 (sha256
757 (base32
62a9a23b 758 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
73adf220 759 (build-system python-build-system)
d3d656c5
AE
760 ;; FIXME: Tests require pytest, which itself relies on setuptools.
761 ;; One could bootstrap with an internal untested setuptools.
73adf220 762 (arguments
824af8ca 763 `(#:tests? #f))
73adf220
AE
764 (home-page "https://pypi.python.org/pypi/setuptools")
765 (synopsis
766 "Library designed to facilitate packaging Python projects")
767 (description
768 "Setuptools is a fully-featured, stable library designed to facilitate
769packaging Python projects, where packaging includes:
770Python package and module definitions,
771distribution package metadata,
772test hooks,
773project installation,
774platform-specific details,
775Python 3 support.")
776 (license psfl)))
777
778(define-public python2-setuptools
779 (package-with-python2 python-setuptools))
fc50e9c6
AE
780
781
cafc3f5a
EB
782(define-public python-pycrypto
783 (package
784 (name "python-pycrypto")
785 (version "2.6.1")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (string-append "https://pypi.python.org/packages/source/p/"
790 "pycrypto/pycrypto-" version ".tar.gz"))
791 (sha256
792 (base32
793 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
794 (build-system python-build-system)
795 (native-inputs
796 `(("python-setuptools" ,python-setuptools)))
797 (inputs
798 `(("python" ,python)
799 ("gmp" ,gmp)))
800 (arguments
801 `(#:phases
802 (alist-cons-before
803 'build 'set-build-env
804 ;; pycrypto runs an autoconf configure script behind the scenes
805 (lambda _
806 (setenv "CONFIG_SHELL" (which "bash")))
807 %standard-phases)))
808 (home-page "http://www.pycrypto.org/")
809 (synopsis "Cryptographic modules for Python")
810 (description
811 "Pycrypto is a collection of both secure hash functions (such as SHA256
812and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 813etc.). The package is structured to make adding new modules easy.")
cafc3f5a
EB
814 (license public-domain)))
815
345f0611
ED
816(define-public python2-pycrypto
817 (package-with-python2 python-pycrypto))
818
cafc3f5a
EB
819(define-public python-keyring
820 (package
821 (name "python-keyring")
822 (version "3.8")
823 (source
824 (origin
825 (method url-fetch)
826 (uri (string-append "https://pypi.python.org/packages/source/k/"
827 "keyring/keyring-" version ".zip"))
828 (sha256
829 (base32
830 "1vxazfbcwggyfyramh55shkxs08skhpqrkm6lrrjnygnm8c1l2zg"))))
831 (build-system python-build-system)
832 (native-inputs
833 `(("unzip" ,unzip)
834 ("python-setuptools" ,python-setuptools)
835 ("python-mock" ,python-mock)))
836 (inputs
837 `(("python-pycrypto" ,python-pycrypto)))
838 (arguments
839 `(#:tests? #f ;TODO: tests require pytest
840 #:phases
841 (alist-replace
842 'unpack
843 (lambda _
844 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
845 "/bin/unzip"))
846 (source (assoc-ref %build-inputs "source")))
847 (and (zero? (system* unzip source))
848 (chdir (string-append "keyring-" ,version)))))
849 %standard-phases)))
850 (home-page "http://bitbucket.org/kang/python-keyring-lib")
851 (synopsis "Store and access your passwords safely")
852 (description
853 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 854service from python. It can be used in any application that needs safe
cafc3f5a
EB
855password storage.")
856 ;; "MIT" and PSF dual license
857 (license x11)))
858
d7af1069
CR
859(define-public python2-keyring
860 (package-with-python2 python-keyring))
861
a480bc41
EB
862(define-public python-six
863 (package
864 (name "python-six")
98bdee67 865 (version "1.9.0")
a480bc41
EB
866 (source
867 (origin
868 (method url-fetch)
869 (uri (string-append "https://pypi.python.org/packages/source/s/"
870 "six/six-" version ".tar.gz"))
871 (sha256
872 (base32
98bdee67 873 "1mci5i8mjqmljmv33h0q3d4djc13zk1kfmb3fbvd3yy43x0m4h72"))))
a480bc41
EB
874 (build-system python-build-system)
875 (inputs
876 `(("python-setuptools" ,python-setuptools)))
877 (home-page "http://pypi.python.org/pypi/six/")
878 (synopsis "Python 2 and 3 compatibility utilities")
879 (description
35b9e423 880 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
881functions for smoothing over the differences between the Python versions with
882the goal of writing Python code that is compatible on both Python versions.
35b9e423 883Six supports every Python version since 2.5. It is contained in only one
a480bc41
EB
884Python file, so it can be easily copied into your project.")
885 (license x11)))
886
0c20025c
AE
887(define-public python2-six
888 (package-with-python2 python-six))
889
cafc3f5a
EB
890(define-public python-dateutil-2
891 (package
892 (name "python-dateutil")
893 (version "2.2")
894 (source
895 (origin
896 (method url-fetch)
897 (uri (string-append "https://pypi.python.org/packages/source/p/"
898 name "/" name "-" version ".tar.gz"))
899 (sha256
900 (base32
901 "0s74ad6r789810s10dxgvaf48ni6adac2icrdad34zxygqq6bj7f"))))
902 (build-system python-build-system)
903 (inputs
904 `(("python-setuptools" ,python-setuptools)
905 ("python-six" ,python-six)))
906 (home-page "http://labix.org/python-dateutil")
907 (synopsis "Extensions to the standard datetime module")
908 (description
909 "The dateutil module provides powerful extensions to the standard
910datetime module, available in Python 2.3+.")
911 (license bsd-3)))
912
913(define-public python2-dateutil-2
914 (package-with-python2 python-dateutil-2))
915
fc50e9c6
AE
916(define-public python-dateutil
917 (package
918 (name "python-dateutil")
919 (version "1.5") ; last version for python < 3
920 (source
921 (origin
922 (method url-fetch)
cafc3f5a
EB
923 (uri (string-append "http://labix.org/download/python-dateutil/"
924 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
925 (sha256
926 (base32
927 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
928 (build-system python-build-system)
929 (inputs
930 `(("python-setuptools" ,python-setuptools)))
931 (home-page "http://labix.org/python-dateutil")
cafc3f5a 932 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
933 (description
934 "The dateutil module provides powerful extensions to the standard
935datetime module, available in Python 2.3+.")
936 (license psfl)))
937
938(define-public python2-dateutil
939 (package-with-python2 python-dateutil))
1d08c01f 940
cafc3f5a
EB
941(define-public python-parsedatetime
942 (package
943 (name "python-parsedatetime")
944 (version "1.2")
945 (source
946 (origin
947 (method url-fetch)
948 (uri (string-append "https://pypi.python.org/packages/source/p/"
949 "parsedatetime/parsedatetime-" version ".tar.gz"))
950 (sha256
951 (base32
952 "1zcj0pzxvpl4j2ma9awmpkfxldybi2kjaahjjpmgfbg5cxwcjsqv"))))
953 (build-system python-build-system)
954 (native-inputs
955 `(("python-setuptools" ,python-setuptools)))
956 (arguments `(#:tests? #f)) ;no test target
957 (home-page "http://github.com/bear/parsedatetime/")
958 (synopsis
959 "Parse human-readable date/time text")
960 (description
e881752c 961 "Parse human-readable date/time text.")
cafc3f5a
EB
962 (license asl2.0)))
963
d072efcb
RW
964(define-public python-pandas
965 (package
966 (name "python-pandas")
967 (version "0.16.0")
968 (source
969 (origin
970 (method url-fetch)
971 (uri (string-append "https://pypi.python.org/packages/source/p/"
972 "pandas/pandas-" version ".tar.gz"))
973 (sha256
974 (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
975 (build-system python-build-system)
976 (arguments
977 `(;; Three tests fail:
978 ;; - test_read_google
979 ;; - test_read_yahoo
980 ;; - test_month_range_union_tz_dateutil
981 #:tests? #f))
982 (propagated-inputs
983 `(("python-numpy" ,python-numpy)
984 ("python-pytz" ,python-pytz)
985 ("python-dateutil" ,python-dateutil-2)))
986 (native-inputs
987 `(("python-nose" ,python-nose)
988 ("python-setuptools" ,python-setuptools)))
989 (home-page "http://pandas.pydata.org")
990 (synopsis "Data structures for data analysis, time series, and statistics")
991 (description
992 "Pandas is a Python package providing fast, flexible, and expressive data
993structures designed to make working with structured (tabular,
994multidimensional, potentially heterogeneous) and time series data both easy
995and intuitive. It aims to be the fundamental high-level building block for
996doing practical, real world data analysis in Python.")
997 (license bsd-3)))
998
999(define-public python2-pandas
1000 (package-with-python2 python-pandas))
1001
cafc3f5a
EB
1002(define-public python-tzlocal
1003 (package
1004 (name "python-tzlocal")
1005 (version "1.1.1")
1006 (source
1007 (origin
1008 (method url-fetch)
1009 (uri (string-append "https://pypi.python.org/packages/source/t/"
1010 "tzlocal/tzlocal-" version ".zip"))
1011 (sha256
1012 (base32
1013 "1m3y918c3chf41fwg2bx4w42bqsjzn3dyvvcmwwy13c8gj6zssv9"))))
1014 (build-system python-build-system)
1015 (native-inputs
1016 `(("unzip" ,unzip)
1017 ("python-setuptools" ,python-setuptools)))
1018 (inputs `(("python-pytz" ,python-pytz)))
1019 (arguments
1020 `(#:phases
1021 (alist-replace
1022 'unpack
1023 (lambda _
1024 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
1025 "/bin/unzip"))
1026 (source (assoc-ref %build-inputs "source")))
1027 (and (zero? (system* unzip source))
1028 (chdir (string-append "tzlocal-" ,version)))))
1029 %standard-phases)))
1030 (home-page "https://github.com/regebro/tzlocal")
1031 (synopsis
35b9e423 1032 "Local timezone information for Python")
cafc3f5a
EB
1033 (description
1034 "Tzlocal returns a tzinfo object with the local timezone information.
1035This module attempts to fix a glaring hole in pytz, that there is no way to
1036get the local timezone information, unless you know the zoneinfo name, and
1037under several distributions that's hard or impossible to figure out.")
1038 (license cc0)))
1039
be7134bf
RW
1040(define-public python-pysam
1041 (package
1042 (name "python-pysam")
1043 (version "0.8.1")
1044 (source
1045 (origin
1046 (method url-fetch)
1047 (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-"
1048 version ".tar.gz"))
1049 (sha256
1050 (base32
1051 "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459"))))
1052 (build-system python-build-system)
1053 (arguments
1054 `(#:tests? #f ; tests are excluded in the manifest
1055 #:phases
1056 (alist-cons-before
1057 'build 'set-flags
1058 (lambda _
1059 (setenv "LDFLAGS" "-lncurses")
1060 (setenv "CFLAGS" "-D_CURSES_LIB=1"))
1061 %standard-phases)))
1062 (inputs
1063 `(("python-cython" ,python-cython)
1064 ("python-setuptools" ,python-setuptools)
1065 ("ncurses" ,ncurses)
1066 ("zlib" ,zlib)))
1067 (home-page "https://github.com/pysam-developers/pysam")
1068 (synopsis "Python bindings to the SAMtools C API")
1069 (description
1070 "Pysam is a Python module for reading and manipulating files in the
1071SAM/BAM format. Pysam is a lightweight wrapper of the SAMtools C API. It
1072also includes an interface for tabix.")
bd3fa666 1073 (license license:expat)))
be7134bf
RW
1074
1075(define-public python2-pysam
1076 (package-with-python2 python-pysam))
1d08c01f
AE
1077
1078(define-public python2-pysqlite
1079 (package
1080 (name "python2-pysqlite")
7a03af70 1081 (version "2.6.3a") ; see below
1d08c01f
AE
1082 (source
1083 (origin
1084 (method url-fetch)
7a03af70
LC
1085 ;; During the switch from code.google.com to pypi.python.org, the 2.6.3
1086 ;; tarball was modified, but the version number was kept:
1087 ;; <https://lists.gnu.org/archive/html/guix-devel/2014-02/msg00077.html>.
1088 ;; Here we want to refer to the pypi-hosted 2.6.3 tarball.
1089 (uri (string-append
1090 "https://pypi.python.org/packages/source/p/pysqlite/pysqlite-"
1091 "2.6.3" ".tar.gz"))
1d08c01f
AE
1092 (sha256
1093 (base32
7a03af70 1094 "13djzgnbi71znjjyaw4nybg6smilgszcid646j5qav7mdchkb77y"))))
1d08c01f
AE
1095 (build-system python-build-system)
1096 (inputs
1097 `(("sqlite" ,sqlite)))
1098 (arguments
1099 `(#:python ,python-2 ; incompatible with Python 3
1100 #:tests? #f)) ; no test target
7a03af70
LC
1101 (home-page "https://pypi.python.org/pypi/pysqlite")
1102 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1103 (description
1104 "Pysqlite provides SQLite bindings for Python that comply to the
1105Database API 2.0T.")
ed0cdf83 1106 (license license:zlib)))
1d08c01f 1107
2875caf5
AE
1108
1109(define-public python2-mechanize
1110 (package
1111 (name "python2-mechanize")
1112 (version "0.2.5")
1113 (source
1114 (origin
1115 (method url-fetch)
1116 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1117 version ".tar.gz"))
1118 (sha256
1119 (base32
1120 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1121 (build-system python-build-system)
1122 (inputs
1123 `(("python2-setuptools" ,python2-setuptools)))
1124 (arguments
1125 `(#:python ,python-2 ; apparently incompatible with Python 3
1126 #:tests? #f))
1127 ;; test fails with message
1128 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1129 ;; (python-3.3.2) or
1130 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1131 ;; (python-2.7.5).
1132 ;; The source code is from March 2011 and probably not up-to-date
1133 ;; with respect to python unit tests.
1134 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1135 (synopsis
1136 "Stateful programmatic web browsing in Python")
1137 (description
1138 "Mechanize implements stateful programmatic web browsing in Python,
1139after Andy Lester’s Perl module WWW::Mechanize.")
166191b3 1140 (license (non-copyleft "file://COPYING"
e881752c 1141 "See COPYING in the distribution."))))
2875caf5 1142
0352532e
AE
1143
1144(define-public python-simplejson
1145 (package
1146 (name "python-simplejson")
1147 (version "3.3.0")
1148 (source
1149 (origin
1150 (method url-fetch)
1151 (uri (string-append "https://pypi.python.org/packages/source/s/simplejson/simplejson-"
1152 version ".tar.gz"))
1153 (sha256
1154 (base32
1155 "07wsry5j44l5zzm74l4j2bvasiq8n5m32f31n2p7c68i5vc6p2ks"))))
1156 (build-system python-build-system)
1157 (home-page "http://simplejson.readthedocs.org/en/latest/")
1158 (synopsis
1159 "Json library for Python")
1160 (description
e881752c
AK
1161 "JSON (JavaScript Object Notation) is a subset of JavaScript
1162syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1163format.
0352532e
AE
1164
1165Simplejson exposes an API familiar to users of the standard library marshal
1166and pickle modules. It is the externally maintained version of the json
1167library contained in Python 2.6, but maintains compatibility with Python 2.5
1168and (currently) has significant performance advantages, even without using
1169the optional C extension for speedups. Simplejson is also supported on
1170Python 3.3+.")
1171 (license x11)))
1172
1173(define-public python2-simplejson
1174 (package-with-python2 python-simplejson))
421a80a2
AE
1175
1176
1177(define-public python2-pyicu
1178 (package
1179 (name "python2-pyicu")
569ac046 1180 (version "1.8")
421a80a2
AE
1181 (source
1182 (origin
1183 (method url-fetch)
1184 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1185 version ".tar.gz"))
1186 (sha256
1187 (base32
569ac046 1188 "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
421a80a2
AE
1189 (build-system python-build-system)
1190 (inputs
1191 `(("icu4c" ,icu4c)))
1192 (arguments
1193 `(#:python ,python-2 ; Python 3 works also, but needs special care for
1194 ; linking with libpython3.3m
1195 #:tests? #f)) ; no check target
1196 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1197 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1198 (description
1199 "PyICU is a python extension wrapping the ICU C++ API.")
1200 (license x11)))
cc20a22a
LC
1201
1202(define-public python2-dogtail
1203 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1204 ;; spaces in indentation" with Python 3.
1205 (package
1206 (name "python2-dogtail")
1207 (version "0.8.2")
1208 (source (origin
1209 (method url-fetch)
1210 (uri (string-append
1211 "https://fedorahosted.org/released/dogtail/dogtail-"
1212 version ".tar.gz"))
1213 (sha256
1214 (base32
1215 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1216 (build-system python-build-system)
1217 (arguments `(#:python ,python-2
1218 #:tests? #f)) ; invalid command "test"
1219 (home-page "https://fedorahosted.org/dogtail/")
1220 (synopsis "GUI test tool and automation framework written in ​Python")
1221 (description
35b9e423 1222 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1223It uses Accessibility (a11y) technologies to communicate with desktop
1224applications. dogtail scripts are written in Python and executed like any
1225other Python program.")
1226 (license gpl2+)))
515e6878 1227
011b18c3
LC
1228(define-public python2-empy
1229 (package
1230 (name "python2-empy")
1231 (version "3.3")
1232 (source (origin
1233 (method url-fetch)
1234 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1235 version ".tar.gz"))
1236 (sha256
1237 (base32
1238 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1239 (build-system python-build-system)
1240 (arguments
1241 `(#:python ,python-2
1242 #:phases (alist-replace
1243 'check
1244 (lambda _
1245 (zero? (system* "./test.sh")))
1246 %standard-phases)))
1247 (home-page "http://www.alcyone.com/software/empy/")
1248 (synopsis "Templating system for Python")
1249 (description
1250 "EmPy is a system for embedding Python expressions and statements in
1251template text; it takes an EmPy source file, processes it, and produces
1252output. This is accomplished via expansions, which are special signals to the
1cd4027c 1253EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1254EmPy can expand arbitrary Python expressions and statements in this way, as
1255well as a variety of special forms. Textual data not explicitly delimited in
1256this way is sent unaffected to the output, allowing Python to be used in
1257effect as a markup language. Also supported are callbacks via hooks,
1258recording and playback via diversions, and dynamic, chainable filters. The
1259system is highly configurable via command line options and embedded
1260commands.")
1261 (license lgpl2.1+)))
1262
8deeda0c
LC
1263(define-public python2-element-tree
1264 (package
1265 (name "python2-element-tree")
1266 (version "1.2.6")
1267 (source (origin
1268 (method url-fetch)
1269 (uri (string-append
1270 "http://effbot.org/media/downloads/elementtree-"
1271 version "-20050316.tar.gz"))
1272 (sha256
1273 (base32
1274 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1275 (build-system python-build-system)
1276 (arguments
1277 `(#:python ,python-2 ; seems to be part of Python 3
1278 #:tests? #f)) ; no 'test' sub-command
1279 (synopsis "Toolkit for XML processing in Python")
1280 (description
1281 "ElementTree is a Python library supporting lightweight XML processing.")
1282 (home-page "http://effbot.org/zone/element-index.htm")
1283 (license (x11-style "http://docs.python.org/2/license.html"
1284 "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
12850.9.0 THROUGH 1.2\"."))))
1286
1287(define-public python2-pybugz
1288 (package
1289 (name "python2-pybugz")
1290 (version "0.6.11")
1291 (source (origin
1292 (method url-fetch)
1293 (uri (string-append
1294 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1295 version ".tar.gz"))
1296 (sha256
1297 (base32
6f194a1e
LC
1298 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1299 (patches (map search-patch
1300 (list "pybugz-stty.patch"
1301 "pybugz-encode-error.patch")))))
8deeda0c
LC
1302 (build-system python-build-system)
1303 (arguments
1304 `(#:python ,python-2 ; SyntaxError with Python 3
1305 #:tests? #f)) ; no 'test' sub-command
1306 (inputs `(("element-tree" ,python2-element-tree)))
1307 (synopsis "Python and command-line interface to Bugzilla")
1308 (description
1309 "PyBugz is a Python library and command-line tool to query the Bugzilla
1310bug tracking system. It is meant as an aid to speed up interaction with the
1311bug tracker.")
1312 (home-page "http://www.liquidx.net/pybugz/")
1313 (license gpl2)))
1314
a480bc41
EB
1315(define-public python-enum34
1316 (package
1317 (name "python-enum34")
1318 (version "1.0")
1319 (source
1320 (origin
1321 (method url-fetch)
1322 (uri (string-append "https://pypi.python.org/packages/source/e/"
1323 "enum34/enum34-" version ".tar.gz"))
1324 (sha256
1325 (base32
1326 "0dg6mpg9n4g9diyrbnbb5vd9d1qw9f265zwhknqy0mxh0cvmjjrq"))))
1327 (build-system python-build-system)
1328 (inputs
1329 `(("python-setuptools" ,python-setuptools)))
1330 (arguments
1331 `(#:phases
1332 (alist-replace
1333 'check
1334 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1335 %standard-phases)))
1336 (home-page "https://pypi.python.org/pypi/enum34")
1337 (synopsis "Backported Python 3.4 Enum")
1338 (description
1339 "Enum34 is the new Python stdlib enum module available in Python 3.4
1340backported for previous versions of Python from 2.4 to 3.3.")
1341 (license bsd-3)))
1342
1343(define-public python-parse-type
1344 (package
1345 (name "python-parse-type")
1346 (version "0.3.4")
1347 (source
1348 (origin
1349 (method url-fetch)
1350 (uri (string-append "https://pypi.python.org/packages/source/p/"
1351 "parse_type/parse_type-" version ".tar.gz"))
1352 (sha256
1353 (base32
1354 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1355 (build-system python-build-system)
1356 (inputs
1357 `(("python-setuptools" ,python-setuptools)
1358 ("python-six" ,python-six)
1359 ("python-parse" ,python-parse)
1360 ("python-enum34" ,python-enum34))) ;required for python<3.4
1361 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1362 (home-page "https://github.com/jenisys/parse_type")
1363 (synopsis "Extended parse module")
1364 (description
1365 "Parse_type extends the python parse module.")
1366 (license bsd-3)))
1367
1368(define-public python-parse
1369 (package
1370 (name "python-parse")
1371 (version "1.6.4")
1372 (source
1373 (origin
1374 (method url-fetch)
1375 (uri (string-append "https://pypi.python.org/packages/source/p/"
1376 "parse/parse-" version ".tar.gz"))
1377 (sha256
1378 (base32
1379 "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
1380 (build-system python-build-system)
1381 (arguments
1382 `(#:phases
1383 (alist-replace
1384 'check
1385 (lambda _ (zero? (system* "python" "test_parse.py")))
1386 %standard-phases)))
1387 (home-page "https://github.com/r1chardj0n3s/parse")
1388 (synopsis "Parse strings")
1389 (description
1390 "Parse strings using a specification based on the Python format()
1391syntax.")
1392 (license x11)))
1393
1394
515e6878
LC
1395(define-public scons
1396 (package
1397 (name "scons")
a3f61425 1398 (version "2.3.4")
515e6878
LC
1399 (source (origin
1400 (method url-fetch)
1401 (uri (string-append "mirror://sourceforge/scons/scons-"
1402 version ".tar.gz"))
1403 (sha256
1404 (base32
a3f61425 1405 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1406 (build-system python-build-system)
1407 (arguments
1408 ;; With Python 3.x, fails to build with a syntax error.
1409 `(#:python ,python-2
1410 #:tests? #f)) ; no 'python setup.py test' command
1411 (home-page "http://scons.org/")
1412 (synopsis "Software construction tool written in Python")
1413 (description
1414 "SCons is a software construction tool. Think of SCons as an improved,
1415cross-platform substitute for the classic Make utility with integrated
1416functionality similar to autoconf/automake and compiler caches such as ccache.
1417In short, SCons is an easier, more reliable and faster way to build
1418software.")
1419 (license x11)))
011b18c3 1420
c15a5c0e
DT
1421(define-public python-extras
1422 (package
1423 (name "python-extras")
1424 (version "0.0.3")
1425 (source
1426 (origin
1427 (method url-fetch)
1428 (uri (string-append
1429 "https://pypi.python.org/packages/source/e/extras/extras-"
1430 version ".tar.gz"))
1431 (sha256
1432 (base32
1433 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1434 (build-system python-build-system)
1435 (inputs
1436 `(("python-setuptools" ,python-setuptools)))
1437 (arguments
1438 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1439 '(#:tests? #f))
1440 (home-page "https://github.com/testing-cabal/extras")
1441 (synopsis "Useful extensions to the Python standard library")
1442 (description
1443 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1444 (license license:expat)))
c15a5c0e
DT
1445
1446(define-public python2-extras
1447 (package-with-python2 python-extras))
1448
56ea0efd
DT
1449(define-public python-mimeparse
1450 (package
1451 (name "python-mimeparse")
1452 (version "0.1.4")
1453 (source
1454 (origin
1455 (method url-fetch)
1456 (uri (string-append
1457 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1458 version ".tar.gz"))
1459 (sha256
1460 (base32
1461 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1462 (build-system python-build-system)
1463 (inputs
1464 `(("python-setuptools" ,python-setuptools)))
1465 (arguments
1466 '(#:tests? #f)) ; no setup.py test command
1467 (home-page
1468 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1469 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1470 (description
1471 "Mimeparse provides basic functions for parsing MIME type names and
1472matching them against a list of media-ranges.")
bd3fa666 1473 (license license:expat)))
56ea0efd
DT
1474
1475(define-public python2-mimeparse
1476 (package-with-python2 python-mimeparse))
1477
4435427e
DT
1478(define-public python-nose
1479 (package
1480 (name "python-nose")
1481 (version "1.3.4")
1482 (source
1483 (origin
1484 (method url-fetch)
1485 (uri (string-append
1486 "https://pypi.python.org/packages/source/n/nose/nose-"
1487 version ".tar.gz"))
1488 (sha256
1489 (base32
1490 "00qymfgwg4iam4xi0w9bnv7lcb3fypq1hzfafzgs1rfmwaj67g3n"))))
1491 (build-system python-build-system)
1492 (inputs
1493 `(("python-setuptools" ,python-setuptools)))
1494 (arguments
1495 '(#:tests? #f)) ; FIXME: test suite fails
1496 (home-page "http://readthedocs.org/docs/nose/")
1497 (synopsis "Python testing library")
1498 (description
1499 "Nose extends the unittest library to make testing easier.")
1500 (license lgpl2.0+)))
1501
1502(define-public python2-nose
1503 (package-with-python2 python-nose))
1504
6cd9c356
DT
1505(define-public python-unittest2
1506 (package
1507 (name "python-unittest2")
1508 (version "0.5.1")
1509 (source
1510 (origin
1511 (method url-fetch)
1512 (uri (string-append
1513 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1514 version ".tar.gz"))
1515 (sha256
1516 (base32
1517 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1518 (build-system python-build-system)
1519 (inputs
1520 `(("python-setuptools" ,python-setuptools)))
1521 (home-page "http://pypi.python.org/pypi/unittest2")
1522 (synopsis "Python unit testing library")
1523 (description
1524 "Unittest2 is a replacement for the unittest module in the Python
1525standard library.")
1526 (license psfl)))
1527
1528(define-public python2-unittest2
1529 (package (inherit python-unittest2)
1530 (name "python2-unittest2")
1531 (version "0.5.1")
1532 (source
1533 (origin
1534 (method url-fetch)
1535 (uri (string-append
1536 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1537 version ".tar.gz"))
1538 (sha256
1539 (base32
1540 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1541 (inputs
1542 `(("python2-setuptools" ,python-setuptools)))
1543 (arguments
1544 `(#:python ,python-2
1545 #:tests? #f)))) ; no setup.py test command
1546
542ad60f
DT
1547(define-public python-py
1548 (package
1549 (name "python-py")
1550 (version "1.4.23")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (string-append
1555 "https://pypi.python.org/packages/source/p/py/py-"
1556 version ".tar.gz"))
1557 (sha256
1558 (base32
1559 "1jkhffpai419v5rickm2vz86p9bkg3b3kcm2k4bi5wfajhw2m3xs"))))
1560 (build-system python-build-system)
1561 (inputs
1562 `(("python-setuptools" ,python-setuptools)))
1563 (home-page "http://pylib.readthedocs.org/")
1564 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1565 (description
1566 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1567code introspection, and logging.")
bd3fa666 1568 (license license:expat)))
542ad60f
DT
1569
1570(define-public python2-py
1571 (package-with-python2 python-py))
1572
855d4761
DT
1573(define-public python-pytest
1574 (package
1575 (name "python-pytest")
1576 (version "2.6.1")
1577 (source
1578 (origin
1579 (method url-fetch)
1580 (uri (string-append
1581 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1582 version ".tar.gz"))
1583 (sha256
1584 (base32
1585 "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
1586 (modules '((guix build utils)))
1587 (snippet
1588 ;; One of the tests involves the /usr directory, so it fails.
1589 '(substitute* "testing/test_argcomplete.py"
1590 (("def test_remove_dir_prefix\\(self\\):")
1591 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1592 (build-system python-build-system)
1593 (inputs
1594 `(("python-setuptools" ,python-setuptools)
1595 ("python-py" ,python-py)
1596 ("python-nose" ,python-nose)
1597 ("python-mock" ,python-mock)))
1598 (home-page "http://pytest.org")
1599 (synopsis "Python testing library")
1600 (description
1601 "Pytest is a testing tool that provides auto-discovery of test modules
1602and functions, detailed info on failing assert statements, modular fixtures,
1603and many external plugins.")
bd3fa666 1604 (license license:expat)))
855d4761
DT
1605
1606(define-public python2-pytest
1607 (package-with-python2 python-pytest))
1608
84d24017
DT
1609(define-public python-scripttest
1610 (package
1611 (name "python-scripttest")
1612 (version "1.3")
1613 (source
1614 (origin
1615 (method url-fetch)
1616 (uri (string-append
1617 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1618 version ".tar.gz"))
1619 (sha256
1620 (base32
1621 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1622 (build-system python-build-system)
1623 (inputs
1624 `(("python-setuptools" ,python-setuptools)
1625 ("python-pytest" ,python-pytest)))
1626 (home-page "http://pythonpaste.org/scripttest/")
1627 (synopsis "Python library to test command-line scripts")
1628 (description "Scripttest is a Python helper library for testing
1629interactive command-line applications. With it you can run a script in a
1630subprocess and see the output as well as any file modifications.")
bd3fa666 1631 (license license:expat)))
84d24017
DT
1632
1633(define-public python2-scripttest
1634 (package-with-python2 python-scripttest))
1635
d8fa80e1
DT
1636(define-public python-testtools
1637 (package
1638 (name "python-testtools")
1639 (version "1.0.0")
1640 (source
1641 (origin
1642 (method url-fetch)
1643 (uri (string-append
1644 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1645 version ".tar.gz"))
1646 (sha256
1647 (base32
1648 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1649 (build-system python-build-system)
0e88cbf8
CR
1650 (propagated-inputs
1651 `(("python-mimeparse" ,python-mimeparse)))
d8fa80e1
DT
1652 (inputs
1653 `(("python-setuptools" ,python-setuptools)
d8fa80e1
DT
1654 ("python-extras" ,python-extras)))
1655 (home-page "https://github.com/testing-cabal/testtools")
1656 (synopsis
1657 "Extensions to the Python standard library unit testing framework")
1658 (description
1659 "Testtools extends the Python standard library unit testing framework to
1660provide matchers, more debugging information, and cross-Python
1661compatibility.")
1662 (license psfl)))
1663
1664(define-public python2-testtools
1665 (package-with-python2 python-testtools))
1666
5bf3afea
DT
1667(define-public python-testscenarios
1668 (package
1669 (name "python-testscenarios")
1670 (version "0.4")
1671 (source
1672 (origin
1673 (method url-fetch)
1674 (uri (string-append
1675 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1676 version ".tar.gz"))
1677 (sha256
1678 (base32
1679 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1680 (build-system python-build-system)
1681 (inputs
1682 `(("python-setuptools" ,python-setuptools)
1683 ("python-testtools" ,python-testtools)
1684 ("python-mimeparse" ,python-mimeparse)))
1685 (home-page "https://launchpad.net/testscenarios")
1686 (synopsis "Pyunit extension for dependency injection")
1687 (description
1688 "Testscenarios provides clean dependency injection for Python unittest
1689style tests.")
1690 (license (list bsd-3 asl2.0)))) ; at the user's option
1691
1692(define-public python2-testscenarios
1693 (package-with-python2 python-testscenarios))
1694
dac79ecc
DT
1695(define-public python-testresources
1696 (package
1697 (name "python-testresources")
1698 (version "0.2.7")
1699 (source
1700 (origin
1701 (method url-fetch)
1702 (uri (string-append
1703 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1704 version ".tar.gz"))
1705 (sha256
1706 (base32
1707 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1708 (build-system python-build-system)
1709 (inputs
1710 `(("python-setuptools" ,python-setuptools)))
1711 (home-page "https://launchpad.net/testresources")
1712 (synopsis
1713 "Pyunit extension for managing test resources")
1714 (description
1715 "Testresources is an extension to Python's unittest to allow declarative
1716use of resources by test cases.")
1717 (license (list bsd-3 asl2.0)))) ; at the user's option
1718
1719(define-public python2-testresources
1720 (package-with-python2 python-testresources))
1721
070ab058
DT
1722(define-public python-subunit
1723 (package
1724 (name "python-subunit")
1725 (version "0.0.21")
1726 (source
1727 (origin
1728 (method url-fetch)
1729 (uri (string-append
1730 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1731 version ".tar.gz"))
1732 (sha256
1733 (base32
1734 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1735 (build-system python-build-system)
1736 (inputs
1737 `(("python-setuptools" ,python-setuptools)
1738 ("python-testtools" ,python-testtools)
1739 ("python-mimeparse" ,python-mimeparse)
1740 ("python-testscenarios" ,python-testscenarios)))
1741 (home-page "http://launchpad.net/subunit")
1742 (synopsis "Python implementation of the subunit protocol")
1743 (description
1744 "Python-subunit is a Python implementation of the subunit test streaming
1745protocol.")
1746 (license (list bsd-3 asl2.0)))) ; at the user's option
1747
1748(define-public python2-subunit
1749 (package-with-python2 python-subunit))
1750
cd49454b
DT
1751(define-public python-fixtures
1752 (package
1753 (name "python-fixtures")
1754 (version "0.3.16")
1755 (source
1756 (origin
1757 (method url-fetch)
1758 (uri (string-append
1759 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1760 version ".tar.gz"))
1761 (sha256
1762 (base32
1763 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1764 (build-system python-build-system)
1765 (inputs
1766 `(("python-setuptools" ,python-setuptools)))
1767 (arguments
1768 '(#:tests? #f)) ; no setup.py test command
1769 (home-page "https://launchpad.net/python-fixtures")
1770 (synopsis "Python test fixture library")
1771 (description
1772 "Fixtures provides a way to create reusable state, useful when writing
1773Python tests.")
1774 (license (list bsd-3 asl2.0)))) ; at user's option
1775
1776(define-public python2-fixtures
1777 (package-with-python2 python-fixtures))
1778
b24a0c00
DT
1779(define-public python-testrepository
1780 (package
1781 (name "python-testrepository")
1782 (version "0.0.20")
1783 (source
1784 (origin
1785 (method url-fetch)
1786 (uri (string-append
1787 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
1788 version ".tar.gz"))
1789 (sha256
1790 (base32
1791 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
1792 (build-system python-build-system)
05de40c5
CR
1793 (propagated-inputs
1794 `(("python-fixtures" ,python-fixtures)
1795 ("python-testtools" ,python-testtools)))
b24a0c00
DT
1796 (inputs
1797 `(("python-setuptools" ,python-setuptools)
b24a0c00 1798 ("python-subunit" ,python-subunit)
b24a0c00
DT
1799 ("python-mimeparse" ,python-mimeparse)))
1800 (home-page "https://launchpad.net/testrepository")
1801 (synopsis "Database for Python test results")
1802 (description "Testrepository provides a database of test results which can
1803be used as part of a developer's workflow to check things such as what tests
1804have failed since the last commit or what tests are currently failing.")
1805 (license (list bsd-3 asl2.0)))) ; at user's option
1806
1807(define-public python2-testrepository
1808 (package-with-python2 python-testrepository))
1809
243a009a
DT
1810(define-public python-coverage
1811 (package
1812 (name "python-coverage")
1813 (version "3.7.1")
1814 (source
1815 (origin
1816 (method url-fetch)
1817 (uri (string-append
1818 "https://pypi.python.org/packages/source/c/coverage/coverage-"
1819 version ".tar.gz"))
1820 (sha256
1821 (base32
1822 "0knlbq79g2ww6xzsyknj9rirrgrgc983dpa2d9nkdf31mb2a3bni"))))
1823 (build-system python-build-system)
1824 (inputs
1825 `(("python-setuptools" ,python-setuptools)))
1826 (home-page "http://nedbatchelder.com/code/coverage")
1827 (synopsis "Code coverage measurement for Python")
1828 (description
1829 "Coverage measures code coverage, typically during test execution. It
1830uses the code analysis tools and tracing hooks provided in the Python standard
1831library to determine which lines are executable, and which have been
1832executed.")
1833 (license bsd-3)))
1834
1835(define-public python2-coverage
1836 (package-with-python2 python-coverage))
1837
041358fb
DT
1838(define-public python-discover
1839 (package
1840 (name "python-discover")
1841 (version "0.4.0")
1842 (source
1843 (origin
1844 (method url-fetch)
1845 (uri (string-append
1846 "https://pypi.python.org/packages/source/d/discover/discover-"
1847 version ".tar.gz"))
1848 (sha256
1849 (base32
1850 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
1851 (build-system python-build-system)
1852 (inputs
1853 `(("python-setuptools" ,python-setuptools)))
1854 (home-page "http://pypi.python.org/pypi/discover/")
1855 (synopsis
1856 "Python test discovery for unittest")
1857 (description
1858 "Discover provides test discovery for unittest, a feature that has been
e881752c 1859backported from Python 2.7 for Python 2.4+.")
041358fb
DT
1860 (license bsd-3)))
1861
1862(define-public python2-discover
1863 (package-with-python2 python-discover))
1864
a480bc41
EB
1865(define-public behave
1866 (package
1867 (name "behave")
1868 (version "1.2.4")
1869 (source (origin
1870 (method url-fetch)
1871 (uri (string-append "https://pypi.python.org/packages/source/b/"
1872 name "/" name "-" version ".tar.gz"))
1873 (sha256
1874 (base32
1875 "1v2rfy8xnf0rk7cj4cgr7lam4015d458i7bg0xqs9czfv6njlm14"))))
1876 (build-system python-build-system)
1877 (inputs
1878 `(("python-setuptools" ,python-setuptools)
1879 ("python-six" ,python-six)
1880 ("python-enum43" ,python-enum34)
1881 ("python-parse" ,python-parse)
1882 ("python-parse-type" ,python-parse-type)))
1883 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
1884 ;PyHamcrest>=1.8
1885 (home-page "http://github.com/behave/behave")
1886 (synopsis "Python behavior-driven development")
1887 (description
1888 "Behave is a tool for behavior-driven development in python.
1889Behavior-driven development (or BDD) is an agile software development
1890technique that encourages collaboration between developers, QA and
1891non-technical or business participants in a software project. Behave uses
1892tests written in a natural language style, backed up by Python code.")
1893 (license x11)))
c7303d3c
DT
1894
1895(define-public python-exif-read
1896 (package
1897 (name "python-exif-read")
1898 (version "1.4.2")
1899 (source (origin
1900 (method url-fetch)
1901 (uri
1902 (string-append
1903 "https://pypi.python.org/packages/source/E/ExifRead/ExifRead-"
1904 version ".tar.gz"))
1905 (sha256
1906 (base32
1907 "17c627gcdmyc05hz4zk8qs4pjgw6rc68qzjzgz8gh1cmpsd7acf1"))))
1908 (build-system python-build-system)
1909 (inputs
1910 `(("python-setuptools" ,python-setuptools)))
1911 (arguments `(#:tests? #f)) ; no tests
1912 (home-page "https://github.com/ianare/exif-py")
1913 (synopsis "Python library to extract EXIF data from image files")
1914 (description
1915 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1916files.")
1917 (license bsd-3)))
1918
1919(define-public python2-exif-read
1920 (package-with-python2 python-exif-read))
d5f89b22
DT
1921
1922(define-public python-pyld
1923 (package
1924 (name "python-pyld")
1925 (version "0.6.0")
1926 (source (origin
1927 (method url-fetch)
1928 (uri
1929 (string-append
1930 "https://pypi.python.org/packages/source/P/PyLD/PyLD-"
1931 version ".tar.gz"))
1932 (sha256
1933 (base32
1934 "1l9ymj85fsvayqplinzpk0kyiq6m74ps9xd3a9fhlxfn1rldf8x8"))))
1935 (build-system python-build-system)
1936 (inputs
1937 `(("python-setuptools" ,python-setuptools)))
1938 (arguments `(#:tests? #f)) ; no tests
1939 (home-page "http://github.com/digitalbazaar/pyld")
1940 (synopsis "Python implementation of the JSON-LD specification")
1941 (description
1942 "PyLD is an implementation of the JSON-LD specification.")
1943 (license bsd-3)))
1944
1945(define-public python2-pyld
1946 (package-with-python2 python-pyld))
3a1f9a68
DT
1947
1948(define-public python-certifi
1949 (package
1950 (name "python-certifi")
1951 (version "14.05.14")
1952 (source (origin
1953 (method url-fetch)
1954 (uri
1955 (string-append
1956 "https://pypi.python.org/packages/source/c/certifi/certifi-"
1957 version ".tar.gz"))
1958 (sha256
1959 (base32
1960 "0s8vxzfz6s4m6fvxc7z25k9j35w0rh6jkw3wwcd1az1mssncn6qy"))))
1961 (build-system python-build-system)
1962 (inputs
1963 `(("python-setuptools" ,python-setuptools)))
1964 (arguments `(#:tests? #f)) ; no tests
1965 (home-page "http://python-requests.org/")
1966 (synopsis "Python CA certificate bundle")
1967 (description
1968 "Certifi is a Python library that contains a CA certificate bundle, which
1969is used by the Requests library to verify HTTPS requests.")
1970 (license asl2.0)))
1971
1972(define-public python2-certifi
1973 (package-with-python2 python-certifi))
e6cfbd36 1974
12c270dd
RW
1975(define-public python-click
1976 (package
1977 (name "python-click")
1978 (version "4.0")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (string-append
1983 "https://pypi.python.org/packages/source/c/click/click-"
1984 version ".tar.gz"))
1985 (sha256
1986 (base32 "0294x9g28w6zgswl0rsygkwi0wf6n480gf7fiiw5f9az3xhh77pl"))))
1987 (build-system python-build-system)
1988 (native-inputs
1989 `(("python-setuptools" ,python-setuptools)))
1990 (home-page "http://click.pocoo.org")
1991 (synopsis "Command line library for Python")
1992 (description
1993 "Click is a Python package for creating command line interfaces in a
1994composable way with as little code as necessary. Its name stands for
1995\"Command Line Interface Creation Kit\". It's highly configurable but comes
1996with sensible defaults out of the box.")
1997 (license bsd-3)))
1998
1999(define-public python2-click
2000 (package-with-python2 python-click))
2001
ae641128 2002(define-public python-requests
e6cfbd36 2003 (package
ae641128 2004 (name "python-requests")
e6cfbd36
DT
2005 (version "2.4.0")
2006 (source (origin
2007 (method url-fetch)
2008 (uri
2009 (string-append
2010 "https://pypi.python.org/packages/source/r/requests/requests-"
2011 version ".tar.gz"))
2012 (sha256
2013 (base32
2014 "0gknlfx1wakrrm1zi8gi03x2lzj4dsns0vjw0nsmgqvkphyf01vh"))))
2015 (build-system python-build-system)
2016 (inputs
2017 `(("python-setuptools" ,python-setuptools)
2018 ("python-certifi" ,python-certifi)))
ae641128 2019 (arguments `(#:tests? #f)) ; no tests
e6cfbd36
DT
2020 (home-page "http://python-requests.org/")
2021 (synopsis "Python HTTP library")
2022 (description
2023 "Requests is a Python HTTP client library. It aims to be easier to use
2024than Python’s urllib2 library.")
2025 (license asl2.0)))
864b5211 2026
ae641128
DT
2027(define-public python2-requests
2028 (package-with-python2 python-requests))
2029
864b5211
DT
2030(define-public python-jsonschema
2031 (package
2032 (name "python-jsonschema")
2033 (version "2.4.0")
2034 (source (origin
2035 (method url-fetch)
2036 (uri
2037 (string-append
2038 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2039 version ".tar.gz"))
2040 (sha256
2041 (base32
2042 "1yik3031ziygvq66rj3mzfqdgxj29sg1bkfc46wsgi7lnbqs560j"))))
2043 (build-system python-build-system)
2044 (inputs
2045 `(("python-setuptools" ,python-setuptools)))
2046 (home-page "http://github.com/Julian/jsonschema")
2047 (synopsis "Implementation of JSON Schema for Python")
2048 (description
2049 "Jsonschema is an implementation of JSON Schema for Python.")
bd3fa666 2050 (license license:expat)))
864b5211
DT
2051
2052(define-public python2-jsonschema
2053 (package-with-python2 python-jsonschema))
850189b8
DT
2054
2055(define-public python-unidecode
2056 (package
2057 (name "python-unidecode")
2058 (version "0.04.16")
2059 (source (origin
2060 (method url-fetch)
2061 (uri
2062 (string-append
2063 "https://pypi.python.org/packages/source/U/Unidecode/Unidecode-"
2064 version ".tar.gz"))
2065 (sha256
2066 (base32
2067 "0yv56vc49rvippyxgxvcyz7jklc07ky38rcspax7p00sgmriiljc"))))
2068 (build-system python-build-system)
2069 (inputs
2070 `(("python-setuptools" ,python-setuptools)))
2071 (home-page "https://pypi.python.org/pypi/Unidecode")
2072 (synopsis "ASCII transliterations of Unicode text")
2073 (description
2074 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2075useful when integrating with legacy code that doesn't support Unicode, or for
2076ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2077machine identifiers from human-readable Unicode strings that should still be
2078somewhat intelligeble.")
2079 (license gpl2+)))
2080
2081(define-public python2-unidecode
2082 (package-with-python2 python-unidecode))
6d45fef4
DT
2083
2084(define-public python-pyjwt
2085 (package
2086 (name "python-pyjwt")
2087 (version "0.2.1")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (string-append
2092 "https://pypi.python.org/packages/source/P/PyJWT/PyJWT-"
2093 version ".tar.gz"))
2094 (sha256
2095 (base32
2096 "1ahqblfy2sj3xz34wsa48cn9rp0dspzq56p54i5znmws3b8gml6g"))))
2097 (build-system python-build-system)
2098 (inputs
2099 `(("python-setuptools" ,python-setuptools)))
2100 (arguments
2101 '(#:tests? #f)) ; test suite doesn't work
2102 (home-page "http://github.com/progrium/pyjwt")
2103 (synopsis "JSON Web Token implementation in Python")
2104 (description
2105 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2106 (license license:expat)))
6d45fef4
DT
2107
2108(define-public python2-pyjwt
2109 (package-with-python2 python-pyjwt))
2110
2cec1f6f
DT
2111(define-public python-oauthlib
2112 (package
2113 (name "python-oauthlib")
2114 (version "0.6.3")
2115 (source (origin
2116 (method url-fetch)
2117 (uri
2118 (string-append
2119 "https://pypi.python.org/packages/source/o/oauthlib/oauthlib-"
2120 version ".tar.gz"))
2121 (sha256
2122 (base32
2123 "1yaj3j64la4arwsbhbfmpnickzh3jpg9nlpyg409v8pp24isn48a"))))
2124 (build-system python-build-system)
2125 (inputs
2126 `(("python-setuptools" ,python-setuptools)
2127 ("python-pyjwt" ,python-pyjwt)
2128 ("python-pycrypto" ,python-pycrypto)
2129 ("python-nose" ,python-nose)
2130 ("python-mock" ,python-mock)))
2131 (home-page "https://github.com/idan/oauthlib")
2132 (synopsis "OAuth implementation for Python")
2133 (description
2134 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2135OAuth request-signing logic.")
2136 (license bsd-3)))
2137
2138(define-public python2-oauthlib
2139 (let ((base (package-with-python2 python-oauthlib)))
2140 (package
2141 (inherit base)
2cec1f6f
DT
2142 (inputs
2143 (append (package-inputs base)
2144 `(("python2-unittest2" ,python2-unittest2)))))))
ec5dbb5c
DT
2145
2146(define-public python-itsdangerous
2147 (package
2148 (name "python-itsdangerous")
2149 (version "0.24")
2150 (source
2151 (origin
2152 (method url-fetch)
2153 (uri (string-append
2154 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2155 version ".tar.gz"))
2156 (sha256
2157 (base32
2158 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2159 (build-system python-build-system)
2160 (inputs
2161 `(("python-setuptools" ,python-setuptools)))
2162 (home-page "http://github.com/mitsuhiko/itsdangerous")
2163 (synopsis "Python library for passing data to/from untrusted environments")
2164 (description
2165 "Itsdangerous provides various helpers to pass trusted data to untrusted
2166environments and back.")
2167 (license bsd-3)))
2168
2169(define-public python2-itsdangerous
2170 (package-with-python2 python-itsdangerous))
5731cae3 2171
8d12be1e
RW
2172(define-public python-pyyaml
2173 (package
2174 (name "python-pyyaml")
2175 (version "3.11")
2176 (source
2177 (origin
2178 (method url-fetch)
2179 (uri (string-append
2180 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2181 version ".tar.gz"))
2182 (sha256
2183 (base32
2184 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2185 (build-system python-build-system)
2186 (inputs
2187 `(("libyaml" ,libyaml)))
2188 (native-inputs
2189 `(("python-setuptools" ,python-setuptools)))
2190 (home-page "http://pyyaml.org/wiki/PyYAML")
2191 (synopsis "YAML parser and emitter for Python")
2192 (description
2193 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2194complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2195API, and sensible error messages. PyYAML supports standard YAML tags and
2196provides Python-specific tags that allow to represent an arbitrary Python
2197object.")
2198 (license license:expat)))
2199
2200(define-public python2-pyyaml
2201 (package-with-python2 python-pyyaml))
2202
5731cae3
DT
2203(define-public python-virtualenv
2204 (package
2205 (name "python-virtualenv")
2206 (version "1.11.6")
2207 (source
2208 (origin
2209 (method url-fetch)
2210 (uri (string-append
2211 "https://pypi.python.org/packages/source/v/virtualenv/virtualenv-"
2212 version ".tar.gz"))
2213 (sha256
2214 (base32
2215 "1xq4prmg25n9cz5zcvbqx68lmc3kl39by582vd8pzs9f3qalqyiy"))))
2216 (build-system python-build-system)
2217 (inputs
2218 `(("python-setuptools" ,python-setuptools)
2219 ("python-mock" ,python-mock)
2220 ("python-nose" ,python-nose)))
2221 (home-page "https://virtualenv.pypa.io/")
2222 (synopsis "Virtual Python environment builder")
2223 (description
2224 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2225 (license license:expat)))
5731cae3
DT
2226
2227(define-public python2-virtualenv
2228 (package-with-python2 python-virtualenv))
8176d4d5
DT
2229
2230(define-public python-markupsafe
2231 (package
2232 (name "python-markupsafe")
2233 (version "0.23")
2234 (source
2235 (origin
2236 (method url-fetch)
2237 (uri (string-append
2238 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2239 version ".tar.gz"))
2240 (sha256
2241 (base32
2242 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2243 (build-system python-build-system)
2244 (inputs
2245 `(("python-setuptools" ,python-setuptools)))
2246 (home-page "http://github.com/mitsuhiko/markupsafe")
2247 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2248 (description
2249 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2250for Python.")
2251 (license bsd-3)))
2252
2253(define-public python2-markupsafe
2254 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2255
2256(define-public python-jinja2
2257 (package
2258 (name "python-jinja2")
2259 (version "2.7.3")
2260 (source
2261 (origin
2262 (method url-fetch)
2263 (uri (string-append
2264 "https://pypi.python.org/packages/source/J/Jinja2/Jinja2-"
2265 version ".tar.gz"))
2266 (sha256
2267 (base32
2268 "1nwg9yfqgy421lncnm63k1zf9xkd1klc0jm0fr4p3dad01fsq91f"))))
2269 (build-system python-build-system)
2270 (inputs
2271 `(("python-setuptools" ,python-setuptools)
2272 ("python-markupsafe" ,python-markupsafe)))
2273 (home-page "http://jinja.pocoo.org/")
2274 (synopsis "Python template engine")
2275 (description
2276 "Jinja2 is a small but fast and easy to use stand-alone template engine
2277written in pure Python.")
2278 (license bsd-3)))
2279
2280(define-public python2-jinja2
2281 (package-with-python2 python-jinja2))
3580ab8b
DT
2282
2283(define-public python-docutils
2284 (package
2285 (name "python-docutils")
2286 (version "0.12")
2287 (source
2288 (origin
2289 (method url-fetch)
2290 (uri (string-append
2291 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2292 version ".tar.gz"))
2293 (sha256
2294 (base32
2295 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2296 (build-system python-build-system)
2297 (inputs
2298 `(("python-setuptools" ,python-setuptools)))
2299 (arguments
2300 '(#:tests? #f)) ; no setup.py test command
2301 (home-page "http://docutils.sourceforge.net/")
2302 (synopsis "Python Documentation Utilities")
2303 (description
2304 "Docutils is a modular system for processing documentation into useful
2305formats, such as HTML, XML, and LaTeX. For input Docutils supports
2306reStructuredText.")
2307 ;; Most of the source code is public domain, but some source files are
2308 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2309 (license (list public-domain psfl bsd-2 gpl3+))))
2310
2311(define-public python2-docutils
2312 (package-with-python2 python-docutils))
fb35b7c0
DT
2313
2314(define-public python-pygments
2315 (package
2316 (name "python-pygments")
2317 (version "1.6")
2318 (source
2319 (origin
2320 (method url-fetch)
2321 (uri (string-append
2322 "https://pypi.python.org/packages/source/P/Pygments/Pygments-"
2323 version ".tar.gz"))
2324 (sha256
2325 (base32
2326 "1h11r6ss8waih51vcksfvzghfxiav2f8svc0812fa5kmyz5d97kr"))))
2327 (build-system python-build-system)
2328 (inputs
2329 `(("python-setuptools" ,python-setuptools)))
2330 (home-page "http://pygments.org/")
2331 (synopsis "Syntax highlighting")
2332 (description
2333 "Pygments is a syntax highlighting package written in Python.")
2334 (license bsd-2)))
2335
2336(define-public python2-pygments
2337 (package-with-python2 python-pygments))
9dd6078d
DT
2338
2339(define-public python-sphinx
2340 (package
2341 (name "python-sphinx")
2342 (version "1.2.3")
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (string-append
2347 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2348 version ".tar.gz"))
2349 (sha256
2350 (base32
2351 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2352 (build-system python-build-system)
2353 (inputs
2354 `(("python-setuptools" ,python-setuptools)
2355 ("python-jinja2" ,python-jinja2)
2356 ("python-docutils" ,python-docutils)
2357 ("python-pygments" ,python-pygments)))
2358 (home-page "http://sphinx-doc.org/")
2359 (synopsis "Python documentation generator")
2360 (description "Sphinx is a tool that makes it easy to create documentation
2361for Python projects or other documents consisting of multiple reStructuredText
2362sources.")
2363 (license bsd-3)))
2364
2365(define-public python2-sphinx
2366 (package-with-python2 python-sphinx))
6888830b 2367
ad320b20
RW
2368(define-public python-sphinx-rtd-theme
2369 (package
2370 (name "python-sphinx-rtd-theme")
2371 (version "0.1.6")
2372 (source
2373 (origin
2374 (method url-fetch)
2375 (uri (string-append "https://pypi.python.org/packages/source/s/"
2376 "sphinx_rtd_theme/sphinx_rtd_theme-"
2377 version ".tar.gz"))
2378 (sha256
2379 (base32
2380 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2381 (build-system python-build-system)
2382 (arguments
2383 `(;; With standard flags, the install phase attempts to create a zip'd
2384 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2385 ;; before 1980'
2386 #:configure-flags '("--single-version-externally-managed"
2387 "--record=sphinx-rtd-theme.txt")))
2388 (native-inputs
2389 `(("python-setuptools" ,python-setuptools)))
2390 (inputs
2391 `(("python-docutils" ,python-docutils)
2392 ("python-sphinx" ,python-sphinx)))
2393 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2394 (synopsis "ReadTheDocs.org theme for Sphinx")
2395 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2396 (license license:expat)))
ad320b20
RW
2397
2398(define-public python2-sphinx-rtd-theme
2399 (package-with-python2 python-sphinx-rtd-theme))
2400
f4de5b3b
CAW
2401(define-public python-feedgenerator
2402 (package
2403 (name "python-feedgenerator")
2404 (version "20150710.97185b7")
2405 (source
2406 ;; Using the git checkout for now because license file not added till
2407 ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
2408 (origin
2409 (method git-fetch)
2410 (uri (git-reference
2411 (url "https://github.com/dmdm/feedgenerator-py3k.git")
2412 (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
2413 (sha256
2414 (base32
2415 "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
2416 (arguments
2417 `(;; With standard flags, the install phase attempts to create a zip'd
2418 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2419 ;; before 1980'
2420 #:configure-flags '("--single-version-externally-managed"
2421 "--record=feedgenerator.txt")))
2422 (build-system python-build-system)
2423 (inputs
2424 `(("python-setuptools" ,python-setuptools)
2425 ("python-pytz" ,python-pytz)
2426 ("python-six" ,python-six)))
2427 (home-page
2428 "https://github.com/dmdm/feedgenerator-py3k.git")
2429 (synopsis
2430 "Standalone version of Django's Atom/RSS feed generator")
2431 (description
2432 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2433which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2434 (license bsd-3)))
2435
2436(define-public python2-feedgenerator
2437 (package-with-python2 python-feedgenerator))
2438
59ad30e3
CAW
2439(define-public python-blinker
2440 (package
2441 (name "python-blinker")
2442 (version "1.3")
2443 (source
2444 (origin
2445 (method url-fetch)
2446 (uri (string-append
2447 "https://pypi.python.org/packages/source/b/blinker/blinker-"
2448 version ".tar.gz"))
2449 (sha256
2450 (base32
2451 "0bvfxkmjx6bpa302pv7v2vw5rwr3dlzjzfdp3bj628i6144024b8"))))
2452 (build-system python-build-system)
2453 (native-inputs
2454 `(("python-setuptools" ,python-setuptools)))
2455 ;; No "test" command supplied to setuptools, so unless there's another way
2456 ;; to run tests, we're skipping them!
2457 (arguments '(#:tests? #f))
2458 (home-page "http://pythonhosted.org/blinker/")
2459 (synopsis "Fast, simple object-to-object and broadcast signaling")
2460 (description
2461 "Blinker provides a fast dispatching system that allows any number of
2462interested parties to subscribe to events, or \"signals\".")
2463 (license license:expat)))
2464
2465(define-public python2-blinker
2466 (package-with-python2 python-blinker))
2467
b8050e71
CAW
2468(define-public pelican
2469 (package
2470 (name "pelican")
2471 (version "3.6.0")
2472 (source
2473 (origin
2474 (method url-fetch)
2475 (uri (string-append
2476 "https://pypi.python.org/packages/source/p/pelican/pelican-"
2477 version ".tar.gz"))
2478 (sha256
2479 (base32
2480 "0lbkk902mqxpp452pp76n6qcjv6f99lq2zl204xmqyzcan9zr3ps"))))
2481 (build-system python-build-system)
2482 (native-inputs
2483 `(("python-setuptools" ,python-setuptools)))
2484 (propagated-inputs
2485 `(("python-feedgenerator" ,python-feedgenerator)
2486 ("python-jinja2" ,python-jinja2)
2487 ("python-pygments" ,python-pygments)
2488 ("python-docutils" ,python-docutils)
2489 ("python-pytz" ,python-pytz)
2490 ("python-blinker" ,python-blinker)
2491 ("python-unidecode" ,python-unidecode)
2492 ("python-six" ,python-six)
2493 ("python-dateutil-2" ,python-dateutil-2)))
2494 (home-page "http://getpelican.com/")
2495 (arguments
2496 `(;; XXX Requires a lot more packages to do unit tests :P
2497 #:tests? #f
2498 #:phases (modify-phases %standard-phases
2499 (add-before
2500 'install 'adjust-requires
2501 ;; Since feedgenerator is installed from git, it doesn't
2502 ;; conform to the version requirements.
2503 ;;
2504 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2505 ;; version requirement so setuptools doesn't get confused.
2506 (lambda _
2507 (substitute* "setup.py"
2508 (("['\"]feedgenerator.*?['\"]")
2509 "'feedgenerator'")))))))
2510 (synopsis "Python-based static site publishing system")
2511 (description
2512 "Pelican is a tool to generate a static blog from reStructuredText,
2513Markdown input files, and more. Pelican uses Jinja2 for templating
2514and is very extensible.")
2515 (license agpl3+)))
2516
240ca4aa
RW
2517(define-public python-scikit-learn
2518 (package
2519 (name "python-scikit-learn")
be0a4c26 2520 (version "0.16.1")
240ca4aa
RW
2521 (source
2522 (origin
2523 (method url-fetch)
2524 (uri (string-append
2525 "https://github.com/scikit-learn/scikit-learn/archive/"
2526 version ".tar.gz"))
2527 (sha256
2528 (base32
be0a4c26 2529 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2530 (build-system python-build-system)
2531 (arguments
2532 `(#:phases
2533 (alist-cons-before
2f6b3d2e
RW
2534 'check 'set-HOME
2535 ;; some tests require access to "$HOME"
2536 (lambda _ (setenv "HOME" "/tmp"))
2537 ;; Tests can only be run after the library has been installed and not
2538 ;; within the source directory.
2539 (alist-cons-after
2540 'install 'check
2541 (lambda _
2542 (with-directory-excursion "/tmp"
2543 ;; With Python 3 one test of 3334 fails
2544 ;; (sklearn.tests.test_common.test_transformers); see
2545 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2546 (system* "nosetests" "-v" "sklearn")))
2547 (alist-delete 'check %standard-phases)))))
240ca4aa 2548 (inputs
2f6b3d2e 2549 `(("openblas" ,openblas)
240ca4aa
RW
2550 ("python-nose" ,python-nose)))
2551 (propagated-inputs
2552 `(("python-numpy" ,python-numpy)
2553 ("python-scipy" ,python-scipy)))
2554 (home-page "http://scikit-learn.org/")
2555 (synopsis "Machine Learning in Python")
2556 (description
2557 "Scikit-learn provides simple and efficient tools for data
2558mining and data analysis.")
2559 (license bsd-3)))
2560
2561(define-public python2-scikit-learn
2562 (let ((scikit (package-with-python2 python-scikit-learn)))
2563 (package (inherit scikit)
2564 (propagated-inputs
2565 `(("python2-numpy" ,python2-numpy)
2566 ("python2-scipy" ,python2-scipy)
2567 ,@(alist-delete
2568 "python-numpy"
2569 (alist-delete
2570 "python-scipy" (package-propagated-inputs scikit))))))))
2571
12f8f9bb
RW
2572(define-public python-scikit-image
2573 (package
2574 (name "python-scikit-image")
2575 (version "0.11.3")
2576 (source
2577 (origin
2578 (method url-fetch)
2579 (uri (string-append
2580 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2581 version ".tar.gz"))
2582 (sha256
2583 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2584 (build-system python-build-system)
2585 (propagated-inputs
2586 `(("python-matplotlib" ,python-matplotlib)
2587 ("python-networkx" ,python-networkx)
2588 ("python-numpy" ,python-numpy)
2589 ("python-scipy" ,python-scipy)
2590 ("python-six" ,python-six)
2591 ("python-pillow" ,python-pillow)))
2592 (native-inputs
2593 `(("python-cython" ,python-cython)
2594 ("python-setuptools" ,python-setuptools)))
2595 (home-page "http://scikit-image.org/")
2596 (synopsis "Image processing in Python")
2597 (description
e881752c 2598 "Scikit-image is a collection of algorithms for image processing.")
12f8f9bb
RW
2599 (license bsd-3)))
2600
2601(define-public python2-scikit-image
2602 (let ((scikit-image (package-with-python2 python-scikit-image)))
2603 (package (inherit scikit-image)
2604 (native-inputs
2605 `(("python2-mock" ,python2-mock)
2606 ,@(package-native-inputs scikit-image)))
2607 (propagated-inputs
2608 `(("python2-pytz" ,python2-pytz)
2609 ,@(package-propagated-inputs scikit-image))))))
2610
5394a6a6
RW
2611(define-public python-redis
2612 (package
2613 (name "python-redis")
2614 (version "2.10.3")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (string-append
2619 "https://pypi.python.org/packages/source/r/redis/redis-"
2620 version ".tar.gz"))
2621 (sha256
2622 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2623 (build-system python-build-system)
2624 ;; Tests require a running Redis server
2625 (arguments '(#:tests? #f))
2626 (native-inputs
2627 `(("python-setuptools" ,python-setuptools)
2628 ("python-pytest" ,python-pytest)))
2629 (home-page "https://github.com/andymccurdy/redis-py")
2630 (synopsis "Redis Python client")
2631 (description
2632 "This package provides a Python interface to the Redis key-value store.")
2633 (license license:expat)))
2634
2635(define-public python2-redis
2636 (package-with-python2 python-redis))
2637
748cef5b
RW
2638(define-public python-rq
2639 (package
2640 (name "python-rq")
2641 (version "0.5.2")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (string-append
2646 "https://pypi.python.org/packages/source/r/rq/rq-"
2647 version ".tar.gz"))
2648 (sha256
2649 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
2650 (build-system python-build-system)
2651 (propagated-inputs
2652 `(("python-click" ,python-click)
2653 ("python-redis" ,python-redis)))
2654 (native-inputs
2655 `(("python-setuptools" ,python-setuptools)))
2656 (home-page "http://python-rq.org/")
2657 (synopsis "Simple job queues for Python")
2658 (description
2659 "RQ (Redis Queue) is a simple Python library for queueing jobs and
2660processing them in the background with workers. It is backed by Redis and it
2661is designed to have a low barrier to entry.")
2662 (license bsd-2)))
2663
2664(define-public python2-rq
2665 (package-with-python2 python-rq))
2666
6888830b
FB
2667(define-public python-cython
2668 (package
2669 (name "python-cython")
2670 (version "0.21.1")
2671 (source
2672 (origin
2673 (method url-fetch)
2674 (uri (string-append "http://cython.org/release/Cython-"
2675 version ".tar.gz"))
2676 (sha256
2677 (base32
2678 "0ddz2l2dvcy5hdkxx4xlfiwpccvwia7ixgcy4h0pdv46a4i4vxj3"))))
2679 (build-system python-build-system)
2680 ;; we need the full python package and not just the python-wrapper
2681 ;; because we need libpython3.3m.so
2682 (inputs
2683 `(("python" ,python)))
2684 (arguments
2685 `(#:phases
2686 (alist-cons-before
2687 'check 'set-HOME
2688 ;; some tests require access to "$HOME/.cython"
2689 (lambda* _ (setenv "HOME" "/tmp"))
2690 (alist-replace
2691 'check
2692 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))
2693 %standard-phases))))
2694 (home-page "http://cython.org/")
2695 (synopsis "C extensions for Python")
2696 (description "Cython is an optimising static compiler for both the Python
2697programming language and the extended Cython programming language. It makes
2698writing C extensions for Python as easy as Python itself.")
2699 (license asl2.0)))
2700
2701(define-public python2-cython
2702 (package (inherit (package-with-python2 python-cython))
2703 (name "python2-cython")
2704 (inputs
2705 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533
FB
2706
2707;; This version of numpy is missing the documentation and is only used to
2708;; build matplotlib which is required to build numpy's documentation.
2709(define python-numpy-bootstrap
2710 (package
2711 (name "python-numpy-bootstrap")
2712 (version "1.9.1")
2713 (source
2714 (origin
2715 (method url-fetch)
2716 (uri (string-append "mirror://sourceforge/numpy"
2717 "/numpy-" version ".tar.gz"))
2718 (sha256
2719 (base32
2720 "070ybfvpgfmiz2hs94x445hvkh9dh52nyi0m8jp5kdihgvhbnx80"))))
2721 (build-system python-build-system)
2722 (inputs
2723 `(("python-nose" ,python-nose)
cba256f8
RW
2724 ("openblas" ,openblas)
2725 ("lapack" ,lapack)))
0da98533 2726 (native-inputs
19afbea1 2727 `(("gfortran" ,gfortran)))
0da98533
FB
2728 (arguments
2729 `(#:phases
2730 (alist-cons-before
2731 'build 'set-environment-variables
2732 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
2733 (call-with-output-file "site.cfg"
2734 (lambda (port)
cba256f8
RW
2735 (format port
2736 "[openblas]
dbdfe515
RW
2737libraries = openblas
2738library_dirs = ~a/lib
2739include_dirs = ~a/include
cba256f8
RW
2740
2741[lapack]
2742lapack_libs = lapack
2743library_dirs = ~a/lib
2744include_dirs = ~a/include
2745"
2746 (assoc-ref inputs "openblas")
2747 (assoc-ref inputs "openblas")
2748 (assoc-ref inputs "lapack")
2749 (assoc-ref inputs "lapack"))))
dbdfe515
RW
2750 ;; Use "gcc" executable, not "cc".
2751 (substitute* "numpy/distutils/system_info.py"
2752 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2753 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2754 #t)
6a843168
FB
2755 ;; Tests can only be run after the library has been installed and not
2756 ;; within the source directory.
2757 (alist-cons-after
2758 'install 'check
89b5c60e 2759 (lambda _
6a843168 2760 (with-directory-excursion "/tmp"
89b5c60e 2761 (zero? (system* "python" "-c"
6a843168 2762 "import numpy; numpy.test(verbose=2)"))))
89b5c60e
AE
2763 (alist-delete
2764 'check
6a843168 2765 %standard-phases)))))
0da98533
FB
2766 (home-page "http://www.numpy.org/")
2767 (synopsis "Fundamental package for scientific computing with Python")
2768 (description "NumPy is the fundamental package for scientific computing
e881752c 2769with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
2770object, sophisticated (broadcasting) functions, tools for integrating C/C++
2771and Fortran code, useful linear algebra, Fourier transform, and random number
2772capabilities.")
2773 (license bsd-3)))
2774
2775(define python2-numpy-bootstrap
2776 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 2777
3a1bfe18
RW
2778(define-public python2-fastlmm
2779 (package
2780 (name "python2-fastlmm")
2781 (version "0.2.14")
2782 (source
2783 (origin
2784 (method url-fetch)
2785 (uri (string-append
2786 "https://pypi.python.org/packages/source/f/fastlmm"
2787 "/fastlmm-" version ".zip"))
2788 (sha256
2789 (base32
2790 "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l"))))
2791 (build-system python-build-system)
2792 (arguments
2793 `(#:python ,python-2)) ; only Python 2.7 is supported
2794 (propagated-inputs
2795 `(("python2-numpy" ,python2-numpy)
2796 ("python2-scipy" ,python2-scipy)
2797 ("python2-matplotlib" ,python2-matplotlib)
2798 ("python2-pandas" ,python2-pandas)
2799 ("python2-scikit-learn" ,python2-scikit-learn)
2800 ("python2-cython" ,python2-cython)
2801 ("python2-pysnptools" ,python2-pysnptools)))
2802 (native-inputs
2803 `(("unzip" ,unzip)
2804 ("python2-mock" ,python2-mock)
2805 ("python2-setuptools" ,python2-setuptools)))
2806 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
2807 (synopsis "Perform genome-wide association studies on large data sets")
2808 (description
2809 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
2810Models, is a program for performing both single-SNP and SNP-set genome-wide
2811association studies (GWAS) on extremely large data sets.")
2812 (license asl2.0)))
2813
2ee8869a
FB
2814(define-public python-numpy
2815 (package (inherit python-numpy-bootstrap)
2816 (name "python-numpy")
2817 (outputs '("out" "doc"))
89b5c60e 2818 (inputs
2ee8869a
FB
2819 `(("which" ,which)
2820 ("python-setuptools" ,python-setuptools)
2821 ("python-matplotlib" ,python-matplotlib)
2822 ("python-sphinx" ,python-sphinx)
2823 ("python-pyparsing" ,python-pyparsing)
2824 ("python-numpydoc" ,python-numpydoc)
2825 ,@(package-inputs python-numpy-bootstrap)))
2826 (native-inputs
2827 `(("pkg-config" ,pkg-config)
2828 ("texlive" ,texlive)
2829 ("texinfo" ,texinfo)
2830 ("perl" ,perl)
2831 ,@(package-native-inputs python-numpy-bootstrap)))
2832 (arguments
89b5c60e 2833 `(,@(substitute-keyword-arguments
2ee8869a
FB
2834 (package-arguments python-numpy-bootstrap)
2835 ((#:phases phases)
2836 `(alist-cons-after
2837 'install 'install-doc
2838 (lambda* (#:key outputs #:allow-other-keys)
2839 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
2840 (doc (string-append
2841 data "/doc/" ,name "-"
2ee8869a
FB
2842 ,(package-version python-numpy-bootstrap)))
2843 (info (string-append data "/info"))
2844 (html (string-append doc "/html"))
2845 (pyver ,(string-append "PYVER=")))
2846 (with-directory-excursion "doc"
2847 (mkdir-p html)
2848 (system* "make" "html" pyver)
2849 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 2850 (system* "make" "-C" "build/latex"
2ee8869a
FB
2851 "all-pdf" "PAPER=a4" pyver)
2852 ;; FIXME: Generation of the info file fails.
2853 ;; (system* "make" "info" pyver)
2854 ;; (mkdir-p info)
2855 ;; (copy-file "build/texinfo/numpy.info"
2856 ;; (string-append info "/numpy.info"))
2857 (for-each (lambda (file)
2858 (copy-file (string-append "build/latex" file)
2859 (string-append doc file)))
2860 '("/numpy-ref.pdf" "/numpy-user.pdf"))
2861 (with-directory-excursion "build/html"
2862 (for-each (lambda (file)
2863 (let* ((dir (dirname file))
2864 (tgt-dir (string-append html "/" dir)))
2865 (unless (equal? "." dir)
2866 (mkdir-p tgt-dir))
96c46210 2867 (install-file file html)))
2ee8869a
FB
2868 (find-files "." ".*"))))))
2869 ,phases)))))))
2870
764c077b
LC
2871(define-public python2-numpy
2872 (let ((numpy (package-with-python2 python-numpy)))
2873 (package (inherit numpy)
88c26834
AE
2874 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
2875 ;; Python 2.
2876 (inputs `(("python2-matplotlib" ,python2-matplotlib)
2877 ,@(alist-delete "python-matplotlib"
2878 (package-inputs numpy)))))))
2ee8869a 2879
15bfe6d6
FB
2880(define-public python-pyparsing
2881 (package
2882 (name "python-pyparsing")
e0669289 2883 (version "2.0.3")
15bfe6d6
FB
2884 (source
2885 (origin
2886 (method url-fetch)
2887 (uri (string-append "mirror://sourceforge/pyparsing"
2888 "/pyparsing-" version ".tar.gz"))
2889 (sha256
2890 (base32
e0669289 2891 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
2892 (build-system python-build-system)
2893 (outputs '("out" "doc"))
2894 (arguments
2895 `(#:tests? #f ; no test target
2896 #:modules ((guix build python-build-system)
2897 (guix build utils))
2898 #:phases
2899 (alist-cons-after
2900 'install 'install-doc
2901 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 2902 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
2903 "/share/doc/" ,name "-" ,version))
2904 (html-doc (string-append doc "/html"))
2905 (examples (string-append doc "/examples")))
2906 (mkdir-p html-doc)
2907 (mkdir-p examples)
89b5c60e 2908 (for-each
15bfe6d6 2909 (lambda (dir tgt)
89b5c60e 2910 (map (lambda (file)
96c46210 2911 (install-file file tgt))
15bfe6d6
FB
2912 (find-files dir ".*")))
2913 (list "docs" "htmldoc" "examples")
2914 (list doc html-doc examples))))
2915 %standard-phases)))
2916 (home-page "http://pyparsing.wikispaces.com")
2917 (synopsis "Python parsing class library")
2918 (description
2919 "The pyparsing module is an alternative approach to creating and
2920executing simple grammars, vs. the traditional lex/yacc approach, or the use
2921of regular expressions. The pyparsing module provides a library of classes
2922that client code uses to construct the grammar directly in Python code.")
bd3fa666 2923 (license license:expat)))
15bfe6d6
FB
2924
2925(define-public python2-pyparsing
2926 (package-with-python2 python-pyparsing))
2927
ec00de35
FB
2928(define-public python-numpydoc
2929 (package
2930 (name "python-numpydoc")
2931 (version "0.5")
2932 (source
2933 (origin
2934 (method url-fetch)
89b5c60e 2935 (uri (string-append
ec00de35
FB
2936 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
2937 version ".tar.gz"))
2938 (sha256
2939 (base32
5e4d8f67
AE
2940 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
2941 (modules '((guix build utils)))
2942 (snippet
2943 '(begin
2944 ;; Drop a test requiring matplotlib, which we cannot add as an
2945 ;; input since it would create a circular dependency: Extend the
2946 ;; test for Python 3, where it is already dropped, to Python 2.
2947 (substitute* "numpydoc/tests/test_plot_directive.py"
2948 (("3") "2"))))))
ec00de35
FB
2949 (build-system python-build-system)
2950 (inputs
2951 `(("python-setuptools" ,python-setuptools)
2952 ("python-docutils" ,python-docutils)
2953 ("python-sphinx" ,python-sphinx)
2954 ("python-nose" ,python-nose)))
2955 (home-page "https://pypi.python.org/pypi/numpydoc")
2956 (synopsis
2957 "Numpy's Sphinx extensions")
2958 (description
2959 "Sphinx extension to support docstrings in Numpy format.")
2960 (license bsd-2)))
2961
2962(define-public python2-numpydoc
5e4d8f67 2963 (package-with-python2 python-numpydoc))
1c65314c
FB
2964
2965(define-public python-matplotlib
2966 (package
2967 (name "python-matplotlib")
2968 (version "1.4.2")
2969 (source
2970 (origin
2971 (method url-fetch)
2972 (uri (string-append "mirror://sourceforge/matplotlib"
2973 "/matplotlib-" version ".tar.gz"))
2974 (sha256
2975 (base32
2976 "0m6v9nwdldlwk22gcd339zg6mny5m301fxgks7z8sb8m9wawg8qp"))))
2977 (build-system python-build-system)
2978 (outputs '("out" "doc"))
25f9a068
FB
2979 (propagated-inputs ; the following packages are all needed at run time
2980 `(("python-pyparsing" ,python-pyparsing)
2981 ("python-pygobject" ,python-pygobject)
2982 ("gobject-introspection" ,gobject-introspection)
2983 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
2984 ;; from 'gtk+') provides the required 'typelib' files used by
2985 ;; 'gobject-introspection'. The location of these files is set with the
2986 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
2987 ;; is done automatically by a 'native-search-path' procedure. However,
2988 ;; at run-time the user must set this variable as follows:
2989 ;;
2990 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
2991 ("gtk+" ,gtk+)
2992 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
2993 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
2994 ;; object. For this reason we need to import both libraries.
2995 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
2996 ("python-pycairo" ,python-pycairo)
2997 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
2998 (inputs
2999 `(("python-setuptools" ,python-setuptools)
3000 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
3001 ("python-six" ,python-six)
3002 ("python-pytz" ,python-pytz)
3003 ("python-numpy" ,python-numpy-bootstrap)
3004 ("python-sphinx" ,python-sphinx)
3005 ("python-numpydoc" ,python-numpydoc)
3006 ("python-nose" ,python-nose)
3007 ("python-mock" ,python-mock)
3008 ("libpng" ,libpng)
3009 ("imagemagick" ,imagemagick)
3010 ("freetype" ,freetype)
25f9a068
FB
3011 ("cairo" ,cairo)
3012 ("glib" ,glib)
4e7a137a 3013 ("python-pillow" ,python-pillow)
1c65314c 3014 ;; FIXME: Add backends when available.
1c65314c
FB
3015 ;("python-wxpython" ,python-wxpython)
3016 ;("python-pyqt" ,python-pyqt)
3017 ))
3018 (native-inputs
3019 `(("pkg-config" ,pkg-config)
3020 ("texlive" ,texlive)
3021 ("texinfo" ,texinfo)))
3022 (arguments
3023 `(#:phases
25f9a068
FB
3024 (alist-cons-before
3025 'build 'configure-environment
3026 (lambda* (#:key outputs inputs #:allow-other-keys)
3027 (let ((cairo (assoc-ref inputs "cairo"))
3028 (gtk+ (assoc-ref inputs "gtk+")))
3029 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3030 ;; has not effect.
25f9a068
FB
3031 (setenv "LD_LIBRARY_PATH"
3032 (string-append cairo "/lib:" gtk+ "/lib"))
3033 (setenv "HOME" (getcwd))
3034 (call-with-output-file "setup.cfg"
3035 (lambda (port)
3036 (format port "[rc_options]~%
3037backend = GTK3Agg~%")))))
3038 (alist-cons-after
3039 'install 'install-doc
3040 (lambda* (#:key outputs #:allow-other-keys)
3041 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3042 (doc (string-append data "/doc/" ,name "-" ,version))
3043 (info (string-append data "/info"))
3044 (html (string-append doc "/html")))
3045 (with-directory-excursion "doc"
25f9a068
FB
3046 ;; Produce pdf in 'A4' format.
3047 (substitute* (find-files "." "conf\\.py")
3048 (("latex_paper_size = 'letter'")
3049 "latex_paper_size = 'a4'"))
3050 (mkdir-p html)
3051 (mkdir-p info)
3052 ;; The doc recommends to run the 'html' target twice.
3053 (system* "python" "make.py" "html")
3054 (system* "python" "make.py" "html")
3055 (system* "python" "make.py" "latex")
3056 (system* "python" "make.py" "texinfo")
3057 (copy-file "build/texinfo/matplotlib.info"
3058 (string-append info "/matplotlib.info"))
3059 (copy-file "build/latex/Matplotlib.pdf"
3060 (string-append doc "/Matplotlib.pdf"))
3061 (copy-recursively "build/html" html))))
3062 %standard-phases))))
1c65314c
FB
3063 (home-page "http://matplotlib.org")
3064 (synopsis "2D plotting library for Python")
3065 (description
3066 "Matplotlib is a Python 2D plotting library which produces publication
3067quality figures in a variety of hardcopy formats and interactive environments
3068across platforms. Matplotlib can be used in Python scripts, the python and
3069ipython shell, web application servers, and six graphical user interface
3070toolkits.")
3071 (license psfl)))
3072
764c077b
LC
3073(define-public python2-matplotlib
3074 (let ((matplotlib (package-with-python2 python-matplotlib)))
3075 (package (inherit matplotlib)
88c26834
AE
3076 ;; Make sure to use special packages for Python 2 instead
3077 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3078 (propagated-inputs
7ca0dbc3 3079 `(("python2-pycairo" ,python2-pycairo)
764c077b
LC
3080 ("python2-pygobject-2" ,python2-pygobject-2)
3081 ,@(alist-delete "python-pycairo"
3082 (alist-delete "python-pygobject"
89b5c60e 3083 (package-propagated-inputs
88c26834 3084 matplotlib))))))))
94914805 3085
0dde6232
RW
3086(define-public python2-pysnptools
3087 (package
3088 (name "python2-pysnptools")
3089 (version "0.2.13")
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (string-append
3094 "https://pypi.python.org/packages/source/p/pysnptools"
3095 "/pysnptools-" version ".zip"))
3096 (sha256
3097 (base32
3098 "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
3099 (build-system python-build-system)
3100 (arguments
3101 `(#:python ,python-2)) ; only Python 2.7 is supported
3102 (propagated-inputs
3103 `(("python2-numpy" ,python2-numpy)
3104 ("python2-scipy" ,python2-scipy)
3105 ("python2-pandas" ,python2-pandas)
3106 ("python2-cython" ,python2-cython)))
3107 (native-inputs
3108 `(("unzip" ,unzip)
3109 ("python2-setuptools" ,python2-setuptools)))
3110 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3111 (synopsis "Library for reading and manipulating genetic data")
3112 (description
3113 "PySnpTools is a library for reading and manipulating genetic data. It
3114can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3115those files. It can also efficiently manipulate ranges of integers using set
3116operators such as union, intersection, and difference.")
3117 (license asl2.0)))
3118
c9b1b4f9
RW
3119(define-public python-rpy2
3120 (package
3121 (name "python-rpy2")
3122 (version "2.6.0")
3123 (source
3124 (origin
3125 (method url-fetch)
3126 (uri (string-append "https://pypi.python.org/packages/source/r/rpy2"
3127 "/rpy2-" version ".tar.gz"))
3128 (sha256
3129 (base32
3130 "1dp4l8hpv0jpf4crz4wis6in3lvwk86cr5zvpw410y4a07rrbqjk"))))
3131 (build-system python-build-system)
3132 (inputs
3133 `(("python-six" ,python-six)
3134 ("readline" ,readline)
3135 ("icu4c" ,icu4c)
3136 ("pcre" ,pcre)
3137 ("r" ,r)))
3138 (native-inputs
3139 `(("python-setuptools" ,python-setuptools)))
3140 (home-page "http://rpy.sourceforge.net/")
3141 (synopsis "Python interface to the R language")
3142 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3143low-level interface to R from Python, a proposed high-level interface,
3144including wrappers to graphical libraries, as well as R-like structures and
3145functions.")
3146 (license gpl3+)))
3147
3148(define-public python2-rpy2
3149 (let ((rpy2 (package-with-python2 python-rpy2)))
3150 (package (inherit rpy2)
3151 (native-inputs
3152 `(("python2-singledispatch" ,python2-singledispatch)
3153 ,@(package-native-inputs rpy2))))))
3154
bb986599
FB
3155(define-public python-scipy
3156 (package
3157 (name "python-scipy")
da6ce3f1 3158 (version "0.15.0")
bb986599
FB
3159 (source
3160 (origin
3161 (method url-fetch)
3162 (uri (string-append "mirror://sourceforge/scipy"
da6ce3f1 3163 "/scipy-" version ".tar.xz"))
bb986599
FB
3164 (sha256
3165 (base32
da6ce3f1 3166 "0fsqi05s035d7p6s8h3h2pvk1axias16chy17rw9l1bxvrfhmncf"))))
bb986599
FB
3167 (build-system python-build-system)
3168 (inputs
3169 `(("python-numpy" ,python-numpy)
3170 ("python-matplotlib" ,python-matplotlib)
3171 ("python-pyparsing" ,python-pyparsing)
3172 ("python-nose" ,python-nose)
3173 ("python-sphinx" ,python-sphinx)
719b01c1
RW
3174 ("lapack" ,lapack)
3175 ("openblas" ,openblas)))
bb986599 3176 (native-inputs
19afbea1 3177 `(("gfortran" ,gfortran)
bb986599
FB
3178 ("texlive" ,texlive)
3179 ("perl" ,perl)))
3180 (outputs '("out" "doc"))
3181 (arguments
3182 `(#:phases
3183 (alist-cons-before
719b01c1 3184 'build 'configure-openblas
bb986599 3185 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3186 (call-with-output-file "site.cfg"
3187 (lambda (port)
3188 (format port
3189 "[blas]
3190libraries = openblas
3191library_dirs = ~a/lib
3192include_dirs = ~a/include
3193[atlas]
3194library_dirs = ~a/lib
3195atlas_libs = openblas
3196"
3197 (assoc-ref inputs "openblas")
3198 (assoc-ref inputs "openblas")
3199 (assoc-ref inputs "openblas"))))
3200 #t)
bb986599
FB
3201 (alist-cons-after
3202 'install 'install-doc
3203 (lambda* (#:key outputs #:allow-other-keys)
3204 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3205 (doc (string-append data "/doc/" ,name "-" ,version))
3206 (html (string-append doc "/html"))
3207 (pyver ,(string-append "PYVER=")))
3208 (with-directory-excursion "doc"
bb986599
FB
3209 ;; Fix generation of images for mathematical expressions.
3210 (substitute* (find-files "source" "conf\\.py")
3211 (("pngmath_use_preview = True")
3212 "pngmath_use_preview = False"))
3213 (mkdir-p html)
3214 (system* "make" "html" pyver)
3215 (system* "make" "latex" "PAPER=a4" pyver)
3216 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3217 (copy-file "build/latex/scipy-ref.pdf"
3218 (string-append doc "/scipy-ref.pdf"))
3219 (with-directory-excursion "build/html"
3220 (for-each (lambda (file)
3221 (let* ((dir (dirname file))
3222 (tgt-dir (string-append html "/" dir)))
96c46210 3223 (install-file file html)))
bb986599
FB
3224 (find-files "." ".*"))))))
3225 ;; Tests can only be run after the library has been installed and not
3226 ;; within the source directory.
3227 (alist-cons-after
3228 'install 'check
89b5c60e 3229 (lambda _
bb986599
FB
3230 (with-directory-excursion "/tmp"
3231 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3232 (alist-delete
3233 'check
bb986599
FB
3234 %standard-phases))))))
3235 (home-page "http://www.scipy.org/")
3236 (synopsis "The Scipy library provides efficient numerical routines")
3237 (description "The SciPy library is one of the core packages that make up
3238the SciPy stack. It provides many user-friendly and efficient numerical
3239routines such as routines for numerical integration and optimization.")
3240 (license bsd-3)))
3241
764c077b
LC
3242(define-public python2-scipy
3243 (let ((scipy (package-with-python2 python-scipy)))
3244 (package (inherit scipy)
3245 ;; Use packages customized for python-2.
3246 (inputs `(("python2-matplotlib" ,python2-matplotlib)
3247 ("python2-numpy" ,python2-numpy)
89b5c60e
AE
3248 ,@(alist-delete "python-matplotlib"
3249 (alist-delete "python-numpy"
764c077b 3250 (package-inputs scipy))))))))
bb986599 3251
94914805
EB
3252(define-public python-sqlalchemy
3253 (package
3254 (name "python-sqlalchemy")
3255 (version "0.9.7")
3256 (source
3257 (origin
3258 (method url-fetch)
3259 (uri (string-append "https://pypi.python.org/packages/source/S/"
3260 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3261 (sha256
3262 (base32
3263 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
3264 (build-system python-build-system)
3265 (native-inputs
3266 `(("python-cython" ,python-cython) ;for c extensions
3267 ("python-pytest" ,python-pytest)
3268 ("python-mock" ,python-mock))) ;for tests
3269 (arguments
3270 `(#:phases (alist-replace
3271 'check
3272 (lambda _ (zero? (system* "py.test")))
3273 %standard-phases)))
3274 (home-page "http://www.sqlalchemy.org")
3275 (synopsis "Database abstraction library")
3276 (description
3277 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3278gives application developers the full power and flexibility of SQL. It
3279provides a full suite of well known enterprise-level persistence patterns,
3280designed for efficient and high-performing database access, adapted into a
3281simple and Pythonic domain language.")
3282 (license x11)))
3283
3284(define-public python2-sqlalchemy
3285 (package-with-python2 python-sqlalchemy))
c937562e 3286
1671c07c
EB
3287(define-public python-distutils-extra
3288 (package
3289 (name "python-distutils-extra")
3290 (version "2.38")
3291 (source
3292 (origin
3293 (method url-fetch)
3294 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3295 version "/+download/python-distutils-extra-"
3296 version ".tar.gz"))
3297 (sha256
3298 (base32
3299 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3300 (build-system python-build-system)
3301 (native-inputs
3302 `(("python-setuptools" ,python-setuptools)))
3303 (home-page "https://launchpad.net/python-distutils-extra/")
3304 (synopsis "Enhancements to Python's distutils")
3305 (description
3306 "The python-distutils-extra module enables you to easily integrate
3307gettext support, themed icons, and scrollkeeper-based documentation into
3308Python's distutils.")
3309 (license gpl2)))
3310
3311(define-public python2-distutils-extra
3312 (package-with-python2 python-distutils-extra))
ea5456c8
EB
3313
3314(define-public python2-elib.intl
3315 (package
3316 (name "python2-elib.intl")
3317 (version "0.0.3")
3318 (source
3319 (origin
3320 ;; This project doesn't tag releases or publish tarballs, so we take
3321 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3322 (method git-fetch)
3323 (uri (git-reference
3324 (url "https://github.com/dieterv/elib.intl.git")
3325 (commit "d09997cfef")))
3326 (sha256
3327 (base32
3328 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3329 (build-system python-build-system)
3330 (native-inputs
3331 `(("python2-setuptools" ,python2-setuptools)))
3332 (arguments
3333 ;; incompatible with Python 3 (exception syntax)
3334 `(#:python ,python-2
3335 #:tests? #f
3336 ;; With standard flags, the install phase attempts to create a zip'd
3337 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3338 ;; before 1980'
3339 #:configure-flags '("--single-version-externally-managed"
3340 "--record=elib.txt")))
3341 (home-page "https://github.com/dieterv/elib.intl")
3342 (synopsis "Enhanced internationalization for Python")
3343 (description
3344 "The elib.intl module provides enhanced internationalization (I18N)
3345services for your Python modules and applications.")
3346 (license lgpl3+)))
3347
c937562e
EB
3348(define-public python-pillow
3349 (package
3350 (name "python-pillow")
5ff408d9 3351 (version "2.8.1")
c937562e
EB
3352 (source
3353 (origin
3354 (method url-fetch)
3355 (uri (string-append "https://pypi.python.org/packages/source/P/"
3356 "Pillow/Pillow-" version ".tar.gz"))
3357 (sha256
3358 (base32
5ff408d9 3359 "15n92axxph2s3kvg68bki9gv3nzwgq7130kp7wbblpi1l0cc2q47"))))
c937562e
EB
3360 (build-system python-build-system)
3361 (native-inputs
3362 `(("python-setuptools" ,python-setuptools)
3363 ("python-nose" ,python-nose)))
3364 (inputs
5ff408d9
SB
3365 `(("freetype" ,freetype)
3366 ("lcms" ,lcms)
c937562e
EB
3367 ("zlib" ,zlib)
3368 ("libjpeg" ,libjpeg)
3369 ("openjpeg" ,openjpeg)
5ff408d9
SB
3370 ("libtiff" ,libtiff)
3371 ("libwebp" ,libwebp)))
c937562e
EB
3372 (propagated-inputs
3373 `(;; Used at runtime for pkg_resources
3374 ("python-setuptools" ,python-setuptools)))
3375 (arguments
e5358a6b
LC
3376 `(#:phases (modify-phases %standard-phases
3377 (add-before
3378 'install 'disable-egg-compression
3379 (lambda _
3380 ;; Leave the .egg uncompressed since compressing it would
3381 ;; prevent the GC from identifying run-time dependencies.
3382 ;; See <http://bugs.gnu.org/20765>.
3383 (let ((port (open-file "setup.cfg" "a")))
3384 (display "\n[easy_install]\nzip_ok = 0\n"
3385 port)
3386 (close-port port)
3387 #t)))
3388 (add-after
3389 'install 'check-installed
3390 (lambda _
3391 (begin
3392 (setenv "HOME" (getcwd))
3393 (and (zero? (system* "python" "selftest.py"
3394 "--installed"))
3395 (zero? (system* "python" "test-installed.py"))))))
3396 (delete 'check))))
c937562e
EB
3397 (home-page "https://pypi.python.org/pypi/Pillow")
3398 (synopsis "Fork of the Python Imaging Library")
3399 (description
3400 "The Python Imaging Library adds image processing capabilities to your
3401Python interpreter. This library provides extensive file format support, an
3402efficient internal representation, and fairly powerful image processing
3403capabilities. The core image library is designed for fast access to data
3404stored in a few basic pixel formats. It should provide a solid foundation for
3405a general image processing tool.")
3406 (license (x11-style
3407 "http://www.pythonware.com/products/pil/license.htm"
3408 "The PIL Software License"))))
3409
3410(define-public python2-pillow
3411 (package-with-python2 python-pillow))
bb986599 3412
a415f036
FB
3413(define-public python-pycparser
3414 (package
3415 (name "python-pycparser")
3416 (version "2.10")
3417 (source
3418 (origin
3419 (method url-fetch)
3420 (uri (string-append "https://pypi.python.org/packages/source/p/"
3421 "pycparser/pycparser-" version ".tar.gz"))
3422 (sha256
3423 (base32
3424 "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm"))))
3425 (outputs '("out" "doc"))
3426 (build-system python-build-system)
3427 (native-inputs
3428 `(("pkg-config" ,pkg-config)
3429 ("python-setuptools" ,python-setuptools)))
3430 (arguments
89b5c60e 3431 `(#:phases
a415f036
FB
3432 (alist-replace
3433 'check
3434 (lambda _
3435 (with-directory-excursion "tests"
3436 (zero? (system* "python" "all_tests.py"))))
3437 (alist-cons-after
3438 'install 'install-doc
3439 (lambda* (#:key outputs #:allow-other-keys)
3440 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3441 (doc (string-append data "/doc/" ,name "-" ,version))
3442 (examples (string-append doc "/examples")))
3443 (mkdir-p examples)
3444 (for-each (lambda (file)
3445 (copy-file (string-append "." file)
3446 (string-append doc file)))
3447 '("/README.rst" "/CHANGES" "/LICENSE"))
3448 (copy-recursively "examples" examples)))
3449 %standard-phases))))
3450 (home-page "https://github.com/eliben/pycparser")
3451 (synopsis "C parser in Python")
3452 (description
3453 "Pycparser is a complete parser of the C language, written in pure Python
3454using the PLY parsing library. It parses C code into an AST and can serve as
3455a front-end for C compilers or analysis tools.")
3456 (license bsd-3)))
3457
3458(define-public python2-pycparser
3459 (package-with-python2 python-pycparser))
57c3f716
FB
3460
3461(define-public python-cffi
3462 (package
3463 (name "python-cffi")
4179f952 3464 (version "1.2.1")
57c3f716
FB
3465 (source
3466 (origin
3467 (method url-fetch)
3468 (uri (string-append "https://pypi.python.org/packages/source/c/"
3469 "cffi/cffi-" version ".tar.gz"))
89b5c60e 3470 (sha256
4179f952 3471 (base32 "0g8yfzinry1vsj6d1jlnd19338bh92lhhk207ksy4lm1n3g73dga"))))
57c3f716
FB
3472 (build-system python-build-system)
3473 (outputs '("out" "doc"))
3474 (inputs
3475 `(("libffi" ,libffi)))
3476 (propagated-inputs ; required at run-time
3477 `(("python-pycparser" ,python-pycparser)))
3478 (native-inputs
3479 `(("pkg-config" ,pkg-config)
3480 ("python-sphinx" ,python-sphinx)
4179f952 3481 ("python-pytest" ,python-pytest)
57c3f716
FB
3482 ("python-setuptools" ,python-setuptools)))
3483 (arguments
4179f952 3484 `(#:phases
57c3f716
FB
3485 (alist-cons-after
3486 'install 'install-doc
3487 (lambda* (#:key outputs #:allow-other-keys)
3488 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3489 (doc (string-append data "/doc/" ,name "-" ,version))
3490 (html (string-append doc "/html")))
3491 (with-directory-excursion "doc"
3492 (system* "make" "html")
3493 (mkdir-p html)
3494 (copy-recursively "build/html" html))
3495 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3496 %standard-phases)))
3497 (home-page "http://cffi.readthedocs.org")
3498 (synopsis "Foreign function interface for Python")
3499 (description
3500 "Foreign Function Interface for Python calling C code.")
bd3fa666 3501 (license license:expat)))
57c3f716
FB
3502
3503(define-public python2-cffi
3504 (package-with-python2 python-cffi))
6fa14469
FB
3505
3506(define-public python-xcffib
3507 (package
3508 (name "python-xcffib")
3509 (version "0.1.9")
3510 (source
3511 (origin
3512 (method url-fetch)
3513 (uri (string-append "https://pypi.python.org/packages/source/x/"
3514 "xcffib/xcffib-" version ".tar.gz"))
3515 (sha256
3516 (base32
3517 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3518 (build-system python-build-system)
3519 (inputs
3520 `(("libxcb" ,libxcb)
3521 ("python-six" ,python-six)))
3522 (native-inputs
3523 `(("python-setuptools" ,python-setuptools)))
3524 (propagated-inputs
3525 `(("python-cffi" ,python-cffi))) ; used at run time
3526 (arguments
89b5c60e 3527 `(#:phases
6fa14469
FB
3528 (alist-cons-after
3529 'install 'install-doc
3530 (lambda* (#:key outputs #:allow-other-keys)
3531 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3532 "/doc/" ,name "-" ,version)))
3533 (mkdir-p doc)
3534 (copy-file "README.md"
3535 (string-append doc "/README.md"))))
3536 %standard-phases)))
3537 (home-page "https://github.com/tych0/xcffib")
3538 (synopsis "XCB Python bindings")
3539 (description
3540 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3541support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3542 (license license:expat)))
6fa14469
FB
3543
3544(define-public python2-xcffib
3545 (package-with-python2 python-xcffib))
3546
9e099723
FB
3547(define-public python-cairocffi
3548 (package
3549 (name "python-cairocffi")
3550 (version "0.6")
3551 (source
3552 (origin
3553 (method url-fetch)
3554 ;; The archive on pypi is missing the 'utils' directory!
3555 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3556 version ".tar.gz"))
f586c877 3557 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3558 (sha256
3559 (base32
3560 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3561 (build-system python-build-system)
3562 (outputs '("out" "doc"))
3563 (inputs
3564 `(("gdk-pixbuf" ,gdk-pixbuf)
3565 ("cairo" ,cairo)))
3566 (native-inputs
3567 `(("pkg-config" ,pkg-config)
3568 ("python-sphinx" ,python-sphinx)
3569 ("python-docutils" ,python-docutils)
3570 ("python-setuptools" ,python-setuptools)))
3571 (propagated-inputs
3572 `(("python-xcffib" ,python-xcffib))) ; used at run time
3573 (arguments
89b5c60e 3574 `(#:phases
9e099723
FB
3575 (alist-cons-after
3576 'install 'install-doc
3577 (lambda* (#:key inputs outputs #:allow-other-keys)
3578 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3579 (doc (string-append data "/doc/" ,name "-" ,version))
3580 (html (string-append doc "/html")))
89b5c60e 3581 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3582 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3583 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3584 (setenv "LANG" "en_US.UTF-8")
3585 (mkdir-p html)
3586 (for-each (lambda (file)
3587 (copy-file (string-append "." file)
3588 (string-append doc file)))
3589 '("/README.rst" "/CHANGES" "/LICENSE"))
3590 (system* "python" "setup.py" "build_sphinx")
3591 (copy-recursively "docs/_build/html" html)))
3592 %standard-phases)))
3593 (home-page "https://github.com/SimonSapin/cairocffi")
3594 (synopsis "Python bindings and object-oriented API for Cairo")
3595 (description
3596 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3597Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3598graphics library with support for multiple backends including image buffers,
3599PNG, PostScript, PDF, and SVG file output.")
3600 (license bsd-3)))
3601
3602(define-public python2-cairocffi
3603 (package-with-python2 python-cairocffi))
3604
3cff95cb
RW
3605(define-public python-decorator
3606 (package
3607 (name "python-decorator")
3608 (version "3.4.2")
3609 (source
3610 (origin
3611 (method url-fetch)
3612 (uri (string-append
3613 "https://pypi.python.org/packages/source/d/decorator/decorator-"
3614 version ".tar.gz"))
3615 (sha256
3616 (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
3617 (build-system python-build-system)
3618 (arguments '(#:tests? #f)) ; no test target
3619 (native-inputs
3620 `(("python-setuptools" ,python-setuptools)))
3621 (home-page "http://pypi.python.org/pypi/decorator/")
3622 (synopsis "Python module to simplify usage of decorators")
3623 (description
3624 "The aim of the decorator module is to simplify the usage of decorators
3625for the average programmer, and to popularize decorators usage giving examples
3626of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3627etc. The core of this module is a decorator factory.")
3628 (license license:expat)))
3629
3630(define-public python2-decorator
3631 (package-with-python2 python-decorator))
3632
2c0499ad
RW
3633(define-public python-drmaa
3634 (package
3635 (name "python-drmaa")
3636 (version "0.7.6")
3637 (source
3638 (origin
3639 (method url-fetch)
3640 (uri (string-append
3641 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3642 version ".tar.gz"))
3643 (sha256
3644 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3645 (build-system python-build-system)
3646 ;; The test suite requires libdrmaa which is provided by the cluster
3647 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3648 ;; should be set to the path of the libdrmaa library.
3649 (arguments '(#:tests? #f))
3650 (native-inputs
3651 `(("python-nose" ,python-nose)
3652 ("python-setuptools" ,python-setuptools)))
3653 (home-page "https://pypi.python.org/pypi/drmaa")
3654 (synopsis "Python bindings for the DRMAA library")
3655 (description
3656 "A Python package for Distributed Resource Management (DRM) job
3657submission and control. This package is an implementation of the DRMAA 1.0
3658Python language binding specification.")
3659 (license bsd-3)))
3660
3661(define-public python2-drmaa
3662 (package-with-python2 python-drmaa))
3663
d05c6da0
RW
3664(define-public python-gridmap
3665 (package
3666 (name "python-gridmap")
3667 (version "0.13.0")
3668 (source
3669 (origin
3670 (method url-fetch)
3671 (uri (string-append
3672 "https://github.com/pygridtools/gridmap/archive/v"
3673 version ".tar.gz"))
3674 (file-name (string-append name "-" version ".tar.gz"))
3675 (sha256
3676 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
3677 (build-system python-build-system)
3678 (inputs
3679 `(("python-psutil" ,python-psutil)
3680 ("python-drmaa" ,python-drmaa)
3681 ("python-pyzmq" ,python-pyzmq)))
3682 (native-inputs
3683 `(("python-setuptools" ,python-setuptools)))
3684 (home-page "https://github.com/pygridtools/gridmap")
3685 (synopsis "Create jobs on a cluster directly from Python")
3686 (description
3687 "Gridmap is a Python package to allow you to easily create jobs on the
3688cluster directly from Python. You can directly map Python functions onto the
3689cluster without needing to write any wrapper code yourself.")
3690 (license gpl3+)))
3691
3692(define-public python2-gridmap
3693 (package-with-python2 python-gridmap))
3694
ae1ab9fe
FB
3695(define-public python-ipython
3696 (package
3697 (name "python-ipython")
3a0b1b9a 3698 (version "3.2.1")
ae1ab9fe
FB
3699 (source
3700 (origin
3701 (method url-fetch)
3702 (uri (string-append "https://pypi.python.org/packages/source/i/"
3703 "ipython/ipython-" version ".tar.gz"))
3704 (sha256
3a0b1b9a 3705 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
ae1ab9fe
FB
3706 (build-system python-build-system)
3707 (outputs '("out" "doc"))
3a0b1b9a
FB
3708 (propagated-inputs
3709 `(("python-pyzmq" ,python-pyzmq)
3710 ("python-terminado" ,python-terminado)))
ae1ab9fe
FB
3711 (inputs
3712 `(("readline" ,readline)
3a0b1b9a 3713 ("which" ,which)
ae1ab9fe
FB
3714 ("python-matplotlib" ,python-matplotlib)
3715 ("python-numpy" ,python-numpy-bootstrap)
3716 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
3717 ("python-jinja2" ,python-jinja2)
3718 ("python-mistune" ,python-mistune)
3719 ("python-jsonschema" ,python-jsonschema)
3720 ("python-pygments" ,python-pygments)
3721 ("python-requests" ,python-requests) ;; for tests
ae1ab9fe
FB
3722 ("python-nose" ,python-nose)))
3723 (native-inputs
3724 `(("pkg-config" ,pkg-config)
3725 ("python-sphinx" ,python-sphinx)
3726 ("texlive" ,texlive)
3727 ("texinfo" ,texinfo)
3728 ("python-setuptools" ,python-setuptools)))
3729 (arguments
89b5c60e 3730 `(#:phases
3a0b1b9a
FB
3731 (modify-phases %standard-phases
3732 (add-after
3733 'install 'install-doc
3734 (lambda* (#:key inputs outputs #:allow-other-keys)
3735 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3736 (doc (string-append data "/doc/" ,name "-" ,version))
3737 (html (string-append doc "/html"))
3738 (man1 (string-append data "/man/man1"))
3739 (info (string-append data "/info"))
3740 (examples (string-append doc "/examples")))
afd3d931 3741 (setenv "LANG" "en_US.utf8")
3a0b1b9a
FB
3742 (with-directory-excursion "docs"
3743 ;; FIXME: html and pdf fail to build
3744 ;; (system* "make" "html")
3745 ;; (system* "make" "pdf" "PAPER=a4")
3746 (system* "make" "info"))
3747 (copy-recursively "docs/man" man1)
3748 (copy-recursively "examples" examples)
3749 ;; (copy-recursively "docs/build/html" html)
3750 ;; (copy-file "docs/build/latex/ipython.pdf"
3751 ;; (string-append doc "/ipython.pdf"))
3752 (mkdir-p info)
3753 (copy-file "docs/build/texinfo/ipython.info"
3754 (string-append info "/ipython.info"))
3755 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
3756 ;; Tests can only be run after the library has been installed and not
3757 ;; within the source directory.
3758 (delete 'check)
3759 (add-after
3760 'install 'check
3761 (lambda* (#:key outputs tests? #:allow-other-keys)
3762 (if tests?
3763 (with-directory-excursion "/tmp"
3764 (setenv "HOME" "/tmp/") ;; required by a test
3765 (zero? (system* (string-append (assoc-ref outputs "out")
3766 "/bin/iptest"))))
3767 #t)))
3768 (add-before
3769 'install 'fix-tests
3770 (lambda* (#:key inputs #:allow-other-keys)
3771 (substitute* "./IPython/utils/_process_posix.py"
3772 (("/usr/bin/env', 'which") (which "which")))
3773 (substitute* "./IPython/core/tests/test_inputtransformer.py"
3774 (("#!/usr/bin/env python")
3775 (string-append "#!" (which "python"))))
3776 ;; Disable 1 failing test
3777 (substitute* "./IPython/core/tests/test_magic.py"
3778 (("def test_dirops\\(\\):" all)
3779 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
3780 (home-page "http://ipython.org")
3781 (synopsis "IPython is a tool for interactive computing in Python")
3782 (description
3783 "IPython provides a rich architecture for interactive computing with:
3784Powerful interactive shells, a browser-based notebook, support for interactive
3785data visualization, embeddable interpreters and tools for parallel
3786computing.")
3787 (license bsd-3)))
3788
3789(define-public python2-ipython
3790 (let ((ipython (package-with-python2 python-ipython)))
3a0b1b9a
FB
3791 (package
3792 (inherit ipython)
3793 ;; FIXME: some tests are failing
3794 (arguments
3795 `(#:tests? #f ,@(package-arguments ipython)))
ae1ab9fe 3796 ;; Make sure we use custom python2-NAME packages.
3a0b1b9a 3797 ;; FIXME: add pyreadline once available.
667d90df
RW
3798 (propagated-inputs
3799 `(("python2-terminado" ,python2-terminado)
3800 ,@(alist-delete "python-terminado"
3801 (package-propagated-inputs ipython))))
89b5c60e 3802 (inputs
3a0b1b9a
FB
3803 `(("python2-mock" ,python2-mock)
3804 ("python2-matplotlib" ,python2-matplotlib)
667d90df
RW
3805 ,@(alist-delete "python-matplotlib"
3806 (package-inputs ipython)))))))
03411993
AE
3807
3808(define-public python-isodate
3809 (package
3810 (name "python-isodate")
3811 (version "0.5.1")
3812 (source
3813 (origin
3814 (method url-fetch)
3815 (uri (string-append
3816 "https://pypi.python.org/packages/source/i/isodate/isodate-"
3817 version
3818 ".tar.gz"))
3819 (sha256
3820 (base32
3821 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
3822 (build-system python-build-system)
3823 (inputs
3824 `(("python-setuptools" ,python-setuptools)))
3825 (home-page
3826 "http://cheeseshop.python.org/pypi/isodate")
3827 (synopsis
3828 "Python date parser and formatter")
3829 (description
3830 "Python-isodate is a python module for parsing and formatting
3831ISO 8601 dates, time and duration.")
3832 (license bsd-3)))
3833
3834(define-public python2-isodate
3835 (package-with-python2 python-isodate))
673ab897
AE
3836
3837(define-public python-html5lib
3838 (package
3839 (name "python-html5lib")
3840 (version "1.0b3")
3841 (source
3842 (origin
3843 (method url-fetch)
3844 (uri (string-append
3845 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
3846 version
3847 ".tar.gz"))
3848 (sha256
3849 (base32
3850 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
3851 (build-system python-build-system)
3dd75476
AE
3852 (propagated-inputs
3853 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
3854 (inputs
3855 `(("python-setuptools" ,python-setuptools)))
3856 (arguments
3857 `(#:test-target "check"))
3858 (home-page
3859 "https://github.com/html5lib/html5lib-python")
3860 (synopsis
3861 "Python HTML parser based on the WHATWG HTML specifcation")
3862 (description
3863 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
3864and written in Python.")
bd3fa666 3865 (license license:expat)))
673ab897
AE
3866
3867(define-public python2-html5lib
3868 (package-with-python2 python-html5lib))
e99f4211
MW
3869
3870(define-public python-urwid
3871 (package
3872 (name "python-urwid")
3873 (version "1.3.0")
3874 (source
3875 (origin
3876 (method url-fetch)
be1f44bb
MW
3877 (uri (string-append
3878 "https://pypi.python.org/packages/source/u/urwid/urwid-"
3879 version ".tar.gz"))
e99f4211
MW
3880 (sha256
3881 (base32
3882 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
3883 (build-system python-build-system)
3884 (native-inputs `(("python-setuptools" ,python-setuptools)))
3885 (home-page "http://urwid.org")
3886 (synopsis "Console user interface library for Python")
3887 (description
3888 "Urwid is a curses-based UI/widget library for Python. It includes many
3889features useful for text console applications.")
3890 (license lgpl2.1+)))
3891
3892(define-public python2-urwid
3893 (package-with-python2 python-urwid))
d95a56c6
PAR
3894
3895(define-public python-dbus
3896 (package
3897 (name "python-dbus")
3898 (version "1.2.0")
3899 (source
3900 (origin
3901 (method url-fetch)
3902 (uri (string-append
3903 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
3904 version ".tar.gz"))
3905 (sha256
3906 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
3907 (build-system gnu-build-system)
3908 (native-inputs
3909 `(("pkg-config" ,pkg-config)))
3910 (inputs
3911 `(("python" ,python)
2e88d113 3912 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
3913 (synopsis "Python bindings for D-bus")
3914 (description "python-dbus provides bindings for libdbus, the reference
3915implementation of D-Bus.")
3916 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 3917 (license license:expat)))
b52af02b
MW
3918
3919(define-public python2-dbus
3920 (package (inherit python-dbus)
3921 (name "python2-dbus")
3922 (inputs `(("python" ,python-2)
3923 ,@(alist-delete "python"
3924 (package-inputs python-dbus)
3925 equal?)))
3926 ;; FIXME: on Python 2, the test_utf8 fails with:
3927 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
3928 (arguments `(#:tests? #f))))
a6ac8332
AE
3929
3930(define-public python-apsw
3931 (package
3932 (name "python-apsw")
3933 (version "3.8.7.3-r1")
3934 (source
3935 (origin
3936 (method url-fetch)
3937 (uri (string-append
3938 "https://pypi.python.org/packages/source/a/apsw/apsw-"
3939 version
3940 ".tar.gz"))
3941 (sha256
3942 (base32
3943 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
3944 (build-system python-build-system)
3945 (inputs
3946 `(("python-setuptools" ,python-setuptools)
3947 ("sqlite" ,sqlite)))
3948 (arguments
3949 `(#:phases
3950 ;; swap check and install phases
3951 (alist-cons-after
3952 'install 'check
3953 (assoc-ref %standard-phases 'check)
3954 (alist-delete
3955 'check
3956 %standard-phases))))
3957 (home-page "https://github.com/rogerbinns/apsw/")
3958 (synopsis "Another Python SQLite Wrapper")
3959 (description "APSW is a Python wrapper for the SQLite
3960embedded relational database engine. In contrast to other wrappers such as
3961pysqlite it focuses on being a minimal layer over SQLite attempting just to
3962translate the complete SQLite API into Python.")
abde5f37 3963 (license license:zlib)))
a6ac8332
AE
3964
3965(define-public python2-apsw
3966 (package-with-python2 python-apsw))
26b307e2
AE
3967
3968(define-public python-lxml
3969 (package
3970 (name "python-lxml")
3971 (version "3.4.2")
3972 (source
3973 (origin
3974 (method url-fetch)
3975 (uri (string-append
3976 "https://pypi.python.org/packages/source/l/lxml/lxml-"
3977 version
3978 ".tar.gz"))
3979 (sha256
3980 (base32
3981 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
3982 (build-system python-build-system)
3983 (inputs
3984 `(("libxml2" ,libxml2)
3985 ("libxslt" ,libxslt)
3986 ("python-setuptools" ,python-setuptools)))
3987 (home-page "http://lxml.de/")
3988 (synopsis
3989 "Python XML processing library")
3990 (description
3991 "The lxml XML toolkit is a Pythonic binding for the C libraries
3992libxml2 and libxslt.")
3993 (license bsd-3))) ; and a few more, see LICENSES.txt
3994
3995(define-public python2-lxml
3996 (package-with-python2 python-lxml))
4ed20663 3997
bec07a7c
AE
3998(define-public python2-pil
3999 (package
4000 (name "python2-pil")
4001 (version "1.1.7")
4002 (source
4003 (origin
4004 (method url-fetch)
4005 (uri (string-append
4006 "http://effbot.org/downloads/Imaging-"
4007 version ".tar.gz"))
4008 (sha256
4009 (base32
516277cb
AE
4010 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
4011 (modules '((guix build utils)))
4012 (snippet
4013 ;; Adapt to newer freetype. As the package is unmaintained upstream,
4014 ;; there is no use in creating a patch and reporting it.
4015 '(substitute* "_imagingft.c"
4016 (("freetype/")
4017 "freetype2/")))))
bec07a7c
AE
4018 (build-system python-build-system)
4019 (inputs
4020 `(("freetype" ,freetype)
4021 ("libjpeg" ,libjpeg)
4022 ("libtiff" ,libtiff)
4023 ("python-setuptools" ,python-setuptools)
4024 ("zlib" ,zlib)))
4025 (arguments
4026 ;; Only the fork python-pillow works with Python 3.
4027 `(#:python ,python-2
4028 #:tests? #f ; no check target
4029 #:phases
4030 (alist-cons-before
4031 'build 'configure
4032 ;; According to README and setup.py, manual configuration is
4033 ;; the preferred way of "searching" for inputs.
4034 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
4035 (lambda* (#:key inputs #:allow-other-keys)
4036 (let ((jpeg (assoc-ref inputs "libjpeg"))
4037 (zlib (assoc-ref inputs "zlib"))
4038 (tiff (assoc-ref inputs "libtiff"))
4039 (freetype (assoc-ref inputs "freetype")))
4040 (substitute* "setup.py"
4041 (("JPEG_ROOT = None")
4042 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
4043 (("ZLIB_ROOT = None")
4044 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
4045 (("TIFF_ROOT = None")
4046 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
4047 (("FREETYPE_ROOT = None")
4048 (string-append "FREETYPE_ROOT = libinclude(\""
4049 freetype "\")")))))
4050 %standard-phases)))
4051 (home-page "http://www.pythonware.com/products/pil/")
4052 (synopsis "Python Imaging Library")
4053 (description "The Python Imaging Library (PIL) adds image processing
4054capabilities to the Python interpreter.")
4055 (license (x11-style
4056 "file://README"
4057 "See 'README' in the distribution."))))
092e86f5
AE
4058
4059(define-public python2-cssutils
4060 (package
4061 (name "python2-cssutils")
4062 (version "1.0")
4063 (source
4064 (origin
4065 (method url-fetch)
4066 (uri (string-append
4067 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
4068 version
4069 ".zip"))
4070 (sha256
4071 (base32
4072 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
4073 (build-system python-build-system)
4074 (native-inputs
4075 `(("python2-mock" ,python2-mock) ; for the tests
4076 ("unzip" ,unzip))) ; for unpacking the source
4077 (inputs
4078 `(("python2-setuptools" ,python2-setuptools)))
4079 (arguments
4080 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4081 #:tests? #f ; The tests apparently download an external URL.
da6dd842 4082 ))
092e86f5
AE
4083 (home-page "http://cthedot.de/cssutils/")
4084 (synopsis
4085 "CSS Cascading Style Sheets library for Python")
4086 (description
4087 "Cssutils is a Python package for parsing and building CSS
4088Cascading Style Sheets. Currently it provides a DOM only and no rendering
4089options.")
4090 (license lgpl3+)))
880ff77c
AE
4091
4092(define-public python-cssselect
4093 (package
4094 (name "python-cssselect")
4095 (version "0.9.1")
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (string-append
4100 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
4101 version
4102 ".tar.gz"))
4103 (sha256
4104 (base32
4105 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
4106 (build-system python-build-system)
4107 (inputs
4108 `(("python-setuptools" ,python-setuptools)))
4109 (arguments
4110 ;; tests fail with message
4111 ;; AttributeError: 'module' object has no attribute 'tests'
4112 `(#:tests? #f))
4113 (home-page
4114 "https://pythonhosted.org/cssselect/")
4115 (synopsis
4116 "CSS3 selector parser and translator to XPath 1.0")
4117 (description
4118 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4119them to XPath 1.0 expressions. Such expressions can be used in lxml or
4120another XPath engine to find the matching elements in an XML or HTML document.")
4121 (license bsd-3)))
4122
4123(define-public python2-cssselect
4124 (package-with-python2 python-cssselect))
60357f99
AE
4125
4126(define-public python-netifaces
4127 (package
4128 (name "python-netifaces")
4129 (version "0.10.4")
4130 (source
4131 (origin
4132 (method url-fetch)
4133 (uri (string-append
4134 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4135 version
4136 ".tar.gz"))
4137 (sha256
4138 (base32
4139 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4140 (build-system python-build-system)
4141 (inputs
4142 `(("python-setuptools" ,python-setuptools)))
4143 (home-page
4144 "https://bitbucket.org/al45tair/netifaces")
4145 (synopsis
4146 "Python module for portable network interface information")
4147 (description
4148 "Netifaces is a Python module providing information on network
4149interfaces in an easy and portable manner.")
4150 (license license:expat)))
4151
4152(define-public python2-netifaces
4153 (package-with-python2 python-netifaces))
92cb152b 4154
32f77c04
RW
4155(define-public python-networkx
4156 (package
4157 (name "python-networkx")
4158 (version "1.9.1")
4159 (source
4160 (origin
4161 (method url-fetch)
4162 (uri (string-append
4163 "https://pypi.python.org/packages/source/n/networkx/networkx-"
4164 version ".tar.gz"))
4165 (sha256
4166 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
4167 (build-system python-build-system)
4168 ;; python-decorator is needed at runtime
4169 (propagated-inputs
4170 `(("python-decorator" ,python-decorator)))
4171 (native-inputs
4172 `(("python-setuptools" ,python-setuptools)
4173 ("python-nose" ,python-nose)))
4174 (home-page "http://networkx.github.io/")
4175 (synopsis "Python module for creating and manipulating graphs and networks")
4176 (description
4177 "NetworkX is a Python package for the creation, manipulation, and study
4178of the structure, dynamics, and functions of complex networks.")
4179 (license bsd-3)))
4180
4181(define-public python2-networkx
4182 (package-with-python2 python-networkx))
4183
92cb152b
RW
4184(define-public snakemake
4185 (package
4186 (name "snakemake")
4187 (version "3.2.1")
4188 (source
4189 (origin
4190 (method url-fetch)
4191 (uri (string-append
4192 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4193 version ".tar.gz"))
4194 (sha256
4195 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4196 (build-system python-build-system)
4197 (inputs `(("python-setuptools" ,python-setuptools)))
4198 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4199 (synopsis "Python-based execution environment for make-like workflows")
4200 (description
4201 "Snakemake aims to reduce the complexity of creating workflows by
4202providing a clean and modern domain specific specification language (DSL) in
4203Python style, together with a fast and comfortable execution environment.")
4204 (license license:expat)))
a1920bc9 4205
35de1fbd
RW
4206(define-public python-seaborn
4207 (package
4208 (name "python-seaborn")
4209 (version "0.5.1")
4210 (source
4211 (origin
4212 (method url-fetch)
4213 (uri (string-append
4214 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
4215 version ".tar.gz"))
4216 (sha256
4217 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
4218 (build-system python-build-system)
4219 (propagated-inputs
4220 `(("python-pandas" ,python-pandas)
4221 ("python-matplotlib" ,python-matplotlib)
4222 ("python-scipy" ,python-scipy)))
4223 (native-inputs
4224 `(("python-setuptools" ,python-setuptools)))
4225 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4226 (synopsis "Statistical data visualization")
4227 (description
4228 "Seaborn is a library for making attractive and informative statistical
4229graphics in Python. It is built on top of matplotlib and tightly integrated
4230with the PyData stack, including support for numpy and pandas data structures
4231and statistical routines from scipy and statsmodels.")
4232 (license bsd-3)))
4233
4234(define-public python2-seaborn
4235 (let ((seaborn (package-with-python2 python-seaborn)))
4236 (package (inherit seaborn)
4237 (propagated-inputs
4238 `(("python2-pytz" ,python2-pytz)
4239 ,@(package-propagated-inputs seaborn))))))
4240
90fc547f
RW
4241(define-public python-sympy
4242 (package
4243 (name "python-sympy")
4244 (version "0.7.6")
4245 (source
4246 (origin
4247 (method url-fetch)
4248 (uri (string-append
4249 "https://github.com/sympy/sympy/releases/download/sympy-"
4250 version "/sympy-" version ".tar.gz"))
4251 (sha256
4252 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4253 (build-system python-build-system)
4254 (native-inputs
4255 `(("python-setuptools" ,python-setuptools)))
4256 (home-page "http://www.sympy.org/")
4257 (synopsis "Python library for symbolic mathematics")
4258 (description
4259 "SymPy is a Python library for symbolic mathematics. It aims to become a
4260full-featured computer algebra system (CAS) while keeping the code as simple
4261as possible in order to be comprehensible and easily extensible.")
4262 (license bsd-3)))
4263
4264(define-public python2-sympy
4265 (package-with-python2 python-sympy))
4266
a1920bc9
FB
4267(define-public python-testlib
4268 (package
4269 (name "python-testlib")
4270 (version "0.6.5")
4271 (source
4272 (origin
4273 (method url-fetch)
4274 (uri (string-append
4275 "https://pypi.python.org/packages/source/t/testlib/testlib-"
4276 version ".zip"))
4277 (sha256
4278 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
4279 (build-system python-build-system)
4280 (inputs
4281 `(("python-setuptools" ,python-setuptools)))
4282 (native-inputs
4283 `(("unzip" ,unzip)))
4284 (arguments
4285 `(#:phases
4286 (alist-replace
4287 'unpack
4288 (lambda* (#:key inputs outputs #:allow-other-keys)
4289 (let ((unzip (string-append (assoc-ref inputs "unzip")
4290 "/bin/unzip"))
4291 (source (assoc-ref inputs "source")))
4292 (and (zero? (system* unzip source))
4293 (chdir (string-append "testlib-" ,version)))))
4294 %standard-phases)))
4295 (synopsis "Python micro test suite harness")
4296 (description "A micro unittest suite harness for Python.")
4297 (home-page "https://github.com/trentm/testlib")
1cb9c006 4298 (license license:expat)))
a1920bc9
FB
4299
4300(define-public python2-testlib
4301 (package-with-python2 python-testlib))
db62afa5
LC
4302
4303(define-public python2-xlib
4304 (package
4305 (name "python2-xlib")
4306 (version "0.14")
4307 (source (origin
4308 (method url-fetch)
4309 (uri (string-append "mirror://sourceforge/python-xlib/"
4310 "python-xlib-" version ".tar.gz"))
4311 (sha256
4312 (base32
4313 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
4314 (build-system python-build-system)
4315 (arguments
4316 `(#:python ,python-2 ;Python 2 only
4317 #:tests? #f)) ;no tests
4318 (inputs
4319 `(("python-setuptools" ,python-setuptools)))
4320 (home-page "http://python-xlib.sourceforge.net/")
4321 (synopsis "Python X11 client library")
4322 (description
4323 "The Python X Library is intended to be a fully functional X client
4324library for Python programs. It is useful to implement low-level X clients.
4325It is written entirely in Python.")
4326 (license gpl2+)))
0234ca06
DT
4327
4328(define-public python-singledispatch
4329 (package
4330 (name "python-singledispatch")
4331 (version "3.4.0.3")
4332 (source
4333 (origin
4334 (method url-fetch)
4335 (uri (string-append
4336 "https://pypi.python.org/packages/source/s/singledispatch/"
4337 "singledispatch-" version ".tar.gz"))
4338 (sha256
4339 (base32
4340 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
4341 (build-system python-build-system)
4342 (native-inputs
4343 `(("python-setuptools" ,python-setuptools)))
4344 (propagated-inputs
4345 `(("python-six" ,python-six)))
4346 (home-page
4347 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
4348 (synopsis "Backport of singledispatch feature from Python 3.4")
4349 (description
4350 "This library brings functools.singledispatch from Python 3.4 to Python
43512.6-3.3.")
4352 (license license:expat)))
4353
4354(define-public python2-singledispatch
4355 (package-with-python2 python-singledispatch))
feaae484 4356
310d218f
RW
4357(define-public python-tornado
4358 (package
4359 (name "python-tornado")
4360 (version "4.1")
4361 (source
4362 (origin
4363 (method url-fetch)
4364 (uri (string-append
4365 "https://pypi.python.org/packages/source/t/tornado/"
4366 "tornado-" version ".tar.gz"))
4367 (sha256
4368 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
4369 (build-system python-build-system)
4370 (inputs
4371 `(("python-certifi" ,python-certifi)))
4372 (native-inputs
4373 `(("python-setuptools" ,python-setuptools)))
4374 (home-page "https://pypi.python.org/pypi/tornado/4.1")
4375 (synopsis "Python web framework and asynchronous networking library")
4376 (description
4377 "Tornado is a Python web framework and asynchronous networking library,
4378originally developed at FriendFeed. By using non-blocking network I/O,
4379Tornado can scale to tens of thousands of open connections, making it ideal
4380for long polling, WebSockets, and other applications that require a long-lived
4381connection to each user.")
4382 (license asl2.0)))
4383
4384(define-public python2-tornado
4385 (let ((tornado (package-with-python2 python-tornado)))
4386 (package (inherit tornado)
4387 (inputs
4388 `(("python2-backport-ssl-match-hostname"
4389 ,python2-backport-ssl-match-hostname)
4390 ,@(package-inputs tornado))))))
4391
feaae484
SB
4392(define-public python-waf
4393 (package
4394 (name "python-waf")
4395 (version "1.8.8")
4396 (source (origin
4397 (method url-fetch)
4398 (uri (string-append "https://waf.io/"
4399 "waf-" version ".tar.bz2"))
4400 (sha256
4401 (base32
4402 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
4403 (build-system python-build-system)
4404 (arguments
4405 '(#:phases
4406 (modify-phases %standard-phases
4407 (replace 'build
4408 (lambda _
4409 (zero? (begin
4410 (system* "python" "waf-light" "configure")
4411 (system* "python" "waf-light" "build")))))
4412 (replace 'check
4413 (lambda _
4414 (zero? (system* "python" "waf" "--version"))))
4415 (replace 'install
4416 (lambda _
4417 (copy-file "waf" %output))))))
4418 (home-page "https://waf.io/")
4419 (synopsis "Python-based build system")
4420 (description
4421 "Waf is a Python-based framework for configuring, compiling and installing
4422applications.")
4423 (license bsd-3)))
4424
4425(define-public python2-waf
4426 (package-with-python2 python-waf))
45203542
RW
4427
4428(define-public python-pyzmq
4429 (package
4430 (name "python-pyzmq")
4431 (version "14.6.0")
4432 (source
4433 (origin
4434 (method url-fetch)
4435 (uri (string-append
4436 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
4437 version ".tar.gz"))
4438 (sha256
4439 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
4440 (build-system python-build-system)
4441 (arguments
4442 `(#:configure-flags
4443 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
4444 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
4445 ;; --inplace' for 'python setup.py test' to work.
4446 #:tests? #f))
4447 (inputs
4448 `(("zeromq" ,zeromq)))
4449 (native-inputs
4450 `(("pkg-config" ,pkg-config)
4451 ("python-nose" ,python-nose)
4452 ("python-setuptools" ,python-setuptools)))
4453 (home-page "http://github.com/zeromq/pyzmq")
4454 (synopsis "Python bindings for 0MQ")
4455 (description
4456 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
4457 (license bsd-4)))
4458
4459(define-public python2-pyzmq
4460 (package-with-python2 python-pyzmq))
d889e6c4
CR
4461
4462(define-public python-pep8
4463 (package
4464 (name "python-pep8")
4465 (version "1.6.2")
4466 (source
4467 (origin
4468 (method url-fetch)
4469 (uri (string-append
4470 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4471 version
4472 ".tar.gz"))
4473 (sha256
4474 (base32
4475 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
4476 (build-system python-build-system)
4477 (inputs
4478 `(("python-setuptools" ,python-setuptools)))
4479 (home-page "http://pep8.readthedocs.org/")
4480 (synopsis "Python style guide checker")
4481 (description
4482 "This tools checks Python code against some of the style conventions in
4483PEP 8.")
4484 (license license:expat)))
4485
4486(define-public python2-pep8
4487 (package-with-python2 python-pep8))
e31d7f44
CR
4488
4489(define-public python-pyflakes
4490 (package
4491 (name "python-pyflakes")
4492 (version "0.9.2")
4493 (source
4494 (origin
4495 (method url-fetch)
4496 (uri (string-append
4497 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
4498 version
4499 ".tar.gz"))
4500 (sha256
4501 (base32
4502 "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82"))))
4503 (build-system python-build-system)
4504 (inputs
4505 `(("python-setuptools" ,python-setuptools)))
4506 (home-page
4507 "https://github.com/pyflakes/pyflakes")
4508 (synopsis "Passive checker of Python programs")
4509 (description
4510 "Pyflakes statically checks Python source code for common errors.")
4511 (license license:expat)))
a59e017c 4512
7261d9eb
CR
4513(define-public python2-pyflakes
4514 (package-with-python2 python-pyflakes))
4515
a59e017c
CR
4516(define-public python-mccabe
4517 (package
4518 (name "python-mccabe")
4519 (version "0.3.1")
4520 (source
4521 (origin
4522 (method url-fetch)
4523 (uri (string-append
4524 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
4525 version
4526 ".tar.gz"))
4527 (sha256
4528 (base32
4529 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
4530 (build-system python-build-system)
4531 (inputs
4532 `(("python-setuptools" ,python-setuptools)))
4533 (home-page "https://github.com/flintwork/mccabe")
4534 (synopsis "McCabe checker, plugin for flake8")
4535 (description
4536 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
4537complexity of Python source code.")
7362371d 4538 (license license:expat)))
a59e017c
CR
4539
4540(define-public python2-mccabe
4541 (package-with-python2 python-mccabe))
e8df8f47
CR
4542
4543;; Flake8 2.4.1 requires an older version of pep8.
4544;; This should be removed ASAP.
4545(define-public python-pep8-1.5.7
4546 (package (inherit python-pep8)
4547 (version "1.5.7")
4548 (source
4549 (origin
4550 (method url-fetch)
4551 (uri (string-append
4552 "https://pypi.python.org/packages/source/p/pep8/pep8-"
4553 version
4554 ".tar.gz"))
4555 (sha256
4556 (base32
4557 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
4558
4559(define-public python2-pep8-1.5.7
4560 (package-with-python2 python-pep8-1.5.7))
4561
4562;; Flake8 2.4.1 requires an older version of pyflakes.
4563;; This should be removed ASAP.
4564(define-public python-pyflakes-0.8.1
4565 (package (inherit python-pyflakes)
4566 (version "0.8.1")
4567 (source
4568 (origin
4569 (method url-fetch)
4570 (uri (string-append
4571 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
4572 version
4573 ".tar.gz"))
4574 (sha256
4575 (base32
4576 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
4577
4578(define-public python2-pyflakes-0.8.1
7261d9eb 4579 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
4580
4581(define-public python-flake8
4582 (package
4583 (name "python-flake8")
4584 (version "2.4.1")
4585 (source
4586 (origin
4587 (method url-fetch)
4588 (uri (string-append
4589 "https://pypi.python.org/packages/source/f/flake8/flake8-"
4590 version
4591 ".tar.gz"))
4592 (sha256
4593 (base32
4594 "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif"))))
4595 (build-system python-build-system)
4596 (inputs
4597 `(("python-setuptools" ,python-setuptools)
4598 ("python-pep8" ,python-pep8-1.5.7)
4599 ("python-pyflakes" ,python-pyflakes-0.8.1)
4600 ("python-mccabe" ,python-mccabe)
4601 ("python-mock" ,python-mock)
4602 ("python-nose" ,python-nose)))
4603 (home-page "https://gitlab.com/pycqa/flake8")
4604 (synopsis
4605 "The modular source code checker: pep8, pyflakes and co")
4606 (description
4607 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
4608 (license license:expat)))
4609
4610(define-public python2-flake8
4611 (package-with-python2 python-flake8))
61b9ac53
FB
4612
4613(define-public python-mistune
4614 (package
4615 (name "python-mistune")
4616 (version "0.7")
4617 (source
4618 (origin
4619 (method url-fetch)
4620 (uri (string-append
4621 "https://pypi.python.org/packages/source/m/mistune/mistune-"
4622 version
4623 ".tar.gz"))
4624 (sha256
4625 (base32
4626 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
4627 (build-system python-build-system)
4628 (inputs
4629 `(("python-setuptools" ,python-setuptools)
4630 ("python-nose" ,python-nose)
4631 ("python-cython" ,python-cython)))
4632 (home-page "https://github.com/lepture/mistune")
4633 (synopsis "Markdown parser in pure Python")
4634 (description "This package provides a fast markdown parser in pure
4635Python.")
4636 (license bsd-3)))
4637
4638(define-public python2-mistune
4639 (package-with-python2 python-mistune))
6d992d07
FB
4640
4641(define-public python-ptyprocess
4642 (package
4643 (name "python-ptyprocess")
4644 (version "0.5")
4645 (source
4646 (origin
4647 (method url-fetch)
4648 (uri (string-append
4649 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
4650 version ".tar.gz"))
4651 (sha256
4652 (base32
4653 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
4654 (build-system python-build-system)
4655 (inputs
4656 `(("python-setuptools" ,python-setuptools)
4657 ("python-nose" ,python-nose)))
4658 (arguments
4659 `(#:phases
4660 (modify-phases %standard-phases
4661 (replace 'check
4662 (lambda _
4663 (zero? (system* "nosetests")))))))
4664 (home-page "https://github.com/pexpect/ptyprocess")
4665 (synopsis "Run a subprocess in a pseudo terminal")
4666 (description
4667 "This package provides a Python library used to launch a subprocess in a
4668pseudo terminal (pty), and interact with both the process and its pty.")
4669 (license isc)))
4670
4671(define-public python2-ptyprocess
4672 (package-with-python2 python-ptyprocess))
4aadb1df
FB
4673
4674(define-public python-terminado
4675 (package
4676 (name "python-terminado")
4677 (version "0.5")
4678 (source
4679 (origin
4680 (method url-fetch)
4681 (uri (string-append
4682 "https://pypi.python.org/packages/source/t/terminado/terminado-"
4683 version ".tar.gz"))
4684 (sha256
4685 (base32
4686 "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
4687 (build-system python-build-system)
4688 (propagated-inputs
4689 `(("python-tornado" ,python-tornado)
4690 ("python-ptyprocess" ,python-ptyprocess)))
4691 (inputs
4692 `(("python-setuptools" ,python-setuptools)
4693 ("python-nose" ,python-nose)))
4694 (arguments
4695 `(#:phases
4696 (modify-phases %standard-phases
4697 (replace 'check
4698 (lambda _
4699 (zero? (system* "nosetests")))))))
4700 (home-page "https://github.com/takluyver/terminado")
4701 (synopsis "Terminals served to term.js using Tornado websockets")
4702 (description "This package provides a Tornado websocket backend for the
4703term.js Javascript terminal emulator library.")
4704 (license bsd-2)))
4705
4706(define-public python2-terminado
4707 (let ((terminado (package-with-python2 python-terminado)))
4708 (package (inherit terminado)
4709 (propagated-inputs
4710 `(("python2-tornado" ,python2-tornado)
4711 ("python2-backport-ssl-match-hostname"
4712 ,python2-backport-ssl-match-hostname)
4713 ,@(alist-delete "python-tornado"
4714 (package-propagated-inputs terminado)))))))
5faa5ce4 4715
d582eaac
SB
4716(define-public python-fonttools
4717 (package
4718 (name "python-fonttools")
4719 (version "2.5")
4720 (source (origin
4721 (method url-fetch)
4722 (uri (string-append
4723 "https://pypi.python.org/packages/source/F/FontTools/"
4724 "fonttools-" version ".tar.gz"))
4725 (sha256
4726 (base32
4727 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
4728 (build-system python-build-system)
4729 (arguments '(#:test-target "check"))
4730 (propagated-inputs
4731 ;; XXX: module not found if setuptools is not available.
4732 `(("python-setuptools" ,python-setuptools)))
4733 (home-page "http://github.com/behdad/fonttools")
4734 (synopsis "Tools to manipulate font files")
4735 (description
4736 "FontTools/TTX is a library to manipulate font files from Python. It
4737supports reading and writinfg of TrueType/OpenType fonts, reading and writing
4738of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
4739also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
4740from an XML-based format.")
4741 (license (non-copyleft "file://LICENSE.txt"
4742 "See LICENSE.txt in the distribution."))))
4743
4744(define-public python2-fonttools
4745 (package-with-python2 python-fonttools))
75710da6 4746
5faa5ce4
RW
4747(define-public python-ly
4748 (package
4749 (name "python-ly")
4750 (version "0.9.2")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (string-append
4755 "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
4756 version ".tar.gz"))
4757 (sha256
4758 (base32
4759 "1bsjg4q9ihr8bfdclrcmb8yjcg8xm9dznh58f3zsyrkrjzwbhcd2"))))
4760 (build-system python-build-system)
4761 (native-inputs
4762 `(("python-setuptools" ,python-setuptools)))
4763 (synopsis "Tool and library for manipulating LilyPond files")
4764 (description "This package provides a Python library to parse, manipulate
4765or create documents in LilyPond format. A command line program ly is also
4766provided that can be used to do various manipulations with LilyPond files.")
4767 (home-page "https://pypi.python.org/pypi/python-ly")
4768 (license gpl2+)))
7e7b27d9
CR
4769
4770(define-public python-appdirs
4771 (package
4772 (name "python-appdirs")
4773 (version "1.4.0")
4774 (source
4775 (origin
4776 (method url-fetch)
4777 (uri (string-append
4778 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
4779 version
4780 ".tar.gz"))
4781 (sha256
4782 (base32
4783 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
4784 (build-system python-build-system)
4785 (inputs
4786 `(("python-setuptools" ,python-setuptools)))
4787 (home-page "http://github.com/ActiveState/appdirs")
4788 (synopsis
4789 "Determine platform-specific dirs, e.g. a \"user data dir\"")
4790 (description
4791 "This module provides a portable way of finding out where user data
4792should be stored on various operating systems.")
4793 (license license:expat)))
4794
4795(define-public python2-appdirs
4796 (package-with-python2 python-appdirs))
89b2e0b0
LF
4797
4798(define-public python-llfuse
4799 (package
4800 (name "python-llfuse")
4801 (version "0.41")
4802 (source (origin
4803 (method url-fetch)
4804 (uri (string-append
4805 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
4806 "llfuse-" version ".tar.bz2"))
4807 (sha256
4808 (base32
4809 "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
4810 (build-system python-build-system)
4811 (inputs
4812 `(("fuse" ,fuse)
4813 ("attr" ,attr)))
4814 (native-inputs
4815 `(("pkg-config" ,pkg-config)
4816 ("python-setuptools" ,python-setuptools)))
4817 (synopsis "Python bindings for FUSE")
4818 (description
4819 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
4820 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
4821 ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
4822 ;; The rest of the package is licensed under LGPL2.0 or later.
4823 (license (list license:expat lgpl2.0+))))
4824
4825(define-public python2-llfuse
4826 (package-with-python2 python-llfuse))
641c9871
LF
4827
4828(define-public python-msgpack
4829 (package
4830 (name "python-msgpack")
4831 (version "0.4.6")
4832 (source (origin
4833 (method url-fetch)
4834 (uri (string-append
4835 "https://pypi.python.org/packages/source/m/"
4836 "msgpack-python/msgpack-python-" version ".tar.gz"))
4837 (sha256
4838 (base32
4839 "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
4840 (build-system python-build-system)
4841 (native-inputs
4842 `(("python-setuptools" ,python-setuptools)))
4843 (synopsis "MessagePack (de)serializer")
4844 (description "MessagePack is a fast, compact binary serialization format,
4845suitable for similar data to JSON. This package provides CPython bindings for
4846reading and writing MessagePack data.")
4847 (home-page "https://pypi.python.org/pypi/msgpack-python/")
4848 (license asl2.0)))
4849
4850(define-public python2-msgpack
4851 (package-with-python2 python-msgpack))
6e5e39f4
CR
4852
4853(define-public python-netaddr
4854 (package
4855 (name "python-netaddr")
4856 (version "0.7.18")
4857 (source
4858 (origin
4859 (method url-fetch)
4860 (uri (string-append
4861 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
4862 version
4863 ".tar.gz"))
4864 (sha256
4865 (base32
4866 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
4867 (build-system python-build-system)
4868 (arguments `(#:tests? #f)) ;; No tests.
4869 (inputs
4870 `(("python-setuptools" ,python-setuptools)))
4871 (home-page "https://github.com/drkjam/netaddr/")
4872 (synopsis "Pythonic manipulation of network addresses")
4873 (description
4874 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
4875and MAC network addresses.")
4876 (license bsd-3)))
4877
4878(define-public python2-netaddr
4879 (package-with-python2 python-netaddr))
8c692a52
CR
4880
4881(define-public python-wrapt
4882 (package
4883 (name "python-wrapt")
4884 (version "1.10.5")
4885 (source
4886 (origin
4887 (method url-fetch)
4888 (uri (string-append
4889 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
4890 version
4891 ".tar.gz"))
4892 (sha256
4893 (base32
4894 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
4895 (build-system python-build-system)
4896 (arguments
4897 ;; Tests are not included in the tarball, they are only available in the
4898 ;; git repository.
4899 `(#:tests? #f))
4900 (inputs
4901 `(("python-setuptools" ,python-setuptools)))
4902 (home-page "https://github.com/GrahamDumpleton/wrapt")
4903 (synopsis "Module for decorators, wrappers and monkey patching")
4904 (description
4905 "The aim of the wrapt module is to provide a transparent object proxy for
4906 Python, which can be used as the basis for the construction of function
4907 wrappers and decorator functions.")
4908 (license bsd-2)))
4909
4910(define-public python2-wrapt
4911 (package-with-python2 python-wrapt))
b85c85be
CR
4912
4913(define-public python-iso8601
4914 (package
4915 (name "python-iso8601")
4916 (version "0.1.10")
4917 (source
4918 (origin
4919 (method url-fetch)
4920 (uri (string-append
4921 "https://pypi.python.org/packages/source/i/iso8601/iso8601-"
4922 version
4923 ".tar.gz"))
4924 (sha256
4925 (base32
4926 "1qf01afxh7j4gja71vxv345if8avg6nnm0ry0zsk6j3030xgy4p7"))))
4927 (build-system python-build-system)
4928 (inputs
4929 `(("python-setuptools" ,python-setuptools)))
4930 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
4931 (synopsis "Module to parse ISO 8601 dates")
4932 (description
4933 "This module parses the most common forms of ISO 8601 date strings (e.g.
4934@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
4935 (license license:expat)))
4936
4937(define-public python2-iso8601
4938 (package-with-python2 python-iso8601))
5e412b63
CR
4939
4940(define-public python-monotonic
4941 (package
4942 (name "python-monotonic")
4943 (version "0.3")
4944 (source
4945 (origin
4946 (method url-fetch)
4947 (uri (string-append
4948 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
4949 version
4950 ".tar.gz"))
4951 (sha256
4952 (base32
4953 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
4954 (build-system python-build-system)
4955 (inputs
4956 `(("python-setuptools" ,python-setuptools)))
4957 (home-page "https://github.com/atdt/monotonic")
4958 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
4959 (description
4960 "This module provides a monotonic() function which returns the value (in
4961fractional seconds) of a clock which never goes backwards.")
4962 (license asl2.0)))
4963
4964(define-public python2-monotonic
4965 (package-with-python2 python-monotonic))
de34afac
CR
4966
4967(define-public python-webob
4968 (package
4969 (name "python-webob")
4970 (version "1.5.0b0")
4971 (source
4972 (origin
4973 (method url-fetch)
4974 (uri (string-append
4975 "https://pypi.python.org/packages/source/W/WebOb/WebOb-"
4976 version ".tar.gz"))
4977 (sha256
4978 (base32
4979 "140b3iczclk1j0405rvw5gxshqfkhcc8254fj520z3m23cwbql4a"))))
4980 (build-system python-build-system)
4981 (inputs
4982 `(("python-nose" ,python-nose)
4983 ("python-setuptools" ,python-setuptools)))
4984 (home-page "http://webob.org/")
4985 (synopsis "WSGI request and response object")
4986 (description
4987 "WebOb provides wrappers around the WSGI request environment, and an
4988object to help create WSGI responses.")
4989 (license license:expat)))
4990
4991(define-public python2-webob
4992 (package-with-python2 python-webob))
350ba0a3
CR
4993
4994(define-public python-prettytable
4995 (package
4996 (name "python-prettytable")
4997 (version "0.7.2")
4998 (source
4999 (origin
5000 (method url-fetch)
5001 (uri (string-append
5002 "https://pypi.python.org/packages/source/P/PrettyTable/"
5003 "prettytable-" version ".tar.bz2"))
5004 (sha256
5005 (base32
5006 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5007 (build-system python-build-system)
5008 (inputs
5009 `(("python-setuptools" ,python-setuptools)))
5010 (home-page "http://code.google.com/p/prettytable/")
5011 (synopsis "Display tabular data in an ASCII table format")
5012 (description
5013 "A library designed to represent tabular data in visually appealing ASCII
5014tables. PrettyTable allows for selection of which columns are to be printed,
5015independent alignment of columns (left or right justified or centred) and
5016printing of sub-tables by specifying a row range.")
5017 (license bsd-3)))
5018
5019(define-public python2-prettytable
5020 (package-with-python2 python-prettytable))
7a8ac75a
RW
5021
5022(define-public python-pyasn1
5023 (package
5024 (name "python-pyasn1")
5025 (version "0.1.8")
5026 (source
5027 (origin
5028 (method url-fetch)
5029 (uri (string-append "https://pypi.python.org/packages/source/p/"
5030 "pyasn1/pyasn1-" version ".tar.gz"))
5031 (sha256
5032 (base32
5033 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5034 (build-system python-build-system)
5035 (home-page "http://pyasn1.sourceforge.net/")
5036 (synopsis "ASN.1 types and codecs")
5037 (description
5038 "This is an implementation of ASN.1 types and codecs in Python. It is
5039suitable for a wide range of protocols based on the ASN.1 specification.")
5040 (license bsd-2)))
5041
5042(define-public python2-pyasn1
5043 (package-with-python2 python-pyasn1))
9a49a535
RW
5044
5045(define-public python2-ipaddress
5046 (package
5047 (name "python2-ipaddress")
5048 (version "1.0.14")
5049 (source
5050 (origin
5051 (method url-fetch)
5052 (uri (string-append "https://pypi.python.org/packages/source/i/"
5053 "ipaddress/ipaddress-" version ".tar.gz"))
5054 (sha256
5055 (base32
5056 "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
5057 (build-system python-build-system)
5058 (arguments
5059 `(#:tests? #f ; no tests
5060 #:python ,python-2))
5061 (home-page "https://github.com/phihag/ipaddress")
5062 (synopsis "IP address manipulation library")
5063 (description
5064 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5065in Python. This library is used to create, poke at, and manipulate IPv4 and
5066IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5067module to older versions of Python.")
5068 (license psfl)))
3f00e078
RW
5069
5070(define-public python-idna
5071 (package
5072 (name "python-idna")
5073 (version "2.0")
5074 (source
5075 (origin
5076 (method url-fetch)
5077 (uri (string-append "https://pypi.python.org/packages/source/i/"
5078 "idna/idna-" version ".tar.gz"))
5079 (sha256
5080 (base32
5081 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
5082 (build-system python-build-system)
5083 (native-inputs
5084 `(("python-setuptools" ,python-setuptools)))
5085 (home-page "https://github.com/kjd/idna")
5086 (synopsis "Internationalized domain names in applications")
5087 (description
5088 "This is a library to support the Internationalised Domain Names in
5089Applications (IDNA) protocol as specified in RFC 5891. This version of the
5090protocol is often referred to as “IDNA2008” and can produce different results
5091from the earlier standard from 2003. The library is also intended to act as a
5092suitable drop-in replacement for the “encodings.idna” module that comes with
5093the Python standard library but currently only supports the older 2003
5094specification.")
5095 (license bsd-4)))
5096
5097(define-public python2-idna
5098 (package-with-python2 python-idna))
36ebf972
RW
5099
5100(define-public python-pretend
5101 (package
5102 (name "python-pretend")
5103 (version "1.0.8")
5104 (source
5105 (origin
5106 (method url-fetch)
5107 (uri (string-append "https://pypi.python.org/packages/source/p/"
5108 "pretend/pretend-" version ".tar.gz"))
5109 (sha256
5110 (base32
5111 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
5112 (build-system python-build-system)
5113 (native-inputs
5114 `(("python-setuptools" ,python-setuptools)))
5115 (home-page "https://github.com/alex/pretend")
5116 (synopsis "Library for stubbing in Python")
5117 (description
5118 "Pretend is a library to make stubbing with Python easier. Stubbing is a
5119technique for writing tests. You may hear the term mixed up with mocks,
5120fakes, or doubles. Basically, a stub is an object that returns pre-canned
5121responses, rather than doing any computation.")
5122 (license bsd-3)))
5123
5124(define-public python2-pretend
5125 (package-with-python2 python-pretend))
aa759a51
RW
5126
5127(define-public python-cryptography-vectors
5128 (package
5129 (name "python-cryptography-vectors")
5130 (version "1.0.1")
5131 (source
5132 (origin
5133 (method url-fetch)
5134 (uri (string-append "https://pypi.python.org/packages/source/c/"
5135 "cryptography-vectors/cryptography_vectors-"
5136 version ".tar.gz"))
5137 (sha256
5138 (base32
5139 "1i2chlyhlx4792di82fqzcy9wz0gnnc661bj46zr794ip4629sp4"))))
5140 (build-system python-build-system)
5141 (native-inputs
5142 `(("python-setuptools" ,python-setuptools)))
5143 (home-page "https://github.com/pyca/cryptography")
5144 (synopsis "Test vectors for the cryptography package.")
5145 (description
5146 "This package contains test vectors for the cryptography package.")
5147 ;; Distributed under either BSD-3 or ASL2.0
5148 (license (list bsd-3 asl2.0))))
5149
5150(define-public python2-cryptography-vectors
5151 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
5152
5153(define-public python-cryptography
5154 (package
5155 (name "python-cryptography")
5156 (version "1.0.1")
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (string-append "https://pypi.python.org/packages/source/c/"
5161 "cryptography/cryptography-" version ".tar.gz"))
5162 (sha256
5163 (base32
5164 "1lxzvhlyl6h6nm77n34622rcj2cxnx220x9vgjlw76wjd8m0kqyg"))))
5165 (build-system python-build-system)
5166 (inputs
5167 `(("openssl" ,openssl)))
5168 (propagated-inputs
5169 `(("python-cffi" ,python-cffi)
5170 ("python-six" ,python-six)
5171 ("python-pyasn1" ,python-pyasn1)
5172 ("python-enum34" ,python-enum34)
5173 ("python-idna" ,python-idna)
5174 ("python-iso8601" ,python-iso8601)))
5175 (native-inputs
5176 `(("python-cryptography-vectors" ,python-cryptography-vectors)
5177 ("python-setuptools" ,python-setuptools)
5178 ("python-pretend" ,python-pretend)
5179 ("python-pytest" ,python-pytest)))
5180 (home-page "https://github.com/pyca/cryptography")
5181 (synopsis "Cryptographic recipes and primitives for Python")
5182 (description
5183 "cryptography is a package which provides cryptographic recipes and
5184primitives to Python developers. It aims to be the “cryptographic standard
5185library” for Python. The package includes both high level recipes, and low
5186level interfaces to common cryptographic algorithms such as symmetric ciphers,
5187message digests and key derivation functions.")
5188 ;; Distributed under either BSD-3 or ASL2.0
5189 (license (list bsd-3 asl2.0))))
5190
5191(define-public python2-cryptography
5192 (let ((crypto (package-with-python2 python-cryptography)))
5193 (package (inherit crypto)
5194 (propagated-inputs
5195 `(("python2-ipaddress" ,python2-ipaddress)
5196 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
5197
5198(define-public python-pyopenssl
5199 (package
5200 (name "python-pyopenssl")
5201 (version "0.15.1")
5202 (source
5203 (origin
5204 (method url-fetch)
5205 (uri (string-append "https://pypi.python.org/packages/source/p/"
5206 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
5207 (sha256
5208 (base32
5209 "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
5210 (build-system python-build-system)
5211 (arguments
5212 `(#:phases
5213 (modify-phases %standard-phases
5214 (add-after 'unpack 'fix-tests
5215 (lambda* (#:key inputs #:allow-other-keys)
5216 (substitute* "OpenSSL/test/test_ssl.py"
5217 (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
5218 "return True")
5219 ;; FIXME: disable broken test
5220 (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
5221 (substitute* "OpenSSL/test/test_crypto.py"
5222 (("command = b\"openssl \"")
5223 (string-append "command = b\""
5224 (assoc-ref inputs "openssl")
5225 "/bin/openssl" " \""))
5226 ;; FIXME: disable four broken tests
5227 (("test_der") "disabled__der")
5228 (("test_digest") "disabled__digest")
5229 (("test_get_extension") "disabled__get_extension")
5230 (("test_extension_count") "disabled__extension_count"))
5231 #t)))))
5232 (propagated-inputs
5233 `(("python-cryptography" ,python-cryptography)
5234 ("python-six" ,python-six)))
5235 (inputs
5236 `(("openssl" ,openssl)))
5237 (native-inputs
5238 `(("python-setuptools" ,python-setuptools)))
5239 (home-page "https://github.com/pyca/pyopenssl")
5240 (synopsis "Python wrapper module around the OpenSSL library")
5241 (description
5242 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
5243library.")
5244 (license asl2.0)))
5245
5246(define-public python2-pyopenssl
5247 (let ((pyopenssl (package-with-python2 python-pyopenssl)))
5248 (package (inherit pyopenssl)
5249 (propagated-inputs
5250 `(("python2-cryptography" ,python2-cryptography)
5251 ,@(alist-delete "python-cryptography"
5252 (package-propagated-inputs pyopenssl)))))))