SHA256
3
0
forked from pool/cmake
cmake/feature-suse-python-interp-search-order.patch
Dirk Mueller 9dc6932a6b Accepting request 1197687 from home:mathletic:branches:devel:tools:building
- update to 3.30.3:
  * file(DOWNLOAD): Fix User-Agent to use run-time curl version
  * curl: Avoid using HTTP/2 with curl 8.7.x due to bug in error
    codes
  * FindPython: fix regression of NumPy detection with Intel MKL
    library
  * FindPython: ensure a usable environment is set for the free
    threaded Python
  * project: non cache <project> prefix variables are created
  * FindJNI: Support finding libjvm.so for all OpenJDK variants
- Remove cmake-zerojvm.patch which is part of upstream

OBS-URL: https://build.opensuse.org/request/show/1197687
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=602
2024-08-31 09:20:12 +00:00

17 lines
779 B
Diff

Index: cmake-3.27.7/Modules/FindPythonInterp.cmake
===================================================================
--- cmake-3.27.7.orig/Modules/FindPythonInterp.cmake
+++ cmake-3.27.7/Modules/FindPythonInterp.cmake
@@ -105,8 +105,9 @@ if(DEFINED PYTHONLIBS_VERSION_STRING)
list(GET _PYTHONLIBS_VERSION 1 _PYTHONLIBS_VERSION_MINOR)
list(APPEND _Python_VERSIONS ${_PYTHONLIBS_VERSION_MAJOR}.${_PYTHONLIBS_VERSION_MINOR})
endif()
-# Search for the current active python version first
-list(APPEND _Python_VERSIONS ";")
+
+# Search python versions from newest to oldest as python3 is the default and
+# /usr/bin/python doesn't mean the systemd on SUSE / openSUSE systems
list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS})
unset(_PYTHON_FIND_OTHER_VERSIONS)