diff --git a/docker/python-builder/scripts/assemble b/docker/python-builder/scripts/assemble index 83a9ba939d..611ff44f82 100755 --- a/docker/python-builder/scripts/assemble +++ b/docker/python-builder/scripts/assemble @@ -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