From 9443d8a7ceb9930fbb8e40120ef5b00a1a13e0c9 Mon Sep 17 00:00:00 2001 From: daizhirui Date: Fri, 16 Aug 2024 13:17:32 -0700 Subject: [PATCH 1/2] Update CMakeLists.txt site-packages is used when building this package with ROS activated. Change `dist-packages` to `site-packages` for `PYTHON_SITE_PACKAGES_INSTALL_DIR`. --- python_orocos_kdl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_orocos_kdl/CMakeLists.txt b/python_orocos_kdl/CMakeLists.txt index e0bc2f2a6..bda6d5047 100644 --- a/python_orocos_kdl/CMakeLists.txt +++ b/python_orocos_kdl/CMakeLists.txt @@ -28,7 +28,7 @@ set(PYBIND11_PYTHON_VERSION ${PYTHON_VERSION} CACHE STRING "Python version used find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development REQUIRED) # get_python_lib in python3 produces path which isn't in sys.path: https://bugs.launchpad.net/ubuntu/+source/python3-stdlib-extensions/+bug/1832215 # execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True, prefix=''))" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) -set(PYTHON_SITE_PACKAGES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages" CACHE STRING "Install location of the python package") # This might be overridden below if built with catkin. +set(PYTHON_SITE_PACKAGES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages" CACHE STRING "Install location of the python package") # This might be overridden below if built with catkin. set(LIBRARY_NAME "PyKDL") # catkin-specific configuration (optional) From 2c64c1072825327877ab04ecee565c7a48976494 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Wed, 23 Apr 2025 11:32:00 +0200 Subject: [PATCH 2/2] (actions) also update to site-packages here --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5b339b439..a2e99bef3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,7 +79,7 @@ jobs: run: | cd python_orocos_kdl python_version_short=$(python -c "import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))") - export PYTHONPATH=/usr/local/lib/python${python_version_short}/dist-packages${PYTHONPATH:+:${PYTHONPATH}} + export PYTHONPATH=/usr/local/lib/python${python_version_short}/site-packages${PYTHONPATH:+:${PYTHONPATH}} python tests/PyKDLtest.py industrial_ci: