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