dev-python/gmpy: Use distutils_enable_sphinx
authorMichał Górny <mgorny@gentoo.org>
Mon, 25 Nov 2019 12:24:57 +0000 (13:24 +0100)
committerMichał Górny <mgorny@gentoo.org>
Mon, 25 Nov 2019 12:35:07 +0000 (13:35 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/gmpy/gmpy-2.0.8-r1.ebuild

index 49b20e3409bd70cf3601e2bc72713e9e88db115d..206a2329c1f98aff357743fcfa32c6e047c87545 100644 (file)
@@ -18,7 +18,7 @@ S="${WORKDIR}"/${MY_P}
 LICENSE="LGPL-3+"
 SLOT="2"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
-IUSE="doc mpir"
+IUSE="mpir"
 
 RDEPEND="
        >=dev-libs/mpc-1.0.2:=
@@ -27,18 +27,14 @@ RDEPEND="
        mpir? ( sci-libs/mpir:= )"
 DEPEND="${RDEPEND}"
 BDEPEND="
-       app-arch/unzip
-       doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') )"
+       app-arch/unzip"
 
 PATCHES=(
        "${FILESDIR}"/${P}-fix-mpir-types.patch
        "${FILESDIR}"/gmpy-2.0.8-test-exit-status.patch
 )
 
-python_check_deps() {
-       use doc || return 0
-       has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
+distutils_enable_sphinx docs
 
 python_prepare_all() {
        distutils-r1_python_prepare_all
@@ -60,13 +56,6 @@ python_compile() {
        distutils-r1_python_compile
 }
 
-python_compile_all() {
-       if use doc; then
-               emake -C docs html
-               HTML_DOCS=( docs/_build/html/. )
-       fi
-}
-
 python_test() {
        cd test || die
        "${EPYTHON}" runtests.py || die "tests failed under ${EPYTHON}"