commit:     1b9d991226d088eeb0275d42f5467450ae23dab1
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  6 14:33:11 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Jan  6 15:07:07 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b9d9912

dev-python/nose: Include enhancement suggested by mgorny

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 dev-python/nose/nose-1.3.7.ebuild | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/dev-python/nose/nose-1.3.7.ebuild 
b/dev-python/nose/nose-1.3.7.ebuild
index 2353f02..a059793 100644
--- a/dev-python/nose/nose-1.3.7.ebuild
+++ b/dev-python/nose/nose-1.3.7.ebuild
@@ -21,7 +21,10 @@ SLOT="0"
 KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc 
x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE="doc examples test"
 
-REQUIRED_USE="doc? ( python_targets_python2_7 )"
+REQUIRED_USE="
+       doc? (
+               || ( $(python_gen_useflags 'python2*') )
+       )"
 
 RDEPEND="
        dev-python/coverage[${PYTHON_USEDEP}]
@@ -30,6 +33,10 @@ DEPEND="${RDEPEND}
        doc? ( >=dev-python/sphinx-0.6[${PYTHON_USEDEP}] )
        test? ( $(python_gen_cond_dep 
'dev-python/twisted-core[${PYTHON_USEDEP}]' python2_7) )"
 
+pkg_setup() {
+       use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' )
+}
+
 python_prepare_all() {
        # Tests need to be converted, and they don't respect BUILD_DIR.
        use test && DISTUTILS_IN_SOURCE_BUILD=1
@@ -64,7 +71,7 @@ python_compile() {
 
 python_compile_all() {
        if use doc; then
-               python_export python2_7 EPYTHON
+               python_setup 'python2*'
                emake -C doc html
        fi
 }
@@ -79,10 +86,7 @@ python_install() {
 
 python_install_all() {
        use examples && local EXAMPLES=( examples/. )
+       use doc && HTML_DOCS=( doc/.build/html/. )
        distutils-r1_python_install_all
 
-       if use doc; then
-               docinto html
-               dodoc -r -A txt doc/.build/html/.
-       fi
 }

Reply via email to