Require PyGTK 2.4
authorJohan Dahlin <johan@gnome.org>
Mon, 11 Oct 2004 08:45:04 +0000 (08:45 +0000)
committerJohan Dahlin <johan@gnome.org>
Mon, 11 Oct 2004 08:45:04 +0000 (08:45 +0000)
Original commit message from CVS:
Require PyGTK 2.4

configure.ac
testsuite/interface.py
testsuite/test_interface.py

index 18a6559..23d2c1e 100644 (file)
@@ -23,7 +23,7 @@ dnl Add parameters for aclocal
 ACLOCAL="$ACLOCAL -I common/m4 $ACLOCAL_FLAGS"
 
 dnl required versions of other packages
-AC_SUBST(PYGTK_REQ, 2.0.0)
+AC_SUBST(PYGTK_REQ, 2.4.0)
 AC_SUBST(GLIB_REQ,  2.0.0)
 AC_SUBST(GTK_REQ,   2.0.0)
 AC_SUBST(GST_REQ,   0.8.0)
@@ -61,11 +61,6 @@ dnl check for pygtk
 PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ)
 AC_SUBST(PYGTK_CFLAGS)
 
-PKG_CHECK_MODULES(_UNUSED_NEW_PYGTK, pygtk-2.0 >= 2.3.92, ,HAVE_OLD_PYGTK="yes")
-if test "x$HAVE_OLD_PYGTK" = "xyes"; then
-  AC_DEFINE_UNQUOTED(HAVE_OLD_PYGTK, 1, [Defined if we have an old version of PyGTK])
-fi
-
 AC_MSG_CHECKING(for pygtk defs)
 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
 AC_SUBST(PYGTK_DEFSDIR)
index 00093b8..0890e60 100644 (file)
@@ -1,11 +1,7 @@
 from common import gst, unittest
 
-try:
-    from gst import interfaces
-except:
-    raise SystemExit
-
 import gobject
+from gst import interfaces
 
 class Availability(unittest.TestCase):
     def testXOverlay(self):
@@ -16,13 +12,12 @@ class Availability(unittest.TestCase):
         assert hasattr(interfaces, 'Mixer')
         assert issubclass(interfaces.Mixer, gobject.GInterface)
 
-if getattr(gobject, 'pygtk_version', ()) >= (2,3,92):
-    class FunctionCall(unittest.TestCase):
-        def testXOverlay(self):
-            element = gst.Element('xvimagesink')
-            assert isinstance(element, gst.Element)
-            assert isinstance(element, interfaces.XOverlay)
-            element.set_xwindow_id(0L)
+class FunctionCall(unittest.TestCase):
+    def testXOverlay(self):
+        element = gst.element_factory_make('xvimagesink')
+        assert isinstance(element, gst.Element)
+        assert isinstance(element, interfaces.XOverlay)
+        element.set_xwindow_id(0L)
         
 if __name__ == "__main__":
     unittest.main()
index 00093b8..0890e60 100644 (file)
@@ -1,11 +1,7 @@
 from common import gst, unittest
 
-try:
-    from gst import interfaces
-except:
-    raise SystemExit
-
 import gobject
+from gst import interfaces
 
 class Availability(unittest.TestCase):
     def testXOverlay(self):
@@ -16,13 +12,12 @@ class Availability(unittest.TestCase):
         assert hasattr(interfaces, 'Mixer')
         assert issubclass(interfaces.Mixer, gobject.GInterface)
 
-if getattr(gobject, 'pygtk_version', ()) >= (2,3,92):
-    class FunctionCall(unittest.TestCase):
-        def testXOverlay(self):
-            element = gst.Element('xvimagesink')
-            assert isinstance(element, gst.Element)
-            assert isinstance(element, interfaces.XOverlay)
-            element.set_xwindow_id(0L)
+class FunctionCall(unittest.TestCase):
+    def testXOverlay(self):
+        element = gst.element_factory_make('xvimagesink')
+        assert isinstance(element, gst.Element)
+        assert isinstance(element, interfaces.XOverlay)
+        element.set_xwindow_id(0L)
         
 if __name__ == "__main__":
     unittest.main()