-
Notifications
You must be signed in to change notification settings - Fork 2.2k
chore: use scikit-build-core for the build #5598
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
Conversation
d8188d9
to
098e77b
Compare
Explain how results previously obtained by setting |
As for the explanation, I think that should go in the upgrade guide. |
4eebc66
to
08a874a
Compare
d9d3774
to
9d251d7
Compare
d2cd617
to
ce7aec7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR transitions the project’s build system from setuptools to scikit‐build‐core, removing deprecated setup scripts and updating tests to accommodate the new backend. Key changes include:
- Removing the build-system block from tools/pyproject.toml and updating the main pyproject.toml with scikit‐build‐core settings.
- Removing setup.py and associated legacy build logic.
- Adding tools/make_global.py and adjusting tests and nox sessions to support the new global build process.
Reviewed Changes
Copilot reviewed 11 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tools/pyproject.toml | Removed legacy build-system configuration for setuptools. |
tools/make_global.py | New script for generating a global configuration for sdist/wheel. |
tests/extra_python_package/test_files.py | Updated tests to work with the new build backend and file layout. |
setup.py | Removed in favor of scikit‐build‐core. |
pyproject.toml | Rewritten to use scikit‐build‐core with updated project metadata. |
pybind11/_version.py | Adjusted version extraction using regex from the header file. |
noxfile.py | Updated nox sessions to support both standard and global builds. |
docs/conf.py | Updated to use pathlib for loading version information. |
.pre-commit-config.yaml and workflows files | Minor changes to remove outdated hooks and extra args. |
Files not reviewed (6)
- CMakeLists.txt: Language not supported
- MANIFEST.in: Language not supported
- setup.cfg: Language not supported
- tests/requirements.txt: Language not supported
- tools/setup_global.py.in: Language not supported
- tools/setup_main.py.in: Language not supported
Comments suppressed due to low confidence (1)
tests/extra_python_package/test_files.py:237
- [nitpick] Verify that the differences in pkg_info assertions between global and non-global builds are intentional and well-documented, ensuring consistency in the expected package metadata.
assert "Provides-Extra: global" not in pkg_info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Nothing jumping out as an issue, CI looks good.
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
7253136
to
787b0e4
Compare
Description
Switches to scikit-build-core from setuptools, similar to nanobind. Using PEP 639 licence. The version is read from the C++ files. The CMake files are generated in the wheel step for now. Setup to make the global SDist is a bit different.
Suggested changelog entry:
* Use scikit-build-core for the build backend. The CMake generation has been moved to the sdist->wheel step. ``PYBIND11_GLOBAL_PREFIX`` has been removed.