mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
dev-python/pytest-cov: Use distutils_enable_sphinx
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -14,16 +14,13 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
IUSE="doc test"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/py-1.4.22[${PYTHON_USEDEP}]
|
||||
>=dev-python/pytest-3.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/coverage-4.4[${PYTHON_USEDEP}]
|
||||
doc? (
|
||||
$(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]')
|
||||
$(python_gen_any_dep 'dev-python/sphinx-py3doc-enhanced-theme[${PYTHON_USEDEP}]')
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
@@ -35,24 +32,13 @@ DEPEND="
|
||||
)
|
||||
"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
# Bug 597708
|
||||
"${FILESDIR}/${PN}-2.8.1-disable-broken-tests.patch"
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
use doc || return 0
|
||||
local dep
|
||||
for dep in dev-python/sphinx dev-python/sphinx-py3doc-enhanced-theme; do
|
||||
has_version ${dep}[${PYTHON_USEDEP}] || return ${?}
|
||||
done
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
use doc && sphinx-build -b html docs _build/html
|
||||
}
|
||||
distutils_enable_sphinx docs \
|
||||
dev-python/sphinx-py3doc-enhanced-theme
|
||||
|
||||
python_test() {
|
||||
distutils_install_for_testing
|
||||
@@ -60,8 +46,3 @@ python_test() {
|
||||
PYTEST_PLUGINS=${PN/-/_} \
|
||||
pytest -vv || die "Tests failed under ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && HTML_DOCS=( _build/html/. )
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user