8 |
SDEPEND="${SDEPEND} |
SDEPEND="${SDEPEND} |
9 |
>= dev-lang/python-2.7" |
>= dev-lang/python-2.7" |
10 |
fi |
fi |
|
if [[ -z ${MAGE_PYTHON_BUILD_VERSIONS} ]] |
|
|
then |
|
|
MAGE_PYTHON_BUILD_VERSIONS="single" |
|
|
fi |
|
11 |
|
|
12 |
# get the major.minor current installed python version |
# get the major.minor current installed python version |
13 |
# -> ex 2.4 |
# -> ex 2.4 |
15 |
{ |
{ |
16 |
local pyver |
local pyver |
17 |
# pyver="$(${MAGE_PYTHON_EXEC} -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" |
# pyver="$(${MAGE_PYTHON_EXEC} -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" |
18 |
pyver=$(${MAGE_PYTHON_EXEC} -c "import sys ; (print sys.version[:3])") |
pyver=$(${MAGE_PYTHON_EXEC} -c "import sys ; print (sys.version[:3])") |
19 |
[[ -z ${pyver} ]] && return 1 |
[[ -z ${pyver} ]] && return 1 |
20 |
echo "${pyver}" |
echo "${pyver}" |
21 |
return 0 |
return 0 |