6 from .cmake
import CATKIN_INSTALL_PYTHON_PRENAME
7 from .util
import roscompile
11 return len(package.source_code.get_source_by_language(
'python')) > 0
15 key =
'src/%s' % package.name
16 for source
in package.source_code.get_source_by_language(
'python'):
17 if key
in source.rel_fn:
26 if package.setup_py
is None:
30 package.setup_py =
SetupPy(package.name, os.path.join(package.root,
'setup.py'))
32 if 'catkin_python_setup' not in package.cmake.content_map:
33 package.cmake.add_command(
Command(
'catkin_python_setup'))
38 execs = [source.rel_fn
for source
in package.source_code.get_source_by_language(
'python')
if source.is_executable()]
41 cmd =
'catkin_install_python' 42 if cmd
not in package.cmake.content_map:
44 cmake_cmd.add_section(
'PROGRAMS', execs)
45 cmake_cmd.add_section(
'DESTINATION', [
'${CATKIN_PACKAGE_BIN_DESTINATION}'],
47 package.cmake.add_command(cmake_cmd)
49 package.cmake.section_check(execs, cmd,
'PROGRAMS')
def update_python_installs(package)
def check_setup_py(package)
def has_python_library(package)