Add `pyproject.toml` with legacy build backend to keep most logic in `setup.py`
- [ ] Test all build cases this needs to support.
- [x] Test Windows builds/support. -
Successfully built deepspeed-0.16.5+1d869d1f-cp311-cp311-win_amd64.whl - [x] Confirm pre-compiling ops - works with
--no-build-isolation - [x] Test commit hashes are added to dev builds (when building wheels, error from
python -m build-Successfully built deepspeed-0.16.5+1d869d1f.tar.gz and deepspeed-0.16.5+unknown-py3-none-any.whl - [x] Add pyproject.toml to path triggers similar to setup.py.
The main goal of this effort is to become compliant with the coming changes to pip in 25.1 listed here which will break editable installs. Future PRs will fully move from setup.py to pyproject.toml
Fixes: #7031
MII equivalent PR: https://github.com/deepspeedai/DeepSpeed-MII/pull/555 DS-Kernels equivalent PR: https://github.com/deepspeedai/DeepSpeed-Kernels/pull/20
@mrwyattii we just went through some of this with arctic training. If it’s helpful @loadams let’s discuss on slack a bit. There’s a ton that’s currently happening in setup.py, this could be a big lift? But I agree, needs to happen!
Edit: this is no longer correct with latest changes.
The current problem is that the logic inside setup.py aside from the call to setup() isn't run. This means that we don't append cupy into the requirements file, and tests fail as a result. This impacts other parts of the build experience, so we will need to do more work to switch to a modern build backend.