From 928006ae4247def431bb8be1d70f9a2dffb7f8e3 Mon Sep 17 00:00:00 2001 From: David King Date: Jun 21 2021 16:28:51 +0000 Subject: Rebuilt for Python 3.10 (#1898060) --- diff --git a/libproxy-0.4.17-fix-python-version-check.patch b/libproxy-0.4.17-fix-python-version-check.patch new file mode 100644 index 0000000..e4affb0 --- /dev/null +++ b/libproxy-0.4.17-fix-python-version-check.patch @@ -0,0 +1,61 @@ +From 04eeeabb42436cb58e9bac2f6c31c0fb87905a72 Mon Sep 17 00:00:00 2001 +From: David King +Date: Mon, 21 Jun 2021 17:10:43 +0100 +Subject: [PATCH] python: Support Python 3.10 and above +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +As suggested by Miro HronĨok, change the way that the Python interpreter +version is found. Additionally, update the static list of accepted +Python 3 versions. + +https://bugzilla.redhat.com/show_bug.cgi?id=1898060 +--- + bindings/python/python2/CMakeLists.txt | 2 +- + bindings/python/python3/CMakeLists.txt | 2 +- + cmake/FindPython3Interp.cmake | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/bindings/python/python2/CMakeLists.txt b/bindings/python/python2/CMakeLists.txt +index 00df551..f4d2b91 100644 +--- a/bindings/python/python2/CMakeLists.txt ++++ b/bindings/python/python2/CMakeLists.txt +@@ -6,7 +6,7 @@ if(PYTHON2INTERP_FOUND) + if(NOT PYTHON2_SITEPKG_DIR) + execute_process(COMMAND + ${PYTHON2_EXECUTABLE} +- -c "import sys; print (sys.version[0:3])" ++ -c "import sys; print('{}.{}'.format(*sys.version_info[0:2]))" + OUTPUT_VARIABLE PYTHON2_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) + +diff --git a/bindings/python/python3/CMakeLists.txt b/bindings/python/python3/CMakeLists.txt +index bf87dfc..fc3b24b 100644 +--- a/bindings/python/python3/CMakeLists.txt ++++ b/bindings/python/python3/CMakeLists.txt +@@ -6,7 +6,7 @@ if(PYTHON3INTERP_FOUND) + if(NOT PYTHON3_SITEPKG_DIR) + execute_process(COMMAND + ${PYTHON3_EXECUTABLE} +- -c "import sys; print (sys.version[0:3])" ++ -c "import sys; print('{}.{}'.format(*sys.version_info[0:2]))" + OUTPUT_VARIABLE PYTHON3_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) + +diff --git a/cmake/FindPython3Interp.cmake b/cmake/FindPython3Interp.cmake +index 74398b2..5b25e5a 100644 +--- a/cmake/FindPython3Interp.cmake ++++ b/cmake/FindPython3Interp.cmake +@@ -39,7 +39,7 @@ + + unset(_Python3_NAMES) + +-set(_Python3_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) ++set(_Python3_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + + if(Python3Interp_FIND_VERSION) + if(Python3Interp_FIND_VERSION_COUNT GREATER 1) +-- +2.31.1 + diff --git a/libproxy.spec b/libproxy.spec index 367f639..e8ead26 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -12,6 +12,8 @@ URL: https://libproxy.github.io/libproxy/ Source0: https://github.com/libproxy/%{name}/releases/download/%{name}-%{version}.tar.xz # Taken from the Debian package. Source1: proxy.1 +# https://bugzilla.redhat.com/show_bug.cgi?id=1898060 +Patch0: libproxy-0.4.17-fix-python-version-check.patch BuildRequires: cmake >= 2.6.0 BuildRequires: gcc-c++ @@ -209,8 +211,8 @@ install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/proxy.1 %changelog -* Fri Jun 04 2021 Python Maint - 0.4.17-2 -- Rebuilt for Python 3.10 +* Mon Jun 21 2021 David King - 0.4.17-2 +- Rebuilt for Python 3.10 (#1898060) * Fri May 28 2021 David King - 0.4.17-1 - Update to 0.4.17