diff -urN libftdi1-1.5/python/CMakeLists.txt.orig libftdi1-1.5/python/CMakeLists.txt
--- libftdi1-1.5/python/CMakeLists.txt.orig	2020-07-07 21:32:55.000000000 +0200
+++ libftdi1-1.5/python/CMakeLists.txt	2024-11-04 19:33:40.333609200 +0100
@@ -42,7 +42,19 @@
 
 set_target_properties ( ${SWIG_MODULE_ftdi1_REAL_NAME} PROPERTIES NO_SONAME ON )
 
-execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print( sysconfig.get_python_lib( plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}' ) )"
+execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "
+import sys
+import sysconfig
+import os
+
+platlib = sysconfig.get_path('platlib')
+prefix = sys.prefix
+
+if platlib.startswith(prefix):
+    print(os.path.join('${CMAKE_INSTALL_PREFIX}', platlib[len(prefix):].lstrip(os.sep)))
+else:
+    print(os.path.join('${CMAKE_INSTALL_PREFIX}', platlib))
+"
                   OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH
                   OUTPUT_STRIP_TRAILING_WHITESPACE )
 
