scikit-build / cmake-python-distributions

This project provides the infrastructure to build CMake Python wheels.
https://cmake-python-distributions.readthedocs.io
Apache License 2.0
112 stars 34 forks source link

do not request cmake when building sdist or wheel #507

Closed dhellmann closed 4 months ago

dhellmann commented 4 months ago

Configure scikit-build-core to not include cmake in the build backend dependencies for this package so that we avoid a circular dependency.

Fixes #506

dhellmann commented 4 months ago

@henryiii you may have an opinion about this PR. Please let me know if I'm misinterpreting the scikit-build-core settings, but my local testing shows this change avoids having cmake depend on itself for building wheels.

henryiii commented 4 months ago

cmake.version = "" should disable requesting the cmake python package, but it will still require cmake to be available, generally via a possibly older version pre-installed. wheel.cmake = False will not run CMake at all, and all of our logic is in CMakeLists.txt. sdist.cmake = False is the default for SDists.

dhellmann commented 4 months ago

Hmm. That's definitely not the behavior I'm seeing. Maybe I have an old version of scikit-build-core. I'll keep digging on my side. Thanks for the quick response!

dhellmann commented 4 months ago

OK, I can't find why, but I get different results for python 3.10 and 3.11, even for the same versions of pyproject_hooks and scikit-build-core. I think this is an issue in some other part of the tool chain, so I'll close this out and look for another way to work around it.

Sorry for the noise, and thanks for the quick response!