25 lines
941 B
Diff
25 lines
941 B
Diff
diff -urN fontforge-20230101/pyhook/CMakeLists.txt.orig fontforge-20230101/pyhook/CMakeLists.txt
|
|
--- fontforge-20230101/pyhook/CMakeLists.txt.orig 2023-01-01 06:25:39.000000000 +0100
|
|
+++ fontforge-20230101/pyhook/CMakeLists.txt 2024-11-04 18:45:57.371407500 +0100
|
|
@@ -21,7 +21,19 @@
|
|
# So do it ourselves, getting the prefix-relative path instead
|
|
if(NOT DEFINED PYHOOK_INSTALL_DIR)
|
|
execute_process(
|
|
- COMMAND "${Python3_EXECUTABLE}" -c "import distutils.sysconfig as sc; print(sc.get_python_lib(prefix='', plat_specific=True,standard_lib=False))"
|
|
+ COMMAND "${Python3_EXECUTABLE}" -c "
|
|
+import sys
|
|
+import sysconfig
|
|
+import os
|
|
+
|
|
+platlib = sysconfig.get_path('platlib')
|
|
+prefix = sys.prefix
|
|
+
|
|
+if platlib.startswith(prefix):
|
|
+ print(platlib[len(prefix):].lstrip(os.sep))
|
|
+else:
|
|
+ print(platlib)
|
|
+"
|
|
RESULT_VARIABLE _pyhook_install_dir_result
|
|
OUTPUT_VARIABLE PYHOOK_INSTALL_DIR
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|