-
Notifications
You must be signed in to change notification settings - Fork 101
build: add pyproject.toml for PEP 517/518 support #210
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
|
selt test: |
|
Please update you commits with |
|
Thank you for supporting the project. |
Signed-off-by: yexiaochuan <[email protected]>
latest commit sign off added |
I think deeply migrating to pyproject.toml not hard. I'll have a try |
I took a closer look. Migrating just the metadata and tool configs into pyproject.toml may be easy, but a full migration is tougher than it looks. Our current setup.py has a lot of custom build logic — things like cmake_build, create_version, build_py, build_ext — and those hook into environment variables and CMake flags. To remove setup.py entirely we’d need to rework that logic inside CMake or switch to something like scikit-build-core, which means touching both the build system and the packaging. It will definitely more effort than a simple config move. |
|
I think there is no need to remove setup.py completely at the moment.. |
|
That’s right. setup.py should still be supported. It’s only that using setup.py develop etc. directly is deprecated. |
|
|
|
|
I've tried full migration of setup.cfg to pyproject.toml based on this PR: #217 |
Based on #210 closes #209 --------- Signed-off-by: yexiaochuan <[email protected]> Signed-off-by: take-cheeze <[email protected]> Signed-off-by: Takeshi Watanabe <[email protected]> Co-authored-by: yexiaochuan <[email protected]>
|
#217 is merged so feel free to have additional contributions |



fix #209
This PR introduces a minimal
pyproject.tomlso that the package can be built through the PEP 517 interface.Currently it still delegates to
setup.py(setuptools.build_metabackend), so all custom CMake build logic remains unchanged.Version constraints
cmake>=3.22– aligned withcmake_minimum_required(VERSION 3.22)in the project’sCMakeLists.txt.protobuf>=4.25.1– consistent with [onnx/onnx requirements](https://github.com/onnx/onnx/blob/main/requirements.txt).setuptools>=68,wheel– ensure stable PEP 517/518/660 support and wheel building.Next steps
This is only the first step: future work can gradually migrate static metadata (name, license, classifiers, URLs, entry points, etc.) from
setup.pyinto the[project]section ofpyproject.toml.