Skip to content

Commit

Permalink
do not create a python package
Browse files Browse the repository at this point in the history
... where there is no package.
Only a script was installed from the setup.py
but catkin provides a separate command for that
http://docs.ros.org/en/jade/api/catkin/html/howto/format2/installing_python.html

I retained the installation to the global path. It is unusual to do
that, but it has been like that for a long time.

This started failing with recent setuptools with the following error
message:

---
error: Multiple top-level packages discovered in a flat-layout: ['debian', 'config', 'launch'].

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.
---
  • Loading branch information
v4hn committed Nov 5, 2024
1 parent d3edd9b commit 11f8df9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
8 changes: 6 additions & 2 deletions fetch_calibration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.0.2)
project(fetch_calibration)

find_package(catkin)
catkin_python_setup()
catkin_package()

install(DIRECTORY config
Expand All @@ -13,7 +12,12 @@ install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

install(
catkin_install_python(
PROGRAMS scripts/camera_reconfigure.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

catkin_install_python(
PROGRAMS scripts/calibrate_robot
DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
2 changes: 0 additions & 2 deletions fetch_calibration/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
<url type="repository">https://github.com/fetchrobotics/fetch_ros</url>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend condition="$ROS_PYTHON_VERSION == 2">python-setuptools</buildtool_depend>
<buildtool_depend condition="$ROS_PYTHON_VERSION == 3">python3-setuptools</buildtool_depend>

<exec_depend version_gte="0.5.1">robot_calibration</exec_depend>
</package>
10 changes: 0 additions & 10 deletions fetch_calibration/setup.py

This file was deleted.

0 comments on commit 11f8df9

Please sign in to comment.