[X2Go-Commits] [pyhoca-gui] 06/08: pyhoca-gui.spec: adapt %build to Python 2/3 logic.

git-admin at x2go.org git-admin at x2go.org
Sat Dec 21 04:22:03 CET 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository pyhoca-gui.

commit 07a27b618a04efae9a103023204219c910f2389f
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Dec 21 04:20:12 2019 +0100

    pyhoca-gui.spec: adapt %build to Python 2/3 logic.
---
 debian/changelog |  1 +
 pyhoca-gui.spec  | 19 +++++++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1909890..f50460d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,7 @@ pyhoca-gui (0.6.1.0-0x2go1) UNRELEASED; urgency=medium
     + Adapt Build-Requires to Python 2/3 logic.
     + Adapt Requires to Python 2/3 logic.
     + Replace hashbang in %prep.
+    + Adapt %build to Python 2/3 logic.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 11 Dec 2019 12:47:21 +0100
 
diff --git a/pyhoca-gui.spec b/pyhoca-gui.spec
index 7fc2113..21c7582 100644
--- a/pyhoca-gui.spec
+++ b/pyhoca-gui.spec
@@ -194,6 +194,7 @@ sed -i -e '1s@^#/usr/bin/env python3@/usr/bin/env %{name_helper_python3}@' '%{na
 %endif
 
 %build
+%if 0%{?with_python2}
 %if 0%{?suse_version}
 %if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) )
 python2 setup.py build_i18n
@@ -203,14 +204,24 @@ python2 setup.py build
 %{python2_build}
 %endif
 %else
-%if 0%{?fedora} || 0%{?rhel} >= 8
-%{__python3} setup.py build_i18n
-%{py3_build}
-%else
 %{__python2} setup.py build_i18n
 %{py2_build}
 %endif
 %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_i18n
+python3 setup.py build
+%else
+%{__python3} setup.py build_i18n
+%{python3_build}
+%endif
+%else
+%{__python3} setup.py build_i18n
+%{py3_build}
+%endif
+%endif
 
 %install
 %if 0%{?suse_version}

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git


More information about the x2go-commits mailing list