| 15 |
15 |
|
| 16 |
16 |
LICENSE="MIT"
|
| 17 |
17 |
SLOT="0"
|
| 18 |
|
KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
|
|
18 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
| 19 |
19 |
IUSE="doc examples test"
|
| 20 |
20 |
RESTRICT="!test? ( test )"
|
| 21 |
21 |
|
| 22 |
22 |
RDEPEND="
|
| 23 |
|
>=dev-python/numpy-1.7.1[${PYTHON_USEDEP}]
|
| 24 |
|
>=sci-libs/scipy-0.12[${PYTHON_USEDEP}]
|
| 25 |
|
>=sci-mathematics/octave-4.2.0"
|
|
23 |
>=dev-python/numpy-1.11[${PYTHON_USEDEP}]
|
|
24 |
dev-python/octave_kernel[${PYTHON_USEDEP}]
|
|
25 |
>=sci-libs/scipy-0.17[${PYTHON_USEDEP}]
|
|
26 |
"
|
| 26 |
27 |
DEPEND="${RDEPEND}
|
| 27 |
28 |
doc? (
|
| 28 |
|
dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]
|
| 29 |
29 |
dev-python/numpydoc[${PYTHON_USEDEP}]
|
|
30 |
dev-python/sphinx[${PYTHON_USEDEP}]
|
|
31 |
dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]
|
| 30 |
32 |
)
|
| 31 |
33 |
test? (
|
| 32 |
|
dev-python/nose[${PYTHON_USEDEP}]
|
|
34 |
dev-python/pytest[${PYTHON_USEDEP}]
|
| 33 |
35 |
dev-python/ipython[${PYTHON_USEDEP}]
|
| 34 |
|
)"
|
| 35 |
|
|
| 36 |
|
python_prepare_all() {
|
| 37 |
|
# https://github.com/blink1073/oct2py/issues/77
|
| 38 |
|
sed \
|
| 39 |
|
-e 's:test_help:disabled:g' \
|
| 40 |
|
-i oct2py/tests/test_usage.py || die
|
| 41 |
|
|
| 42 |
|
distutils-r1_python_prepare_all
|
| 43 |
|
}
|
| 44 |
|
|
|
36 |
)
|
|
37 |
"
|
| 45 |
38 |
python_compile_all() {
|
| 46 |
39 |
if use doc; then
|
| 47 |
40 |
sphinx-build docs html || die
|
|
41 |
HTML_DOCS=( html/. )
|
| 48 |
42 |
fi
|
| 49 |
43 |
}
|
| 50 |
44 |
|
| 51 |
45 |
python_test() {
|
| 52 |
|
unset DISPLAY
|
| 53 |
|
[[ ${EPYTHON} == python2.7 ]] && local OPTIONS="--with-doctest"
|
| 54 |
|
nosetests --exe -v oct2py ${OPTIONS} || die "Tests fail with ${EPYTHON}"
|
|
46 |
cd "${BUILD_DIR}/lib" || die
|
|
47 |
py.test -v -v || die
|
| 55 |
48 |
}
|
| 56 |
49 |
|
| 57 |
50 |
python_install_all() {
|
| 58 |
|
use doc && local HTML_DOCS=( html/. )
|
|
51 |
distutils-r1_python_install_all
|
| 59 |
52 |
if use examples; then
|
| 60 |
53 |
docinto examples
|
| 61 |
54 |
dodoc -r example/.
|
|
55 |
docompress -x /usr/share/doc/${PF}/examples
|
| 62 |
56 |
fi
|
| 63 |
|
|
| 64 |
|
distutils-r1_python_install_all
|
| 65 |
57 |
}
|