--- branches/magellan-next/include/python.sminc 2011/07/27 11:18:18 8644 +++ branches/magellan-next/include/python.sminc 2011/07/27 11:23:46 8645 @@ -1,8 +1,5 @@ # $Id$ -# needed for mbindir() -sminclude mtools - # get the major.minor current installed python version # -> ex 2.4 get_python_version() @@ -27,39 +24,47 @@ munpack ${SRCFILE} || die } -python_src_compile() +python_docompile() { - cd ${SRCDIR} - if [[ -e setup.py ]] then - python setup.py build "$@" || die + python setup.py build $@ || die elif [[ -e waf ]] then - python waf configure --prefix=/usr --libdir=/usr/$(mlibdir) "$@" || die - python waf build "$@" || die + python waf configure --prefix=/usr --libdir=/usr/$(mlibdir) $@ || die + python waf build $@ || die elif [[ -e configure ]] then - mconfigure "$@" || die + mconfigure $@ || die mmake || die else mmake || die fi } -python_src_install() +python_doinstall() { - cd ${SRCDIR} - if [[ -e setup.py ]] then - python setup.py install --no-compile --root $(mbindir) "$@" || die + python setup.py install --no-compile --root ${BINDIR} $@ || die elif [[ -e waf ]] then - python waf install --destdir="$(mbindir)" "$@" || die + python waf install --destdir=${BINDIR} $@ || die else - mmake DESTDIR=$(mbindir) install || die + mmake DESTDIR=${BINDIR} install || die fi +} + +python_src_compile() +{ + cd ${SRCDIR} + python_docompile || die +} + +python_src_install() +{ + cd ${SRCDIR} + python_doinstall || die local i for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \