From df1c1f7d20bb5c168162abbc877b7b99a95ce170 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 8 Jan 2025 14:33:08 +0000 Subject: [PATCH 1/2] Explicit pass the Python path to pipx in CI step --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index db8c150173..16153ad1e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,7 +95,10 @@ jobs: run: | rm -rf dist # workaround for pypa/setuptools#4333 - pipx run --pip-args 'pyproject-hooks!=1.1' build + pipx run \ + --python ${{ steps.python-install.outputs.python-path }} \ + --pip-args 'pyproject-hooks!=1.1' \ + build echo "PRE_BUILT_SETUPTOOLS_SDIST=$(ls dist/*.tar.gz)" >> $GITHUB_ENV echo "PRE_BUILT_SETUPTOOLS_WHEEL=$(ls dist/*.whl)" >> $GITHUB_ENV rm -rf setuptools.egg-info # Avoid interfering with the other tests From 059d5a6a2e4a96afd425d0c10c7880958a43add1 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 8 Jan 2025 14:46:38 +0000 Subject: [PATCH 2/2] Use environment variable for pipx --- .github/workflows/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 16153ad1e9..c9de26d330 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -90,15 +90,16 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' working-directory: setuptools/tests/config run: python -m downloads.preload setupcfg_examples.txt + - name: Adjust env vars + shell: bash + run: | + echo 'PIPX_DEFAULT_PYTHON=${{ steps.python-install.outputs.python-path }}' >> $GITHUB_ENV - name: Pre-build distributions for test shell: bash run: | rm -rf dist # workaround for pypa/setuptools#4333 - pipx run \ - --python ${{ steps.python-install.outputs.python-path }} \ - --pip-args 'pyproject-hooks!=1.1' \ - build + pipx run --pip-args 'pyproject-hooks!=1.1' build echo "PRE_BUILT_SETUPTOOLS_SDIST=$(ls dist/*.tar.gz)" >> $GITHUB_ENV echo "PRE_BUILT_SETUPTOOLS_WHEEL=$(ls dist/*.whl)" >> $GITHUB_ENV rm -rf setuptools.egg-info # Avoid interfering with the other tests