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