From 6434c8978786667936757aec27bef39a7be6fb4e Mon Sep 17 00:00:00 2001 From: Daniel Stonier Date: Mon, 18 Mar 2013 11:55:38 +0900 Subject: [PATCH] find python path properly for installed underlays. --- cmake/templates/generate_cached_setup.py.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/templates/generate_cached_setup.py.in b/cmake/templates/generate_cached_setup.py.in index bf9c37085..83a0cc0d1 100644 --- a/cmake/templates/generate_cached_setup.py.in +++ b/cmake/templates/generate_cached_setup.py.in @@ -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@')