This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository pyhoca-gui. commit af0bc856fef19a591b5613878b447296300a1bdc Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 11 10:55:09 2019 +0100 pyhoca-gui.spec: Support building against Python3 (for Fedora and RHEL >= 8). --- debian/changelog | 2 ++ pyhoca-gui.spec | 65 ++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index 82eeb1b..27a3863 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,8 @@ pyhoca-gui (0.6.0.0-0x2go1) UNRELEASED; urgency=medium + Rework packaging, use pybuild. + Drop from D (pyhoca-gui): python3-argparse. Shipped in core module bundle of Python3. + * pyhoca-gui.spec: + + Support building against Python3 (for Fedora and RHEL >= 8). -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Mon, 02 Dec 2019 17:10:19 +0100 diff --git a/pyhoca-gui.spec b/pyhoca-gui.spec index 70b2e20..44581d8 100644 --- a/pyhoca-gui.spec +++ b/pyhoca-gui.spec @@ -16,40 +16,64 @@ BuildArch: noarch %if 0%{?suse_version} BuildRequires: python-devel BuildRequires: fdupes +BuildRequires: python-setuptools +BuildRequires: python-distutils-extra +%if ( 0%{?sle_version} && 0%{?sle_version} >= 120300 && 0%{?is_opensuse} ) || ( 0%{?suse_version} > 1500 ) +BuildRequires: python-rpm-macros +%endif +%else +%if 0%{?fedora} || 0%{?rhel} >= 8 +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-distutils-extra %else BuildRequires: python2-devel -%endif BuildRequires: python-setuptools BuildRequires: python-distutils-extra +%endif +%endif BuildRequires: desktop-file-utils BuildRequires: intltool -%if ( 0%{?sle_version} && 0%{?sle_version} >= 120300 && 0%{?is_opensuse} ) || ( 0%{?suse_version} > 1500 ) -BuildRequires: python-rpm-macros -%endif -Requires: python-setproctitle -Requires: python-x2go >= 0.6.1.0 + %if 0%{?suse_version} +Requires: python-argparse +Requires: python-cups +Requires: python-setproctitle +Requires: python-x2go >= 0.6.1.2 %if 0%{?suse_version} >= 1230 Requires: python-gobject +Requires: python-wxWidgets-2_9 Requires: typelib-1_0-Notify-0_7 %else Requires: python-notify +Requires: wxPython %endif %else -%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7 +%if 0%{?fedora} || 0%{?rhel} >= 8 +Requires: python%{python3_pkgversion}-cups +Requires: python%{python3_pkgversion}-setproctitle +Requires: python%{python3_pkgversion}-x2go >= 0.6.1.2 +Requires: libnotify +Requires: python%{python3_pkgversion}-gobject-base +Requires: python%{python3_pkgversion}-wxPython4 +%else +%if 0%{?rhel} && 0%{?rhel} < 7 +Requires: system-config-printer-libs +Requires: python-argparse +%else +Requires: python2-cups +%endif +Requires: python2-setproctitle +Requires: python2-x2go >= 0.6.1.2 +%if 0%{?fedora} >= 22 Requires: libnotify -Requires: pygobject3-base +Requires: python2-gobject-base %else Requires: notify-python %endif +Requires: python2-wxpython %endif -%if 0%{?suse_version} >= 1230 -Requires: python-wxWidgets-2_9 -%else -Requires: wxPython %endif -Requires: python-argparse -Requires: python-cups %description X2Go is a server based computing environment with: @@ -72,11 +96,20 @@ notification area and allows multiple X2Go session handling. %build %if 0%{?suse_version} %if 0%{?sle_version} && ( ( 0%{?sle_version} < 120300 && 0%{?is_opensuse} ) || ( ! 0%{?is_opensuse} ) ) +sed -i %{name} -e "s@/usr/bin/env python3@/usr/bin/env python2@/" +python2 setup.py build_i18n python2 setup.py build %else +%{__python2} setup.py build_i18n %{python2_build} %endif %else +%if 0%{?fedora} || 0%{?rhel} >= 8 +%{__python3} setup.py build_i18n +%{py3_build} +%else +sed -i %{name} -e "s@/usr/bin/env python3@/usr/bin/env python2@/" +%{__python2} setup.py build_i18n %{py2_build} %endif @@ -89,8 +122,12 @@ python2 setup.py install -O1 --skip-build --prefix %{_prefix} --root %{buildroot %{python2_install} -O1 %endif %else +%if 0%{?fedora} || 0%{?rhel} >= 8 +%{py3_install} +%else %{py2_install} %endif +%endif mkdir -p %{buildroot}%{_bindir}/ cp -p %{name} %{buildroot}%{_bindir}/ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git