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