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

Diff of /eclass/python.eclass

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

Revision 1.119 Revision 1.120
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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.119 2011/07/08 07:39:03 djc Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.120 2011/07/08 07:40:02 djc Exp $
4 4
5# @ECLASS: python.eclass 5# @ECLASS: python.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Gentoo Python Project <python@gentoo.org> 7# Gentoo Python Project <python@gentoo.org>
8# @BLURB: Eclass for Python packages 8# @BLURB: Eclass for Python packages
21_PYTHON_GLOBALLY_SUPPORTED_ABIS=(${_CPYTHON2_GLOBALLY_SUPPORTED_ABIS[@]} ${_CPYTHON3_GLOBALLY_SUPPORTED_ABIS[@]} ${_JYTHON_GLOBALLY_SUPPORTED_ABIS[@]}) 21_PYTHON_GLOBALLY_SUPPORTED_ABIS=(${_CPYTHON2_GLOBALLY_SUPPORTED_ABIS[@]} ${_CPYTHON3_GLOBALLY_SUPPORTED_ABIS[@]} ${_JYTHON_GLOBALLY_SUPPORTED_ABIS[@]})
22 22
23# ================================================================================================ 23# ================================================================================================
24# ===================================== HANDLING OF METADATA ===================================== 24# ===================================== HANDLING OF METADATA =====================================
25# ================================================================================================ 25# ================================================================================================
26
27_PYTHON_ABI_PATTERN_REGEX="([[:alnum:]]|\.|-|\*|\[|\])+"
26 28
27_python_check_python_abi_matching() { 29_python_check_python_abi_matching() {
28 local pattern patterns patterns_list="0" PYTHON_ABI 30 local pattern patterns patterns_list="0" PYTHON_ABI
29 31
30 while (($#)); do 32 while (($#)); do
820 eval "_PYTHON_SAVED_${variable}=\"\${!variable}\"" 822 eval "_PYTHON_SAVED_${variable}=\"\${!variable}\""
821 for prefix in PYTHON_USER_ PYTHON_; do 823 for prefix in PYTHON_USER_ PYTHON_; do
822 if [[ "$(declare -p ${prefix}${variable} 2> /dev/null)" == "declare -a ${prefix}${variable}="* ]]; then 824 if [[ "$(declare -p ${prefix}${variable} 2> /dev/null)" == "declare -a ${prefix}${variable}="* ]]; then
823 eval "array=(\"\${${prefix}${variable}[@]}\")" 825 eval "array=(\"\${${prefix}${variable}[@]}\")"
824 for element in "${array[@]}"; do 826 for element in "${array[@]}"; do
825 if [[ "${element}" =~ ^([[:alnum:]]|\.|-|\*|\[|\])+\ (\+|-)\ .+ ]]; then 827 if [[ "${element}" =~ ^${_PYTHON_ABI_PATTERN_REGEX}\ (\+|-)\ .+ ]]; then
826 pattern="${element%% *}" 828 pattern="${element%% *}"
827 element="${element#* }" 829 element="${element#* }"
828 operator="${element%% *}" 830 operator="${element%% *}"
829 flags="${element#* }" 831 flags="${element#* }"
830 if _python_check_python_abi_matching "${PYTHON_ABI}" "${pattern}"; then 832 if _python_check_python_abi_matching "${PYTHON_ABI}" "${pattern}"; then

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.120

  ViewVC Help
Powered by ViewVC 1.1.20