Skip to content

Commit

Permalink
[ros-o] sound_classification: use Python3 and requirements.in.obase
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Dec 27, 2024
1 parent f9dc100 commit 335addd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sound_classification/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,19 @@ catkin_package(
message_runtime
)

if("$ENV{ROS_DISTRO}" STREQUAL "indigo" OR "$ENV{ROS_DISTRO}" STREQUAL "kinetic" OR
"$ENV{ROS_DISTRO}" STREQUAL "melodic" OR "$ENV{ROS_DISTRO}" STREQUAL "noetic")
catkin_generate_virtualenv(
PYTHON_INTERPRETER python2
INPUT_REQUIREMENTS requirements.in
)
else()
execute_process(COMMAND cmake -E remove ${PROJECT_SOURCE_DIR}/requirements.txt)
catkin_generate_virtualenv(
PYTHON_INTERPRETER python3
INPUT_REQUIREMENTS requirements.in.obase
)
endif()

file(GLOB SCRIPTS_FILES scripts/*.py)
catkin_install_python(
Expand Down
3 changes: 3 additions & 0 deletions sound_classification/requirements.in.obase
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
chainer # For Python 2.x, chainer 5.x.x is needed, 7.0.0 will not work on Python2
numpy<2.0
cv_bridge

0 comments on commit 335addd

Please sign in to comment.