From cc27ffcc7449f7ad1fe876b279a187b92cb171f3 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Sun, 18 Apr 2021 13:33:45 +0300 Subject: [PATCH] python/CMakeLists.txt: Fix install destination --- src/python/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index cdd1856af..06d81ade9 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -11,7 +11,10 @@ if (CALL_FROM_SETUP_PY) else() # The Python package is installed directly in the folder of the # detected interpreter (system, user, or virtualenv) - set(S2GEOMETRY_INSTALL_PREFIX ${Python3_SITELIB}) + execute_process(COMMAND ${Python3_EXECUTABLE} -c + "import sys, sysconfig; print(sysconfig.get_path('platlib').replace(sys.prefix+'/','')+'/s2geometry')" + OUTPUT_VARIABLE S2GEOMETRY_INSTALL_PREFIX + OUTPUT_STRIP_TRAILING_WHITESPACE) endif() include(${SWIG_USE_FILE})