diff options
author | Timo Dritschler <timo.dritschler@kit.edu> | 2019-11-28 12:50:01 +0100 |
---|---|---|
committer | Timo Dritschler <timo.dritschler@kit.edu> | 2019-11-28 12:50:01 +0100 |
commit | fb482cd0459e3d52694b14f2b13ca06dbc36c512 (patch) | |
tree | 1aa9b22e136b22952c871a0df3451b34a6ca3361 | |
parent | ca020f15da6fbd11bef2f00c3d5736c7b772ecca (diff) | |
download | pcitool-fb482cd0459e3d52694b14f2b13ca06dbc36c512.tar.gz pcitool-fb482cd0459e3d52694b14f2b13ca06dbc36c512.tar.bz2 pcitool-fb482cd0459e3d52694b14f2b13ca06dbc36c512.tar.xz pcitool-fb482cd0459e3d52694b14f2b13ca06dbc36c512.zip |
Made CMake inline scrip Python 3 compliant
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e259bd..4d5680f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,7 +81,7 @@ if (NOT DISABLE_PYTHON) # file (TO_CMAKE_PATH "${PYTHON_SITE_DIR}" PYTHON_SITE_DIR) # string (REGEX REPLACE "^${PYTHON_PREFIX}/" "${CMAKE_INSTALL_PREFIX}/" PYTHON_SITE_DIR "${PYTHON_SITE_DIR}") - execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "import site; list = [dir for dir in site.getsitepackages() if dir.startswith('${CMAKE_INSTALL_PREFIX}')]; liblist = [dir for dir in list if dir.startswith('${CMAKE_INSTALL_PREFIX}/lib')]; print liblist[0] if liblist else list[0] if list else site.getsitepackages()[0]" OUTPUT_VARIABLE PYTHON_SITE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "import site; list = [dir for dir in site.getsitepackages() if dir.startswith('${CMAKE_INSTALL_PREFIX}')]; liblist = [dir for dir in list if dir.startswith('${CMAKE_INSTALL_PREFIX}/lib')]; print (liblist[0] if liblist else list[0] if list else site.getsitepackages()[0])" OUTPUT_VARIABLE PYTHON_SITE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) message(${PYTHON_SITE_DIR}) file (TO_CMAKE_PATH "${PYTHON_SITE_DIR}" PYTHON_SITE_DIR) |