Skip to content

Commit

Permalink
Stop using python_cmake_module. (#304)
Browse files Browse the repository at this point in the history
* Stop using python_cmake_module.

We really don't need it anymore, and can just use the
builtin find_package(Python3).

* Add buildtool dependency on ament_cmake_python.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Oct 3, 2024
1 parent f8faa8a commit 51020f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions rqt_py_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ if(BUILD_TESTING)

find_package(rosidl_default_generators REQUIRED)
find_package(ament_cmake_pytest REQUIRED)
# Provides PYTHON_EXECUTABLE_DEBUG
find_package(python_cmake_module REQUIRED)
find_package(PythonExtra MODULE)

if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
set(${PROJECT_NAME}_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE_DEBUG}")
else()
set(${PROJECT_NAME}_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
endif()

# use different project name for generated test interfaces in order to make
# them importable in the tests beside the Python module of this package
Expand All @@ -52,8 +43,8 @@ if(BUILD_TESTING)
ament_add_pytest_test(${PROJECT_NAME} test
ENV "AMENT_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}/ament_index"
APPEND_ENV PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_py
TIMEOUT 90,
PYTHON_EXECUTABLE "${${PROJECT_NAME}_PYTHON_EXECUTABLE}")
TIMEOUT 90
)
endif()

ament_package()
2 changes: 1 addition & 1 deletion rqt_py_common/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<author>Isaac Saito</author>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_python</buildtool_depend>

<depend>qtbase5-dev</depend>
<depend>rclpy</depend>
Expand All @@ -33,7 +34,6 @@
<test_depend>ament_cmake_pytest</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<test_depend>python_cmake_module</test_depend>
<test_depend>rosidl_default_generators</test_depend>
<test_depend>rosidl_default_runtime</test_depend>

Expand Down

0 comments on commit 51020f1

Please sign in to comment.