diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 58b96d38c883..8c45ef95990b 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -135,6 +135,28 @@ jobs: name: sdist path: dist/ + - name: Build wheels for CPython 3.12 + uses: pypa/cibuildwheel@39a63b5912f086dd459cf6fcb13dcdd3fe3bc24d # v2.15.0 + with: + package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }} + env: + CIBW_BUILD: "cp312-*" + CIBW_ARCHS: ${{ matrix.cibw_archs }} + # Remove this once NumPy with Python 3.12 wheels is not pre-release. + CIBW_BEFORE_BUILD: >- + pip install certifi "pybind11>=2.6" "setuptools>=42" "setuptools_scm>=7" && + pip install --pre "numpy>=1.25" && + rm -rf {package}/build + CIBW_BEFORE_BUILD_WINDOWS: >- + pip install certifi delvewheel "pybind11>=2.6" "setuptools>=42" "setuptools_scm>=7" && + pip install --pre "numpy>=1.25" && + rm -rf {package}/build + CIBW_ENVIRONMENT: PIP_NO_BUILD_ISOLATION=0 + # Remove this once contourpy has Python 3.12 wheels. + CIBW_BEFORE_TEST: >- + pip install "meson>=1.2.0" "meson-python>=0.13.1" "ninja" "pybind11>=2.10.4" && + pip install --pre "numpy>=1.25" + - name: Build wheels for CPython 3.11 uses: pypa/cibuildwheel@39a63b5912f086dd459cf6fcb13dcdd3fe3bc24d # v2.15.0 with: