This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository python-x2go. commit d3b0ce5fd57a42d220f99003bff3ac8813a6ffd5 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Jan 1 10:01:37 2020 +0100 python-x2go.spec: add Python-3-autodetection via %{python3_version} and fallbacks to %{py3_ver} and yet another to the plain "3" postfix. --- debian/changelog | 2 ++ python-x2go.spec | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index bb5846f..ef5d682 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,8 @@ python-x2go (0.6.1.3-0x2go1) UNRELEASED; urgency=medium + Reflow comments (only). + Also use the same detection mechanism for sphinx-build. + Correctly check for existance of %{python2_version}. + + Add Python-3-autodetection via %{python3_version} and fallbacks to + %{py3_ver} and yet another to the plain "3" postfix. -- X2Go Release Manager <git-admin@x2go.org> Thu, 26 Dec 2019 10:37:02 +0100 diff --git a/python-x2go.spec b/python-x2go.spec index 60db7f0..aa568da 100644 --- a/python-x2go.spec +++ b/python-x2go.spec @@ -272,7 +272,21 @@ python3 setup.py build %if 0%{?with_python3} # If we build for Python 3, let's assume that the binary always includes the # Python-3-version. -make -f Makefile.docupload docbuild SPHINX_APIDOC='sphinx-apidoc-%{python3_version}' SPHINXBUILD='sphinx-build-%{python3_version}' +# Older distros, especially *SuSE versions, do not support %{python3_version}, +# though, so we will have to use %{py3_ver} instead. +sphinx_postfix='%{?python3_version}' +if [ -n "${sphinx_postfix}" ]; then + sphinx_postfix='%{?py3_ver}' + if [ -n "${sphinx_postfix}" ]; then + # And if not even that exists, fall back to the plain -3 postfix. + sphinx_postfix='3' + + # Note that if that one doesn't exist either, we're screwed. + # This said, I don't want to add a fallback to an unversioned alternative + # just yet, so let's see how well that goes for now. + fi +fi +make -f Makefile.docupload docbuild SPHINX_APIDOC='sphinx-apidoc-%{sphinx_postfix}' SPHINXBUILD='sphinx-build-%{sphinx_postfix}' %else # Python-2-builds are a bit tricky. # Sometimes the Python-2-binary doesn't have any postfix, sometimes the -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/python-x2go.git