diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2011-07-08 07:41:56 +0000 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2011-07-08 07:41:56 +0000 |
commit | e6910af14e6fe8fb72d7e1bc3e70a1eeaf518cc0 (patch) | |
tree | ad38ba35b782c7996d1049976ca28bf39b6e175e /eclass/python.eclass | |
parent | Add _PYTHON_ABI_PATTERN_REGEX. (diff) | |
download | historical-e6910af14e6fe8fb72d7e1bc3e70a1eeaf518cc0.tar.gz historical-e6910af14e6fe8fb72d7e1bc3e70a1eeaf518cc0.tar.bz2 historical-e6910af14e6fe8fb72d7e1bc3e70a1eeaf518cc0.zip |
Allow to use _python_package_supporting_installation_for_multiple_python_abis()
in global scope and define it earlier.
(Patch by Arfrever. Backported from python overlay.)
Diffstat (limited to 'eclass/python.eclass')
-rw-r--r-- | eclass/python.eclass | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/eclass/python.eclass b/eclass/python.eclass index 30e5af99528a..56cc61b51ba8 100644 --- a/eclass/python.eclass +++ b/eclass/python.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.120 2011/07/08 07:40:02 djc Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.121 2011/07/08 07:41:56 djc Exp $ # @ECLASS: python.eclass # @MAINTAINER: @@ -83,6 +83,18 @@ _python_check_python_abi_matching() { fi } +_python_package_supporting_installation_for_multiple_python_abis() { + if has "${EAPI:-0}" 0 1 2 3 4; then + if [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then + return 0 + else + return 1 + fi + else + die "${FUNCNAME}(): Support for EAPI=\"${EAPI}\" not implemented" + fi +} + # @ECLASS-VARIABLE: PYTHON_DEPEND # @DESCRIPTION: # Specification of dependency on dev-lang/python. @@ -287,22 +299,6 @@ _python_implementation() { fi } -_python_package_supporting_installation_for_multiple_python_abis() { - if [[ "${EBUILD_PHASE}" == "depend" ]]; then - die "${FUNCNAME}() cannot be used in global scope" - fi - - if has "${EAPI:-0}" 0 1 2 3 4; then - if [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then - return 0 - else - return 1 - fi - else - die "${FUNCNAME}(): Support for EAPI=\"${EAPI}\" not implemented" - fi -} - _python_abi-specific_local_scope() { [[ " ${FUNCNAME[@]:2} " =~ " "(_python_final_sanity_checks|python_execute_function|python_mod_optimize|python_mod_cleanup)" " ]] } |