Use upper constraints when installing ARA

Currently lint tests are failing due to ARA bringing in
extra packages unconstrained. Here we ensure that the
upper constraints are applied when installing ARA.

Change-Id: I35e3688ae632d5f7747f32dafc41d23883c033c5
(cherry picked from commit 2516484ffc)
This commit is contained in:
Jesse Pretorius 2018-05-29 10:32:09 +01:00 committed by Jesse Pretorius (odyssey4me)
parent 93dc5b2f65
commit 8694efe27b
1 changed files with 8 additions and 2 deletions

View File

@ -87,9 +87,15 @@ function setup_ara {
# Install ARA from source if running in ARA gate, otherwise install from PyPi
ARA_SRC_HOME="${TESTING_HOME}/src/git.openstack.org/openstack/ara"
if [[ -d "${ARA_SRC_HOME}" ]]; then
pip install --constraint "${COMMON_TESTS_PATH}/test-ansible-deps.txt" "${ARA_SRC_HOME}"
pip install \
--constraint "${COMMON_TESTS_PATH}/test-ansible-deps.txt" \
--constraint ${UPPER_CONSTRAINTS_FILE:-https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens} \
"${ARA_SRC_HOME}"
else
pip install --constraint "${COMMON_TESTS_PATH}/test-ansible-deps.txt" ara
pip install \
--constraint "${COMMON_TESTS_PATH}/test-ansible-deps.txt" \
--constraint ${UPPER_CONSTRAINTS_FILE:-https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens} \
ara
fi
# Dynamically figure out the location of ARA (ex: py2 vs py3)