dev-python/h5py: version bump.
[gentoo.git] / dev-python / h5py / h5py-2.6.0.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
8
9 inherit distutils-r1 flag-o-matic
10
11 DESCRIPTION="Simple Python interface to HDF5 files"
12 HOMEPAGE="http://www.h5py.org/"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
18 IUSE="doc test examples mpi"
19
20 RDEPEND="
21         sci-libs/hdf5:=[mpi=]
22         dev-python/numpy[${PYTHON_USEDEP}]
23         dev-python/six[${PYTHON_USEDEP}]"
24 DEPEND="${RDEPEND}
25         dev-python/cython[${PYTHON_USEDEP}]
26         dev-python/pkgconfig[${PYTHON_USEDEP}]
27         dev-python/setuptools[${PYTHON_USEDEP}]
28         doc? (
29                 dev-python/alabaster[${PYTHON_USEDEP}]
30                 >=dev-python/sphinx-1.3.1[${PYTHON_USEDEP}]
31                 )
32         mpi? ( dev-python/mpi4py[${PYTHON_USEDEP}] )"
33
34 pkg_setup() {
35         use mpi && export CC=mpicc
36 }
37
38 python_prepare_all() {
39         append-cflags -fno-strict-aliasing
40         distutils-r1_python_prepare_all
41 }
42
43 python_configure() {
44         esetup.py configure $(usex mpi --mpi '')
45 }
46
47 python_compile_all() {
48         if use doc; then
49                 cd "${S}"/docs || die
50                 sed '/html_theme/s:default:alabaster:g' -i conf.py || die
51                 rm -r _build || die
52                 emake html
53         fi
54 }
55
56 python_test() {
57         esetup.py test
58 }
59
60 python_install_all() {
61         DOCS=( README.rst ANN.rst )
62         use doc && HTML_DOCS=( docs/_build/html/. )
63         use examples && local EXAMPLES=( examples/. )
64
65         distutils-r1_python_install_all
66 }