Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 3/4] dev-python/future: Use distutils_enable_sphinx
Date: Wed, 20 Nov 2019 14:23:08
Message-Id: 20191120142158.157436-3-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Add distutils_enable_sphinx helper function by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 dev-python/future/future-0.18.2.ebuild | 23 +++--------------------
4 1 file changed, 3 insertions(+), 20 deletions(-)
5
6 diff --git a/dev-python/future/future-0.18.2.ebuild b/dev-python/future/future-0.18.2.ebuild
7 index d5b55ddea8d2..91b1a6a29af8 100644
8 --- a/dev-python/future/future-0.18.2.ebuild
9 +++ b/dev-python/future/future-0.18.2.ebuild
10 @@ -17,16 +17,12 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~
11 IUSE="doc"
12
13 distutils_enable_tests pytest
14 +distutils_enable_sphinx docs \
15 + dev-python/sphinx-bootstrap-theme
16
17 # TODO: make numpy unconditional when it supports py3.8
18 -BDEPEND="
19 +BDEPEND+="
20 dev-python/setuptools[${PYTHON_USEDEP}]
21 - doc? (
22 - $(python_gen_any_dep '
23 - dev-python/sphinx[${PYTHON_USEDEP}]
24 - dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]
25 - ')
26 - )
27 test? (
28 $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \
29 python{2_7,3_{5,6,7}})
30 @@ -37,12 +33,6 @@ PATCHES=(
31 "${FILESDIR}"/${P}-tests.patch
32 )
33
34 -python_check_deps() {
35 - use doc || return 0
36 - has_version "dev-python/sphinx[${PYTHON_USEDEP}]" &&
37 - has_version "dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]"
38 -}
39 -
40 python_prepare_all() {
41 sed -i "/'sphinx.ext.intersphinx'/d" docs/conf.py || die
42 # tests requiring network access
43 @@ -52,10 +42,3 @@ python_prepare_all() {
44
45 distutils-r1_python_prepare_all
46 }
47 -
48 -python_compile_all() {
49 - if use doc; then
50 - sphinx-build docs/ docs/_build/html || die
51 - HTML_DOCS=( docs/_build/html/. )
52 - fi
53 -}
54 --
55 2.24.0