summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2019-11-30 00:32:42 +0100
committerDavid Seifert <soap@gentoo.org>2019-11-30 00:32:42 +0100
commitfd2855146d1053985596c57dcae1827590058082 (patch)
treed0a4d88f4ee7033249b9e76ffe69a4c04cf49c8e /dev-python/pyhamcrest
parentprofiles/package.mask: these were dropped (diff)
downloadgentoo-fd2855146d1053985596c57dcae1827590058082.tar.gz
gentoo-fd2855146d1053985596c57dcae1827590058082.tar.bz2
gentoo-fd2855146d1053985596c57dcae1827590058082.zip
dev-python/pyhamcrest: Fix USE="doc" failure
Closes: https://bugs.gentoo.org/661396 Package-Manager: Portage-2.3.80, Repoman-2.3.19 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-python/pyhamcrest')
-rw-r--r--dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild18
1 files changed, 12 insertions, 6 deletions
diff --git a/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild b/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild
index 84ed83d25437..80a64d742426 100644
--- a/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild
+++ b/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild
@@ -17,14 +17,15 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~sh ~amd64-linux ~x86-linux"
IUSE="doc examples test"
+REQUIRED_USE="doc? ( || ( $(python_gen_useflags -3) ) )"
RESTRICT="!test? ( test )"
RDEPEND=">=dev-python/six-1.4[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? (
- >=dev-python/sphinx-1.2.2[${PYTHON_USEDEP}]
- dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '>=dev-python/sphinx-2[${PYTHON_USEDEP}]' -3)
+ $(python_gen_cond_dep 'dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]' -3)
)
test? (
>=dev-python/pytest-2.6[${PYTHON_USEDEP}]
@@ -33,6 +34,10 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MY_PN}-${PV}"
+pkg_setup() {
+ use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( -3 )
+}
+
python_prepare_all() {
# enables coverage testing which we don't want
rm pytest.ini || die
@@ -52,17 +57,18 @@ python_prepare_all() {
}
python_compile_all() {
- use doc && esetup.py build_sphinx
+ if use doc; then
+ esetup.py build_sphinx
+ HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. )
+ fi
}
python_test() {
py.test -vv || die "Tests failed under ${EPYTHON}"
- "${PYTHON}" tests/object_import.py || die "Tests failed under ${EPYTHON}"
+ "${EPYTHON}" tests/object_import.py || die "Tests failed under ${EPYTHON}"
}
python_install_all() {
- use doc && local HTML_DOCS=( doc/_build/html/. )
use examples && dodoc -r examples
-
distutils-r1_python_install_all
}