summaryrefslogtreecommitdiff
path: root/user/libproxy/python3.10.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-01-14 04:38:01 +0000
committerZach van Rijn <me@zv.io>2022-10-21 18:33:57 -0500
commit13c05c4fcba68506963e3fd739dd1a388fbc45a2 (patch)
tree8c195210982c9f865e6230500b5394329ba38d66 /user/libproxy/python3.10.patch
parent4a44f20744b33efe6e4cc72bdc08fcdbedae779b (diff)
downloadpackages-13c05c4fcba68506963e3fd739dd1a388fbc45a2.tar.gz
packages-13c05c4fcba68506963e3fd739dd1a388fbc45a2.tar.bz2
packages-13c05c4fcba68506963e3fd739dd1a388fbc45a2.tar.xz
packages-13c05c4fcba68506963e3fd739dd1a388fbc45a2.zip
user/libproxy: bump { 0.4.15 --> 0.4.17 }, fix build with Python 3.10
Diffstat (limited to 'user/libproxy/python3.10.patch')
-rw-r--r--user/libproxy/python3.10.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/user/libproxy/python3.10.patch b/user/libproxy/python3.10.patch
new file mode 100644
index 000000000..73645cee6
--- /dev/null
+++ b/user/libproxy/python3.10.patch
@@ -0,0 +1,58 @@
+From 04eeeabb42436cb58e9bac2f6c31c0fb87905a72 Mon Sep 17 00:00:00 2001
+From: David King <amigadave@amigadave.com>
+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 00df551b..f4d2b91a 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 bf87dfcc..fc3b24b2 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 74398b2b..5b25e5af 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)