You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call CMake and build the CPU extension when invoking the build
via a PEP 517 backend, to ensure that at least some extension is built
when users are building from source. This improves consistency with
other Python packages, and reduces the risk of accidents.
We are using `scikit-build-core` setuptools plugin to take care of CMake
dependencies and call into CMake. However, we need to modify
the `build_py` command to ensure that CMake is called prior to
the setuptools command, as otherwise the newly built shared library
won't be picked up by `build_py`.
Since setuptools is still responsible for collecting the Python package,
it also collects all other shared libraries that were built earlier,
for example via manual CMake calls as done in the CI pipeline.
Furthermore, if the user does not have `scikit-build-core` installed
and calls `setup.py` directly, we output a warning but continue working
as before.
The logic can be further extended in the future, for example to detect
the best COMPUTE_BACKEND default.
Fixesbitsandbytes-foundation#1511
0 commit comments