This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
     new 70ace03  PROTON-2323 Propagate requested version 3.6 from FindPython 
to FindPythonInterp (#313)
70ace03 is described below

commit 70ace037684f39c2d68681ef32302d38a9e06fac
Author: Jiri Daněk <jda...@redhat.com>
AuthorDate: Thu May 20 16:40:21 2021 +0200

    PROTON-2323 Propagate requested version 3.6 from FindPython to 
FindPythonInterp (#313)
---
 .travis.yml                          | 8 ++++++++
 CMakeLists.txt                       | 2 +-
 tools/cmake/Modules/FindPython.cmake | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 2988e0a..c9681e0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -158,6 +158,14 @@ before_install:
   # 
https://travis-ci.community/t/clang-10-was-recently-broken-on-linux-unmet-dependencies-for-clang-10-clang-tidy-10-valgrind/11527
   - if [[ "${TRAVIS_DIST}" == "focal" ]]; then sudo apt-get install -yq 
--allow-downgrades libc6=2.31-0ubuntu9.2 libc6-dev=2.31-0ubuntu9.2; fi
   - if [[ "${TRAVIS_DIST}" == "focal" ]]; then sudo -E apt-get -yq 
--no-install-suggests --no-install-recommends --allow-downgrades 
--allow-remove-essential --allow-change-held-packages install valgrind -o 
Debug::pkgProblemResolver=yes; fi
+  # install Python 3.6.8; Travis has a mechanism for this, but that would 
activate it in a venv, which older CMake does not deal well with
+  - if [[ "${TRAVIS_DIST}" == "xenial" ]]; then curl -sSf --retry 5 -o 
python-3.6.8.tar.bz2 
https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/16.04/x86_64/python-3.6.8.tar.bz2;
 fi
+  - if [[ "${TRAVIS_DIST}" == "xenial" ]]; then sudo tar xjf 
python-3.6.8.tar.bz2 --directory /; fi
+  - if [[ "${TRAVIS_DIST}" == "xenial" ]]; then 
PATH="/opt/python/3.6.8/bin:${PATH}"; fi
+  # same thing for bionic
+  - if [[ "${TRAVIS_DIST}" == "bionic" ]]; then curl -sSf --retry 5 -o 
python-3.6.8.tar.bz2 
https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/18.04/x86_64/python-3.6.8.tar.bz2;
 fi
+  - if [[ "${TRAVIS_DIST}" == "bionic" ]]; then sudo tar xjf 
python-3.6.8.tar.bz2 --directory /; fi
+  - if [[ "${TRAVIS_DIST}" == "bionic" ]]; then 
PATH="/opt/python/3.6.8/bin:${PATH}"; fi
 
 install:
 - echo "Using PYTHON=${PYTHON:=python}"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6ad7f9b..3d9bee8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,7 +42,7 @@ endif ()
 if (NOT DEFINED Python_FIND_FRAMEWORK)
   set(Python_FIND_FRAMEWORK "LAST")
 endif ()
-find_package(Python
+find_package(Python 3.6
         REQUIRED COMPONENTS Interpreter
         OPTIONAL_COMPONENTS Development)
 
diff --git a/tools/cmake/Modules/FindPython.cmake 
b/tools/cmake/Modules/FindPython.cmake
index fc8d1af..9a79e79 100644
--- a/tools/cmake/Modules/FindPython.cmake
+++ b/tools/cmake/Modules/FindPython.cmake
@@ -35,7 +35,7 @@ if (CMAKE_VERSION VERSION_LESS "3.15.0")
         set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
     endif ()
 
-    find_package (PythonInterp REQUIRED)
+    find_package (PythonInterp ${Python_FIND_VERSION} REQUIRED)
     # forward compatibility with FindPython
     set(Python_VERSION_STRING "${PYTHON_VERSION_STRING}")
     set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to