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