diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2011-07-08 07:40:02 +0000 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2011-07-08 07:40:02 +0000 |
commit | 53f883959186ba2a91949eda99b45e4987457522 (patch) | |
tree | c547b41ea3daf90844eb0b64a808823f90176985 /eclass | |
parent | Log syntax errors / warnings in python_mod_optimize(). (diff) | |
download | historical-53f883959186ba2a91949eda99b45e4987457522.tar.gz historical-53f883959186ba2a91949eda99b45e4987457522.tar.bz2 historical-53f883959186ba2a91949eda99b45e4987457522.zip |
Add _PYTHON_ABI_PATTERN_REGEX.
(Patch by Arfrever. Backported from python overlay.)
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/python.eclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/eclass/python.eclass b/eclass/python.eclass index 213b56df644d..30e5af99528a 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.119 2011/07/08 07:39:03 djc Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.120 2011/07/08 07:40:02 djc Exp $ # @ECLASS: python.eclass # @MAINTAINER: @@ -24,6 +24,8 @@ _PYTHON_GLOBALLY_SUPPORTED_ABIS=(${_CPYTHON2_GLOBALLY_SUPPORTED_ABIS[@]} ${_CPYT # ===================================== HANDLING OF METADATA ===================================== # ================================================================================================ +_PYTHON_ABI_PATTERN_REGEX="([[:alnum:]]|\.|-|\*|\[|\])+" + _python_check_python_abi_matching() { local pattern patterns patterns_list="0" PYTHON_ABI @@ -822,7 +824,7 @@ _python_prepare_flags() { if [[ "$(declare -p ${prefix}${variable} 2> /dev/null)" == "declare -a ${prefix}${variable}="* ]]; then eval "array=(\"\${${prefix}${variable}[@]}\")" for element in "${array[@]}"; do - if [[ "${element}" =~ ^([[:alnum:]]|\.|-|\*|\[|\])+\ (\+|-)\ .+ ]]; then + if [[ "${element}" =~ ^${_PYTHON_ABI_PATTERN_REGEX}\ (\+|-)\ .+ ]]; then pattern="${element%% *}" element="${element#* }" operator="${element%% *}" |