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:
parent
8ad53fb04d
commit
2213cf9b77
@ -62,7 +62,6 @@ case ${DISTRO_ID} in
|
||||
python-pyasn1 pyOpenSSL python-ndg_httpsclient \
|
||||
python-netaddr python-prettytable python-crypto PyYAML \
|
||||
python-virtualenv
|
||||
VIRTUALENV_OPTIONS=""
|
||||
;;
|
||||
ubuntu)
|
||||
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
|
||||
if [[ ${PYTHON_VERSION} =~ ^3 ]]; then
|
||||
VIRTUALENV_COMMAND="python3 -m venv"
|
||||
VIRTUALENV_OPTIONS=${VIRTUALENV_OPTIONS:-"--copies"}
|
||||
VIRTUALENV_OPTIONS="--copies"
|
||||
else
|
||||
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
|
||||
|
||||
# Create a Virtualenv for the Ansible runtime
|
||||
|
@ -186,7 +186,6 @@ if [[ "${ACTION}" == "upgrade" ]]; then
|
||||
# requirements to be installed.
|
||||
unset ANSIBLE_PACKAGE
|
||||
unset UPPER_CONSTRAINTS_FILE
|
||||
unset VIRTUALENV_OPTIONS
|
||||
|
||||
# Kick off the data plane tester
|
||||
bash ${OSA_CLONE_DIR}/tests/data-plane-test.sh &> /var/log/data-plane-error.log &
|
||||
|
Loading…
Reference in New Issue
Block a user