- 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
base: main
Are you sure you want to change the base?
Conversation
selt test:
|
Please update you commits with |
Thank you for supporting the project. |
Signed-off-by: yexiaochuan <tap91624@gmail.com>
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. |
|
|
fix #209
This PR introduces a minimal
pyproject.toml
so that the package can be built through the PEP 517 interface.Currently it still delegates to
setup.py
(setuptools.build_meta
backend), 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.py
into the[project]
section ofpyproject.toml
.