[X2Go-Commits] [x2goclient] 04/25: pyhoca-cli.spec: use %{?with_pythonX} and %{name_helper_pythonX} macros.
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 15 21:07:14 CET 2023
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.6.1.2
in repository x2goclient.
commit 89628dc90c2520872b16db7560e365aa9afa2d6a
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Dec 18 20:57:30 2019 +0100
pyhoca-cli.spec: use %{?with_pythonX} and %{name_helper_pythonX} macros.
Also fixes running against nightly versions of python-x2go.
---
debian/changelog | 2 ++
pyhoca-cli.spec | 38 ++++++++++++++++++++++++--------------
2 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 57953349..670a0933 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ pyhoca-cli (0.6.1.2-0x2go1) UNRELEASED; urgency=medium
+ Backport macros from python-x2go.spec.
+ Prefer Python 3 if both variants have been requested, so that we only
ever build for one variant.
+ + Use %{?with_pythonX} and %{name_helper_pythonX} macros. Also fixes
+ running against nightly versions of python-x2go.
-- X2Go Release Manager <git-admin at x2go.org> Fri, 22 Nov 2019 15:26:45 +0100
diff --git a/pyhoca-cli.spec b/pyhoca-cli.spec
index 171fbfeb..73a07cdc 100644
--- a/pyhoca-cli.spec
+++ b/pyhoca-cli.spec
@@ -107,16 +107,24 @@ URL: http://www.x2go.org/
Source0: http://code.x2go.org/releases/source/%{name}/%{name}-%{version}.tar.gz
BuildArch: noarch
-%if 0%{?el6} || 0%{?el7}
+%if 0%{?with_python2}
+%if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) )
+# On some *SuSE versions, we still need python-devel, even though we also enable Python 3
+# builds there and consequently should build-depend upon python2-devel... but it doesn't
+# exist there.
BuildRequires: python-devel
+%else
+BuildRequires: %{name_helper_python2}-devel
+%endif
BuildRequires: python-setuptools
Requires: python-setproctitle
-Requires: python-x2go >= 0.6.1.0
-%else
-BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-Requires: python3-setproctitle
-Requires: python3-x2go >= 0.6.1.0
+Requires: %{name_helper_python2}-x2go >= 0.6.1.%0
+%endif
+if 0%{?with_python3}
+BuildRequires: %{name_helper_python3}-devel
+BuildRequires: %{name_helper_python3}-setuptools
+Requires: %{name_helper_python3}-setproctitle
+Requires: %{name_helper_python3}-x2go >= 0.6.1.0
%endif
%if 0%{?suse_version}
BuildRequires: fdupes
@@ -147,10 +155,10 @@ on desktops and thin clients.
%build
-%if 0%{?el6} || 0%{?el7}
-# Make sure we stay on Python 2 on CentOS for the time being. Maybe not for EL8.
+%if 0%{?with_python2}
%{py2_build}
-%else
+%endif
+%if 0%{?with_python3}
%if 0%{?suse_version}
%if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) )
python3 setup.py build
@@ -163,9 +171,10 @@ python3 setup.py build
%endif
%install
-%if 0%{?el6} || 0%{?el7}
+%if 0%{?with_python2}
%{py2_install}
-%else
+%endif
+%if 0%{?with_python3}
%if 0%{?suse_version}
%if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) )
python3 setup.py install -O1 --skip-build --prefix %{_prefix} --root %{buildroot}
@@ -189,10 +198,11 @@ cp -rp man/* %{buildroot}/%{_mandir}/
%defattr(-,root,root)
%doc COPYING README TODO
%{_bindir}/%{name}
-%if 0%{?el6} || 0%{?el7}
+%if 0%{?with_python2}
%{python2_sitelib}/pyhoca/
%{python2_sitelib}/PyHoca_CLI*
-%else
+%endif
+%if 0%{?with_python3}
%{python3_sitelib}/pyhoca/
%{python3_sitelib}/PyHoca_CLI*
%if 0%{?suse_version}
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list