You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a package which contains a python script that I want to call from my CMakeLists.txt. It lives in the bin directory within the package. In my CMakeLists.txt I would like to do something like:
If I understood correctly, you have a Python script in one of your dependencies, and you want to run that script from the CMakeLists.txt of a consumer of that dependency, that has a requires() or tool_requires to it?
Would the explicit way be good for your use case? Something like:
which works well - except on windows the path ends up in the variable with unescaped backslashes. I can manually fix that up but maybe CMakeToolchain should be doing that?
I was re-reading, isn't it enough that the dependency sets the PYTHONPATH in its self.buildenv, so the consumer doesn't need to inject anything, as it will be already in the PYTHONPATH?
What is your question?
I have a package which contains a python script that I want to call from my
CMakeLists.txt
. It lives in thebin
directory within the package. In myCMakeLists.txt
I would like to do something like:Is there any way to do this? The best I can find is to do something like
mypackage_INCLUDE_DIR/../bin/myscript.py
but that's pretty yuck.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: