Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CNOID] Consider python version in cnoid file #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions cnoid/project/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
if(NOT ${CHOREONOID_USE_PYTHON2})
execute_process(
COMMAND python3 -c "import sysconfig; print(sysconfig.get_config_var(\"VERSION\"))"
OUTPUT_VARIABLE PYTHON_VERSION
RESULT_VARIABLE PYTHON_VERSION_SUCCESS
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
execute_process(
COMMAND python2 -c "from distutils import sysconfig; print(sysconfig.get_config_var(\"VERSION\"))"
OUTPUT_VARIABLE PYTHON_VERSION
RESULT_VARIABLE PYTHON_VERSION_SUCCESS
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT PYTHON_VERSION_SUCCESS STREQUAL 0)
execute_process(
COMMAND python -c "from distutils import sysconfig; print(sysconfig.get_config_var(\"VERSION\"))"
OUTPUT_VARIABLE PYTHON_VERSION
RESULT_VARIABLE PYTHON_VERSION_SUCCESS
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
message("-- Python version detected: ${PYTHON_VERSION}")

set(LMC_CNOID_CONFIG_FILE_LIST
rtc.conf.choreonoid
robot.conf
Expand Down
2 changes: 1 addition & 1 deletion cnoid/project/LMC_JVRC1_Cart.in.cnoid
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ OpenRTM:
"deleteUnmanagedRTCsOnStartingSimulation": true
Python:
"moduleSearchPath":
- @HRPSYSBASE_PREFIX@/lib/python2.7/dist-packages/hrpsys
- @HRPSYSBASE_PREFIX@/lib/python@PYTHON_VERSION@/dist-packages/hrpsys
viewAreas:
-
type: embedded
Expand Down
2 changes: 1 addition & 1 deletion cnoid/project/LMC_JVRC1_CartHighFriction.in.cnoid
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ OpenRTM:
"deleteUnmanagedRTCsOnStartingSimulation": true
Python:
"moduleSearchPath":
- @HRPSYSBASE_PREFIX@/lib/python2.7/dist-packages/hrpsys
- @HRPSYSBASE_PREFIX@/lib/python@PYTHON_VERSION@/dist-packages/hrpsys
viewAreas:
-
type: embedded
Expand Down
Loading