tttapa / py-build-cmake

Modern, PEP 517 compliant build backend for creating Python packages with extensions built using CMake.
https://pypi.org/project/py-build-cmake
MIT License
40 stars 6 forks source link

CMake presets functionality seems to be broken #33

Open t1-nva opened 3 weeks ago

t1-nva commented 3 weeks ago

We are trying to use CMakePresets.json with py-build-cmake, but the documentation seems out of sync with what is implemented in CMake i.e. there is no concept of install preset, which is referred to in the py-build-cmake documentation. One result is that py-build-cmake generates invalid arguments to CMake resulting in errors.

Lifting and duplicating the settings out of CMakePresets.json into "old school" CMake arguments works, however this is not our preferred way of working since the Python module is just a small part of the project and leads to DRY-violations in the build system.

Are there any examples of working with CMake presets from py-build-cmake that actually work?

CMake preset ref; https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html

tttapa commented 3 weeks ago

Thanks for the report. This is indeed the case, and has been addressed in recent pre-releases: https://github.com/tttapa/py-build-cmake/blob/rework-0.2.0/docs/Config.md
Unfortunately, I haven't been able to turn this into a stable release yet. I hope to return to this in a couple weeks.