diff options
author | Sviatoslav Sydorenko <webknjaz@redhat.com> | 2023-03-30 00:58:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-29 15:58:14 -0700 |
commit | 18d6ae1e1fe95481a8ba6a4a481fb6a3ec93ac58 (patch) | |
tree | fd14b9fd1848f998fe392c936ea5d5f371dda8a0 | |
parent | 77d221c0ac408af0609d6778c62d31a4be0320c8 (diff) | |
download | ansible-18d6ae1e1fe95481a8ba6a4a481fb6a3ec93ac58.tar.gz |
Fix `entry_points` integration test for PEP 517 (#80357)
This patch pre-builds the sdist via build using the self-eliminating
in-tree build backend and then, feeds the result to a pottentially
outdated pip (below v20) so that it uses the setuptools' native
PEP 517 build backend to build a wheel on install.
-rwxr-xr-x | test/integration/targets/entry_points/runme.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/integration/targets/entry_points/runme.sh b/test/integration/targets/entry_points/runme.sh index cabf153a24..399586f1b0 100755 --- a/test/integration/targets/entry_points/runme.sh +++ b/test/integration/targets/entry_points/runme.sh @@ -4,13 +4,22 @@ set -eu -o pipefail source virtualenv.sh set +x unset PYTHONPATH +export PIP_DISABLE_PIP_VERSION_CHECK=1 export SETUPTOOLS_USE_DISTUTILS=stdlib base_dir="$(dirname "$(dirname "$(dirname "$(dirname "${OUTPUT_DIR}")")")")" bin_dir="$(dirname "$(command -v pip)")" + +# NOTE: pip < 20 doesn't support in-tree build backends. This is why, we +# NOTE: pre-build a compatible sdist that has it self-eliminated. Following +# NOTE: installs from that artifact will use the setuptools-native backend +# NOTE: instead, as a compatibility measure for ancient environments. +pip install 'build ~= 0.10.0' +python -m build --sdist --outdir="${OUTPUT_DIR}"/dist "${base_dir}" + # deps are already installed, using --no-deps to avoid re-installing them -pip install "${base_dir}" --disable-pip-version-check --no-deps +pip install "${OUTPUT_DIR}"/dist/ansible-core-*.tar.gz --no-deps # --use-feature=in-tree-build not available on all platforms for bin in "${bin_dir}/ansible"*; do |