dev-python/nose: Include enhancement suggested by mgorny
authorJustin Lecher <jlec@gentoo.org>
Wed, 6 Jan 2016 14:33:11 +0000 (15:33 +0100)
committerJustin Lecher <jlec@gentoo.org>
Wed, 6 Jan 2016 15:07:07 +0000 (16:07 +0100)
Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher <jlec@gentoo.org>
dev-python/nose/nose-1.3.7.ebuild

index 2353f021dd966be52c9e8c0d3159e4519774d59f..a059793bf0bf427dbe326a1b4810e6cf06d34fe6 100644 (file)
@@ -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
 }