diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
commit | 80d90d9b204f7c17912740f9f414fe5d59f293ba (patch) | |
tree | 5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/development/python-modules/ifcopenshell/site-packages.patch | |
parent | 3a31a84c7d3e589035ad08499206aac44a81f424 (diff) | |
parent | 83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff) |
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/ifcopenshell/site-packages.patch')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/python-modules/ifcopenshell/site-packages.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/ifcopenshell/site-packages.patch b/infra/libkookie/nixpkgs/pkgs/development/python-modules/ifcopenshell/site-packages.patch new file mode 100644 index 000000000000..e61fe2056f7b --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/ifcopenshell/site-packages.patch @@ -0,0 +1,32 @@ +--- a/src/ifcwrap/CMakeLists.txt ++++ b/src/ifcwrap/CMakeLists.txt +@@ -68,26 +68,17 @@ endif() + # directory in which the wrapper can be installed. + FIND_PACKAGE(PythonInterp) + IF(PYTHONINTERP_FOUND AND NOT "${PYTHON_EXECUTABLE}" STREQUAL "") +- EXECUTE_PROCESS( +- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import get_python_lib; sys.stdout.write(get_python_lib(1))" +- OUTPUT_VARIABLE python_package_dir +- ) +- +- IF("${python_package_dir}" STREQUAL "") +- MESSAGE(WARNING "Unable to locate Python site-package directory, unable to install the Python wrapper") +- ELSE() + FILE(GLOB_RECURSE sourcefiles "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/*.py") + FOREACH(file ${sourcefiles}) + FILE(RELATIVE_PATH relative "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/" "${file}") + GET_FILENAME_COMPONENT(dir "${relative}" DIRECTORY) + INSTALL(FILES "${file}" +- DESTINATION "${python_package_dir}/ifcopenshell/${dir}") ++ DESTINATION "@site_packages@/ifcopenshell/${dir}") + ENDFOREACH() + INSTALL(FILES "${CMAKE_BINARY_DIR}/ifcwrap/ifcopenshell_wrapper.py" +- DESTINATION "${python_package_dir}/ifcopenshell") ++ DESTINATION "@site_packages@/ifcopenshell") + INSTALL(TARGETS _ifcopenshell_wrapper +- DESTINATION "${python_package_dir}/ifcopenshell") +- ENDIF() ++ DESTINATION "@site_packages@/ifcopenshell") + ELSE() + MESSAGE(WARNING "No Python interpreter found, unable to install the Python wrapper") + ENDIF() |