From 9f677bf3c673c6c4c46faeaab2373e8fd3820012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Sture?= Date: Tue, 2 Jan 2024 18:25:35 +0100 Subject: [PATCH] Install the Python libs to system site-packages instead of root (#2274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Occurs when using USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION flag. Signed-off-by: Øystein Sture --- python/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 6caede67ec..3069e98752 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -22,6 +22,9 @@ if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION) if(USE_DIST_PACKAGES_FOR_PYTHON) string(REPLACE "site-packages" "dist-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITEARCH}) + else() + # custom cmake command is returning dist-packages + string(REPLACE "dist-packages" "site-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITEARCH}) endif() else() # If not a system installation, respect local paths