cmake/feature-suse-python-interp-search-order.patch
Simon Lees 79eab23e07 Accepting request 561776 from home:simotek:branches:devel:tools
- Add feature-suse-python-interp-search-order.patch to make sure 
  that python3 is found before python2
- switch to using %autopatch

OBS-URL: https://build.opensuse.org/request/show/561776
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=310
2018-01-05 00:49:45 +00:00

17 lines
777 B
Diff

Index: cmake-3.10.1/Modules/FindPythonInterp.cmake
===================================================================
--- cmake-3.10.1.orig/Modules/FindPythonInterp.cmake
+++ cmake-3.10.1/Modules/FindPythonInterp.cmake
@@ -78,8 +78,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)