mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Fix installation of volk_gnsssdr python files if Python >= 3.10
This commit is contained in:
parent
f71b7c9a67
commit
e48389e306
@ -112,7 +112,18 @@ endif()
|
|||||||
# Sets the python installation directory VOLK_PYTHON_DIR
|
# Sets the python installation directory VOLK_PYTHON_DIR
|
||||||
########################################################################
|
########################################################################
|
||||||
if(NOT DEFINED VOLK_PYTHON_DIR)
|
if(NOT DEFINED VOLK_PYTHON_DIR)
|
||||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
|
if(PYTHON_VERSION_STRING VERSION_GREATER "3.9.99")
|
||||||
|
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
if os.name == 'posix':
|
||||||
|
print(os.path.join('lib', 'python' + sys.version[:4], 'dist-packages'))
|
||||||
|
if os.name == 'nt':
|
||||||
|
print(os.path.join('Lib', 'site-packages'))
|
||||||
|
" OUTPUT_VARIABLE VOLK_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
if os.name == 'posix':
|
if os.name == 'posix':
|
||||||
@ -120,7 +131,8 @@ if os.name == 'posix':
|
|||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
print(os.path.join('Lib', 'site-packages'))
|
print(os.path.join('Lib', 'site-packages'))
|
||||||
" OUTPUT_VARIABLE VOLK_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
|
" OUTPUT_VARIABLE VOLK_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
file(TO_CMAKE_PATH ${VOLK_PYTHON_DIR} VOLK_PYTHON_DIR)
|
file(TO_CMAKE_PATH ${VOLK_PYTHON_DIR} VOLK_PYTHON_DIR)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user