I'm developing a python module with a long pybind11 C++ extension compilation step invoked via cmake in setup.py
.
When making changes to a C++ file, cmake invoked via python setup.py develop
will avoid recompiling units whose dependent files have not changed. However, invoking setup.py
directly ignores the settings in my pyproject.toml
and I understand that the modern way to do a developmental build is with python -m pip install -e .
While pip install -e
successfully builds, it unfortunately starts from scratch inside a clean temporary directory every invocation. Is there a way to instruct pip install -e
to maintain my CMakeCache.txt and compilation dependency tracking?
(And/or does this somehow indicate that I misunderstand pip install -e
or am using it incorrectly?)
This previous unanswered question is quite similar sounding. Perhaps, I have the added detail that my python setup.py develop
is working in this regard.