1 |
commit: fd2855146d1053985596c57dcae1827590058082 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 29 23:32:42 2019 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 29 23:32:42 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd285514 |
7 |
|
8 |
dev-python/pyhamcrest: Fix USE="doc" failure |
9 |
|
10 |
Closes: https://bugs.gentoo.org/661396 |
11 |
Package-Manager: Portage-2.3.80, Repoman-2.3.19 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
|
14 |
dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild | 18 ++++++++++++------ |
15 |
1 file changed, 12 insertions(+), 6 deletions(-) |
16 |
|
17 |
diff --git a/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild b/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild |
18 |
index 84ed83d2543..80a64d74242 100644 |
19 |
--- a/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild |
20 |
+++ b/dev-python/pyhamcrest/pyhamcrest-1.9.0-r1.ebuild |
21 |
@@ -17,14 +17,15 @@ LICENSE="BSD" |
22 |
SLOT="0" |
23 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~sh ~amd64-linux ~x86-linux" |
24 |
IUSE="doc examples test" |
25 |
+REQUIRED_USE="doc? ( || ( $(python_gen_useflags -3) ) )" |
26 |
RESTRICT="!test? ( test )" |
27 |
|
28 |
RDEPEND=">=dev-python/six-1.4[${PYTHON_USEDEP}]" |
29 |
DEPEND="${RDEPEND} |
30 |
dev-python/setuptools[${PYTHON_USEDEP}] |
31 |
doc? ( |
32 |
- >=dev-python/sphinx-1.2.2[${PYTHON_USEDEP}] |
33 |
- dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] |
34 |
+ $(python_gen_cond_dep '>=dev-python/sphinx-2[${PYTHON_USEDEP}]' -3) |
35 |
+ $(python_gen_cond_dep 'dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]' -3) |
36 |
) |
37 |
test? ( |
38 |
>=dev-python/pytest-2.6[${PYTHON_USEDEP}] |
39 |
@@ -33,6 +34,10 @@ DEPEND="${RDEPEND} |
40 |
|
41 |
S="${WORKDIR}/${MY_PN}-${PV}" |
42 |
|
43 |
+pkg_setup() { |
44 |
+ use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( -3 ) |
45 |
+} |
46 |
+ |
47 |
python_prepare_all() { |
48 |
# enables coverage testing which we don't want |
49 |
rm pytest.ini || die |
50 |
@@ -52,17 +57,18 @@ python_prepare_all() { |
51 |
} |
52 |
|
53 |
python_compile_all() { |
54 |
- use doc && esetup.py build_sphinx |
55 |
+ if use doc; then |
56 |
+ esetup.py build_sphinx |
57 |
+ HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. ) |
58 |
+ fi |
59 |
} |
60 |
|
61 |
python_test() { |
62 |
py.test -vv || die "Tests failed under ${EPYTHON}" |
63 |
- "${PYTHON}" tests/object_import.py || die "Tests failed under ${EPYTHON}" |
64 |
+ "${EPYTHON}" tests/object_import.py || die "Tests failed under ${EPYTHON}" |
65 |
} |
66 |
|
67 |
python_install_all() { |
68 |
- use doc && local HTML_DOCS=( doc/_build/html/. ) |
69 |
use examples && dodoc -r examples |
70 |
- |
71 |
distutils-r1_python_install_all |
72 |
} |