dev-python/pyhamcrest: Switch to distutils_enable_sphinx
authorMichał Górny <mgorny@gentoo.org>
Wed, 18 Mar 2020 06:46:28 +0000 (07:46 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 18 Mar 2020 07:27:07 +0000 (08:27 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild

index 9030f0d5741bd74e49183a2733559f313e651786..3d3ac12ea0faf253b998a9218d1e18f79699e104 100644 (file)
@@ -12,31 +12,24 @@ MY_PN="PyHamcrest"
 DESCRIPTION="Hamcrest framework for matcher objects"
 HOMEPAGE="https://github.com/hamcrest/PyHamcrest"
 SRC_URI="https://github.com/hamcrest/PyHamcrest/archive/V${PV}.tar.gz -> ${MY_PN}-${PV}.gh.tar.gz"
+S="${WORKDIR}/${MY_PN}-${PV}"
 
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 ~mips ~sh sparc ~amd64-linux ~x86-linux"
-IUSE="doc examples test"
-REQUIRED_USE="doc? ( || ( $(python_gen_useflags -3) ) )"
+IUSE="examples test"
 RESTRICT="!test? ( test )"
 
 RDEPEND=">=dev-python/six-1.4[${PYTHON_USEDEP}]"
 DEPEND="${RDEPEND}
        dev-python/setuptools[${PYTHON_USEDEP}]
-       doc? (
-               $(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}]
                dev-python/mock[${PYTHON_USEDEP}]
        )"
 
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-pkg_setup() {
-       use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( -3 )
-}
+distutils_enable_sphinx doc \
+       dev-python/sphinx_rtd_theme
 
 python_prepare_all() {
        # enables coverage testing which we don't want
@@ -56,13 +49,6 @@ python_prepare_all() {
        distutils-r1_python_prepare_all
 }
 
-python_compile_all() {
-       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}"
        "${EPYTHON}" tests/object_import.py || die "Tests failed under ${EPYTHON}"