commit:     a53294c6e44cf07e9102b4b3f4afea56ecd3c11f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 25 12:25:27 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Nov 25 12:35:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a53294c6

dev-python/webtest: Use distutils_enable_sphinx

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/webtest/webtest-2.0.33.ebuild | 35 ++++----------------------------
 1 file changed, 4 insertions(+), 31 deletions(-)

diff --git a/dev-python/webtest/webtest-2.0.33.ebuild 
b/dev-python/webtest/webtest-2.0.33.ebuild
index 192dfb7318f..c9df5a13b44 100644
--- a/dev-python/webtest/webtest-2.0.33.ebuild
+++ b/dev-python/webtest/webtest-2.0.33.ebuild
@@ -13,11 +13,13 @@ MY_P="${MY_PN}-${PV}"
 DESCRIPTION="Helper to test WSGI applications"
 HOMEPAGE="https://pypi.org/project/WebTest/";
 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
 
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="doc test"
+IUSE="test"
+RESTRICT="!test? ( test )"
 
 # nose<1.3.0 appears a leftover never updated in requires.txt. tests pass fine 
with latest
 RDEPEND="
@@ -28,10 +30,6 @@ RDEPEND="
 DEPEND="${RDEPEND}
        app-arch/unzip
        dev-python/setuptools[${PYTHON_USEDEP}]
-       doc? ( $(python_gen_any_dep '
-                       dev-python/sphinx[${PYTHON_USEDEP}]
-               ')
-       )
        test? ( dev-python/nose[${PYTHON_USEDEP}]
                dev-python/pyquery[${PYTHON_USEDEP}]
                dev-python/pastedeploy[${PYTHON_USEDEP}]
@@ -40,31 +38,11 @@ DEPEND="${RDEPEND}
                $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' 
python2_7 )
        )"
 
-S="${WORKDIR}/${MY_P}"
-
-RESTRICT="!test? ( test )"
-
 PATCHES=(
        "${FILESDIR}/webtest-2.0.33-no-pylons-theme.patch"
 )
 
-python_check_deps() {
-       use doc || return 0
-       has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
-
-python_prepare_all() {
-       # Prevent un-needed d'loading during doc build
-       sed -i -e 's:^intersphinx_mapping:disabled_&: ; s:^templates_path:#&:' \
-               docs/conf.py || die
-       distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
-       if use doc; then
-               sphinx-build docs html || die
-       fi
-}
+distutils_enable_sphinx docs
 
 python_test() {
        distutils_install_for_testing
@@ -72,8 +50,3 @@ python_test() {
        local -x PYTHONPATH=
        nosetests -v || die "Tests fail with ${EPYTHON}"
 }
-
-python_install_all() {
-       use doc && local HTML_DOCS=( html/. )
-       distutils-r1_python_install_all
-}

Reply via email to