Open wobakj opened 1 month ago
Thanks for the report!
Create cmake cache not relative to source, but in package build folder.
I'm afraid this kind of defeats the purpose of having a cache :)
As workaround: Add a flag to disable the cmake cache.
This is a good idea, I'll see if I can find some time to implement this soon.
As you've suggested in the title, the problem can be avoided by installing ninja globally (or in your current environment).
As a long-term solution, I believe py-build-cmake
should keep track of whether it installed Ninja in a temporary folder or not, and clear the CMakeCache.txt file based on that.
Thanks for the quick response! As alternative the long-term solution, maybe the ninja path variable can be make relative to the build folder/just contain the command? Then it should be valid regardless in which temp folder the build is taking place, because ninja is available in all cases.
I have added a fix in 86dc912dbae9934f4841aabb3a0d06c5e6db49e9: If Ninja is installed in the current Python environment, its path is passed to CMake, updating the cache variable on every run.
First, thanks for creating this package! It is super handy.
I would like to report a bug related to using py-build-cmake as build backend of a package a which is a local/path dependency for another package b with a build backend supporting PEP 508 path dependencies (e.g. poetry):
.py-build-cmake_cache
in the package source folder of b.Proposed solutions: