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