[gnome-keysign: 5/5] Merged vendorising of avahi
- From: Tobias Mueller <tobiasmue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keysign: 5/5] Merged vendorising of avahi
- Date: Thu, 15 Nov 2018 22:40:16 +0000 (UTC)
commit cda60a55eab98bc0123651b155a3a284a2cd5fe2
Merge: e98a746 930cde4
Author: Tobias Mueller <muelli cryptobitch de>
Date: Thu Nov 15 23:36:11 2018 +0100
Merged vendorising of avahi
This is unfortunate, but Debian does not have a avahi package for python3.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853239
And that's even more unfortunate, because the package is trivially compatible.
Because we need a few constants only, we vendorise the package and hope to
get the Debian package built.
README.rst | 4 +-
keysign/network/AvahiBrowser.py | 41 ++++++++++++---------
keysign/network/AvahiConstants.py | 77 +++++++++++++++++++++++++++++++++++++++
keysign/network/AvahiPublisher.py | 14 ++++++-
packaging/gnome-keysign.spec | 2 +-
5 files changed, 115 insertions(+), 23 deletions(-)
---
diff --cc keysign/network/AvahiBrowser.py
index 5ef2402,ed41b67..3bc0c3a
--- a/keysign/network/AvahiBrowser.py
+++ b/keysign/network/AvahiBrowser.py
@@@ -18,17 -18,24 +18,26 @@@
# You should have received a copy of the GNU General Public License
# along with GNOME Keysign. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
- import avahi, dbus
- from dbus import DBusException
- from dbus.mainloop.glib import DBusGMainLoop
+ import logging
+ import os
- from gi.repository import Gio
+ import dbus
+ from dbus.mainloop.glib import DBusGMainLoop
from gi.repository import GObject
- import logging
+ if __name__ == "__main__" and __package__ is None:
+ logging.getLogger().error("You seem to be trying to execute " +
+ "this script directly which is discouraged. " +
+ "Try python -m instead.")
+ parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ os.sys.path.insert(0, parent_dir)
+ os.sys.path.insert(0, os.path.join(parent_dir, 'monkeysign'))
+ __package__ = str('keysign')
+
+ from .AvahiConstants import AvahiConstants as avahi
+from ..errors import NoAvahiDbus
+
__all__ = ["AvahiBrowser"]
DBusGMainLoop( set_as_default=True )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]