gnu: Move content of openssl module into tls module.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
da6dd842 3;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
03411993 4;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
ad320b20 10;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
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 50 #:use-module (gnu packages perl)
b10ab723 51 #:use-module (gnu packages pkg-config)
4ed20663 52 #:use-module (gnu packages readline)
1c65314c
FB
53 #:use-module (gnu packages texlive)
54 #:use-module (gnu packages texinfo)
cc2b77df 55 #:use-module (gnu packages tls)
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 2277 (native-inputs
19afbea1 2278 `(("gfortran" ,gfortran)))
0da98533
FB
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
3a1bfe18
RW
2329(define-public python2-fastlmm
2330 (package
2331 (name "python2-fastlmm")
2332 (version "0.2.14")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (string-append
2337 "https://pypi.python.org/packages/source/f/fastlmm"
2338 "/fastlmm-" version ".zip"))
2339 (sha256
2340 (base32
2341 "023sydkrc3yxad2bycar02jfswwlh4199kafzhf2bssyx2c3xa0l"))))
2342 (build-system python-build-system)
2343 (arguments
2344 `(#:python ,python-2)) ; only Python 2.7 is supported
2345 (propagated-inputs
2346 `(("python2-numpy" ,python2-numpy)
2347 ("python2-scipy" ,python2-scipy)
2348 ("python2-matplotlib" ,python2-matplotlib)
2349 ("python2-pandas" ,python2-pandas)
2350 ("python2-scikit-learn" ,python2-scikit-learn)
2351 ("python2-cython" ,python2-cython)
2352 ("python2-pysnptools" ,python2-pysnptools)))
2353 (native-inputs
2354 `(("unzip" ,unzip)
2355 ("python2-mock" ,python2-mock)
2356 ("python2-setuptools" ,python2-setuptools)))
2357 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
2358 (synopsis "Perform genome-wide association studies on large data sets")
2359 (description
2360 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
2361Models, is a program for performing both single-SNP and SNP-set genome-wide
2362association studies (GWAS) on extremely large data sets.")
2363 (license asl2.0)))
2364
2ee8869a
FB
2365(define-public python-numpy
2366 (package (inherit python-numpy-bootstrap)
2367 (name "python-numpy")
2368 (outputs '("out" "doc"))
89b5c60e 2369 (inputs
2ee8869a
FB
2370 `(("which" ,which)
2371 ("python-setuptools" ,python-setuptools)
2372 ("python-matplotlib" ,python-matplotlib)
2373 ("python-sphinx" ,python-sphinx)
2374 ("python-pyparsing" ,python-pyparsing)
2375 ("python-numpydoc" ,python-numpydoc)
2376 ,@(package-inputs python-numpy-bootstrap)))
2377 (native-inputs
2378 `(("pkg-config" ,pkg-config)
2379 ("texlive" ,texlive)
2380 ("texinfo" ,texinfo)
2381 ("perl" ,perl)
2382 ,@(package-native-inputs python-numpy-bootstrap)))
2383 (arguments
89b5c60e 2384 `(,@(substitute-keyword-arguments
2ee8869a
FB
2385 (package-arguments python-numpy-bootstrap)
2386 ((#:phases phases)
2387 `(alist-cons-after
2388 'install 'install-doc
2389 (lambda* (#:key outputs #:allow-other-keys)
2390 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
2391 (doc (string-append
2392 data "/doc/" ,name "-"
2ee8869a
FB
2393 ,(package-version python-numpy-bootstrap)))
2394 (info (string-append data "/info"))
2395 (html (string-append doc "/html"))
2396 (pyver ,(string-append "PYVER=")))
2397 (with-directory-excursion "doc"
2398 (mkdir-p html)
2399 (system* "make" "html" pyver)
2400 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 2401 (system* "make" "-C" "build/latex"
2ee8869a
FB
2402 "all-pdf" "PAPER=a4" pyver)
2403 ;; FIXME: Generation of the info file fails.
2404 ;; (system* "make" "info" pyver)
2405 ;; (mkdir-p info)
2406 ;; (copy-file "build/texinfo/numpy.info"
2407 ;; (string-append info "/numpy.info"))
2408 (for-each (lambda (file)
2409 (copy-file (string-append "build/latex" file)
2410 (string-append doc file)))
2411 '("/numpy-ref.pdf" "/numpy-user.pdf"))
2412 (with-directory-excursion "build/html"
2413 (for-each (lambda (file)
2414 (let* ((dir (dirname file))
2415 (tgt-dir (string-append html "/" dir)))
2416 (unless (equal? "." dir)
2417 (mkdir-p tgt-dir))
2418 (copy-file file (string-append html "/" file))))
2419 (find-files "." ".*"))))))
2420 ,phases)))))))
2421
764c077b
LC
2422(define-public python2-numpy
2423 (let ((numpy (package-with-python2 python-numpy)))
2424 (package (inherit numpy)
88c26834
AE
2425 ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
2426 ;; Python 2.
2427 (inputs `(("python2-matplotlib" ,python2-matplotlib)
2428 ,@(alist-delete "python-matplotlib"
2429 (package-inputs numpy)))))))
2ee8869a 2430
15bfe6d6
FB
2431(define-public python-pyparsing
2432 (package
2433 (name "python-pyparsing")
e0669289 2434 (version "2.0.3")
15bfe6d6
FB
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (string-append "mirror://sourceforge/pyparsing"
2439 "/pyparsing-" version ".tar.gz"))
2440 (sha256
2441 (base32
e0669289 2442 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
2443 (build-system python-build-system)
2444 (outputs '("out" "doc"))
2445 (arguments
2446 `(#:tests? #f ; no test target
2447 #:modules ((guix build python-build-system)
2448 (guix build utils))
2449 #:phases
2450 (alist-cons-after
2451 'install 'install-doc
2452 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 2453 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
2454 "/share/doc/" ,name "-" ,version))
2455 (html-doc (string-append doc "/html"))
2456 (examples (string-append doc "/examples")))
2457 (mkdir-p html-doc)
2458 (mkdir-p examples)
89b5c60e 2459 (for-each
15bfe6d6 2460 (lambda (dir tgt)
89b5c60e 2461 (map (lambda (file)
15bfe6d6
FB
2462 (copy-file file (string-append tgt "/" (basename file))))
2463 (find-files dir ".*")))
2464 (list "docs" "htmldoc" "examples")
2465 (list doc html-doc examples))))
2466 %standard-phases)))
2467 (home-page "http://pyparsing.wikispaces.com")
2468 (synopsis "Python parsing class library")
2469 (description
2470 "The pyparsing module is an alternative approach to creating and
2471executing simple grammars, vs. the traditional lex/yacc approach, or the use
2472of regular expressions. The pyparsing module provides a library of classes
2473that client code uses to construct the grammar directly in Python code.")
bd3fa666 2474 (license license:expat)))
15bfe6d6
FB
2475
2476(define-public python2-pyparsing
2477 (package-with-python2 python-pyparsing))
2478
ec00de35
FB
2479(define-public python-numpydoc
2480 (package
2481 (name "python-numpydoc")
2482 (version "0.5")
2483 (source
2484 (origin
2485 (method url-fetch)
89b5c60e 2486 (uri (string-append
ec00de35
FB
2487 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
2488 version ".tar.gz"))
2489 (sha256
2490 (base32
5e4d8f67
AE
2491 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
2492 (modules '((guix build utils)))
2493 (snippet
2494 '(begin
2495 ;; Drop a test requiring matplotlib, which we cannot add as an
2496 ;; input since it would create a circular dependency: Extend the
2497 ;; test for Python 3, where it is already dropped, to Python 2.
2498 (substitute* "numpydoc/tests/test_plot_directive.py"
2499 (("3") "2"))))))
ec00de35
FB
2500 (build-system python-build-system)
2501 (inputs
2502 `(("python-setuptools" ,python-setuptools)
2503 ("python-docutils" ,python-docutils)
2504 ("python-sphinx" ,python-sphinx)
2505 ("python-nose" ,python-nose)))
2506 (home-page "https://pypi.python.org/pypi/numpydoc")
2507 (synopsis
2508 "Numpy's Sphinx extensions")
2509 (description
2510 "Sphinx extension to support docstrings in Numpy format.")
2511 (license bsd-2)))
2512
2513(define-public python2-numpydoc
5e4d8f67 2514 (package-with-python2 python-numpydoc))
1c65314c
FB
2515
2516(define-public python-matplotlib
2517 (package
2518 (name "python-matplotlib")
2519 (version "1.4.2")
2520 (source
2521 (origin
2522 (method url-fetch)
2523 (uri (string-append "mirror://sourceforge/matplotlib"
2524 "/matplotlib-" version ".tar.gz"))
2525 (sha256
2526 (base32
2527 "0m6v9nwdldlwk22gcd339zg6mny5m301fxgks7z8sb8m9wawg8qp"))))
2528 (build-system python-build-system)
2529 (outputs '("out" "doc"))
25f9a068
FB
2530 (propagated-inputs ; the following packages are all needed at run time
2531 `(("python-pyparsing" ,python-pyparsing)
2532 ("python-pygobject" ,python-pygobject)
2533 ("gobject-introspection" ,gobject-introspection)
2534 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
2535 ;; from 'gtk+') provides the required 'typelib' files used by
2536 ;; 'gobject-introspection'. The location of these files is set with the
2537 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
2538 ;; is done automatically by a 'native-search-path' procedure. However,
2539 ;; at run-time the user must set this variable as follows:
2540 ;;
2541 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
2542 ("gtk+" ,gtk+)
2543 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
2544 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
2545 ;; object. For this reason we need to import both libraries.
2546 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
2547 ("python-pycairo" ,python-pycairo)
2548 ("python-cairocffi" ,python-cairocffi)))
1c65314c
FB
2549 (inputs
2550 `(("python-setuptools" ,python-setuptools)
2551 ("python-dateutil" ,python-dateutil-2)
1c65314c
FB
2552 ("python-six" ,python-six)
2553 ("python-pytz" ,python-pytz)
2554 ("python-numpy" ,python-numpy-bootstrap)
2555 ("python-sphinx" ,python-sphinx)
2556 ("python-numpydoc" ,python-numpydoc)
2557 ("python-nose" ,python-nose)
2558 ("python-mock" ,python-mock)
2559 ("libpng" ,libpng)
2560 ("imagemagick" ,imagemagick)
2561 ("freetype" ,freetype)
25f9a068
FB
2562 ("cairo" ,cairo)
2563 ("glib" ,glib)
4e7a137a 2564 ("python-pillow" ,python-pillow)
1c65314c 2565 ;; FIXME: Add backends when available.
1c65314c
FB
2566 ;("python-wxpython" ,python-wxpython)
2567 ;("python-pyqt" ,python-pyqt)
2568 ))
2569 (native-inputs
2570 `(("pkg-config" ,pkg-config)
2571 ("texlive" ,texlive)
2572 ("texinfo" ,texinfo)))
2573 (arguments
2574 `(#:phases
25f9a068
FB
2575 (alist-cons-before
2576 'build 'configure-environment
2577 (lambda* (#:key outputs inputs #:allow-other-keys)
2578 (let ((cairo (assoc-ref inputs "cairo"))
2579 (gtk+ (assoc-ref inputs "gtk+")))
2580 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
2581 ;; has not effect.
25f9a068
FB
2582 (setenv "LD_LIBRARY_PATH"
2583 (string-append cairo "/lib:" gtk+ "/lib"))
2584 (setenv "HOME" (getcwd))
2585 (call-with-output-file "setup.cfg"
2586 (lambda (port)
2587 (format port "[rc_options]~%
2588backend = GTK3Agg~%")))))
2589 (alist-cons-after
2590 'install 'install-doc
2591 (lambda* (#:key outputs #:allow-other-keys)
2592 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2593 (doc (string-append data "/doc/" ,name "-" ,version))
2594 (info (string-append data "/info"))
2595 (html (string-append doc "/html")))
2596 (with-directory-excursion "doc"
25f9a068
FB
2597 ;; Produce pdf in 'A4' format.
2598 (substitute* (find-files "." "conf\\.py")
2599 (("latex_paper_size = 'letter'")
2600 "latex_paper_size = 'a4'"))
2601 (mkdir-p html)
2602 (mkdir-p info)
2603 ;; The doc recommends to run the 'html' target twice.
2604 (system* "python" "make.py" "html")
2605 (system* "python" "make.py" "html")
2606 (system* "python" "make.py" "latex")
2607 (system* "python" "make.py" "texinfo")
2608 (copy-file "build/texinfo/matplotlib.info"
2609 (string-append info "/matplotlib.info"))
2610 (copy-file "build/latex/Matplotlib.pdf"
2611 (string-append doc "/Matplotlib.pdf"))
2612 (copy-recursively "build/html" html))))
2613 %standard-phases))))
1c65314c
FB
2614 (home-page "http://matplotlib.org")
2615 (synopsis "2D plotting library for Python")
2616 (description
2617 "Matplotlib is a Python 2D plotting library which produces publication
2618quality figures in a variety of hardcopy formats and interactive environments
2619across platforms. Matplotlib can be used in Python scripts, the python and
2620ipython shell, web application servers, and six graphical user interface
2621toolkits.")
2622 (license psfl)))
2623
764c077b
LC
2624(define-public python2-matplotlib
2625 (let ((matplotlib (package-with-python2 python-matplotlib)))
2626 (package (inherit matplotlib)
88c26834
AE
2627 ;; Make sure to use special packages for Python 2 instead
2628 ;; of those automatically rewritten by package-with-python2.
89b5c60e 2629 (propagated-inputs
7ca0dbc3 2630 `(("python2-pycairo" ,python2-pycairo)
764c077b
LC
2631 ("python2-pygobject-2" ,python2-pygobject-2)
2632 ,@(alist-delete "python-pycairo"
2633 (alist-delete "python-pygobject"
89b5c60e 2634 (package-propagated-inputs
88c26834 2635 matplotlib))))))))
94914805 2636
0dde6232
RW
2637(define-public python2-pysnptools
2638 (package
2639 (name "python2-pysnptools")
2640 (version "0.2.13")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (string-append
2645 "https://pypi.python.org/packages/source/p/pysnptools"
2646 "/pysnptools-" version ".zip"))
2647 (sha256
2648 (base32
2649 "1rzf5qvwfvd2pp84b14pb2gdvxdk5avnj7rb41ac8gndpkr9g6ib"))))
2650 (build-system python-build-system)
2651 (arguments
2652 `(#:python ,python-2)) ; only Python 2.7 is supported
2653 (propagated-inputs
2654 `(("python2-numpy" ,python2-numpy)
2655 ("python2-scipy" ,python2-scipy)
2656 ("python2-pandas" ,python2-pandas)
2657 ("python2-cython" ,python2-cython)))
2658 (native-inputs
2659 `(("unzip" ,unzip)
2660 ("python2-setuptools" ,python2-setuptools)))
2661 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
2662 (synopsis "Library for reading and manipulating genetic data")
2663 (description
2664 "PySnpTools is a library for reading and manipulating genetic data. It
2665can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
2666those files. It can also efficiently manipulate ranges of integers using set
2667operators such as union, intersection, and difference.")
2668 (license asl2.0)))
2669
bb986599
FB
2670(define-public python-scipy
2671 (package
2672 (name "python-scipy")
da6ce3f1 2673 (version "0.15.0")
bb986599
FB
2674 (source
2675 (origin
2676 (method url-fetch)
2677 (uri (string-append "mirror://sourceforge/scipy"
da6ce3f1 2678 "/scipy-" version ".tar.xz"))
bb986599
FB
2679 (sha256
2680 (base32
da6ce3f1 2681 "0fsqi05s035d7p6s8h3h2pvk1axias16chy17rw9l1bxvrfhmncf"))))
bb986599
FB
2682 (build-system python-build-system)
2683 (inputs
2684 `(("python-numpy" ,python-numpy)
2685 ("python-matplotlib" ,python-matplotlib)
2686 ("python-pyparsing" ,python-pyparsing)
2687 ("python-nose" ,python-nose)
2688 ("python-sphinx" ,python-sphinx)
719b01c1
RW
2689 ("lapack" ,lapack)
2690 ("openblas" ,openblas)))
bb986599 2691 (native-inputs
19afbea1 2692 `(("gfortran" ,gfortran)
bb986599
FB
2693 ("texlive" ,texlive)
2694 ("perl" ,perl)))
2695 (outputs '("out" "doc"))
2696 (arguments
2697 `(#:phases
2698 (alist-cons-before
719b01c1 2699 'build 'configure-openblas
bb986599 2700 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
2701 (call-with-output-file "site.cfg"
2702 (lambda (port)
2703 (format port
2704 "[blas]
2705libraries = openblas
2706library_dirs = ~a/lib
2707include_dirs = ~a/include
2708[atlas]
2709library_dirs = ~a/lib
2710atlas_libs = openblas
2711"
2712 (assoc-ref inputs "openblas")
2713 (assoc-ref inputs "openblas")
2714 (assoc-ref inputs "openblas"))))
2715 #t)
bb986599
FB
2716 (alist-cons-after
2717 'install 'install-doc
2718 (lambda* (#:key outputs #:allow-other-keys)
2719 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2720 (doc (string-append data "/doc/" ,name "-" ,version))
2721 (html (string-append doc "/html"))
2722 (pyver ,(string-append "PYVER=")))
2723 (with-directory-excursion "doc"
bb986599
FB
2724 ;; Fix generation of images for mathematical expressions.
2725 (substitute* (find-files "source" "conf\\.py")
2726 (("pngmath_use_preview = True")
2727 "pngmath_use_preview = False"))
2728 (mkdir-p html)
2729 (system* "make" "html" pyver)
2730 (system* "make" "latex" "PAPER=a4" pyver)
2731 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
2732 (copy-file "build/latex/scipy-ref.pdf"
2733 (string-append doc "/scipy-ref.pdf"))
2734 (with-directory-excursion "build/html"
2735 (for-each (lambda (file)
2736 (let* ((dir (dirname file))
2737 (tgt-dir (string-append html "/" dir)))
2738 (unless (equal? "." dir)
2739 (mkdir-p tgt-dir))
2740 (copy-file file (string-append html "/" file))))
2741 (find-files "." ".*"))))))
2742 ;; Tests can only be run after the library has been installed and not
2743 ;; within the source directory.
2744 (alist-cons-after
2745 'install 'check
89b5c60e 2746 (lambda _
bb986599
FB
2747 (with-directory-excursion "/tmp"
2748 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
2749 (alist-delete
2750 'check
bb986599
FB
2751 %standard-phases))))))
2752 (home-page "http://www.scipy.org/")
2753 (synopsis "The Scipy library provides efficient numerical routines")
2754 (description "The SciPy library is one of the core packages that make up
2755the SciPy stack. It provides many user-friendly and efficient numerical
2756routines such as routines for numerical integration and optimization.")
2757 (license bsd-3)))
2758
764c077b
LC
2759(define-public python2-scipy
2760 (let ((scipy (package-with-python2 python-scipy)))
2761 (package (inherit scipy)
2762 ;; Use packages customized for python-2.
2763 (inputs `(("python2-matplotlib" ,python2-matplotlib)
2764 ("python2-numpy" ,python2-numpy)
89b5c60e
AE
2765 ,@(alist-delete "python-matplotlib"
2766 (alist-delete "python-numpy"
764c077b 2767 (package-inputs scipy))))))))
bb986599 2768
94914805
EB
2769(define-public python-sqlalchemy
2770 (package
2771 (name "python-sqlalchemy")
2772 (version "0.9.7")
2773 (source
2774 (origin
2775 (method url-fetch)
2776 (uri (string-append "https://pypi.python.org/packages/source/S/"
2777 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
2778 (sha256
2779 (base32
2780 "059ayifj5l08v6vv56anhyibyllscn10dlzr2fcw68gz1hfjdzsz"))))
2781 (build-system python-build-system)
2782 (native-inputs
2783 `(("python-cython" ,python-cython) ;for c extensions
2784 ("python-pytest" ,python-pytest)
2785 ("python-mock" ,python-mock))) ;for tests
2786 (arguments
2787 `(#:phases (alist-replace
2788 'check
2789 (lambda _ (zero? (system* "py.test")))
2790 %standard-phases)))
2791 (home-page "http://www.sqlalchemy.org")
2792 (synopsis "Database abstraction library")
2793 (description
2794 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
2795gives application developers the full power and flexibility of SQL. It
2796provides a full suite of well known enterprise-level persistence patterns,
2797designed for efficient and high-performing database access, adapted into a
2798simple and Pythonic domain language.")
2799 (license x11)))
2800
2801(define-public python2-sqlalchemy
2802 (package-with-python2 python-sqlalchemy))
c937562e 2803
1671c07c
EB
2804(define-public python-distutils-extra
2805 (package
2806 (name "python-distutils-extra")
2807 (version "2.38")
2808 (source
2809 (origin
2810 (method url-fetch)
2811 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
2812 version "/+download/python-distutils-extra-"
2813 version ".tar.gz"))
2814 (sha256
2815 (base32
2816 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
2817 (build-system python-build-system)
2818 (native-inputs
2819 `(("python-setuptools" ,python-setuptools)))
2820 (home-page "https://launchpad.net/python-distutils-extra/")
2821 (synopsis "Enhancements to Python's distutils")
2822 (description
2823 "The python-distutils-extra module enables you to easily integrate
2824gettext support, themed icons, and scrollkeeper-based documentation into
2825Python's distutils.")
2826 (license gpl2)))
2827
2828(define-public python2-distutils-extra
2829 (package-with-python2 python-distutils-extra))
ea5456c8
EB
2830
2831(define-public python2-elib.intl
2832 (package
2833 (name "python2-elib.intl")
2834 (version "0.0.3")
2835 (source
2836 (origin
2837 ;; This project doesn't tag releases or publish tarballs, so we take
2838 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
2839 (method git-fetch)
2840 (uri (git-reference
2841 (url "https://github.com/dieterv/elib.intl.git")
2842 (commit "d09997cfef")))
2843 (sha256
2844 (base32
2845 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
2846 (build-system python-build-system)
2847 (native-inputs
2848 `(("python2-setuptools" ,python2-setuptools)))
2849 (arguments
2850 ;; incompatible with Python 3 (exception syntax)
2851 `(#:python ,python-2
2852 #:tests? #f
2853 ;; With standard flags, the install phase attempts to create a zip'd
2854 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2855 ;; before 1980'
2856 #:configure-flags '("--single-version-externally-managed"
2857 "--record=elib.txt")))
2858 (home-page "https://github.com/dieterv/elib.intl")
2859 (synopsis "Enhanced internationalization for Python")
2860 (description
2861 "The elib.intl module provides enhanced internationalization (I18N)
2862services for your Python modules and applications.")
2863 (license lgpl3+)))
2864
c937562e
EB
2865(define-public python-pillow
2866 (package
2867 (name "python-pillow")
5ff408d9 2868 (version "2.8.1")
c937562e
EB
2869 (source
2870 (origin
2871 (method url-fetch)
2872 (uri (string-append "https://pypi.python.org/packages/source/P/"
2873 "Pillow/Pillow-" version ".tar.gz"))
2874 (sha256
2875 (base32
5ff408d9 2876 "15n92axxph2s3kvg68bki9gv3nzwgq7130kp7wbblpi1l0cc2q47"))))
c937562e
EB
2877 (build-system python-build-system)
2878 (native-inputs
2879 `(("python-setuptools" ,python-setuptools)
2880 ("python-nose" ,python-nose)))
2881 (inputs
5ff408d9
SB
2882 `(("freetype" ,freetype)
2883 ("lcms" ,lcms)
c937562e
EB
2884 ("zlib" ,zlib)
2885 ("libjpeg" ,libjpeg)
2886 ("openjpeg" ,openjpeg)
5ff408d9
SB
2887 ("libtiff" ,libtiff)
2888 ("libwebp" ,libwebp)))
c937562e
EB
2889 (propagated-inputs
2890 `(;; Used at runtime for pkg_resources
2891 ("python-setuptools" ,python-setuptools)))
2892 (arguments
2893 `(#:phases (alist-cons-after
2894 'install 'check-installed
2895 (lambda _
2896 (begin
2897 (setenv "HOME" (getcwd))
2898 (and (zero? (system* "python" "selftest.py" "--installed"))
2899 (zero? (system* "python" "test-installed.py")))))
2900 (alist-delete 'check %standard-phases))))
2901 (home-page "https://pypi.python.org/pypi/Pillow")
2902 (synopsis "Fork of the Python Imaging Library")
2903 (description
2904 "The Python Imaging Library adds image processing capabilities to your
2905Python interpreter. This library provides extensive file format support, an
2906efficient internal representation, and fairly powerful image processing
2907capabilities. The core image library is designed for fast access to data
2908stored in a few basic pixel formats. It should provide a solid foundation for
2909a general image processing tool.")
2910 (license (x11-style
2911 "http://www.pythonware.com/products/pil/license.htm"
2912 "The PIL Software License"))))
2913
2914(define-public python2-pillow
2915 (package-with-python2 python-pillow))
bb986599 2916
a415f036
FB
2917(define-public python-pycparser
2918 (package
2919 (name "python-pycparser")
2920 (version "2.10")
2921 (source
2922 (origin
2923 (method url-fetch)
2924 (uri (string-append "https://pypi.python.org/packages/source/p/"
2925 "pycparser/pycparser-" version ".tar.gz"))
2926 (sha256
2927 (base32
2928 "0v5qfq03yvd1pi0dwlgfai0p3dh9bq94pydn19c4pdn0c6v9hzcm"))))
2929 (outputs '("out" "doc"))
2930 (build-system python-build-system)
2931 (native-inputs
2932 `(("pkg-config" ,pkg-config)
2933 ("python-setuptools" ,python-setuptools)))
2934 (arguments
89b5c60e 2935 `(#:phases
a415f036
FB
2936 (alist-replace
2937 'check
2938 (lambda _
2939 (with-directory-excursion "tests"
2940 (zero? (system* "python" "all_tests.py"))))
2941 (alist-cons-after
2942 'install 'install-doc
2943 (lambda* (#:key outputs #:allow-other-keys)
2944 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2945 (doc (string-append data "/doc/" ,name "-" ,version))
2946 (examples (string-append doc "/examples")))
2947 (mkdir-p examples)
2948 (for-each (lambda (file)
2949 (copy-file (string-append "." file)
2950 (string-append doc file)))
2951 '("/README.rst" "/CHANGES" "/LICENSE"))
2952 (copy-recursively "examples" examples)))
2953 %standard-phases))))
2954 (home-page "https://github.com/eliben/pycparser")
2955 (synopsis "C parser in Python")
2956 (description
2957 "Pycparser is a complete parser of the C language, written in pure Python
2958using the PLY parsing library. It parses C code into an AST and can serve as
2959a front-end for C compilers or analysis tools.")
2960 (license bsd-3)))
2961
2962(define-public python2-pycparser
2963 (package-with-python2 python-pycparser))
57c3f716
FB
2964
2965(define-public python-cffi
2966 (package
2967 (name "python-cffi")
2968 (version "0.8.6")
2969 (source
2970 (origin
2971 (method url-fetch)
2972 (uri (string-append "https://pypi.python.org/packages/source/c/"
2973 "cffi/cffi-" version ".tar.gz"))
89b5c60e 2974 (sha256
57c3f716
FB
2975 (base32 "0406j3sgndmx88idv5zxkkrwfqxmjl18pj8gf47nsg4ymzixjci5"))))
2976 (build-system python-build-system)
2977 (outputs '("out" "doc"))
2978 (inputs
2979 `(("libffi" ,libffi)))
2980 (propagated-inputs ; required at run-time
2981 `(("python-pycparser" ,python-pycparser)))
2982 (native-inputs
2983 `(("pkg-config" ,pkg-config)
2984 ("python-sphinx" ,python-sphinx)
2985 ("python-setuptools" ,python-setuptools)))
2986 (arguments
2987 `(#:tests? #f ; FIXME: requires pytest
89b5c60e 2988 #:phases
57c3f716
FB
2989 (alist-cons-after
2990 'install 'install-doc
2991 (lambda* (#:key outputs #:allow-other-keys)
2992 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
2993 (doc (string-append data "/doc/" ,name "-" ,version))
2994 (html (string-append doc "/html")))
2995 (with-directory-excursion "doc"
2996 (system* "make" "html")
2997 (mkdir-p html)
2998 (copy-recursively "build/html" html))
2999 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
3000 %standard-phases)))
3001 (home-page "http://cffi.readthedocs.org")
3002 (synopsis "Foreign function interface for Python")
3003 (description
3004 "Foreign Function Interface for Python calling C code.")
bd3fa666 3005 (license license:expat)))
57c3f716
FB
3006
3007(define-public python2-cffi
3008 (package-with-python2 python-cffi))
6fa14469
FB
3009
3010(define-public python-xcffib
3011 (package
3012 (name "python-xcffib")
3013 (version "0.1.9")
3014 (source
3015 (origin
3016 (method url-fetch)
3017 (uri (string-append "https://pypi.python.org/packages/source/x/"
3018 "xcffib/xcffib-" version ".tar.gz"))
3019 (sha256
3020 (base32
3021 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
3022 (build-system python-build-system)
3023 (inputs
3024 `(("libxcb" ,libxcb)
3025 ("python-six" ,python-six)))
3026 (native-inputs
3027 `(("python-setuptools" ,python-setuptools)))
3028 (propagated-inputs
3029 `(("python-cffi" ,python-cffi))) ; used at run time
3030 (arguments
89b5c60e 3031 `(#:phases
6fa14469
FB
3032 (alist-cons-after
3033 'install 'install-doc
3034 (lambda* (#:key outputs #:allow-other-keys)
3035 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3036 "/doc/" ,name "-" ,version)))
3037 (mkdir-p doc)
3038 (copy-file "README.md"
3039 (string-append doc "/README.md"))))
3040 %standard-phases)))
3041 (home-page "https://github.com/tych0/xcffib")
3042 (synopsis "XCB Python bindings")
3043 (description
3044 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3045support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 3046 (license license:expat)))
6fa14469
FB
3047
3048(define-public python2-xcffib
3049 (package-with-python2 python-xcffib))
3050
9e099723
FB
3051(define-public python-cairocffi
3052 (package
3053 (name "python-cairocffi")
3054 (version "0.6")
3055 (source
3056 (origin
3057 (method url-fetch)
3058 ;; The archive on pypi is missing the 'utils' directory!
3059 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
3060 version ".tar.gz"))
f586c877 3061 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
3062 (sha256
3063 (base32
3064 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
3065 (build-system python-build-system)
3066 (outputs '("out" "doc"))
3067 (inputs
3068 `(("gdk-pixbuf" ,gdk-pixbuf)
3069 ("cairo" ,cairo)))
3070 (native-inputs
3071 `(("pkg-config" ,pkg-config)
3072 ("python-sphinx" ,python-sphinx)
3073 ("python-docutils" ,python-docutils)
3074 ("python-setuptools" ,python-setuptools)))
3075 (propagated-inputs
3076 `(("python-xcffib" ,python-xcffib))) ; used at run time
3077 (arguments
89b5c60e 3078 `(#:phases
9e099723
FB
3079 (alist-cons-after
3080 'install 'install-doc
3081 (lambda* (#:key inputs outputs #:allow-other-keys)
3082 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3083 (doc (string-append data "/doc/" ,name "-" ,version))
3084 (html (string-append doc "/html")))
89b5c60e 3085 (setenv "LD_LIBRARY_PATH"
9e099723
FB
3086 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3087 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3088 (setenv "LANG" "en_US.UTF-8")
3089 (mkdir-p html)
3090 (for-each (lambda (file)
3091 (copy-file (string-append "." file)
3092 (string-append doc file)))
3093 '("/README.rst" "/CHANGES" "/LICENSE"))
3094 (system* "python" "setup.py" "build_sphinx")
3095 (copy-recursively "docs/_build/html" html)))
3096 %standard-phases)))
3097 (home-page "https://github.com/SimonSapin/cairocffi")
3098 (synopsis "Python bindings and object-oriented API for Cairo")
3099 (description
3100 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3101Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3102graphics library with support for multiple backends including image buffers,
3103PNG, PostScript, PDF, and SVG file output.")
3104 (license bsd-3)))
3105
3106(define-public python2-cairocffi
3107 (package-with-python2 python-cairocffi))
3108
3cff95cb
RW
3109(define-public python-decorator
3110 (package
3111 (name "python-decorator")
3112 (version "3.4.2")
3113 (source
3114 (origin
3115 (method url-fetch)
3116 (uri (string-append
3117 "https://pypi.python.org/packages/source/d/decorator/decorator-"
3118 version ".tar.gz"))
3119 (sha256
3120 (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
3121 (build-system python-build-system)
3122 (arguments '(#:tests? #f)) ; no test target
3123 (native-inputs
3124 `(("python-setuptools" ,python-setuptools)))
3125 (home-page "http://pypi.python.org/pypi/decorator/")
3126 (synopsis "Python module to simplify usage of decorators")
3127 (description
3128 "The aim of the decorator module is to simplify the usage of decorators
3129for the average programmer, and to popularize decorators usage giving examples
3130of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3131etc. The core of this module is a decorator factory.")
3132 (license license:expat)))
3133
3134(define-public python2-decorator
3135 (package-with-python2 python-decorator))
3136
2c0499ad
RW
3137(define-public python-drmaa
3138 (package
3139 (name "python-drmaa")
3140 (version "0.7.6")
3141 (source
3142 (origin
3143 (method url-fetch)
3144 (uri (string-append
3145 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
3146 version ".tar.gz"))
3147 (sha256
3148 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
3149 (build-system python-build-system)
3150 ;; The test suite requires libdrmaa which is provided by the cluster
3151 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3152 ;; should be set to the path of the libdrmaa library.
3153 (arguments '(#:tests? #f))
3154 (native-inputs
3155 `(("python-nose" ,python-nose)
3156 ("python-setuptools" ,python-setuptools)))
3157 (home-page "https://pypi.python.org/pypi/drmaa")
3158 (synopsis "Python bindings for the DRMAA library")
3159 (description
3160 "A Python package for Distributed Resource Management (DRM) job
3161submission and control. This package is an implementation of the DRMAA 1.0
3162Python language binding specification.")
3163 (license bsd-3)))
3164
3165(define-public python2-drmaa
3166 (package-with-python2 python-drmaa))
3167
ae1ab9fe
FB
3168(define-public python-ipython
3169 (package
3170 (name "python-ipython")
3171 (version "2.3.1")
3172 (source
3173 (origin
3174 (method url-fetch)
3175 (uri (string-append "https://pypi.python.org/packages/source/i/"
3176 "ipython/ipython-" version ".tar.gz"))
3177 (sha256
3178 (base32 "1764gi5m3ff481rjk336cw6i2h4zlc0nxam9rc5m8m7yl9m4d61y"))))
3179 (build-system python-build-system)
3180 (outputs '("out" "doc"))
3181 ;; FIXME: add optional dependencies when available: pyzmq, tornado, ...
3182 (inputs
3183 `(("readline" ,readline)
3184 ("python-matplotlib" ,python-matplotlib)
3185 ("python-numpy" ,python-numpy-bootstrap)
3186 ("python-numpydoc" ,python-numpydoc)
3187 ("python-nose" ,python-nose)))
3188 (native-inputs
3189 `(("pkg-config" ,pkg-config)
3190 ("python-sphinx" ,python-sphinx)
3191 ("texlive" ,texlive)
3192 ("texinfo" ,texinfo)
3193 ("python-setuptools" ,python-setuptools)))
3194 (arguments
89b5c60e 3195 `(#:phases
ae1ab9fe
FB
3196 (alist-cons-after
3197 'install 'install-doc
3198 (lambda* (#:key inputs outputs #:allow-other-keys)
3199 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3200 (doc (string-append data "/doc/" ,name "-" ,version))
3201 (html (string-append doc "/html"))
3202 (man1 (string-append data "/man/man1"))
3203 (info (string-append data "/info"))
3204 (examples (string-append doc "/examples")))
3205 (setenv "LANG" "en_US.UTF-8")
3206 (with-directory-excursion "docs"
3207 ;; FIXME: html and pdf fail to build without optional pyzmq
3208 ;(system* "make" "html")
3209 ;(system* "make" "pdf" "PAPER=a4")
3210 (system* "make" "info"))
3211 (copy-recursively "docs/man" man1)
3212 (copy-recursively "examples" examples)
3213 ;; (copy-recursively "docs/build/html" html)
3214 ;; (copy-file "docs/build/latex/ipython.pdf"
3215 ;; (string-append doc "/ipython.pdf"))
3216 (mkdir-p info)
3217 (copy-file "docs/build/texinfo/ipython.info"
3218 (string-append info "/ipython.info"))
3219 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst"))))
3220 ;; Tests can only be run after the library has been installed and not
3221 ;; within the source directory.
3222 (alist-cons-after
3223 'install 'check
3224 (lambda* (#:key outputs #:allow-other-keys)
3225 ;; The test procedure appears to miss the fact that some optional
3226 ;; dependencies are missing.
3227 ;; (with-directory-excursion "/tmp"
3228 ;; (zero? (system* (string-append (assoc-ref outputs "out")
3229 ;; "/bin/iptest"))))
3230 #t)
89b5c60e
AE
3231 (alist-delete
3232 'check
ae1ab9fe
FB
3233 %standard-phases)))))
3234 (home-page "http://ipython.org")
3235 (synopsis "IPython is a tool for interactive computing in Python")
3236 (description
3237 "IPython provides a rich architecture for interactive computing with:
3238Powerful interactive shells, a browser-based notebook, support for interactive
3239data visualization, embeddable interpreters and tools for parallel
3240computing.")
3241 (license bsd-3)))
3242
3243(define-public python2-ipython
3244 (let ((ipython (package-with-python2 python-ipython)))
3245 (package (inherit ipython)
3246 ;; Make sure we use custom python2-NAME packages.
89b5c60e 3247 (inputs
88c26834
AE
3248 `(("python2-matplotlib" ,python2-matplotlib)
3249 ,@(alist-delete "python-matplotlib"
3250 (package-inputs ipython)))))))
03411993
AE
3251
3252(define-public python-isodate
3253 (package
3254 (name "python-isodate")
3255 (version "0.5.1")
3256 (source
3257 (origin
3258 (method url-fetch)
3259 (uri (string-append
3260 "https://pypi.python.org/packages/source/i/isodate/isodate-"
3261 version
3262 ".tar.gz"))
3263 (sha256
3264 (base32
3265 "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
3266 (build-system python-build-system)
3267 (inputs
3268 `(("python-setuptools" ,python-setuptools)))
3269 (home-page
3270 "http://cheeseshop.python.org/pypi/isodate")
3271 (synopsis
3272 "Python date parser and formatter")
3273 (description
3274 "Python-isodate is a python module for parsing and formatting
3275ISO 8601 dates, time and duration.")
3276 (license bsd-3)))
3277
3278(define-public python2-isodate
3279 (package-with-python2 python-isodate))
673ab897
AE
3280
3281(define-public python-html5lib
3282 (package
3283 (name "python-html5lib")
3284 (version "1.0b3")
3285 (source
3286 (origin
3287 (method url-fetch)
3288 (uri (string-append
3289 "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
3290 version
3291 ".tar.gz"))
3292 (sha256
3293 (base32
3294 "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
3295 (build-system python-build-system)
3dd75476
AE
3296 (propagated-inputs
3297 `(("python-six" ,python-six))) ; required to "import html5lib"
673ab897
AE
3298 (inputs
3299 `(("python-setuptools" ,python-setuptools)))
3300 (arguments
3301 `(#:test-target "check"))
3302 (home-page
3303 "https://github.com/html5lib/html5lib-python")
3304 (synopsis
3305 "Python HTML parser based on the WHATWG HTML specifcation")
3306 (description
3307 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
3308and written in Python.")
bd3fa666 3309 (license license:expat)))
673ab897
AE
3310
3311(define-public python2-html5lib
3312 (package-with-python2 python-html5lib))
e99f4211
MW
3313
3314(define-public python-urwid
3315 (package
3316 (name "python-urwid")
3317 (version "1.3.0")
3318 (source
3319 (origin
3320 (method url-fetch)
be1f44bb
MW
3321 (uri (string-append
3322 "https://pypi.python.org/packages/source/u/urwid/urwid-"
3323 version ".tar.gz"))
e99f4211
MW
3324 (sha256
3325 (base32
3326 "18mb0yy94sjc434rd61m2sfnw27sa0nyrszpj5a9r9zh7fnlzw19"))))
3327 (build-system python-build-system)
3328 (native-inputs `(("python-setuptools" ,python-setuptools)))
3329 (home-page "http://urwid.org")
3330 (synopsis "Console user interface library for Python")
3331 (description
3332 "Urwid is a curses-based UI/widget library for Python. It includes many
3333features useful for text console applications.")
3334 (license lgpl2.1+)))
3335
3336(define-public python2-urwid
3337 (package-with-python2 python-urwid))
d95a56c6
PAR
3338
3339(define-public python-dbus
3340 (package
3341 (name "python-dbus")
3342 (version "1.2.0")
3343 (source
3344 (origin
3345 (method url-fetch)
3346 (uri (string-append
3347 "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
3348 version ".tar.gz"))
3349 (sha256
3350 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
3351 (build-system gnu-build-system)
3352 (native-inputs
3353 `(("pkg-config" ,pkg-config)))
3354 (inputs
3355 `(("python" ,python)
2e88d113 3356 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
3357 (synopsis "Python bindings for D-bus")
3358 (description "python-dbus provides bindings for libdbus, the reference
3359implementation of D-Bus.")
3360 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 3361 (license license:expat)))
b52af02b
MW
3362
3363(define-public python2-dbus
3364 (package (inherit python-dbus)
3365 (name "python2-dbus")
3366 (inputs `(("python" ,python-2)
3367 ,@(alist-delete "python"
3368 (package-inputs python-dbus)
3369 equal?)))
3370 ;; FIXME: on Python 2, the test_utf8 fails with:
3371 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
3372 (arguments `(#:tests? #f))))
a6ac8332
AE
3373
3374(define-public python-apsw
3375 (package
3376 (name "python-apsw")
3377 (version "3.8.7.3-r1")
3378 (source
3379 (origin
3380 (method url-fetch)
3381 (uri (string-append
3382 "https://pypi.python.org/packages/source/a/apsw/apsw-"
3383 version
3384 ".tar.gz"))
3385 (sha256
3386 (base32
3387 "1rgxdypg7hym0qny15rx5khrghx9fkppfgsfa2s8lg917924mv7l"))))
3388 (build-system python-build-system)
3389 (inputs
3390 `(("python-setuptools" ,python-setuptools)
3391 ("sqlite" ,sqlite)))
3392 (arguments
3393 `(#:phases
3394 ;; swap check and install phases
3395 (alist-cons-after
3396 'install 'check
3397 (assoc-ref %standard-phases 'check)
3398 (alist-delete
3399 'check
3400 %standard-phases))))
3401 (home-page "https://github.com/rogerbinns/apsw/")
3402 (synopsis "Another Python SQLite Wrapper")
3403 (description "APSW is a Python wrapper for the SQLite
3404embedded relational database engine. In contrast to other wrappers such as
3405pysqlite it focuses on being a minimal layer over SQLite attempting just to
3406translate the complete SQLite API into Python.")
abde5f37 3407 (license license:zlib)))
a6ac8332
AE
3408
3409(define-public python2-apsw
3410 (package-with-python2 python-apsw))
26b307e2
AE
3411
3412(define-public python-lxml
3413 (package
3414 (name "python-lxml")
3415 (version "3.4.2")
3416 (source
3417 (origin
3418 (method url-fetch)
3419 (uri (string-append
3420 "https://pypi.python.org/packages/source/l/lxml/lxml-"
3421 version
3422 ".tar.gz"))
3423 (sha256
3424 (base32
3425 "0pd23qz8vms1mgm41p96h4vac5y91igs4wr9640gnvxgk019kmf7"))))
3426 (build-system python-build-system)
3427 (inputs
3428 `(("libxml2" ,libxml2)
3429 ("libxslt" ,libxslt)
3430 ("python-setuptools" ,python-setuptools)))
3431 (home-page "http://lxml.de/")
3432 (synopsis
3433 "Python XML processing library")
3434 (description
3435 "The lxml XML toolkit is a Pythonic binding for the C libraries
3436libxml2 and libxslt.")
3437 (license bsd-3))) ; and a few more, see LICENSES.txt
3438
3439(define-public python2-lxml
3440 (package-with-python2 python-lxml))
4ed20663 3441
bec07a7c
AE
3442(define-public python2-pil
3443 (package
3444 (name "python2-pil")
3445 (version "1.1.7")
3446 (source
3447 (origin
3448 (method url-fetch)
3449 (uri (string-append
3450 "http://effbot.org/downloads/Imaging-"
3451 version ".tar.gz"))
3452 (sha256
3453 (base32
516277cb
AE
3454 "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
3455 (modules '((guix build utils)))
3456 (snippet
3457 ;; Adapt to newer freetype. As the package is unmaintained upstream,
3458 ;; there is no use in creating a patch and reporting it.
3459 '(substitute* "_imagingft.c"
3460 (("freetype/")
3461 "freetype2/")))))
bec07a7c
AE
3462 (build-system python-build-system)
3463 (inputs
3464 `(("freetype" ,freetype)
3465 ("libjpeg" ,libjpeg)
3466 ("libtiff" ,libtiff)
3467 ("python-setuptools" ,python-setuptools)
3468 ("zlib" ,zlib)))
3469 (arguments
3470 ;; Only the fork python-pillow works with Python 3.
3471 `(#:python ,python-2
3472 #:tests? #f ; no check target
3473 #:phases
3474 (alist-cons-before
3475 'build 'configure
3476 ;; According to README and setup.py, manual configuration is
3477 ;; the preferred way of "searching" for inputs.
3478 ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
3479 (lambda* (#:key inputs #:allow-other-keys)
3480 (let ((jpeg (assoc-ref inputs "libjpeg"))
3481 (zlib (assoc-ref inputs "zlib"))
3482 (tiff (assoc-ref inputs "libtiff"))
3483 (freetype (assoc-ref inputs "freetype")))
3484 (substitute* "setup.py"
3485 (("JPEG_ROOT = None")
3486 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
3487 (("ZLIB_ROOT = None")
3488 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
3489 (("TIFF_ROOT = None")
3490 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
3491 (("FREETYPE_ROOT = None")
3492 (string-append "FREETYPE_ROOT = libinclude(\""
3493 freetype "\")")))))
3494 %standard-phases)))
3495 (home-page "http://www.pythonware.com/products/pil/")
3496 (synopsis "Python Imaging Library")
3497 (description "The Python Imaging Library (PIL) adds image processing
3498capabilities to the Python interpreter.")
3499 (license (x11-style
3500 "file://README"
3501 "See 'README' in the distribution."))))
092e86f5
AE
3502
3503(define-public python2-cssutils
3504 (package
3505 (name "python2-cssutils")
3506 (version "1.0")
3507 (source
3508 (origin
3509 (method url-fetch)
3510 (uri (string-append
3511 "https://pypi.python.org/packages/source/c/cssutils/cssutils-"
3512 version
3513 ".zip"))
3514 (sha256
3515 (base32
3516 "1bwim1353r4hqiir73sn4sc43y7ymh09qx0kly7vj048blppc125"))))
3517 (build-system python-build-system)
3518 (native-inputs
3519 `(("python2-mock" ,python2-mock) ; for the tests
3520 ("unzip" ,unzip))) ; for unpacking the source
3521 (inputs
3522 `(("python2-setuptools" ,python2-setuptools)))
3523 (arguments
3524 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
3525 #:tests? #f ; The tests apparently download an external URL.
da6dd842 3526 ))
092e86f5
AE
3527 (home-page "http://cthedot.de/cssutils/")
3528 (synopsis
3529 "CSS Cascading Style Sheets library for Python")
3530 (description
3531 "Cssutils is a Python package for parsing and building CSS
3532Cascading Style Sheets. Currently it provides a DOM only and no rendering
3533options.")
3534 (license lgpl3+)))
880ff77c
AE
3535
3536(define-public python-cssselect
3537 (package
3538 (name "python-cssselect")
3539 (version "0.9.1")
3540 (source
3541 (origin
3542 (method url-fetch)
3543 (uri (string-append
3544 "https://pypi.python.org/packages/source/c/cssselect/cssselect-"
3545 version
3546 ".tar.gz"))
3547 (sha256
3548 (base32
3549 "10h623qnp6dp1191jri7lvgmnd4yfkl36k9smqklp1qlf3iafd85"))))
3550 (build-system python-build-system)
3551 (inputs
3552 `(("python-setuptools" ,python-setuptools)))
3553 (arguments
3554 ;; tests fail with message
3555 ;; AttributeError: 'module' object has no attribute 'tests'
3556 `(#:tests? #f))
3557 (home-page
3558 "https://pythonhosted.org/cssselect/")
3559 (synopsis
3560 "CSS3 selector parser and translator to XPath 1.0")
3561 (description
3562 "Cssselect ia a Python module that parses CSS3 Selectors and translates
3563them to XPath 1.0 expressions. Such expressions can be used in lxml or
3564another XPath engine to find the matching elements in an XML or HTML document.")
3565 (license bsd-3)))
3566
3567(define-public python2-cssselect
3568 (package-with-python2 python-cssselect))
60357f99
AE
3569
3570(define-public python-netifaces
3571 (package
3572 (name "python-netifaces")
3573 (version "0.10.4")
3574 (source
3575 (origin
3576 (method url-fetch)
3577 (uri (string-append
3578 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
3579 version
3580 ".tar.gz"))
3581 (sha256
3582 (base32
3583 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
3584 (build-system python-build-system)
3585 (inputs
3586 `(("python-setuptools" ,python-setuptools)))
3587 (home-page
3588 "https://bitbucket.org/al45tair/netifaces")
3589 (synopsis
3590 "Python module for portable network interface information")
3591 (description
3592 "Netifaces is a Python module providing information on network
3593interfaces in an easy and portable manner.")
3594 (license license:expat)))
3595
3596(define-public python2-netifaces
3597 (package-with-python2 python-netifaces))
92cb152b 3598
32f77c04
RW
3599(define-public python-networkx
3600 (package
3601 (name "python-networkx")
3602 (version "1.9.1")
3603 (source
3604 (origin
3605 (method url-fetch)
3606 (uri (string-append
3607 "https://pypi.python.org/packages/source/n/networkx/networkx-"
3608 version ".tar.gz"))
3609 (sha256
3610 (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
3611 (build-system python-build-system)
3612 ;; python-decorator is needed at runtime
3613 (propagated-inputs
3614 `(("python-decorator" ,python-decorator)))
3615 (native-inputs
3616 `(("python-setuptools" ,python-setuptools)
3617 ("python-nose" ,python-nose)))
3618 (home-page "http://networkx.github.io/")
3619 (synopsis "Python module for creating and manipulating graphs and networks")
3620 (description
3621 "NetworkX is a Python package for the creation, manipulation, and study
3622of the structure, dynamics, and functions of complex networks.")
3623 (license bsd-3)))
3624
3625(define-public python2-networkx
3626 (package-with-python2 python-networkx))
3627
92cb152b
RW
3628(define-public snakemake
3629 (package
3630 (name "snakemake")
3631 (version "3.2.1")
3632 (source
3633 (origin
3634 (method url-fetch)
3635 (uri (string-append
3636 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
3637 version ".tar.gz"))
3638 (sha256
3639 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
3640 (build-system python-build-system)
3641 (inputs `(("python-setuptools" ,python-setuptools)))
3642 (home-page "https://bitbucket.org/johanneskoester/snakemake")
3643 (synopsis "Python-based execution environment for make-like workflows")
3644 (description
3645 "Snakemake aims to reduce the complexity of creating workflows by
3646providing a clean and modern domain specific specification language (DSL) in
3647Python style, together with a fast and comfortable execution environment.")
3648 (license license:expat)))
a1920bc9 3649
35de1fbd
RW
3650(define-public python-seaborn
3651 (package
3652 (name "python-seaborn")
3653 (version "0.5.1")
3654 (source
3655 (origin
3656 (method url-fetch)
3657 (uri (string-append
3658 "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
3659 version ".tar.gz"))
3660 (sha256
3661 (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
3662 (build-system python-build-system)
3663 (propagated-inputs
3664 `(("python-pandas" ,python-pandas)
3665 ("python-matplotlib" ,python-matplotlib)
3666 ("python-scipy" ,python-scipy)))
3667 (native-inputs
3668 `(("python-setuptools" ,python-setuptools)))
3669 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
3670 (synopsis "Statistical data visualization")
3671 (description
3672 "Seaborn is a library for making attractive and informative statistical
3673graphics in Python. It is built on top of matplotlib and tightly integrated
3674with the PyData stack, including support for numpy and pandas data structures
3675and statistical routines from scipy and statsmodels.")
3676 (license bsd-3)))
3677
3678(define-public python2-seaborn
3679 (let ((seaborn (package-with-python2 python-seaborn)))
3680 (package (inherit seaborn)
3681 (propagated-inputs
3682 `(("python2-pytz" ,python2-pytz)
3683 ,@(package-propagated-inputs seaborn))))))
3684
90fc547f
RW
3685(define-public python-sympy
3686 (package
3687 (name "python-sympy")
3688 (version "0.7.6")
3689 (source
3690 (origin
3691 (method url-fetch)
3692 (uri (string-append
3693 "https://github.com/sympy/sympy/releases/download/sympy-"
3694 version "/sympy-" version ".tar.gz"))
3695 (sha256
3696 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
3697 (build-system python-build-system)
3698 (native-inputs
3699 `(("python-setuptools" ,python-setuptools)))
3700 (home-page "http://www.sympy.org/")
3701 (synopsis "Python library for symbolic mathematics")
3702 (description
3703 "SymPy is a Python library for symbolic mathematics. It aims to become a
3704full-featured computer algebra system (CAS) while keeping the code as simple
3705as possible in order to be comprehensible and easily extensible.")
3706 (license bsd-3)))
3707
3708(define-public python2-sympy
3709 (package-with-python2 python-sympy))
3710
a1920bc9
FB
3711(define-public python-testlib
3712 (package
3713 (name "python-testlib")
3714 (version "0.6.5")
3715 (source
3716 (origin
3717 (method url-fetch)
3718 (uri (string-append
3719 "https://pypi.python.org/packages/source/t/testlib/testlib-"
3720 version ".zip"))
3721 (sha256
3722 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
3723 (build-system python-build-system)
3724 (inputs
3725 `(("python-setuptools" ,python-setuptools)))
3726 (native-inputs
3727 `(("unzip" ,unzip)))
3728 (arguments
3729 `(#:phases
3730 (alist-replace
3731 'unpack
3732 (lambda* (#:key inputs outputs #:allow-other-keys)
3733 (let ((unzip (string-append (assoc-ref inputs "unzip")
3734 "/bin/unzip"))
3735 (source (assoc-ref inputs "source")))
3736 (and (zero? (system* unzip source))
3737 (chdir (string-append "testlib-" ,version)))))
3738 %standard-phases)))
3739 (synopsis "Python micro test suite harness")
3740 (description "A micro unittest suite harness for Python.")
3741 (home-page "https://github.com/trentm/testlib")
1cb9c006 3742 (license license:expat)))
a1920bc9
FB
3743
3744(define-public python2-testlib
3745 (package-with-python2 python-testlib))
db62afa5
LC
3746
3747(define-public python2-xlib
3748 (package
3749 (name "python2-xlib")
3750 (version "0.14")
3751 (source (origin
3752 (method url-fetch)
3753 (uri (string-append "mirror://sourceforge/python-xlib/"
3754 "python-xlib-" version ".tar.gz"))
3755 (sha256
3756 (base32
3757 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
3758 (build-system python-build-system)
3759 (arguments
3760 `(#:python ,python-2 ;Python 2 only
3761 #:tests? #f)) ;no tests
3762 (inputs
3763 `(("python-setuptools" ,python-setuptools)))
3764 (home-page "http://python-xlib.sourceforge.net/")
3765 (synopsis "Python X11 client library")
3766 (description
3767 "The Python X Library is intended to be a fully functional X client
3768library for Python programs. It is useful to implement low-level X clients.
3769It is written entirely in Python.")
3770 (license gpl2+)))
0234ca06
DT
3771
3772(define-public python-singledispatch
3773 (package
3774 (name "python-singledispatch")
3775 (version "3.4.0.3")
3776 (source
3777 (origin
3778 (method url-fetch)
3779 (uri (string-append
3780 "https://pypi.python.org/packages/source/s/singledispatch/"
3781 "singledispatch-" version ".tar.gz"))
3782 (sha256
3783 (base32
3784 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
3785 (build-system python-build-system)
3786 (native-inputs
3787 `(("python-setuptools" ,python-setuptools)))
3788 (propagated-inputs
3789 `(("python-six" ,python-six)))
3790 (home-page
3791 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
3792 (synopsis "Backport of singledispatch feature from Python 3.4")
3793 (description
3794 "This library brings functools.singledispatch from Python 3.4 to Python
37952.6-3.3.")
3796 (license license:expat)))
3797
3798(define-public python2-singledispatch
3799 (package-with-python2 python-singledispatch))
feaae484 3800
310d218f
RW
3801(define-public python-tornado
3802 (package
3803 (name "python-tornado")
3804 (version "4.1")
3805 (source
3806 (origin
3807 (method url-fetch)
3808 (uri (string-append
3809 "https://pypi.python.org/packages/source/t/tornado/"
3810 "tornado-" version ".tar.gz"))
3811 (sha256
3812 (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
3813 (build-system python-build-system)
3814 (inputs
3815 `(("python-certifi" ,python-certifi)))
3816 (native-inputs
3817 `(("python-setuptools" ,python-setuptools)))
3818 (home-page "https://pypi.python.org/pypi/tornado/4.1")
3819 (synopsis "Python web framework and asynchronous networking library")
3820 (description
3821 "Tornado is a Python web framework and asynchronous networking library,
3822originally developed at FriendFeed. By using non-blocking network I/O,
3823Tornado can scale to tens of thousands of open connections, making it ideal
3824for long polling, WebSockets, and other applications that require a long-lived
3825connection to each user.")
3826 (license asl2.0)))
3827
3828(define-public python2-tornado
3829 (let ((tornado (package-with-python2 python-tornado)))
3830 (package (inherit tornado)
3831 (inputs
3832 `(("python2-backport-ssl-match-hostname"
3833 ,python2-backport-ssl-match-hostname)
3834 ,@(package-inputs tornado))))))
3835
feaae484
SB
3836(define-public python-waf
3837 (package
3838 (name "python-waf")
3839 (version "1.8.8")
3840 (source (origin
3841 (method url-fetch)
3842 (uri (string-append "https://waf.io/"
3843 "waf-" version ".tar.bz2"))
3844 (sha256
3845 (base32
3846 "0b5q307fgn6a5d8yjia2d1l4bk1q3ilvc0w8k4isfrrx2gbcw8wn"))))
3847 (build-system python-build-system)
3848 (arguments
3849 '(#:phases
3850 (modify-phases %standard-phases
3851 (replace 'build
3852 (lambda _
3853 (zero? (begin
3854 (system* "python" "waf-light" "configure")
3855 (system* "python" "waf-light" "build")))))
3856 (replace 'check
3857 (lambda _
3858 (zero? (system* "python" "waf" "--version"))))
3859 (replace 'install
3860 (lambda _
3861 (copy-file "waf" %output))))))
3862 (home-page "https://waf.io/")
3863 (synopsis "Python-based build system")
3864 (description
3865 "Waf is a Python-based framework for configuring, compiling and installing
3866applications.")
3867 (license bsd-3)))
3868
3869(define-public python2-waf
3870 (package-with-python2 python-waf))
45203542
RW
3871
3872(define-public python-pyzmq
3873 (package
3874 (name "python-pyzmq")
3875 (version "14.6.0")
3876 (source
3877 (origin
3878 (method url-fetch)
3879 (uri (string-append
3880 "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-"
3881 version ".tar.gz"))
3882 (sha256
3883 (base32 "1frmbjykvhmdg64g7sn20c9fpamrsfxwci1nhhg8q7jgz5pq0ikp"))))
3884 (build-system python-build-system)
3885 (arguments
3886 `(#:configure-flags
3887 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
3888 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
3889 ;; --inplace' for 'python setup.py test' to work.
3890 #:tests? #f))
3891 (inputs
3892 `(("zeromq" ,zeromq)))
3893 (native-inputs
3894 `(("pkg-config" ,pkg-config)
3895 ("python-nose" ,python-nose)
3896 ("python-setuptools" ,python-setuptools)))
3897 (home-page "http://github.com/zeromq/pyzmq")
3898 (synopsis "Python bindings for 0MQ")
3899 (description
3900 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3901 (license bsd-4)))
3902
3903(define-public python2-pyzmq
3904 (package-with-python2 python-pyzmq))
d889e6c4
CR
3905
3906(define-public python-pep8
3907 (package
3908 (name "python-pep8")
3909 (version "1.6.2")
3910 (source
3911 (origin
3912 (method url-fetch)
3913 (uri (string-append
3914 "https://pypi.python.org/packages/source/p/pep8/pep8-"
3915 version
3916 ".tar.gz"))
3917 (sha256
3918 (base32
3919 "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
3920 (build-system python-build-system)
3921 (inputs
3922 `(("python-setuptools" ,python-setuptools)))
3923 (home-page "http://pep8.readthedocs.org/")
3924 (synopsis "Python style guide checker")
3925 (description
3926 "This tools checks Python code against some of the style conventions in
3927PEP 8.")
3928 (license license:expat)))
3929
3930(define-public python2-pep8
3931 (package-with-python2 python-pep8))
e31d7f44
CR
3932
3933(define-public python-pyflakes
3934 (package
3935 (name "python-pyflakes")
3936 (version "0.9.2")
3937 (source
3938 (origin
3939 (method url-fetch)
3940 (uri (string-append
3941 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
3942 version
3943 ".tar.gz"))
3944 (sha256
3945 (base32
3946 "0pvawddspdq0y22dbraq5gld9qr6rwa7zhmpfhl2b7v9rqiiqs82"))))
3947 (build-system python-build-system)
3948 (inputs
3949 `(("python-setuptools" ,python-setuptools)))
3950 (home-page
3951 "https://github.com/pyflakes/pyflakes")
3952 (synopsis "Passive checker of Python programs")
3953 (description
3954 "Pyflakes statically checks Python source code for common errors.")
3955 (license license:expat)))
a59e017c
CR
3956
3957(define-public python-mccabe
3958 (package
3959 (name "python-mccabe")
3960 (version "0.3.1")
3961 (source
3962 (origin
3963 (method url-fetch)
3964 (uri (string-append
3965 "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
3966 version
3967 ".tar.gz"))
3968 (sha256
3969 (base32
3970 "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
3971 (build-system python-build-system)
3972 (inputs
3973 `(("python-setuptools" ,python-setuptools)))
3974 (home-page "https://github.com/flintwork/mccabe")
3975 (synopsis "McCabe checker, plugin for flake8")
3976 (description
3977 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
3978complexity of Python source code.")
7362371d 3979 (license license:expat)))
a59e017c
CR
3980
3981(define-public python2-mccabe
3982 (package-with-python2 python-mccabe))
e8df8f47
CR
3983
3984;; Flake8 2.4.1 requires an older version of pep8.
3985;; This should be removed ASAP.
3986(define-public python-pep8-1.5.7
3987 (package (inherit python-pep8)
3988 (version "1.5.7")
3989 (source
3990 (origin
3991 (method url-fetch)
3992 (uri (string-append
3993 "https://pypi.python.org/packages/source/p/pep8/pep8-"
3994 version
3995 ".tar.gz"))
3996 (sha256
3997 (base32
3998 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
3999
4000(define-public python2-pep8-1.5.7
4001 (package-with-python2 python-pep8-1.5.7))
4002
4003;; Flake8 2.4.1 requires an older version of pyflakes.
4004;; This should be removed ASAP.
4005(define-public python-pyflakes-0.8.1
4006 (package (inherit python-pyflakes)
4007 (version "0.8.1")
4008 (source
4009 (origin
4010 (method url-fetch)
4011 (uri (string-append
4012 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
4013 version
4014 ".tar.gz"))
4015 (sha256
4016 (base32
4017 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
4018
4019(define-public python2-pyflakes-0.8.1
4020 (package-with-python2 python-pyflakes))
4021
4022(define-public python-flake8
4023 (package
4024 (name "python-flake8")
4025 (version "2.4.1")
4026 (source
4027 (origin
4028 (method url-fetch)
4029 (uri (string-append
4030 "https://pypi.python.org/packages/source/f/flake8/flake8-"
4031 version
4032 ".tar.gz"))
4033 (sha256
4034 (base32
4035 "0dvmrpv7x98xkzffjz1z7lqr90sp5zdz16bdwckfd1cckpjvnzif"))))
4036 (build-system python-build-system)
4037 (inputs
4038 `(("python-setuptools" ,python-setuptools)
4039 ("python-pep8" ,python-pep8-1.5.7)
4040 ("python-pyflakes" ,python-pyflakes-0.8.1)
4041 ("python-mccabe" ,python-mccabe)
4042 ("python-mock" ,python-mock)
4043 ("python-nose" ,python-nose)))
4044 (home-page "https://gitlab.com/pycqa/flake8")
4045 (synopsis
4046 "The modular source code checker: pep8, pyflakes and co")
4047 (description
4048 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
4049 (license license:expat)))
4050
4051(define-public python2-flake8
4052 (package-with-python2 python-flake8))