[packages/xpra] - fix python 3 version detection

baggins baggins at pld-linux.org
Mon Apr 4 08:47:07 CEST 2022


commit 88eed7ce8dfd2955379c47e1fba8a6a7535c9a0d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Apr 4 08:46:44 2022 +0200

    - fix python 3 version detection

 python3-version.patch | 11 +++++++++++
 xpra.spec             |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/xpra.spec b/xpra.spec
index bc396c5..f34cb5c 100644
--- a/xpra.spec
+++ b/xpra.spec
@@ -32,6 +32,7 @@ Source0:	http://xpra.org/src/%{name}-%{version}.tar.xz
 # Source0-md5:	2fac9c558c099a6ea13d0202732bd684
 Patch0:		setup-cc-ccache.patch
 Patch1:		%{name}-libexecdir.patch
+Patch2:		python3-version.patch
 URL:		http://xpra.org/
 BuildRequires:	OpenGL-devel
 # libavcodec >= 57 for dec_avcodec, libavcodec >= 58.18 for enc_ffmpeg, libswscale
@@ -129,6 +130,7 @@ Backend Xpra dla CUPS-a.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' cups/xpraforwarder $(grep -l '/usr/bin/env python' -r xpra scripts)
 %{__sed} -i -e 's,"/bin/xpra_udev_product_version","%{_bindir}/xpra_udev_product_version",' udev/rules.d/71-xpra-virtual-pointer.rules
diff --git a/python3-version.patch b/python3-version.patch
new file mode 100644
index 0000000..ca2b5b5
--- /dev/null
+++ b/python3-version.patch
@@ -0,0 +1,11 @@
+--- xpra-2.5.3/setup.py~	2022-04-04 08:41:27.000000000 +0200
++++ xpra-2.5.3/setup.py	2022-04-04 08:43:53.267150608 +0200
+@@ -30,7 +30,7 @@
+ 
+ if sys.version<'2.7':
+     raise Exception("xpra no longer supports Python 2 versions older than 2.7")
+-if sys.version[0]=='3' and sys.version<'3.4':
++if sys.version_info[:3] < (3, 4, 0):
+     raise Exception("xpra no longer supports Python 3 versions older than 3.4")
+ #we don't support versions of Python without the new ssl code:
+ if not hasattr(ssl, "SSLContext"):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xpra.git/commitdiff/88eed7ce8dfd2955379c47e1fba8a6a7535c9a0d



More information about the pld-cvs-commit mailing list