1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 03:30:33 +00:00

Revert "cmake: Use standard way of getting python prefix"

This reverts commit f6311abc87.
This commit is contained in:
Carles Fernandez 2019-11-30 21:14:12 +01:00
parent ea79155ebd
commit 80fbeb4fe5
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -115,11 +115,15 @@ endif()
# Sets the python installation directory VOLK_PYTHON_DIR
########################################################################
if(NOT DEFINED VOLK_PYTHON_DIR)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
from distutils import sysconfig
print(sysconfig.get_python_lib(plat_specific=True, prefix=''))
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
import os
import sys
if os.name == 'posix':
print(os.path.join('lib', 'python' + sys.version[:3], 'dist-packages'))
if os.name == 'nt':
print(os.path.join('Lib', 'site-packages'))
" OUTPUT_VARIABLE VOLK_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
)
)
endif()
file(TO_CMAKE_PATH ${VOLK_PYTHON_DIR} VOLK_PYTHON_DIR)