Skip to content
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

Find python path properly for installed underlays. #397

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmake/templates/generate_cached_setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import stat
import sys

# find the import relatively if available to work before installing catkin or overlaying installed version
if os.path.exists(os.path.join('@catkin_EXTRAS_DIR@', 'catkinConfig.cmake.in')):
if os.path.exists(os.path.join('@catkin_EXTRAS_DIR@', 'catkinConfig.cmake.in')): # from an devel space
sys.path.insert(0, os.path.join('@catkin_EXTRAS_DIR@', '..', 'python'))
elif os.path.exists(os.path.join('@catkin_EXTRAS_DIR@', 'catkinConfig.cmake')): # from an install space
sys.path.insert(0, os.path.join('@catkin_EXTRAS_DIR@', '..', '..', '..', '${CATKIN_GLOBAL_PYTHON_DESTINATION}'))
from catkin.environment_cache import generate_environment_script

code = generate_environment_script('@CATKIN_DEVEL_PREFIX@/env.@script_ext@')
Expand Down