Define PYTHON and LD_LIBRARY_PATH before sourcing main.sh

This commit is contained in:
Foo 2017-12-16 16:28:56 +03:00
parent ed0630d074
commit 910c6a33dd
1 changed files with 17 additions and 2 deletions

View File

@ -1,10 +1,25 @@
. tests/bot-ci/scripts/common/main.sh
set +x
: ${PYTHON:=python}
: ${USER:=`id -un`}
: ${HOME:=`getent passwd $USER | cut -d: -f6`}
if test -z "${PYTHON}" ; then
if test -n "$USE_UCS2_PYTHON" ; then
PYTHON="$HOME/opt/cpython-ucs2-$UCS2_PYTHON_VARIANT/bin/python$UCS2_PYTHON_VARIANT"
LD_LIBRARY_PATH="$HOME/opt/cpython-ucs2-$UCS2_PYTHON_VARIANT/lib${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
else
PYTHON=python
fi
fi
export PYTHON
export LD_LIBRARY_PATH
export USER
export HOME
. tests/bot-ci/scripts/common/main.sh
set +x
if test -n "$USE_UCS2_PYTHON" && test -n "$BASH_VERSION" ; then
set +e
. virtualenvwrapper.sh