8000 Move cibuildwheel configuration to pyproject.toml by QuLogic · Pull Request #30252 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Move cibuildwheel configuration to pyproject.toml #30252

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
"CI: Run cibuildwheel":
- changed-files:
- any-glob-to-any-file: ['.github/workflows/cibuildwheel.yml']
- any-glob-to-any-file:
- '.github/workflows/cibuildwheel.yml'
- 'pyproject.toml'
"CI: Run cygwin":
- changed-files:
- any-glob-to-any-file: ['.github/workflows/cygwin.yml']
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,31 +94,6 @@ jobs:
needs: build_sdist
name: Build wheels on ${{ matrix.os }} for ${{ matrix.cibw_archs }}
runs-on: ${{ matrix.os }}
env:
CIBW_BEFORE_BUILD: >-
rm -rf {package}/build
CIBW_BEFORE_BUILD_WINDOWS: >-
pip install delvewheel &&
rm -rf {package}/build
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
delvewheel repair -w {dest_dir} {wheel}
CIBW_AFTER_BUILD: >-
twine check {wheel} &&
python {package}/ci/check_wheel_licenses.py {wheel}
# On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
# MinGW on PATH that would be picked otherwise), switch to a static build for
# runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
# and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
# keeping shared state with the rest of the Python process/extensions.
CIBW_CONFIG_SETTINGS_WINDOWS: >-
setup-args="--vsenv"
setup-args="-Db_vscrt=mt"
setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_SKIP: "*-musllinux_aarch64"
CIBW_TEST_COMMAND: >-
python {package}/ci/check_version_number.py
MACOSX_DEPLOYMENT_TARGET: "10.12"
strategy:
matrix:
include:
Expand Down Expand Up @@ -148,11 +123,6 @@ jobs:
CIBW_BUILD: "cp314-* cp314t-*"
CIBW_ENABLE: "cpython-freethreading cpython-prerelease"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_BEFORE_TEST: >-
python -m pip install
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
--upgrade --pre --only-binary=:all: contourpy numpy pillow

- name: Build wheels for CPython 3.13
uses: pypa/cibuildwheel@5f22145df44122af0f5a201f93cf0207171beca7 # v3.0.0
Expand Down
41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,47 @@ local_scheme = "node-and-date"
parentdir_prefix_version = "matplotlib-"
fallback_version = "0.0+UNKNOWN"

[tool.cibuildwheel]
skip = "*-musllinux_aarch64"
manylinux-x86_64-image = "manylinux2014"

before-build = "rm -rf {package}/build"
test-command = [
# "python {package}/ci/check_wheel_licenses.py {wheel}",
"python {package}/ci/check_version_number.py",
]
test-environment = "PIP_PREFER_BINARY=true"

[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "10.12"

[tool.cibuildwheel.windows]
before-build = [
"pip install delvewheel",
"rm -rf {package}/build",
]
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"

[tool.cibuildwheel.windows.config-settings]
# On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
# MinGW on PATH that would be picked otherwise), switch to a static build for
# runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
# and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
# keeping shared state with the rest of the Python process/extensions.
setup-args = [
"--vsenv",
"-Db_vscrt=mt",
"-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']",
]

[[tool.cibuildwheel.overrides]]
select = "cp314*"
manylinux-x86_64-image = "manylinux_2_28"
before-test = """
python -m pip install \
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
--upgrade --pre --only-binary=:all: contourpy numpy pillow"""

[tool.isort]
known_pydata = "numpy, matplotlib.pyplot"
known_firstparty = "matplotlib,mpl_toolkits"
Expand Down
Loading
0