4646 - uses : actions/setup-python@v5
4747 name : Install Python
4848 with :
49- python-version : 3.9
49+ python-version : ' 3.10 '
5050
5151 # Something changed somewhere that prevents the downloaded-at-build-time
5252 # licenses from being included in built wheels, so pre-download them so
@@ -100,11 +100,20 @@ jobs:
100100 CIBW_AFTER_BUILD : >-
101101 twine check {wheel} &&
102102 python {package}/ci/check_wheel_licenses.py {wheel}
103- CIBW_CONFIG_SETTINGS : setup-args="--vsenv"
103+ # On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
104+ # MinGW on PATH that would be picked otherwise), switch to a static build for
105+ # runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
106+ # and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
107+ # keeping shared state with the rest of the Python process/extensions.
108+ CIBW_CONFIG_SETTINGS_WINDOWS : >-
109+ setup-args="--vsenv"
110+ setup-args="-Db_vscrt=mt"
111+ setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
104112 CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
105113 CIBW_SKIP : " *-musllinux_aarch64"
106114 CIBW_TEST_COMMAND : >-
107115 python {package}/ci/check_version_number.py
116+ MACOSX_DEPLOYMENT_TARGET : " 10.12"
108117 MPL_DISABLE_FH4 : " yes"
109118 strategy :
110119 matrix :
@@ -115,16 +124,10 @@ jobs:
115124 cibw_archs : " aarch64"
116125 - os : windows-latest
117126 cibw_archs : " auto64"
118- - os : macos-11
127+ - os : macos-12
119128 cibw_archs : " x86_64"
120- # NOTE: macos_target can be moved back into global environment after
121- # meson-python 0.16.0 is released.
122- macos_target : " 10.12"
123129 - os : macos-14
124130 cibw_archs : " arm64"
125- # NOTE: macos_target can be moved back into global environment after
126- # meson-python 0.16.0 is released.
127- macos_target : " 11.0"
128131
129132 steps :
130133 - name : Set up QEMU
@@ -139,51 +142,66 @@ jobs:
139142 name : cibw-sdist
140143 path : dist/
141144
145+ - name : Build wheels for CPython 3.13
146+ uses : pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
147+ with :
148+ package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
149+ env :
150+ CIBW_BUILD : " cp313-* cp313t-*"
151+ # No free-threading wheels for NumPy; musllinux skipped for main builds also.
152+ CIBW_SKIP : " cp313t-win_amd64 *-musllinux_aarch64"
153+ CIBW_BUILD_FRONTEND :
154+ " pip; args: --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
155+ CIBW_FREE_THREADED_SUPPORT : true
156+ # No free-threading wheels available for aarch64 on Pillow.
157+ CIBW_TEST_SKIP : " cp313t-manylinux_aarch64"
158+ # We need pre-releases to get the nightly wheels.
159+ CIBW_BEFORE_TEST : >-
160+ pip install --pre
161+ --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
162+ contourpy numpy pillow
163+ CIBW_ARCHS : ${{ matrix.cibw_archs }}
164+
142165 - name : Build wheels for CPython 3.12
143- uses : pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
166+ uses : pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
144167 with :
145168 package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
146169 env :
147170 CIBW_BUILD : " cp312-*"
148171 CIBW_ARCHS : ${{ matrix.cibw_archs }}
149- MACOSX_DEPLOYMENT_TARGET : " ${{ matrix.macos_target }}"
150172
151173 - name : Build wheels for CPython 3.11
152- uses : pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
174+ uses : pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
153175 with :
154176 package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
155177 env :
156178 CIBW_BUILD : " cp311-*"
157179 CIBW_ARCHS : ${{ matrix.cibw_archs }}
158- MACOSX_DEPLOYMENT_TARGET : " ${{ matrix.macos_target }}"
159180
160181 - name : Build wheels for CPython 3.10
161- uses : pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
182+ uses : pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
162183 with :
163184 package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
164185 env :
165186 CIBW_BUILD : " cp310-*"
166187 CIBW_ARCHS : ${{ matrix.cibw_archs }}
167- MACOSX_DEPLOYMENT_TARGET : " ${{ matrix.macos_target }}"
168-
169- - name : Build wheels for CPython 3.9
170- uses : pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
171- with :
172- package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
173- env :
174- CIBW_BUILD : " cp39-*"
175- CIBW_ARCHS : ${{ matrix.cibw_archs }}
176- MACOSX_DEPLOYMENT_TARGET : " ${{ matrix.macos_target }}"
177188
178189 - name : Build wheels for PyPy
179- uses : pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # v2.17.0
190+ uses : pypa/cibuildwheel@f1859528322d7b29d4493ee241a167807661dfb4 # v2.21.2
180191 with :
181192 package-dir : dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
182193 env :
183- CIBW_BUILD : " pp39 -*"
194+ CIBW_BUILD : " pp310 -*"
184195 CIBW_ARCHS : ${{ matrix.cibw_archs }}
185- MACOSX_DEPLOYMENT_TARGET : " ${{ matrix.macos_target }}"
186- if : matrix.cibw_archs != 'aarch64'
196+ # Work around for https://github.com/pypa/setuptools/issues/4571
197+ # This can be removed once kiwisolver has wheels for PyPy 3.10
198+ # https://github.com/nucleic/kiwi/pull/182
199+ CIBW_BEFORE_TEST : >-
200+ export PIP_CONSTRAINT=pypy-constraint.txt &&
201+ echo "setuptools!=72.2.0" > $PIP_CONSTRAINT &&
202+ pip install kiwisolver &&
203+ unset PIP_CONSTRAINT
204+ if : matrix.cibw_archs != 'aarch64' && matrix.os != 'windows-latest'
187205
188206 - uses : actions/upload-artifact@v4
189207 with :
@@ -199,6 +217,8 @@ jobs:
199217 environment : release
200218 permissions :
201219 id-token : write
220+ attestations : write
221+ contents : read
202222 steps :
203223 - name : Download packages
204224 uses : actions/download-artifact@v4
@@ -210,5 +230,10 @@ jobs:
210230 - name : Print out packages
211231 run : ls dist
212232
233+ - name : Generate artifact attestation for sdist and wheel
234+ uses : actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
235+ with :
236+ subject-path : dist/matplotlib-*
237+
213238 - name : Publish package distributions to PyPI
214- uses : pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
239+ uses : pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3
0 commit comments