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 26, 2024
1 parent 81410e4 commit a5f2969
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 28 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()
file(REMOVE 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
35 changes: 7 additions & 28 deletions sound_classification/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,10 @@
backports.functools-lru-cache==1.6.4 # via matplotlib
chainer==6.7.0 # via -r requirements.in
cloudpickle==1.3.0 # via scikit-image
cycler==0.10.0 # via matplotlib
decorator==4.4.2 # via networkx
enum34==1.1.10 # via imageio
filelock==3.2.1 # via chainer
futures==3.3.0 # via imageio
imageio==2.6.0 # via -r requirements.in, imgaug
imgaug==0.4.0 # via -r requirements.in
kiwisolver==1.1.0 # via matplotlib
matplotlib==2.2.5 # via imgaug, scikit-image
networkx==2.2 # via scikit-image
numpy==1.16.6 # via chainer, imageio, imgaug, matplotlib, opencv-python, pywavelets, scipy
opencv-python==4.2.0.32 # via -r requirements.in, imgaug
pillow==6.2.2 # via imageio, imgaug, scikit-image
protobuf==3.17.3 # via chainer
pyparsing==2.4.7 # via matplotlib
python-dateutil==2.8.2 # via matplotlib
pytz==2021.3 # via matplotlib
pywavelets==1.0.3 # via scikit-image
scikit-image==0.14.5 # via imgaug
scipy==1.2.3 # via imgaug, scikit-image
shapely==1.7.1 # via imgaug
six==1.16.0 # via chainer, cycler, imgaug, matplotlib, protobuf, python-dateutil, scikit-image
subprocess32==3.5.4 # via matplotlib
typing-extensions==3.6.6 # via chainer
typing==3.6.6 # via chainer, typing-extensions
chainer==7.8.1 # via -r requirements.in.obase
cv-bridge==1.13.0.post0 # via -r requirements.in.obase
filelock==3.16.1 # via chainer
numpy==1.26.4 # via -r requirements.in.obase, chainer
protobuf==5.29.2 # via chainer
six==1.17.0 # via chainer
typing-extensions==4.12.2 # via chainer

# The following packages are considered to be unsafe in a requirements file:
# setuptools

0 comments on commit a5f2969

Please sign in to comment.