From 03730a09f87aa03329b8a6463d6c2d65e94bde33 Mon Sep 17 00:00:00 2001
From: Shun Hasegawa <pazeshun3684@gmail.com>
Date: Thu, 12 Dec 2024 16:48:11 +0900
Subject: [PATCH] [jsk_panda_teleop] Fix catkin_install_python usage

The same fixes as https://github.com/jsk-ros-pkg/jsk_recognition/pull/2851 and https://github.com/jsk-ros-pkg/jsk_recognition/pull/2859
---
 jsk_panda_robot/jsk_panda_teleop/CMakeLists.txt | 6 +-----
 jsk_panda_robot/jsk_panda_teleop/setup.py       | 8 --------
 2 files changed, 1 insertion(+), 13 deletions(-)
 delete mode 100644 jsk_panda_robot/jsk_panda_teleop/setup.py

diff --git a/jsk_panda_robot/jsk_panda_teleop/CMakeLists.txt b/jsk_panda_robot/jsk_panda_teleop/CMakeLists.txt
index a378fe14ab..5899446c2a 100644
--- a/jsk_panda_robot/jsk_panda_teleop/CMakeLists.txt
+++ b/jsk_panda_robot/jsk_panda_teleop/CMakeLists.txt
@@ -6,10 +6,6 @@ find_package(catkin REQUIRED
   message_generation
   )
 
-if(NOT $ENV{ROS_DISTRO} STREQUAL "indigo") # on noetic it needs catkin_install_python to support Python3 and it does not work on indigo for some reason...
-  catkin_python_setup()
-endif()
-
 add_service_files(
   FILES
   ControlBilateral.srv
@@ -23,7 +19,7 @@ install(DIRECTORY config launch script
   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
   USE_SOURCE_PERMISSIONS
   )
-if(NOT $ENV{ROS_DISTRO} STREQUAL "indigo") # on noetic it needs catkin_install_python to support Python3 and it does not work on indigo for some reason...
+if($ENV{ROS_DISTRO} STREQUAL "indigo") # on noetic it needs catkin_install_python to support Python3 and it does not work on indigo for some reason...
   install(DIRECTORY python
     DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
     USE_SOURCE_PERMISSIONS
diff --git a/jsk_panda_robot/jsk_panda_teleop/setup.py b/jsk_panda_robot/jsk_panda_teleop/setup.py
deleted file mode 100644
index 66f43a495a..0000000000
--- a/jsk_panda_robot/jsk_panda_teleop/setup.py
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env python
-
-from setuptools import setup
-from catkin_pkg.python_setup import generate_distutils_setup
-
-d = generate_distutils_setup()
-
-setup(**d)