File tree Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ install(
3232 DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION} /gradle
3333 )
3434
35- install (
35+ catkin_install_python (
3636 PROGRAMS generate_environment_variables.py
3737 DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
3838 )
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ SCRIPT=@(CMAKE_CURRENT_SOURCE_DIR)/generate_environment_variables.py
66SCRIPT=@ (CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_variables.py
77@[end if]@
88
9- export ROS_MAVEN_PATH=" ` python ${SCRIPT} --maven-path` "
10- export ROS_MAVEN_DEPLOYMENT_REPOSITORY=" ` python ${SCRIPT} --maven-deployment-repository` "
11- export ROS_MAVEN_REPOSITORY=" ` python ${SCRIPT} --maven-repository` "
9+ if command -v python 1> /dev/null; then PYTHON_EXECUTABLE=python
10+ elif command -v python3 1> /dev/null; then PYTHON_EXECUTABLE=python3
11+ elif command -v python2 1> /dev/null; then PYTHON_EXECUTABLE=python2
12+ else PYTHON_EXECUTABLE=python
13+ fi
14+
15+ export ROS_MAVEN_PATH=" ` ${PYTHON_EXECUTABLE} ${SCRIPT} --maven-path` "
16+ export ROS_MAVEN_DEPLOYMENT_REPOSITORY=" ` ${PYTHON_EXECUTABLE} ${SCRIPT} --maven-deployment-repository` "
17+ export ROS_MAVEN_REPOSITORY=" ` ${PYTHON_EXECUTABLE} ${SCRIPT} --maven-repository` "
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ SCRIPT=@(CMAKE_CURRENT_SOURCE_DIR)/generate_environment_variables.py
66SCRIPT=@ (CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_variables.py
77@[end if]@
88
9- export ROS_MAVEN_PATH=" ` python ${SCRIPT} --maven-path` "
10- export ROS_MAVEN_DEPLOYMENT_REPOSITORY=" ` python ${SCRIPT} --maven-deployment-repository` "
11- export ROS_MAVEN_REPOSITORY=" ` python ${SCRIPT} --maven-repository` "
9+ if command -v python 1> /dev/null; then PYTHON_EXECUTABLE=python
10+ elif command -v python3 1> /dev/null; then PYTHON_EXECUTABLE=python3
11+ elif command -v python2 1> /dev/null; then PYTHON_EXECUTABLE=python2
12+ else PYTHON_EXECUTABLE=python
13+ fi
14+
15+ export ROS_MAVEN_PATH=" ` ${PYTHON_EXECUTABLE} ${SCRIPT} --maven-path` "
16+ export ROS_MAVEN_DEPLOYMENT_REPOSITORY=" ` ${PYTHON_EXECUTABLE} ${SCRIPT} --maven-deployment-repository` "
17+ export ROS_MAVEN_REPOSITORY=" ` ${PYTHON_EXECUTABLE} ${SCRIPT} --maven-repository` "
You can’t perform that action at this time.
0 commit comments