obexftp-0.24-python_sitedir.patch 544 B

1234567891011121314151617
  1. --- a/swig/python/CMakeLists.txt
  2. +++ b/swig/python/CMakeLists.txt
  3. @@ -40,11 +40,13 @@
  4. OUTPUT_VARIABLE PYTHON_PREFIX
  5. )
  6. file ( TO_CMAKE_PATH "${PYTHON_PREFIX}" PYTHON_PREFIX )
  7. +if ( NOT PYTHON_SITE_DIR )
  8. execute_process (
  9. COMMAND ${PYTHON_EXECUTABLE} -c
  10. "import site, sys; sys.stdout.write(site.getsitepackages()[-1])"
  11. OUTPUT_VARIABLE PYTHON_SITE_DIR
  12. )
  13. +endif ( PYTHON_SITE_DIR )
  14. file ( TO_CMAKE_PATH "${PYTHON_SITE_DIR}" PYTHON_SITE_DIR )
  15. string ( REGEX REPLACE "^${PYTHON_PREFIX}/" ""
  16. PYTHON_SITE_DIR "${PYTHON_SITE_DIR}"