]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Use pygi instead of pygobject 2
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 6 Nov 2014 14:24:14 +0000 (14:24 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 27 Jan 2015 14:29:59 +0000 (14:29 +0000)
pygobject 2 is obsolete and unmaintained, and anyway this is for
optional functionality (full regression test coverage) rather than
anything that will be needed in production builds.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85969

configure.ac
test/name-test/test-activation-forking.py
test/name-test/test-wait-for-echo.py

index 70d31b7e994dc7a0681ce9f84a2579c2c3d89686..aab78c6514bf567e05c1cf943b373ea758908ac4 100644 (file)
@@ -263,14 +263,14 @@ AM_CONDITIONAL([DBUS_ENABLE_INSTALLED_TESTS],
 
 if test "x$enable_tests" = xyes; then
   # full test coverage is required, Python is a hard dependency
-  AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
+  AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygi])
   AM_PATH_PYTHON([2.6])
   AC_MSG_CHECKING([for Python modules for full test coverage])
-  if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
+  if "$PYTHON" -c "import dbus, gi.repository.GObject, dbus.mainloop.glib"; then
     AC_MSG_RESULT([yes])
   else
     AC_MSG_RESULT([no])
-    AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
+    AC_MSG_ERROR([cannot import dbus, gi.repository.GObject, dbus.mainloop.glib Python modules])
   fi
 else
   # --enable-tests not given: do not abort if Python is missing
index 0d820754cf57ac300ae4e22be99fb3b811761b13..f98537eb6124a92e0938b5aa9754ee136a553d1e 100644 (file)
@@ -3,7 +3,7 @@
 import os,sys
 
 try:
-    import gobject
+    from gi.repository import GObject
     import dbus
     import dbus.mainloop.glib
 except:
@@ -11,7 +11,7 @@ except:
     sys.exit(0)
 
 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
-loop = gobject.MainLoop()
+loop = GObject.MainLoop()
 
 exitcode = 0
 
@@ -54,7 +54,7 @@ def check_counter():
     if counter == 0:
         print "Failed to get NameOwnerChanged for TestSuiteForkingEchoService"
         sys.exit(1)
-gobject.timeout_add(15000, check_counter)
+GObject.timeout_add(15000, check_counter)
 
 loop.run()
 sys.exit(0)
index bd09e4596d77c37b33d59bbb66fd4761b84cacfd..49ecbb4611414c5d18ab1e44c1b0b817c2828f74 100755 (executable)
@@ -3,15 +3,15 @@
 import os,sys
 
 try:
-    import gobject
     import dbus
     import dbus.mainloop.glib
+    from gi.repository import GObject
 except:
     print "Failed import, aborting test"
     sys.exit(0)
 
 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
-loop = gobject.MainLoop()
+loop = GObject.MainLoop()
 
 exitcode = 0
 
@@ -21,7 +21,7 @@ def handle_noreceipt():
     exitcode = 1
     loop.quit()
 
-gobject.timeout_add(7000, handle_noreceipt)
+GObject.timeout_add(7000, handle_noreceipt)
 
 bus = dbus.SessionBus()