Warn about unset EPYTHON.
authorMichał Górny <mgorny@gentoo.org>
Sat, 3 Jan 2015 14:50:34 +0000 (14:50 +0000)
committerMichał Górny <mgorny@gentoo.org>
Sat, 3 Jan 2015 14:50:34 +0000 (14:50 +0000)
eclass/ChangeLog
eclass/waf-utils.eclass

index 9cd691cc62f7f02030e43e112f16901ebfba8813..2136737c566b77dc48c677d9dba8786afd9a1110 100644 (file)
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1495 2015/01/02 09:35:02 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1496 2015/01/03 14:50:34 mgorny Exp $
+
+  03 Jan 2015; Michał Górny <mgorny@gentoo.org> waf-utils.eclass:
+  Warn about unset EPYTHON.
 
   02 Jan 2015; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
   Make python.eclass commands/variables fatal once again since all in-tree
index d291154be637f857b1c05dd99bc2169060fe8f85..f55f98a57f38dc3dc5d17666aa078149705455a0 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/waf-utils.eclass,v 1.21 2014/12/27 18:07:31 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/waf-utils.eclass,v 1.22 2015/01/03 14:50:34 mgorny Exp $
 
 # @ECLASS: waf-utils.eclass
 # @MAINTAINER:
@@ -46,11 +46,27 @@ waf-utils_src_configure() {
                eqawarn "and will be banned on 2015-01-24. Please make sure to configure and inherit"
                eqawarn "appropriate -r1 eclass. For more information and examples, please see:"
                eqawarn "    https://wiki.gentoo.org/wiki/Project:Python/waf-utils_integration"
-       elif [[ ${PYTHON_REQ_USE} != *threads* ]]; then
-               eqawarn "Waf requires threading support in Python. To accomodate this requirement,"
-               eqawarn "please add 'threads(+)' to PYTHON_REQ_USE variable (above inherit line)."
-               eqawarn "For more information and examples, please see:"
-               eqawarn "    https://wiki.gentoo.org/wiki/Project:Python/waf-utils_integration"
+       else
+               if [[ ! ${EPYTHON} ]]; then
+                       eqawarn "EPYTHON is unset while calling waf-utils. This most likely means that"
+                       eqawarn "the ebuild did not call the appropriate eclass function before calling waf."
+                       if [[ ${_PYTHON_ANY_R1} ]]; then
+                               eqawarn "Please ensure that python-any-r1_pkg_setup is called in pkg_setup()."
+                       elif [[ ${_PYTHON_SINGLE_R1} ]]; then
+                               eqawarn "Please ensure that python-single-r1_pkg_setup is called in pkg_setup()."
+                       else # python-r1
+                               eqawarn "Please ensure that python_setup is called before waf-utils_src_configure(),"
+                               eqawarn "or that the latter is used within python_foreach_impl as appropriate."
+                       fi
+                       eqawarn
+               fi
+
+               if [[ ${PYTHON_REQ_USE} != *threads* ]]; then
+                       eqawarn "Waf requires threading support in Python. To accomodate this requirement,"
+                       eqawarn "please add 'threads(+)' to PYTHON_REQ_USE variable (above inherit line)."
+                       eqawarn "For more information and examples, please see:"
+                       eqawarn "    https://wiki.gentoo.org/wiki/Project:Python/waf-utils_integration"
+               fi
        fi
 
        local libdir=""