2828
2929 # Suppress noisy pip warnings
3030 PIP_DISABLE_PIP_VERSION_CHECK : ' true'
31- PIP_NO_PYTHON_VERSION_WARNING : ' true'
3231 PIP_NO_WARN_SCRIPT_LOCATION : ' true'
3332
3433 # Ensure tests can sense settings about the environment
@@ -42,15 +41,13 @@ jobs:
4241 # https://blog.jaraco.com/efficient-use-of-ci-resources/
4342 matrix :
4443 python :
45- - " 3.8 "
44+ - " 3.9 "
4645 - " 3.13"
4746 platform :
4847 - ubuntu-latest
4948 - macos-latest
5049 - windows-latest
5150 include :
52- - python : " 3.9"
53- platform : ubuntu-latest
5451 - python : " 3.10"
5552 platform : ubuntu-latest
5653 - python : " 3.11"
@@ -65,25 +62,30 @@ jobs:
6562 - platform : ubuntu-latest
6663 python : " 3.10"
6764 distutils : stdlib
68- # Python 3.8, 3.9 are on macos-13 but not macos-latest (macos-14-arm64)
69- # https://github.com/actions/setup-python/issues/850
70- # https://github.com/actions/setup-python/issues/696#issuecomment-1637587760
71- - {python: "3.8", platform: "macos-13"}
72- exclude :
73- - {python: "3.8", platform: "macos-latest"}
7465 runs-on : ${{ matrix.platform }}
75- continue-on-error : ${{ matrix.python == '3.14' }}
66+ continue-on-error : ${{ matrix.python == '3.14' || matrix.python == 'pypy3.10' }}
67+ # XXX: pypy seems to be flaky with unrelated tests in #6345
7668 env :
7769 SETUPTOOLS_USE_DISTUTILS : ${{ matrix.distutils || 'local' }}
7870 timeout-minutes : 75
7971 steps :
8072 - uses : actions/checkout@v4
73+ - name : Install build dependencies
74+ # Install dependencies for building packages on pre-release Pythons
75+ # jaraco/skeleton#161
76+ if : matrix.python == '3.14' && matrix.platform == 'ubuntu-latest'
77+ run : |
78+ sudo apt update
79+ sudo apt install -y libxml2-dev libxslt-dev
8180 - name : Setup Python
8281 id : python-install
8382 uses : actions/setup-python@v5
8483 with :
8584 python-version : ${{ matrix.python }}
8685 allow-prereleases : true
86+ env :
87+ # Workaround for actions/setup-python#981 (env var only modified for this specific step)
88+ SETUPTOOLS_USE_DISTUTILS : ${{ matrix.platform == 'macos-latest' && matrix.python == '3.9' && 'stdlib' || matrix.distutils || 'local' }}
8789 - uses : actions/cache@v4
8890 id : cache
8991 with :
9597 if : steps.cache.outputs.cache-hit != 'true'
9698 working-directory : setuptools/tests/config
9799 run : python -m downloads.preload setupcfg_examples.txt
100+ - name : Adjust env vars
101+ shell : bash
102+ run : |
103+ echo 'PIPX_DEFAULT_PYTHON=${{ steps.python-install.outputs.python-path }}' >> $GITHUB_ENV
98104 - name : Pre-build distributions for test
99105 shell : bash
100106 run : |
@@ -151,6 +157,7 @@ jobs:
151157 if : always()
152158
153159 needs :
160+ - check-changed-folders
154161 - integration-test
155162 - test
156163 - collateral
@@ -183,7 +190,7 @@ jobs:
183190 packages : >-
184191 python${{ matrix.python }},
185192 python${{ matrix.python }}-devel,
186- python${{ matrix.python }}-tox ,
193+ python${{ matrix.python }}-pip ,
187194 gcc-core,
188195 git,
189196 - name : Record the currently selected Python version
@@ -194,11 +201,17 @@ jobs:
194201 run : |
195202 python -c 'import platform; print("python-version=" + platform.python_version())' >> ${GITHUB_OUTPUT}
196203 shell : C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
204+ - name : Install tox using pip
205+ shell : C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
206+ run : |
207+ # Workaround for https://github.com/pypa/setuptools/issues/4831
208+ python -m pip install tox
197209 - name : Run tests
198210 shell : C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
199211 run : |
200- git config --global --add safe.directory "$(cygpath -u "$GITHUB_WORKSPACE")" # workaround for #3408
201- tox
212+ git config --global --add safe.directory "$(cygpath -u "${{ github.workspace }}")" # workaround for #3408
213+ echo "$(cygpath -u "${{ github.workspace }}")" # for debugging purposes
214+ python -m tox
202215 - name : Create coverage report
203216 if : hashFiles('.coverage') != '' # Rudimentary `file.exists()`
204217 run : |
@@ -216,6 +229,38 @@ jobs:
216229 VM-${{ matrix.platform }},
217230 Py-${{ steps.python-install.outputs.python-version }}
218231 token : ${{ secrets.CODECOV_TOKEN }}
232+
233+ check-changed-folders :
234+ name : Fail the job if files changed under _disutils/_vendor folders
235+ if : github.event_name == 'pull_request'
236+ runs-on : ubuntu-latest
237+ steps :
238+ - name : Checkout code
239+ uses : actions/checkout@v3
240+ with :
241+ fetch-depth : 0
242+ - name : Check if files changed in the _distutils folder
243+ id : changed-files-specific-distutils
244+ uses : tj-actions/changed-files@v34
245+ with :
246+ files : |
247+ setuptools/_distutils/**
248+ - name : Check if files changed in the _vendor folder
249+ id : changed-files-specific-vendor
250+ uses : tj-actions/changed-files@v34
251+ with :
252+ files : |
253+ setuptools/_vendor/**
254+ - name : Fail the job if any file(s) in the _distutils folder change
255+ if : steps.changed-files-specific-distutils.outputs.any_changed == 'true'
256+ run : |
257+ echo "One or more files in the setuptools/_distutils folder has changed." | tee "${GITHUB_STEP_SUMMARY}"
258+ exit 1
259+ - name : Fail the job if any file(s) in the _vendor folder change
260+ if : steps.changed-files-specific-vendor.outputs.any_changed == 'true'
261+ run : |
262+ echo "One or more files in the setuptools/_vendor folder has changed." | tee "${GITHUB_STEP_SUMMARY}"
263+ exit 1
219264
220265 integration-test :
221266 needs : test
0 commit comments