Skip to content

MNT: Enable wheels for Python 3.12 #26582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" &&

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be willing to try adding contourpy's build-requires? They're not likely to put out a wheel until numpy puts out a final 1.26.0 release, which is not going to happen until 3.12 final.

Suggested change
pip install certifi "pybind11>=2.6" "setuptools>=42" "setuptools_scm>=7" &&
pip install certifi "setuptools>=42" "setuptools_scm>=7" "meson >= 1.2.0" "meson-python >= 0.13.1" "pybind11 >= 2.10.4"

Copy link
Contributor

@neutrinoceros neutrinoceros Aug 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are you getting this from ? CPython 3.12.0 is scheduled for early October while numpy 1.26 's milestone is currently aimed at September 1st.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly a faulty memory. Apologies.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem, just asking :)

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:
Expand Down