def find_catkin(base_path, underlays_list=None): ''' Search the underlays looking for catkin's toplevel.cmake and python module. ''' if underlays_list is None: underlays_list = config_cache.get_underlays_list_from_config_cmake(base_path) catkin_toplevel = None catkin_python_path = None catkin_cmake_path = None for underlay in underlays_list: if os.path.isfile(os.path.join(underlay, 'share', 'catkin', 'cmake', 'toplevel.cmake')): catkin_cmake_path = os.path.join(underlay, 'share', 'catkin', 'cmake') catkin_toplevel = os.path.join(underlay, 'share', 'catkin', 'cmake', 'toplevel.cmake') if os.path.isfile(os.path.join(underlay, python_setup.get_global_python_destination(), 'catkin', 'builder.py')): catkin_python_path = os.path.join(underlay, python_setup.get_global_python_destination()) break return catkin_toplevel, catkin_python_path, catkin_cmake_path
def find_catkin(base_path, underlays_list=None): ''' Search the underlays looking for catkin's toplevel.cmake and python module. ''' if underlays_list is None: underlays_list = config_cache.get_underlays_list_from_config_cmake(base_path) catkin_toplevel = None catkin_python_path = None catkin_cmake_path = None for underlay in underlays_list: if os.path.isfile(os.path.join(underlay, 'share', 'catkin', 'cmake', 'toplevel.cmake')): # it is in an underlay's install space catkin_cmake_path = os.path.join(underlay, 'share', 'catkin', 'cmake') catkin_toplevel = os.path.join(underlay, 'share', 'catkin', 'cmake', 'toplevel.cmake') if os.path.isfile(os.path.join(underlay, python_setup.get_global_python_destination(), 'catkin', 'builder.py')): catkin_python_path = os.path.join(underlay, python_setup.get_global_python_destination()) break elif os.path.isfile(os.path.join(underlay, python_setup.get_global_python_destination(), 'catkin', '__init__.py')): # it's probably a devel space console.error('Error: catkin seems to be buried in a chained devel space - not yet supporting this') # catkin_python_path = os.path.join(underlay, python_setup.get_global_python_destination()) break return catkin_toplevel, catkin_python_path, catkin_cmake_path
def find_catkin(base_path, underlays_list=None): ''' Search the underlays looking for catkin's toplevel.cmake and python module. ''' if underlays_list is None: underlays_list = config_cache.get_underlays_list_from_config_cmake( base_path) catkin_toplevel = None catkin_python_path = None catkin_cmake_path = None for underlay in underlays_list: if os.path.isfile( os.path.join(underlay, 'share', 'catkin', 'cmake', 'toplevel.cmake')): # it is in an underlay's install space catkin_cmake_path = os.path.join(underlay, 'share', 'catkin', 'cmake') catkin_toplevel = os.path.join(underlay, 'share', 'catkin', 'cmake', 'toplevel.cmake') if os.path.isfile( os.path.join(underlay, python_setup.get_global_python_destination(), 'catkin', 'builder.py')): catkin_python_path = os.path.join( underlay, python_setup.get_global_python_destination()) break elif os.path.isfile( os.path.join(underlay, python_setup.get_global_python_destination(), 'catkin', '__init__.py')): # it's probably a devel space console.error( 'Error: catkin seems to be buried in a chained devel space - not yet supporting this' ) # catkin_python_path = os.path.join(underlay, python_setup.get_global_python_destination()) break return catkin_toplevel, catkin_python_path, catkin_cmake_path