summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-08-01 13:22:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-08-01 13:22:30 (GMT)
commit6e4822a035d1af77b9a86e36cdd213c3d2fce54c (patch)
tree18c12bf20352c830c9be0fada2ed0ce6062cb9e0
parent094b98a3746ca3a352d5bf6a74dd6fc8c3d72364 (diff)
parentb02f3872d058bbb70b431c259bd589ef5e35516c (diff)
downloadCMake-6e4822a035d1af77b9a86e36cdd213c3d2fce54c.zip
CMake-6e4822a035d1af77b9a86e36cdd213c3d2fce54c.tar.gz
CMake-6e4822a035d1af77b9a86e36cdd213c3d2fce54c.tar.bz2
Merge topic 'FindPython-Debian-workaround' into release-3.27
b02f3872d0 FindPython: Restore Python_SITE* values for versions below 3.10 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8672
-rw-r--r--Modules/FindPython/Support.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 76d4a9b..f78433d 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -2197,7 +2197,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
# retrieve various package installation directories
execute_process (COMMAND ${_${_PYTHON_PREFIX}_INTERPRETER_LAUNCHER} "${_${_PYTHON_PREFIX}_EXECUTABLE}" -c
- "import sys\ntry:\n import sysconfig\n sys.stdout.write(';'.join([sysconfig.get_path('stdlib'),sysconfig.get_path('platstdlib'),sysconfig.get_path('purelib'),sysconfig.get_path('platlib')]))\nexcept Exception:\n from distutils import sysconfig\n sys.stdout.write(';'.join([sysconfig.get_python_lib(plat_specific=False,standard_lib=True),sysconfig.get_python_lib(plat_specific=True,standard_lib=True),sysconfig.get_python_lib(plat_specific=False,standard_lib=False),sysconfig.get_python_lib(plat_specific=True,standard_lib=False)]))"
+ "import sys\nif sys.version_info >= (3,10):\n import sysconfig\n sys.stdout.write(';'.join([sysconfig.get_path('stdlib'),sysconfig.get_path('platstdlib'),sysconfig.get_path('purelib'),sysconfig.get_path('platlib')]))\nelse:\n from distutils import sysconfig\n sys.stdout.write(';'.join([sysconfig.get_python_lib(plat_specific=False,standard_lib=True),sysconfig.get_python_lib(plat_specific=True,standard_lib=True),sysconfig.get_python_lib(plat_specific=False,standard_lib=False),sysconfig.get_python_lib(plat_specific=True,standard_lib=False)]))"
RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT
OUTPUT_VARIABLE _${_PYTHON_PREFIX}_LIBPATHS
ERROR_QUIET)