Ext:[skip ci] drop prefix argument from Python code to make sure the absolute path to dist-packages is used.

This allows to set CMAKE_INSTALL_PREFIX to something else than /usr and freecad as Python package is still installed into the correct directory.

For more details see: https://forum.freecadweb.org/viewtopic.php?f=4&t=67750
This commit is contained in:
wmayer
2022-04-04 18:46:25 +02:00
parent 156cf62b8a
commit 15c069a7b7

View File

@@ -1,5 +1,5 @@
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
"from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='', plat_specific=True))"
"from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True))"
OUTPUT_VARIABLE python_libs OUTPUT_STRIP_TRAILING_WHITESPACE )
SET(PYTHON_MAIN_DIR ${python_libs})