#!/bin/sh
#
# Wrapper for running Bakefile using system's Python version
#

prefix="@prefix@"
program="`basename $0`"

if test -f "/usr/bin/python2.5" ; then
    python="/usr/bin/python2.5"
else
    python="/usr/bin/python"
fi
pyver=`"$python" -c "from distutils import sysconfig; print sysconfig.get_python_version()"`

PYTHONPATH="$prefix/lib/bakefile/binmodules/$pyver:$PYTHONPATH"
export PYTHONPATH

"$python" "$prefix/lib/bakefile/$program.py" "$@"
