py35: Set virtualenv options for CentOS

The mechanism to override the virtualenv options
is not working as expected. This patch should fix
it.

Change-Id: I913355380927907686a9ee9d3cb4fb134c82cd55
This commit is contained in:
Jesse Pretorius 2017-07-10 09:36:32 +01:00
parent 8ad53fb04d
commit 2213cf9b77
2 changed files with 7 additions and 4 deletions

View File

@ -62,7 +62,6 @@ case ${DISTRO_ID} in
python-pyasn1 pyOpenSSL python-ndg_httpsclient \ python-pyasn1 pyOpenSSL python-ndg_httpsclient \
python-netaddr python-prettytable python-crypto PyYAML \ python-netaddr python-prettytable python-crypto PyYAML \
python-virtualenv python-virtualenv
VIRTUALENV_OPTIONS=""
;; ;;
ubuntu) ubuntu)
apt-get update apt-get update
@ -98,10 +97,15 @@ export UPPER_CONSTRAINTS_FILE=${UPPER_CONSTRAINTS_FILE:-"$UPPER_CONSTRAINTS_PROT
# Figure out the right virtualenv command and options # Figure out the right virtualenv command and options
if [[ ${PYTHON_VERSION} =~ ^3 ]]; then if [[ ${PYTHON_VERSION} =~ ^3 ]]; then
VIRTUALENV_COMMAND="python3 -m venv" VIRTUALENV_COMMAND="python3 -m venv"
VIRTUALENV_OPTIONS=${VIRTUALENV_OPTIONS:-"--copies"} VIRTUALENV_OPTIONS="--copies"
else else
VIRTUALENV_COMMAND="virtualenv --python=${PYTHON_EXEC_PATH}" VIRTUALENV_COMMAND="virtualenv --python=${PYTHON_EXEC_PATH}"
VIRTUALENV_OPTIONS=${VIRTUALENV_OPTIONS:-"--always-copy"} VIRTUALENV_OPTIONS="--always-copy"
fi
# Trying to use the copy option on CentOS fails miserably, so we override it.
if [[ "${DISTRO_ID}" == "centos" ]] || [[ "${DISTRO_ID}" == "rhel" ]]; then
VIRTUALENV_OPTIONS=""
fi fi
# Create a Virtualenv for the Ansible runtime # Create a Virtualenv for the Ansible runtime

View File

@ -186,7 +186,6 @@ if [[ "${ACTION}" == "upgrade" ]]; then
# requirements to be installed. # requirements to be installed.
unset ANSIBLE_PACKAGE unset ANSIBLE_PACKAGE
unset UPPER_CONSTRAINTS_FILE unset UPPER_CONSTRAINTS_FILE
unset VIRTUALENV_OPTIONS
# Kick off the data plane tester # Kick off the data plane tester
bash ${OSA_CLONE_DIR}/tests/data-plane-test.sh &> /var/log/data-plane-error.log & bash ${OSA_CLONE_DIR}/tests/data-plane-test.sh &> /var/log/data-plane-error.log &