Merge "Use the build tool in assemble instead of setup.py"

changes/99/838799/1
Zuul 11 months ago committed by Gerrit Code Review
commit 59aa319f52

@ -44,14 +44,15 @@ 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.
# We run sdist first to trigger code generation steps such
# as are found in zuul, since the sequencing otherwise
# happens in a way that makes wheel content copying unhappy.
# pip wheel isn't used here because it puts all of the output
# The `build` tool builds an sdist first then a wheel from
# that sdist which is exactly what we want. This triggers code
# generation steps such as are found in zuul, since the sequencing
# otherwise happens in a way that makes wheel content copying unhappy.
# `pip wheel` isn't used here because it puts all of the output
# in the output dir and not the wheel cache, so it's not
# possible to tell what is the wheel for the project and
# what is the wheel cache.
python3 setup.py sdist bdist_wheel -d /output/wheels
/tmp/venv/bin/python3 -m build -o /output/wheels ./
# Install everything so that the wheel cache is populated with
# transitive depends. If a requirements.txt file exists, install
@ -88,7 +89,7 @@ done
# Use a clean virtualenv for install steps to prevent things from the
# current environment making us not build a wheel.
python3 -m venv /tmp/venv
/tmp/venv/bin/pip install -U pip wheel
/tmp/venv/bin/pip install -U pip wheel build
# If there is an upper-constraints.txt file in the source tree,
# use it in the pip commands.

Loading…
Cancel
Save