[pygobject] introspection is no longer optional



commit 75e9f7d80d9224c05e6063b88479f1baee48c489
Author: John (J5) Palmieri <johnp redhat com>
Date:   Mon Jul 18 18:41:41 2011 -0400

    introspection is no longer optional
    
    https://bugzilla.gnome.org/show_bug.cgi?id=642048

 Makefile.am         |    8 +-------
 configure.ac        |   43 +++++++++++++++++--------------------------
 gi/pygi.h           |   37 -------------------------------------
 gobject/Makefile.am |    5 +----
 tests/Makefile.am   |    7 +------
 5 files changed, 20 insertions(+), 80 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a12e8eb..6a8a51c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,13 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 AUTOMAKE_OPTIONS = 1.7
 
-SUBDIRS = docs glib gobject examples
-
-if ENABLE_INTROSPECTION
-SUBDIRS += gi
-endif
-
-SUBDIRS += tests
+SUBDIRS = docs glib gobject examples gi tests
 
 PLATFORM_VERSION = 3.0
 
diff --git a/configure.ac b/configure.ac
index a9f2b20..3f19ead 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,33 +209,25 @@ AC_ARG_ENABLE(cairo,
     enable_cairo=$enableval,
     enable_cairo=yes)
 
-AC_ARG_ENABLE(introspection,
-  AC_HELP_STRING([--enable-introspection], [Use introspection information]),
-  enable_introspection=$enableval,
-  enable_introspection=yes)
-if test "$enable_introspection" != no; then
-    AC_DEFINE(ENABLE_INTROSPECTION,1,Use introspection information)
-    PKG_CHECK_MODULES(GI,
-        glib-2.0 >= glib_required_version
-        gobject-introspection-1.0 >= introspection_required_version
-    )
-
-    GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
-    AC_SUBST(GI_DATADIR)
-
-    if test "$enable_cairo" != no; then
-        if test $build_py3k = true; then  
-            PKG_CHECK_MODULES(PYCAIRO,
-                py3cairo >= py3cairo_required_version
-            )
-        else
-            PKG_CHECK_MODULES(PYCAIRO,
-                pycairo >= py2cairo_required_version
-            )
-        fi
+PKG_CHECK_MODULES(GI,
+    glib-2.0 >= glib_required_version
+    gobject-introspection-1.0 >= introspection_required_version
+)
+
+GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
+AC_SUBST(GI_DATADIR)
+
+if test "$enable_cairo" != no; then
+    if test $build_py3k = true; then  
+        PKG_CHECK_MODULES(PYCAIRO,
+            py3cairo >= py3cairo_required_version
+        )
+    else
+        PKG_CHECK_MODULES(PYCAIRO,
+            pycairo >= py2cairo_required_version
+        )
     fi
 fi
-AM_CONDITIONAL(ENABLE_INTROSPECTION, test "$enable_introspection" = "yes")
 AM_CONDITIONAL(ENABLE_CAIRO, test "$enable_cairo" = "yes")
 
 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
@@ -278,5 +270,4 @@ AC_OUTPUT
 
 echo
 echo "libffi support: $have_libffi"
-echo "introspection support: $enable_introspection"
 echo
diff --git a/gi/pygi.h b/gi/pygi.h
index 92ef6a5..ef65241 100644
--- a/gi/pygi.h
+++ b/gi/pygi.h
@@ -29,8 +29,6 @@
 #define NO_IMPORT_PYGOBJECT
 #include <pygobject.h>
 
-#if ENABLE_INTROSPECTION
-
 #include <girepository.h>
 #include "pygi-cache.h"
 
@@ -166,39 +164,4 @@ pygi_register_foreign_struct (const char* namespace_,
     Py_RETURN_NONE;
 }
 
-#else /* ENABLE_INTROSPECTION */
-
-static inline PyObject *
-pygi_type_import_by_g_type (GType g_type)
-{
-    return NULL;
-}
-
-static inline PyObject *
-pygi_get_property_value (PyGObject *instance,
-                         const gchar *attr_name)
-{
-    return NULL;
-}
-
-static inline gint
-pygi_set_property_value (PyGObject *instance,
-                         const gchar *attr_name,
-                         PyObject *value)
-{
-    return -1;
-}
-
-static inline GClosure *
-pygi_signal_closure_new (PyGObject *instance,
-                         const gchar *sig_name,
-                         PyObject *callback,
-                         PyObject *extra_args,
-                         PyObject *swap_data)
-{
-    return NULL;
-}
-
-#endif /* ENABLE_INTROSPECTION */
-
 #endif /* __PYGI_H__ */
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
index 3844d1e..0ff704a 100644
--- a/gobject/Makefile.am
+++ b/gobject/Makefile.am
@@ -25,12 +25,9 @@ _gobject_la_CFLAGS = \
 	$(PYTHON_INCLUDES) \
 	$(FFI_CFLAGS) \
 	$(GLIB_CFLAGS) \
+	$(GI_CFLAGS) \
 	 -DPY_SSIZE_T_CLEAN
 
-if ENABLE_INTROSPECTION
-_gobject_la_CFLAGS += $(GI_CFLAGS)
-endif
-
 _gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject"
 _gobject_la_LIBADD = \
 	$(GLIB_LIBS) \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0a0a446..aa84910 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,7 +1,5 @@
 CLEANFILES =
-noinst_LTLIBRARIES = 
-if ENABLE_INTROSPECTION
-noinst_LTLIBRARIES += libregress.la libgimarshallingtests.la
+noinst_LTLIBRARIES = libregress.la libgimarshallingtests.la
 
 nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
 libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
@@ -44,7 +42,6 @@ gschemas.compiled: org.gnome.test.gschema.xml
 	glib-compile-schemas --targetdir=. --schema-file=$<
 
 CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
-endif
 
 noinst_LTLIBRARIES += testhelper.la
 
@@ -81,13 +78,11 @@ TEST_FILES_STATIC = \
 	test_uris.py
 
 
-if ENABLE_INTROSPECTION
 TEST_FILES_GI = \
 	test_everything.py \
 	test_gi.py \
 	test_gdbus.py \
 	test_overrides.py
-endif
 
 EXTRA_DIST = \
 	compathelper.py \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]