This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository pyhoca-cli. from 6e5c9bf Continue development new d731959 pyhoca-cli.spec: backport macros from python-x2go.spec. new 72f99ac pyhoca-cli.spec: prefer Python 3 if both variants have been requested, so that we only ever build for one variant. new 89628dc pyhoca-cli.spec: use %{?with_pythonX} and %{name_helper_pythonX} macros. new 6f970b8 pyhoca-cli.spec: replace hashbang with version determined by name helper. The 4 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 | 10 +++- pyhoca-cli.spec | 138 +++++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 133 insertions(+), 15 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 72f99acd0fcbdd841f8e49d96ad7172816e4ab68 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Dec 18 20:45:43 2019 +0100 pyhoca-cli.spec: prefer Python 3 if both variants have been requested, so that we only ever build for one variant. --- debian/changelog | 2 ++ pyhoca-cli.spec | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index dee844d..5795334 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ pyhoca-cli (0.6.1.2-0x2go1) UNRELEASED; urgency=medium * New upstream version (0.6.1.1): * pyhoca-cli.spec: + Backport macros from python-x2go.spec. + + Prefer Python 3 if both variants have been requested, so that we only + ever build for one variant. -- 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 5e825a3..171fbfe 100644 --- a/pyhoca-cli.spec +++ b/pyhoca-cli.spec @@ -15,6 +15,11 @@ %bcond_without python2 %endif +# Prefer Python 3 if both variants have been requested. +%if 0%{?with_python2} && 0%{?with_python3} +%bcond_with python2 +%endif + # Provide a default implementation, essentially for non-*SuSE platforms. %if 0%{?with_python3} %if ( ! ( 0%{?rhel} ) ) -- 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 d7319594cb6ec474cd6f73e576185fb1927a23d2 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Dec 18 20:41:01 2019 +0100 pyhoca-cli.spec: backport macros from python-x2go.spec. --- debian/changelog | 5 +++- pyhoca-cli.spec | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 885e6b5..dee844d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ pyhoca-cli (0.6.1.2-0x2go1) UNRELEASED; urgency=medium - * Continue development + * [ Mihai Moldovan ] + * New upstream version (0.6.1.1): + * pyhoca-cli.spec: + + Backport macros from python-x2go.spec. -- 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 a542640..5e825a3 100644 --- a/pyhoca-cli.spec +++ b/pyhoca-cli.spec @@ -1,3 +1,92 @@ +# Add conditional and ... +%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 +%endif + +# Fedora 30 deprecated Python 2, 31 disabled support for building these +# packages. +%if 0%{?fedora} >= 31 +%bcond_with python2 +%else +%bcond_without python2 +%endif + +# Provide a default implementation, essentially for non-*SuSE platforms. +%if 0%{?with_python3} +%if ( ! ( 0%{?rhel} ) ) +%global name_helper_python3 python3 +%if 0%{?with_python2} +%global name_helper_python2 python2 +%{?!python_module:%global python_module() python-%{**} python3-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module() python3-%{**}} +%endif +%else +%if 0%{?rhel} >= 7 +%global name_helper_python3 python%{python3_pkgversion} +%if 0%{?with_python2} +%global name_helper_python2 python2 +%{?!python_module:%global python_module() python-%{**} python%{python3_pkgversion}-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module() python%{python3_pkgversion}-%{**}} +%endif +%else +%global name_helper_python3 python34 +%if 0%{?with_python2} +%global name_helper_python2 python +%{?!python_module:%global python_module() python-%{**} python34-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module() python34-%{**}} +%endif +%endif +%endif +%else +%global name_helper_python3 %{nil} +%if 0%{?with_python2} +%global name_helper_python2 python +%{?!python_module:%global python_module() python-%{**}} +%else +%global name_helper_python2 %{nil} +%{?!python_module:%global python_module()} +%endif +%endif + +%if ! 0%{?with_python3} +%global skip_python3 1 +%endif + +%if ! 0%{?with_python2} +%global skip_python2 1 +%endif + +# Workaround for OpenSuSE Leap 42.3. This is the first version to introduce +# the macros, but in a broken state. It will generate pythonX dependencies +# if pythonX has been installed in the build environment and not honor +# skip_pythonX. +# Override to the expected behavior. +%if 0%{?sle_version} && 0%{?sle_version} == 120300 && 0%{?is_opensuse} +%if 0%{?with_python3} +%if 0%{?with_python2} +%global python_module() python-%{**} python3-%{**} +%else +%global python_module() python3-%{**} +%endif +%else +%if 0%{?with_python2} +%global python_module() python-%{**} +%else +%global python_module() +%endif +%endif +%endif + Name: pyhoca-cli Version: 0.6.1.2 Release: 0.0x2go1%{?dist} -- 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 6f970b8eddfb691c8ac8bfe455b9ad1e4c80dc84 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Dec 18 21:02:49 2019 +0100 pyhoca-cli.spec: replace hashbang with version determined by name helper. --- debian/changelog | 1 + pyhoca-cli.spec | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 670a093..9c87860 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ pyhoca-cli (0.6.1.2-0x2go1) UNRELEASED; urgency=medium ever build for one variant. + Use %{?with_pythonX} and %{name_helper_pythonX} macros. Also fixes running against nightly versions of python-x2go. + + Replace hashbang with version determined by name helper. -- 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 73a07cd..b9501f1 100644 --- a/pyhoca-cli.spec +++ b/pyhoca-cli.spec @@ -152,6 +152,12 @@ on desktops and thin clients. %prep %setup -q +%if 0%{?with_python2} +sed -i -e '1s@^#/usr/bin/python3@/usr/bin/%{name_helper_python2}@' +%endif +%if 0%{?with_python3} +sed -i -e '1s@^#/usr/bin/python3@/usr/bin/%{name_helper_python3}@' +%endif %build -- 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 89628dc90c2520872b16db7560e365aa9afa2d6a Author: Mihai Moldovan <ionic@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 5795334..670a093 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@x2go.org> Fri, 22 Nov 2019 15:26:45 +0100 diff --git a/pyhoca-cli.spec b/pyhoca-cli.spec index 171fbfe..73a07cd 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/pyhoca-cli.git