--- trunk/include/python.sminc 2014/03/06 08:46:51 21031 +++ trunk/include/python.sminc 2014/04/03 23:08:50 22416 @@ -5,7 +5,7 @@ # get the major.minor current installed python version # -> ex 2.4 -get_python_version() +mget-python-version() { local pyver # pyver="$(python -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" @@ -15,7 +15,7 @@ return 0 } -get_python_libdir() +mget-python-libdir() { local pylib pylib=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_lib()') @@ -24,7 +24,7 @@ return 0 } -get_python_includedir() +mget-python-includedir() { local pyinc pyinc=$(python -c 'from distutils import sysconfig; print sysconfig.get_python_inc()') @@ -33,6 +33,23 @@ return 0 } +# fallback functions to support old smage scripts, dropped in near future +get_python_version() +{ + echo -e "${COLYELLOW}Warning: get_python_version() is depcrecated, please use mget-python-version() instead${COLDEFAULT}" >&2 + mget-python-version +} +get_python_libdir() +{ + echo -e "${COLYELLOW}Warning: get_python_libdir() is depcrecated, please use mget-python-libdir() instead${COLDEFAULT}" >&2 + mget-python-libdir +} +get_python_includedir() +{ + echo -e "${COLYELLOW}Warning: get_python_includedir() is depcrecated, please use mget-python-includedir() instead${COLDEFAULT}" >&2 + mget-python-includedir +} + python_src_prepare() { munpack ${SRCFILE} || die