Added dbus-python: Backported GObject import method from 1.1.1
This commit is contained in:
parent
ac12f0b541
commit
c26c8322d7
1 changed files with 48 additions and 0 deletions
48
helpers/make-dbus-python
Normal file
48
helpers/make-dbus-python
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2008-2010 Rubén Rodríguez <ruben@trisquel.info>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
VERSION=1
|
||||||
|
|
||||||
|
. ./config
|
||||||
|
|
||||||
|
cat << EOF | patch -p0
|
||||||
|
--- dbus/gobject_service.py.orig 2012-01-27 16:52:13.000000000 +0100
|
||||||
|
+++ dbus/gobject_service.py 2013-07-11 21:25:25.937253558 +0200
|
||||||
|
@@ -24,7 +24,15 @@
|
||||||
|
|
||||||
|
__all__ = ['ExportedGObject']
|
||||||
|
|
||||||
|
-from gi.repository import GObject as gobject
|
||||||
|
+import sys
|
||||||
|
+
|
||||||
|
+if 'gi' in sys.modules:
|
||||||
|
+ # this worked in dbus-python 1.0, so preserve the functionality
|
||||||
|
+ from gi.repository import GObject as gobject
|
||||||
|
+else:
|
||||||
|
+ # this worked in dbus-python < 1.0
|
||||||
|
+ import gobject
|
||||||
|
+
|
||||||
|
import dbus.service
|
||||||
|
|
||||||
|
# The odd syntax used here is required so that the code is compatible with
|
||||||
|
EOF
|
||||||
|
|
||||||
|
changelog "Backported GObject import method from 1.1.1"
|
||||||
|
|
||||||
|
compile
|
||||||
Loading…
Add table
Add a link
Reference in a new issue