summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-11-25 13:25:25 +0100
committerMichał Górny <mgorny@gentoo.org>2019-11-25 13:35:20 +0100
commitc0df39f605f9b776fb2ac1fe06d86a7aca4a6344 (patch)
treeb4515f4dd50826bfcf2846545b5aa713c3492851 /dev-python/virtualenv
parentdev-python/urllib3: Use distutils_enable_sphinx (diff)
downloadgentoo-c0df39f605f9b776fb2ac1fe06d86a7aca4a6344.tar.gz
gentoo-c0df39f605f9b776fb2ac1fe06d86a7aca4a6344.tar.bz2
gentoo-c0df39f605f9b776fb2ac1fe06d86a7aca4a6344.zip
dev-python/virtualenv: Use distutils_enable_sphinx
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/virtualenv')
-rw-r--r--dev-python/virtualenv/virtualenv-16.7.7.ebuild39
1 files changed, 5 insertions, 34 deletions
diff --git a/dev-python/virtualenv/virtualenv-16.7.7.ebuild b/dev-python/virtualenv/virtualenv-16.7.7.ebuild
index 0c593103eb94..a060296f7646 100644
--- a/dev-python/virtualenv/virtualenv-16.7.7.ebuild
+++ b/dev-python/virtualenv/virtualenv-16.7.7.ebuild
@@ -20,15 +20,10 @@ LICENSE="MIT"
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
SLOT="0"
-IUSE="doc test"
+IUSE="test"
+RESTRICT="!test? ( test )"
BDEPEND=">=dev-python/setuptools-19.6.2[${PYTHON_USEDEP}]
- doc? ( $(python_gen_any_dep '
- dev-python/sphinx[${PYTHON_USEDEP}]
- dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
- dev-python/towncrier[${PYTHON_USEDEP}]
- ')
- )
test? (
>=dev-python/pip-19.3.1-r1[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
@@ -43,9 +38,6 @@ BDEPEND=">=dev-python/setuptools-19.6.2[${PYTHON_USEDEP}]
DOCS=( docs/index.rst docs/changes.rst )
-# uncomment if line above is removed
-RESTRICT="!test? ( test )"
-
PATCHES=(
"${FILESDIR}/virtualenv-16.7.7-tests.patch"
@@ -53,30 +45,9 @@ PATCHES=(
"${FILESDIR}/virtualenv-16.7.7-tests-internet.patch"
)
-python_check_deps() {
- use doc || return 0
-
- has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && \
- has_version "dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]" && \
- has_version "dev-python/towncrier[${PYTHON_USEDEP}]"
-}
-
-python_compile_all() {
- if use doc; then
- sed -i -e 's:^intersphinx_mapping:disabled_&:' \
- docs/conf.py || die
-
- sphinx-build -b html -d docs/_build/doctrees docs \
- docs/_build/html || die
-
- HTML_DOCS+=( "docs/_build/html/." )
- fi
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( docs/_build/html/. )
- distutils-r1_python_install_all
-}
+distutils_enable_sphinx docs \
+ dev-python/sphinx_rtd_theme \
+ dev-python/towncrier
python_test() {
cp "${S}"/LICENSE.txt "${BUILD_DIR}"/lib || \