--- smage/trunk/include/python.sminc 2012/07/09 17:43:13 3578 +++ smage/trunk/include/python.sminc 2013/12/16 10:19:35 5216 @@ -1,13 +1,17 @@ # $Id$ +SDEPEND="${SDEPEND} + >= dev-lang/python-2.7" + # get the major.minor current installed python version # -> ex 2.4 get_python_version() { -# PYVER="$(python -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" - PYVER=$(python -c "import sys ; print sys.version[:3]") - [[ -z ${PYVER} ]] && return 1 - echo "${PYVER}" + local pyver +# pyver="$(python -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" + pyver=$(python -c "import sys ; print sys.version[:3]") + [[ -z ${pyver} ]] && return 1 + echo "${pyver}" return 0 } @@ -15,6 +19,7 @@ { local pylib pylib=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_lib()') + [[ -z ${pylib} ]] && return 1 echo "${pylib}" return 0 } @@ -23,6 +28,7 @@ { local pyinc pyinc=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_inc()') + [[ -z ${pyinc} ]] && return 1 echo "${pyinc}" return 0 }