This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository pyhoca-cli. from 5211c8b pyhoca-cli.spec: use %{name} instead of hardcoding the string in %prep. new 1cb84f8 pyhoca-cli.spec: fix selecting either Python 2 XOR 3. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 4 ++++ pyhoca-cli.spec | 39 ++++++++++++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 9 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-cli.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository pyhoca-cli. commit 1cb84f84cd19cb4cd958d860c291822694045779 Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Dec 24 03:46:37 2019 +0100 pyhoca-cli.spec: fix selecting either Python 2 XOR 3. We cannot override bconds via later %bcond_with... XXX macro calls, but have to use them only once with the correct value. Hence, use a global variable to store and mangle the preferences and only use %bcond_... X later once. --- debian/changelog | 4 ++++ pyhoca-cli.spec | 39 ++++++++++++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index d95a7d6..905de59 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,10 @@ pyhoca-cli (0.6.1.2-0x2go1) UNRELEASED; urgency=medium + Fix files section on older *SuSE variants. + Fix files section on older *SuSE variants again, remove faulty slash. + Use %{name} instead of hardcoding the string in %prep. + + Fix selecting either Python 2 XOR 3. We cannot override bconds via later + %bcond_with... XXX macro calls, but have to use them only once with the + correct value. Hence, use a global variable to store and mangle the + preferences and only use %bcond_... X later once. -- X2Go Release Manager <git-admin@x2go.org> Fri, 22 Nov 2019 15:26:45 +0100 diff --git a/pyhoca-cli.spec b/pyhoca-cli.spec index e79bea2..2202d19 100644 --- a/pyhoca-cli.spec +++ b/pyhoca-cli.spec @@ -1,23 +1,44 @@ # Add conditional and ... +# ... disable by default, mostly for older distros. +%global want_python3 0 %if 0%{?suse_version} > 1310 || 0%{?fedora} >= 26 || 0%{?rhel} >= 8 # ... enable by default on newer distros. -%bcond_without python3 -%else -# ... disable by default on older distros. -%bcond_with python3 +%global want_python3 1 %endif # Fedora 30 deprecated Python 2, 31 disabled support for building these # packages. +%global want_python2 1 %if 0%{?fedora} >= 31 -%bcond_with python2 -%else -%bcond_without python2 +%global want_python2 0 %endif # Prefer Python 3 if both variants have been requested. -%if 0%{?with_python2} && 0%{?with_python3} -%bcond_with python2 +%if 0%{?want_python2} && 0%{?want_python3} +%global want_python2 0 +%endif + +# Conditional builds are a bit weird. +# You CAN either enable or disable a feature via %%bcond_with{,out}, BUT you +# can NOT override this value later on, it seems. +# Case in point: I tried to use %bcond_without python2 for all older Fedora +# versions, %bcond_with python3 for all Fedora versions starting with 26. +# However, as pyhoca-{gui,cli} are just applications, we want to build against +# one specific python version only, so I later tried to override the Python-2- +# build via %bcond_with python2, essentially disabling it and preferring the +# Python-3-based version. +# This didn't work, since %{?with_python2} was kept enabled. +# Hence, we'll only enable/disable a feature once now, based upon the global +# macros. +%if 0%{?want_python2} +%bcond_without python2 +%else +%bcond_with python2 +%endif +%if 0%{?want_python3} +%bcond_without python3 +%else +%bcond_with python3 %endif # Provide a default implementation, essentially for non-*SuSE platforms. -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-cli.git