From 93a9871fb521c95178ecbaf50566cefb64b544fe Mon Sep 17 00:00:00 2001 From: v4hn Date: Mon, 11 Nov 2024 15:13:36 +0100 Subject: [PATCH] Fixup 6ac62fef5caba52cbfa71c093b242a1f0b5a1b88 Drop unused catkin_python_setup(). The call and setup.py are only required when defining python modules, but jsk_recognition_msgs does not expose a python package (aside from the autogenerated package for the messages). This got noticed because Debian's python setuptools complains about missing package list in setup.py: --- error: Multiple top-level packages discovered in a flat-layout: ['srv', 'msg', 'debian', 'action', 'sample']. To avoid accidental inclusion of unwanted files or directories, setuptools will not proceed with this build. If you are trying to create a single distribution with multiple packages on purpose, you should not rely on automatic discovery. Instead, consider the following options: 1. set up custom discovery (`find` directive with `include` or `exclude`) 2. use a `src-layout` 3. explicitly set `py_modules` or `packages` with a list of names To find more information, look for "package discovery" on setuptools docs. CMake Error at catkin_generated/safe_execute_install.cmake:4 (message): execute_process(/<>package/.obj-x86_64-linux-gnu/catkin_generated/python_distutils_install.sh) returned error code Call Stack (most recent call first): cmake_install.cmake:46 (include) --- --- jsk_recognition_msgs/CMakeLists.txt | 3 --- jsk_recognition_msgs/setup.py | 17 ----------------- 2 files changed, 20 deletions(-) delete mode 100644 jsk_recognition_msgs/setup.py diff --git a/jsk_recognition_msgs/CMakeLists.txt b/jsk_recognition_msgs/CMakeLists.txt index 86e6164943..1fba71e003 100644 --- a/jsk_recognition_msgs/CMakeLists.txt +++ b/jsk_recognition_msgs/CMakeLists.txt @@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 2.8.3) project(jsk_recognition_msgs) find_package(catkin REQUIRED std_msgs sensor_msgs geometry_msgs message_generation pcl_msgs jsk_footstep_msgs) -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_message_files( FILES Accuracy.msg diff --git a/jsk_recognition_msgs/setup.py b/jsk_recognition_msgs/setup.py deleted file mode 100644 index 90f8d8be68..0000000000 --- a/jsk_recognition_msgs/setup.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python - -from setuptools import setup - -from setuptools import find_packages -from catkin_pkg.python_setup import generate_distutils_setup - -d = generate_distutils_setup( - # Uncomment until src/jsk_recognition_msgs - # error: package directory 'jsk_recognition_msgs' does not exist - # [jsk_recognition_msgs:install] - # packages=['jsk_recognition_msgs'], - # [jsk_recognition_msgs:install] error: package directory 'src/jsk_recognition_msgs' does not exist - # package_dir={'': 'src'}, -) - -setup(**d)