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(
32
32
DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION} /gradle
33
33
)
34
34
35
- install (
35
+ catkin_install_python (
36
36
PROGRAMS generate_environment_variables.py
37
37
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
38
38
)
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ SCRIPT=@(CMAKE_CURRENT_SOURCE_DIR)/generate_environment_variables.py
6
6
SCRIPT=@ (CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_variables.py
7
7
@[end if]@
8
8
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
6
6
SCRIPT=@ (CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_variables.py
7
7
@[end if]@
8
8
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