Skip to content

Commit

Permalink
Stop using python_cmake_module. (#760)
Browse files Browse the repository at this point in the history
We really don't need it anymore, and can just use the
builtin find_package(Python3).

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Oct 3, 2024
1 parent f3e9cfe commit 00c6fbf
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
4 changes: 0 additions & 4 deletions launch_testing_ament_cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ if(BUILD_TESTING)
message(FATAL_ERROR "launch_testing package not found")
endif()

# Provides PYTHON_EXECUTABLE_DEBUG
find_package(python_cmake_module REQUIRED)
find_package(PythonExtra REQUIRED)

# Test argument passing. This test won't pass unless you give it an argument
add_launch_test(
"${LAUNCH_TESTING_INSTALL_PREFIX}/share/launch_testing/examples/args_launch_test.py"
Expand Down
7 changes: 1 addition & 6 deletions launch_testing_ament_cmake/cmake/add_launch_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ macro(parse_launch_test_arguments namespace filename)
endif()

if(NOT ${namespace}_PYTHON_EXECUTABLE)
set(${namespace}_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
if(WIN32)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(${namespace}_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE_DEBUG}")
endif()
endif()
set(${namespace}_PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
endif()

set(${namespace}_FILE_NAME NOTFOUND)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@
# limitations under the License.

find_package(ament_cmake_test REQUIRED)
# Provides PYTHON_EXECUTABLE_DEBUG
find_package(python_cmake_module REQUIRED)
find_package(PythonExtra REQUIRED)

include("${launch_testing_ament_cmake_DIR}/add_launch_test.cmake")
2 changes: 0 additions & 2 deletions launch_testing_ament_cmake/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
<buildtool_depend>ament_cmake</buildtool_depend>

<buildtool_export_depend>ament_cmake_test</buildtool_export_depend>
<buildtool_export_depend>python_cmake_module</buildtool_export_depend>
<buildtool_export_depend>launch_testing</buildtool_export_depend>

<test_depend>ament_cmake_copyright</test_depend>
<test_depend>launch_testing</test_depend>
<test_depend>python_cmake_module</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down

0 comments on commit 00c6fbf

Please sign in to comment.