-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help find catkin python for install underlays #406
Conversation
This is safe - side effects such as taking care of environment variables like |
If I understand the discussion right (sorry, has been a while) you extend the sys path to be able to find the following catkin.* imports. It is only relavant if the PYTHONPATH was not set before invoking it and it is not used to find python stuff from other packages, right? If that is true, I would recommend we update the condition in line 8 to not look for a file "catkinConfig.cmake.in" (which does not get installed) but for a different file e.g. "toplevel.cmake" which is there in source and install space. |
To the first question, yes - it is just looking for catkin's python path, nothing else. To the second point - looking for an installed file like Hence the two separate search rules. Having a look at that commit again, it should probably use an else argument so that it doesn't override the location if found in the source space. It could probably hunt in those workspace python paths specifically for catkin's package before adding it I'll update tonight. |
Oh, I didn't see that. That's why we check for catkinConfig.cmake.in. I can make a patch which uses your loop over the workspaces and adds the one specific folder which contains catkin. |
The following looks clean to me - what do you think?
|
Just tested it with a couple of erratic ')' bug fixes:
Works great. |
Updated and rebased the commit. |
@@ -4,10 +4,19 @@ import os | |||
import stat | |||
import sys | |||
|
|||
# find the import relatively if available to work before installing catkin or overlaying installed version | |||
# find the import for catkin's python module - either from devel space or from an installed underlay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor formulation issues:
-
"module" -> "package" since there is no module "catkin" - only a package
-
"devel space" is not correct, it must be "source space" since the python files are not copied.
find the import for catkin's python package - either from source space or from an installed underlay
This is a follow on from ros#397
Updated. |
Thank you, for taking the time to push on this. |
Help find catkin python for install underlays
This is a follow on from #397