KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="doc examples test"
-REQUIRED_USE="doc? ( || ( $(python_gen_useflags 'python2*') ) )"
+REQUIRED_USE="doc? ( || ( $(python_gen_useflags -2) ) )"
COMMON_DEPEND="
dev-python/matplotlib[${PYTHON_USEDEP}]
test? (
${COMMON_DEPEND}
dev-python/nose[${PYTHON_USEDEP}]
- $(python_gen_cond_dep 'media-gfx/pydot[${PYTHON_USEDEP}]' python2_7)
+ $(python_gen_cond_dep 'media-gfx/pydot[${PYTHON_USEDEP}]' -2)
)"
RDEPEND="
>=dev-python/decorator-3.4.0[${PYTHON_USEDEP}]
"${FILESDIR}"/1.11-sphinx-pngmath.patch
)
-pkg_setup() {
- use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' )
-}
-
python_prepare_all() {
# Avoid d'loading of file objects.inv from 2 sites of python docs
sed -e "s/'sphinx.ext.intersphinx', //" -i doc/source/conf.py || die
}
python_compile_all() {
- use doc && emake -C doc html
+ if use doc; then
+ python_setup -2
+ emake -C doc html
+ fi
}
python_test() {