/[gentoo-x86]/eclass/python.eclass
Gentoo

Diff of /eclass/python.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.68 Revision 1.69
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.68 2009/08/31 00:07:37 arfrever Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.69 2009/08/31 23:58:28 arfrever Exp $
4 4
5# @ECLASS: python.eclass 5# @ECLASS: python.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# python@gentoo.org 7# python@gentoo.org
8# 8#
129 # USE_${ABI_TYPE^^} and RESTRICT_${ABI_TYPE^^}_ABIS variables hopefully will be included in EAPI >= 4. 129 # USE_${ABI_TYPE^^} and RESTRICT_${ABI_TYPE^^}_ABIS variables hopefully will be included in EAPI >= 4.
130 if [[ -z "${PYTHON_ABIS}" ]] && has "${EAPI:-0}" 0 1 2 3; then 130 if [[ -z "${PYTHON_ABIS}" ]] && has "${EAPI:-0}" 0 1 2 3; then
131 local ABI support_ABI supported_PYTHON_ABIS= restricted_ABI 131 local ABI support_ABI supported_PYTHON_ABIS= restricted_ABI
132 PYTHON_ABI_SUPPORTED_VALUES="2.4 2.5 2.6 2.7 3.0 3.1 3.2" 132 PYTHON_ABI_SUPPORTED_VALUES="2.4 2.5 2.6 2.7 3.0 3.1 3.2"
133 133
134 if declare -p | grep "^declare -x USE_PYTHON=" > /dev/null; then 134 if [[ "$(declare -p USE_PYTHON 2>/dev/null)" == "declare -x USE_PYTHON="* ]]; then
135 if [[ -z "${USE_PYTHON}" ]]; then 135 if [[ -z "${USE_PYTHON}" ]]; then
136 die "USE_PYTHON variable is empty" 136 die "USE_PYTHON variable is empty"
137 fi 137 fi
138 138
139 for ABI in ${USE_PYTHON}; do 139 for ABI in ${USE_PYTHON}; do
361 failure_message="$(eval echo -n "${failure_message_template}")" 361 failure_message="$(eval echo -n "${failure_message_template}")"
362 else 362 else
363 failure_message="${action} failed with Python ${PYTHON_ABI} in ${function}() function" 363 failure_message="${action} failed with Python ${PYTHON_ABI} in ${function}() function"
364 fi 364 fi
365 365
366 if [[ "${nonfatal}" == "1" ]]; then
367 if [[ "${quiet}" == "0" ]]; then
368 ewarn "${RED}${failure_message}${NORMAL}"
369 fi
366 if [[ "${nonfatal}" == "1" ]] || has "${PYTHON_ABI}" ${FAILURE_TOLERANT_PYTHON_ABIS}; then 370 elif has "${PYTHON_ABI}" ${FAILURE_TOLERANT_PYTHON_ABIS}; then
367 local ABI enabled_PYTHON_ABIS 371 local ABI enabled_PYTHON_ABIS=
368 for ABI in ${PYTHON_ABIS}; do 372 for ABI in ${PYTHON_ABIS}; do
369 [[ "${ABI}" != "${PYTHON_ABI}" ]] && enabled_PYTHON_ABIS+=" ${ABI}" 373 [[ "${ABI}" != "${PYTHON_ABI}" ]] && enabled_PYTHON_ABIS+=" ${ABI}"
370 done 374 done
371 export PYTHON_ABIS="${enabled_PYTHON_ABIS# }" 375 export PYTHON_ABIS="${enabled_PYTHON_ABIS# }"
372 if [[ "${quiet}" == "0" ]]; then 376 if [[ "${quiet}" == "0" ]]; then
373 ewarn "${RED}${failure_message}${NORMAL}" 377 ewarn "${RED}${failure_message}${NORMAL}"
378 fi
379 if [[ -z "${PYTHON_ABIS}" ]]; then
380 die "${function}() function failed with all enabled versions of Python"
374 fi 381 fi
375 else 382 else
376 die "${failure_message}" 383 die "${failure_message}"
377 fi 384 fi
378 fi 385 fi

Legend:
Removed from v.1.68  
changed lines
  Added in v.1.69

  ViewVC Help
Powered by ViewVC 1.1.20