28
28
29
29
# Suppress noisy pip warnings
30
30
PIP_DISABLE_PIP_VERSION_CHECK : ' true'
31
- PIP_NO_PYTHON_VERSION_WARNING : ' true'
32
31
PIP_NO_WARN_SCRIPT_LOCATION : ' true'
33
32
34
33
# Ensure tests can sense settings about the environment
@@ -42,15 +41,13 @@ jobs:
42
41
# https://blog.jaraco.com/efficient-use-of-ci-resources/
43
42
matrix :
44
43
python :
45
- - " 3.8 "
44
+ - " 3.9 "
46
45
- " 3.13"
47
46
platform :
48
47
- ubuntu-latest
49
48
- macos-latest
50
49
- windows-latest
51
50
include :
52
- - python : " 3.9"
53
- platform : ubuntu-latest
54
51
- python : " 3.10"
55
52
platform : ubuntu-latest
56
53
- python : " 3.11"
@@ -65,25 +62,30 @@ jobs:
65
62
- platform : ubuntu-latest
66
63
python : " 3.10"
67
64
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"}
74
65
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
76
68
env :
77
69
SETUPTOOLS_USE_DISTUTILS : ${{ matrix.distutils || 'local' }}
78
70
timeout-minutes : 75
79
71
steps :
80
72
- 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
81
80
- name : Setup Python
82
81
id : python-install
83
82
uses : actions/setup-python@v5
84
83
with :
85
84
python-version : ${{ matrix.python }}
86
85
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' }}
87
89
- uses : actions/cache@v4
88
90
id : cache
89
91
with :
95
97
if : steps.cache.outputs.cache-hit != 'true'
96
98
working-directory : setuptools/tests/config
97
99
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
98
104
- name : Pre-build distributions for test
99
105
shell : bash
100
106
run : |
@@ -151,6 +157,7 @@ jobs:
151
157
if : always()
152
158
153
159
needs :
160
+ - check-changed-folders
154
161
- integration-test
155
162
- test
156
163
- collateral
@@ -183,7 +190,7 @@ jobs:
183
190
packages : >-
184
191
python${{ matrix.python }},
185
192
python${{ matrix.python }}-devel,
186
- python${{ matrix.python }}-tox ,
193
+ python${{ matrix.python }}-pip ,
187
194
gcc-core,
188
195
git,
189
196
- name : Record the currently selected Python version
@@ -194,11 +201,17 @@ jobs:
194
201
run : |
195
202
python -c 'import platform; print("python-version=" + platform.python_version())' >> ${GITHUB_OUTPUT}
196
203
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
197
209
- name : Run tests
198
210
shell : C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
199
211
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
202
215
- name : Create coverage report
203
216
if : hashFiles('.coverage') != '' # Rudimentary `file.exists()`
204
217
run : |
@@ -216,6 +229,38 @@ jobs:
216
229
VM-${{ matrix.platform }},
217
230
Py-${{ steps.python-install.outputs.python-version }}
218
231
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
219
264
220
265
integration-test :
221
266
needs : test
0 commit comments