Skip to content

Commit cc27ffc

Browse files
committed
python/CMakeLists.txt: Fix install destination
1 parent bd26b76 commit cc27ffc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/python/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ if (CALL_FROM_SETUP_PY)
1111
else()
1212
# The Python package is installed directly in the folder of the
1313
# detected interpreter (system, user, or virtualenv)
14-
set(S2GEOMETRY_INSTALL_PREFIX ${Python3_SITELIB})
14+
execute_process(COMMAND ${Python3_EXECUTABLE} -c
15+
"import sys, sysconfig; print(sysconfig.get_path('platlib').replace(sys.prefix+'/','')+'/s2geometry')"
16+
OUTPUT_VARIABLE S2GEOMETRY_INSTALL_PREFIX
17+
OUTPUT_STRIP_TRAILING_WHITESPACE)
1518
endif()
1619

1720
include(${SWIG_USE_FILE})

0 commit comments

Comments
 (0)