Skip to content

Commit 335addd

Browse files
committed
[ros-o] sound_classification: use Python3 and requirements.in.obase
1 parent f9dc100 commit 335addd

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: sound_classification/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,19 @@ catkin_package(
2929
message_runtime
3030
)
3131

32+
if("$ENV{ROS_DISTRO}" STREQUAL "indigo" OR "$ENV{ROS_DISTRO}" STREQUAL "kinetic" OR
33+
"$ENV{ROS_DISTRO}" STREQUAL "melodic" OR "$ENV{ROS_DISTRO}" STREQUAL "noetic")
3234
catkin_generate_virtualenv(
3335
PYTHON_INTERPRETER python2
3436
INPUT_REQUIREMENTS requirements.in
3537
)
38+
else()
39+
execute_process(COMMAND cmake -E remove ${PROJECT_SOURCE_DIR}/requirements.txt)
40+
catkin_generate_virtualenv(
41+
PYTHON_INTERPRETER python3
42+
INPUT_REQUIREMENTS requirements.in.obase
43+
)
44+
endif()
3645

3746
file(GLOB SCRIPTS_FILES scripts/*.py)
3847
catkin_install_python(

Diff for: sound_classification/requirements.in.obase

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
chainer # For Python 2.x, chainer 5.x.x is needed, 7.0.0 will not work on Python2
2+
numpy<2.0
3+
cv_bridge

0 commit comments

Comments
 (0)