1From abd19b721f7e9b4d514ed319ece173ebc7b1ea72 Mon Sep 17 00:00:00 2001
2From: =?utf8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
3Date: Mon, 19 Dec 2022 17:40:43 +0100
4Subject: [PATCH] python: move from distutils to sysconfig
5
6The distutils module was deprecated in Python 3.10, and will be removed
7in 3.12 [1], thus switch to the sysconfig module instead.
8
9[1] https://peps.python.org/pep-0632/
10
11Upstream: http://developer.intra2net.com/git/?p=libftdi;a=commit;h=abd19b721f7e9b4d514ed319ece173ebc7b1ea72
12Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
13Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
14---
15 python/CMakeLists.txt |    2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
19index 5e406ff..9358419 100644
20--- a/python/CMakeLists.txt
21+++ b/python/CMakeLists.txt
22@@ -42,7 +42,7 @@ endif ()
23
24 set_target_properties ( ${SWIG_MODULE_ftdi1_REAL_NAME} PROPERTIES NO_SONAME ON )
25
26-execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print( sysconfig.get_python_lib( plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}' ) )"
27+execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "import sysconfig; print( sysconfig.get_path( 'platlib', vars={'platbase': '${CMAKE_INSTALL_PREFIX}'} ) )"
28                   OUTPUT_VARIABLE _ABS_PYTHON_MODULE_PATH
29                   OUTPUT_STRIP_TRAILING_WHITESPACE )
30
31--
321.7.1
33
34