From 79eab23e07426cbc6a206c372bd0e00eb0673c3d899a997328bcfe7e3dfb95ae Mon Sep 17 00:00:00 2001 From: Simon Lees Date: Fri, 5 Jan 2018 00:49:45 +0000 Subject: [PATCH] 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 --- cmake.changes | 7 +++++++ cmake.spec | 7 +++---- feature-suse-python-interp-search-order.patch | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 feature-suse-python-interp-search-order.patch diff --git a/cmake.changes b/cmake.changes index 5648838..173b192 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 4 11:42:59 UTC 2018 - sflees@suse.de + +- Add feature-suse-python-interp-search-order.patch to make sure + that python3 is found before python2 +- switch to using %autopatch + ------------------------------------------------------------------- Thu Jan 4 11:09:29 UTC 2018 - tchvatal@suse.com diff --git a/cmake.spec b/cmake.spec index 80ab649..ebfdcd6 100644 --- a/cmake.spec +++ b/cmake.spec @@ -38,6 +38,8 @@ Patch4: form.patch # PATCH-FIX-UPSTREAM system-libs.patch -- allow choosing between bundled and system jsoncpp & form libs Patch5: system-libs.patch Patch6: cmake-3.10.1_boost-1.66.patch +# Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice +Patch7: feature-suse-python-interp-search-order.patch %if 0%{?suse_version} >= 1330 BuildRequires: libcurl-mini-devel %else @@ -79,10 +81,7 @@ CMake is a cross-platform, open-source build system # Verify hashes in that file against source tarball. echo "`grep %{name}-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOURCE0}" | sha256sum -c %setup -q -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 +%autopatch -p1 %build export CFLAGS="%{optflags}" diff --git a/feature-suse-python-interp-search-order.patch b/feature-suse-python-interp-search-order.patch new file mode 100644 index 0000000..4c3d291 --- /dev/null +++ b/feature-suse-python-interp-search-order.patch @@ -0,0 +1,16 @@ +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)