FindPython: Expose PYTHON_SITE(ARCH|LIB) variables
It will be big benefit to users if we will add support for getting such directories in FindPythonLibs.cmake
For example, for PYTHON_SITEARCH
we can use following code:
execute_process(
COMMAND
${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')"
OUTPUT_VARIABLE
PYTHON_SITEARCH
)
for PYTHON_SITELIB
it's needed to remove True
from code above. I tried to write patch but it was too complicated. Hope my code here helps.