Skip to content

Commit

Permalink
[cython] Do not rely on ${${PYTHON}_SITEARCH}
Browse files Browse the repository at this point in the history
This was changed in CMake 3.27.0 and does not work to find the correct
path for Debian packaging purpose
  • Loading branch information
gergondet committed Jul 24, 2023
1 parent 6bf6a74 commit 47b924b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cython/cython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,13 @@ function(MAKE_CYTHON_BINDINGS PACKAGE)
set(PACKAGE_OUTPUT_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/${PYTHON}/$<CONFIG>/${PACKAGE})
if(DEFINED PYTHON_DEB_ROOT)
set(PYTHON_INSTALL_DESTINATION ${${PYTHON}_SITEARCH})
execute_process(
COMMAND
${${PYTHON}_EXECUTABLE} -c
"from distutils import sysconfig; print(sysconfig.get_python_lib(plat_specific = True, standard_lib = False))"
RESULT_VARIABLE PYTHON_INSTALL_DESTINATION_FOUND
OUTPUT_VARIABLE PYTHON_INSTALL_DESTINATION
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
execute_process(
COMMAND
Expand Down

0 comments on commit 47b924b

Please sign in to comment.