fix: Ignore pre-installed self-package from prefix_path #862
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context:
I am opening to brainstorm some ideas on how to implement.
TODO:
ignore_prefix_path
as a configure variablecanonical_name
as self project name, instead find out the path from installed python files, entry-point etc.CMAKE_IGNORE_PREFIX_PATH
does not works as intendedAbout
CMAKE_IGNORE_PREFIX_PATH
not working as intended. From what I've tested, if I put the path assite-packages/spglib
, then this does not work, it still continues to find the pre-installed package files, but if I remove thespglib
path and make it point to effectively the same folder asCMAKE_PREFIX_PATH
, it does work. This seems like a bug in CMake that it doesn't resolve itself whenCMAKE_IGNORE_PREFIX_PATH
is a child ofCMAKE_PREFIX_PATH
, which as much as I think about it, it should be this way right?Here is what I managed to track down from upstream:
CMAKE_IGNORE_PREFIX_PATH
CMAKE_IGNORE_PREFIX_PATH
to construct search path list