Split bindep and wheel invocations

We need to run bindep before installing git, because otherwise if
a project needs git in its bindep, it won't show up because it'll
be on the build host.

Split the function in two and call them before and after the git
installation.

Change-Id: I316b1bc643eb9293500b31e676361eec7060701d
This commit is contained in:
Monty Taylor 2019-12-03 11:13:56 -06:00
parent bd66a7cb1b
commit 5e12438e0d

View File

@ -27,15 +27,7 @@ cd /tmp/src
apt-get update
# pbr needs git installed, else nothing will work
apt-get install -y git
# Use a clean virtualenv for install steps to prevent things from the
# current environment making us not build a wheel.
python -m venv /tmp/venv
/tmp/venv/bin/pip install -U pip wheel
function install_pwd {
function install_bindep {
# Protect from the bindep builder image use of the assemble script
# to produce a wheel. Note we append because we want all
# sibling packages in here too
@ -46,7 +38,9 @@ function install_pwd {
apt-get install -y ${compile_packages}
fi
fi
}
function install_wheels {
# Build a wheel so that we have an install target.
# pip install . in the container context with the mounted
# source dir gets ... exciting.
@ -79,13 +73,32 @@ function install_pwd {
done
}
# Install the main package
install_pwd
# bindep the main package
install_bindep
# go through ZUUL_SIBLINGS, if any, and build those wheels too
for sibling in ${ZUUL_SIBLINGS:-}; do
pushd .zuul-siblings/${sibling}
install_pwd
install_bindep
popd
done
# pbr needs git installed, else nothing will work. Do this in between
# bindep and wheel so that we don't miss git in target images.
apt-get install -y git
# Use a clean virtualenv for install steps to prevent things from the
# current environment making us not build a wheel.
python -m venv /tmp/venv
/tmp/venv/bin/pip install -U pip wheel
# Install the main package
install_wheels
# go through ZUUL_SIBLINGS, if any, and build those wheels too
for sibling in ${ZUUL_SIBLINGS:-}; do
pushd .zuul-siblings/${sibling}
install_wheels
popd
done