diff options
author | Mike Gilbert <floppym@gentoo.org> | 2012-02-27 03:57:35 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2012-02-27 03:57:35 +0000 |
commit | b6e8049815958eba444e8b40a9aa8f86d20f9815 (patch) | |
tree | 802d82872ef43a1cab1a2181114f8d505963d5bf /eclass/python.eclass | |
parent | Stable for HPPA (bug #405607). (diff) | |
download | historical-b6e8049815958eba444e8b40a9aa8f86d20f9815.tar.gz historical-b6e8049815958eba444e8b40a9aa8f86d20f9815.tar.bz2 historical-b6e8049815958eba444e8b40a9aa8f86d20f9815.zip |
Add a safety check to catch issues like bug 405299 earlier. Adapted from Progress overlay.
Diffstat (limited to 'eclass/python.eclass')
-rw-r--r-- | eclass/python.eclass | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/eclass/python.eclass b/eclass/python.eclass index 1af1f549f657..ccc914f27c85 100644 --- a/eclass/python.eclass +++ b/eclass/python.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.150 2012/02/13 23:50:12 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.151 2012/02/27 03:57:35 floppym Exp $ # @ECLASS: python.eclass # @MAINTAINER: @@ -846,6 +846,16 @@ _python_calculate_PYTHON_ABIS() { fi fi + if [[ -z "${python2_version}" && -z "${python3_version}" ]]; then + eerror "${CATEGORY}/${PF} requires at least one of the following packages:" + for PYTHON_ABI in "${_CPYTHON2_GLOBALLY_SUPPORTED_ABIS[@]}" "${_CPYTHON3_GLOBALLY_SUPPORTED_ABIS[@]}"; do + if ! _python_check_python_abi_matching --patterns-list "${PYTHON_ABI}" "${RESTRICT_PYTHON_ABIS}"; then + eerror " dev-lang/python:${PYTHON_ABI}" + fi + done + die "No supported version of CPython installed" + fi + if [[ -n "${python2_version}" && "${python_version}" == "2."* && "${python_version}" != "${python2_version}" ]]; then eerror "Python wrapper is configured incorrectly or '${EPREFIX}/usr/bin/python2' symlink" eerror "is set incorrectly. Use \`eselect python\` to fix configuration." |