Further modernization of the build backend to reduce `setup.py` usage
Nobody has claimed this yet.
- Dominant language
- Cython
- Stars
- 3.4k
- Forks
- 329
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 116
Description
Creating an issue to capture the internal discussions.
Currently both cuda.bindings and cuda.core use setuptools as the build backend and have a mixture of pyproject.toml static declarations and setup.py dynamic logics. We have two choices here:
- Keep
setuptoolsbut further reduce the amount of code insetup.py:- This seems to become possible with recent
setuptools, where Cython extensions can now be declared inpyproject.toml.
- This seems to become possible with recent
- Switch to use
scikit-build-core:- This has the benefit of reusing CUDA discovery mechanism (
FindCUDAToolkit) and other nice build system features provided by CMake (see the relevant discussion in #46). - The potential downside is to maintain a custom
CMakeLists.txtwhich is arguably a burden for non-C++ (=C & Python) oriented developers. Our Cython extensions are very simple to build.- However, this might become necessary once we start integrating some features from
cudax::, e.g. #528.
- However, this might become necessary once we start integrating some features from
- This has the benefit of reusing CUDA discovery mechanism (
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the current pyproject.toml and setup.py configurations for cuda.bindings and cuda.core, then read the linked discussion in #46. Assess whether recent setuptools can declare the Cython extensions or whether scikit-build-core and a CMakeLists.txt are needed, including the future cudax:: considerations in #528. Done means the project agrees on a build-backend direction and its scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100