4 from util
import roscompile
8 return len(package.source_code.get_source_by_language(
'python')) > 0
12 key =
'src/%s' % package.name
13 for source
in package.source_code.get_source_by_language(
'python'):
14 if key
in source.rel_fn:
23 if package.setup_py
is None:
27 package.setup_py =
SetupPy(package.name, os.path.join(package.root,
'setup.py'))
29 if 'catkin_python_setup' not in package.cmake.content_map:
30 package.cmake.add_command(
Command(
'catkin_python_setup'))
35 execs = [source.rel_fn
for source
in package.source_code.get_source_by_language(
'python')
if source.is_executable()]
38 cmd =
'catkin_install_python' 39 if cmd
not in package.cmake.content_map:
41 cmake_cmd.add_section(
'PROGRAMS', execs)
42 cmake_cmd.add_section(
'DESTINATION', [
'${CATKIN_PACKAGE_BIN_DESTINATION}'])
43 package.cmake.add_command(cmake_cmd)
45 package.cmake.section_check(execs, cmd,
'PROGRAMS')
def update_python_installs(package)
def check_setup_py(package)
def has_python_library(package)