This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository pyhoca-gui. from 28f3c10 debian/control: Drop from D (pyhoca-gui): python3-argparse. Shipped in core module bundle of Python3. new 6c5353b Add version check with gi.require_version for Notify GIR. new a4e57cc profilemanager: With PyWxGTK 4.0, use SetItem and InsertItem rather than deprecated SetStringItem and InsertStringItem. new af0bc85 pyhoca-gui.spec: Support building against Python3 (for Fedora and RHEL >= 8). The 3 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 | 5 ++++ pyhoca-gui.spec | 65 +++++++++++++++++++++++++++++++++--------- pyhoca/__init__.py | 1 - pyhoca/wxgui/notify.py | 2 ++ pyhoca/wxgui/profilemanager.py | 24 ++++++++++++---- 5 files changed, 76 insertions(+), 21 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository pyhoca-gui. commit 6c5353b1d3bbe121f7a4036f0798d9bf9d27df0a Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 11 08:35:52 2019 +0100 Add version check with gi.require_version for Notify GIR. --- debian/changelog | 1 + pyhoca/__init__.py | 1 - pyhoca/wxgui/notify.py | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e683572..fd24dca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ pyhoca-gui (0.6.0.0-0x2go1) UNRELEASED; urgency=medium code run on wx3 and wx4. - Port to wxPython 4.0.x. - __future__ imports need to be at the very top of a .py file. + - Add version check with gi.require_version for Notify GIR. * debian/control: + Switch from Py2 to Py3 (B-Ds and Ds). + Bump DH compat level to version 9. diff --git a/pyhoca/__init__.py b/pyhoca/__init__.py index 23741de..9de2c23 100644 --- a/pyhoca/__init__.py +++ b/pyhoca/__init__.py @@ -18,4 +18,3 @@ # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py index 3970f64..40e9783 100644 --- a/pyhoca/wxgui/notify.py +++ b/pyhoca/wxgui/notify.py @@ -25,6 +25,8 @@ from x2go import log if X2GOCLIENT_OS in ('Linux', 'Mac'): try: # try the GTK3 way for notification support first... + from gi import require_version + require_version('Notify', '0.7') from gi.repository import Notify as _Notify except ImportError: # GTK3 notifications are unavailable, -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository pyhoca-gui. commit a4e57ccec28e3f1c4889ce7de2acd0bf979379fe Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 11 08:46:15 2019 +0100 profilemanager: With PyWxGTK 4.0, use SetItem and InsertItem rather than deprecated SetStringItem and InsertStringItem. --- debian/changelog | 2 ++ pyhoca/wxgui/profilemanager.py | 24 ++++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index fd24dca..82eeb1b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ pyhoca-gui (0.6.0.0-0x2go1) UNRELEASED; urgency=medium - Port to wxPython 4.0.x. - __future__ imports need to be at the very top of a .py file. - Add version check with gi.require_version for Notify GIR. + - profilemanager: With PyWxGTK 4.0, use SetItem and InsertItem rather than + deprecated SetStringItem and InsertStringItem. * debian/control: + Switch from Py2 to Py3 (B-Ds and Ds). + Bump DH compat level to version 9. diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py index 2155421..31ac9b8 100644 --- a/pyhoca/wxgui/profilemanager.py +++ b/pyhoca/wxgui/profilemanager.py @@ -20,6 +20,8 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. import wx +wx_major = int(wx.__version__.split('.')[0]) + import os import copy import types @@ -455,9 +457,11 @@ class PyHocaGUI_ProfileManager(wx.Dialog): # handle check/uncheck events on SharedFoldersList items def _SharedFoldersList_OnCheckItem(index, flag): if flag: - self.SharedFoldersList.SetStringItem(index, 1, _("automatically")) + if wx_major < 4: self.SharedFoldersList.SetStringItem(index, 1, _("automatically")) + else: self.SharedFoldersList.SetItem(index, 1, _("automatically")) else: - self.SharedFoldersList.SetStringItem(index, 1, _("manually")) + if wx_major < 4: self.SharedFoldersList.SetStringItem(index, 1, _("manually")) + else: self.SharedFoldersList.SetItem(index, 1, _("manually")) self.SharedFoldersList.OnCheckItem = _SharedFoldersList_OnCheckItem def __set_properties(self): @@ -1220,8 +1224,12 @@ class PyHocaGUI_ProfileManager(wx.Dialog): if self.SharedFoldersList.FindItem(0, _shared_folder_path) == -1: - idx = self.SharedFoldersList.InsertStringItem(0, _shared_folder_path) - self.SharedFoldersList.SetStringItem(idx, 1, _shared_folder_autoconnect) + if wx_major < 4: + idx = self.SharedFoldersList.InsertStringItem(0, _shared_folder_path) + self.SharedFoldersList.SetStringItem(idx, 1, _shared_folder_autoconnect) + else: + idx = self.SharedFoldersList.InsertItem(0, _shared_folder_path) + self.SharedFoldersList.SetItem(idx, 1, _shared_folder_autoconnect) if self.profile_config['export'][_shared_folder_path]: self.SharedFoldersList.CheckItem(idx) @@ -2415,8 +2423,12 @@ class PyHocaGUI_ProfileManager(wx.Dialog): """ _shared_folder_path = self.SharedFolderPath.GetValue() if _shared_folder_path and (self.SharedFoldersList.FindItem(0, _shared_folder_path) == -1): - idx = self.SharedFoldersList.InsertStringItem(0, _shared_folder_path) - self.SharedFoldersList.SetStringItem(idx, 1, _("automatically")) + if wx_major < 4: + idx = self.SharedFoldersList.InsertStringItem(0, _shared_folder_path) + self.SharedFoldersList.SetStringItem(idx, 1, _("automatically")) + else: + idx = self.SharedFoldersList.InsertItem(0, _shared_folder_path) + self.SharedFoldersList.SetItem(idx, 1, _("automatically")) self.SharedFoldersList.CheckItem(idx) self.SharedFolderPath.SetValue('') self.AddSharedFolderPathButton.Enable(False) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
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