commit:     576be17782f939f8cd11231ddea29235dd299d5e
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Tue Nov 26 21:51:09 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Nov 26 21:51:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=576be177

dev-python/pylibmc-1.6.1: Fix USE=doc with mismatching python impls

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-python/pylibmc/pylibmc-1.6.1.ebuild | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/dev-python/pylibmc/pylibmc-1.6.1.ebuild 
b/dev-python/pylibmc/pylibmc-1.6.1.ebuild
index 11264e7c131..a52234269c7 100644
--- a/dev-python/pylibmc/pylibmc-1.6.1.ebuild
+++ b/dev-python/pylibmc/pylibmc-1.6.1.ebuild
@@ -17,11 +17,17 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="doc test"
 
+# implementations to use for building docs, separate from PYTHON_COMPAT since
+# dev-python/sphinx might not be available everywhere
+DOCS_PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+
 RDEPEND=">=dev-libs/libmemcached-0.32"
 # Older sphinx versions fail to compile the doc
 # https://github.com/sphinx-doc/sphinx/issues/3266
 BDEPEND="${RDEPEND}
-       doc? ( $(python_gen_any_dep 
'>=dev-python/sphinx-1.5.1-r1[${PYTHON_USEDEP}]') )
+       doc? ( $(python_gen_cond_dep '
+               >=dev-python/sphinx-1.5.1-r1[${PYTHON_USEDEP}]' 
"${DOCS_PYTHON_COMPAT[@]}")
+       )
        test? (
                net-misc/memcached
                dev-python/nose[${PYTHON_USEDEP}]
@@ -29,13 +35,14 @@ BDEPEND="${RDEPEND}
 
 RESTRICT="!test? ( test )"
 
+REQUIRED_USE="doc? ( || ( $(python_gen_useflags "${DOCS_PYTHON_COMPAT[@]}") ) 
)"
+
 PATCHES=(
        "${FILESDIR}/pylibmc-1.6.1-fix-test-failures.patch"
 )
 
-python_check_deps() {
-       use doc || return 0
-       has_version ">=dev-python/sphinx-1.5.1-r1[${PYTHON_USEDEP}]"
+pkg_setup() {
+       use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( "${DOCS_PYTHON_COMPAT[@]}" )
 }
 
 python_prepare_all() {

Reply via email to