Skip to content

Commit

Permalink
Enable 24.04 CI, remove distutils dependency (#1408)
Browse files Browse the repository at this point in the history
* distutils is no longer required since this branch requires a
 new enough version of cmake.
* Remove outdated cmake code: setting python
  debug libraries is not needed as of cmake 3.12.
* Require cmake 3.22.1

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
  • Loading branch information
scpeters authored May 7, 2024
1 parent c0dbc0c commit 342e842
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 21 deletions.
1 change: 0 additions & 1 deletion .github/ci/packages.apt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ libtinyxml2-dev
liburdfdom-dev
libxml2-utils
python3-dev
python3-distutils
python3-gz-math8
python3-psutil
python3-pybind11
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ jobs:
codecov-enabled: true
cppcheck-enabled: true
cpplint-enabled: true
noble-ci:
runs-on: ubuntu-latest
name: Ubuntu Noble CI
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@noble
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)

if(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)

find_package(sdformat15 REQUIRED)

Expand Down
20 changes: 2 additions & 18 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
# pybind11 logic for setting up a debug build when both a debug and release
# python interpreter are present in the system seems to be pretty much broken.
# This works around the issue.
set(PYTHON_LIBRARIES "${PYTHON_DEBUG_LIBRARIES}")
endif()


if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION)
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c "if True:
from distutils import sysconfig as sc
print(sc.get_python_lib(plat_specific=True))"
OUTPUT_VARIABLE Python3_SITEARCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
# Get install variable from Python3 module
# Python3_SITEARCH is available from 3.12 on, workaround if needed:
if(NOT Python3_SITEARCH)
# Get variable from Python3 module
find_package(Python3 COMPONENTS Interpreter)
endif()

Expand Down

0 comments on commit 342e842

Please sign in to comment.