diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index fbdc0c36..116b3503 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -2,7 +2,6 @@ libeigen3-dev libgz-cmake4-dev libgz-utils3-dev libpython3-dev -python3-distutils python3-pybind11 python3-pytest ruby-dev diff --git a/src/python_pybind11/CMakeLists.txt b/src/python_pybind11/CMakeLists.txt index 935d34ac..90d1dcac 100644 --- a/src/python_pybind11/CMakeLists.txt +++ b/src/python_pybind11/CMakeLists.txt @@ -73,18 +73,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") 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: - find_package(Python3 COMPONENTS Interpreter) - endif() + # Get install variable from Python3 module + # Python3_SITEARCH is available from 3.12 on, workaround if needed: + find_package(Python3 COMPONENTS Interpreter) if(USE_DIST_PACKAGES_FOR_PYTHON) string(REPLACE "site-packages" "dist-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITEARCH})