[packages] pygobject: Bump revision and remove patches

git-svn-id: svn://svn.openwrt.org/openwrt/packages@35220 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
hcg 2013-01-18 13:02:25 +00:00
parent 660b353305
commit 3dee6785b9
2 changed files with 5 additions and 391 deletions

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=pygobject PKG_NAME:=pygobject
PKG_VERSION:=2.16.0 PKG_VERSION:=2.21.5
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.16 PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.21
PKG_MD5SUM:=431e7d4632163b93d1ee43cd071a389c PKG_MD5SUM:=77ad7e8dbf13188364c9f56f907e530a
PKG_FIXUP:=autoreconf PKG_FIXUP:=autoreconf
PKG_INSTALL:=1 PKG_INSTALL:=1
@ -25,7 +25,7 @@ EXTRA_LDFLAGS+= \
-L$(ICONV_PREFIX) -L$(INTL_PREFIX) -L$(ICONV_PREFIX) -L$(INTL_PREFIX)
TARGET_CFLAGS += $(FPIC) TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += --enable-static CONFIGURE_ARGS += --enable-static --disable-instrospection
define Package/python-gobject define Package/python-gobject
SUBMENU:=Python SUBMENU:=Python
@ -42,7 +42,7 @@ endef
define Build/Configure define Build/Configure
$(call Build/Configure/Default, \ $(call Build/Configure/Default, \
--with-libffi \ --with-libffi --disable-introspection \
) )
endef endef

View File

@ -1,386 +0,0 @@
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
index e59daa4..0115c7e 100644
--- a/gobject/Makefile.am
+++ b/gobject/Makefile.am
@@ -11,7 +11,7 @@ pygobjectdir = $(pkgpyexecdir)/gobject
pygobject_PYTHON = \
__init__.py \
propertyhelper.py
-pygobject_LTLIBRARIES = _gobject.la
+pygobject_LTLIBRARIES = _gobject.la _constants.la
nodist_pygobject_PYTHON = constants.py
common_ldflags = -module -avoid-version
@@ -19,18 +19,11 @@ if PLATFORM_WIN32
common_ldflags += -no-undefined
endif
-constants.py: generate-constants$(EXEEXT) constants.py.in
- rm -f constants.py
- cp $(srcdir)/constants.py.in constants.py
- chmod 644 constants.py
- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py
- chmod 444 constants.py
-
-generate_constants_CFLAGS = $(GLIB_CFLAGS) $(PYTHON_INCLUDES)
-
-noinst_PROGRAMS = generate-constants
CLEANFILES = constants.py
-EXTRA_DIST = constants.py.in
+
+_constants_la_CFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+_constants_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_constants
+_constants_la_SOURCES = _constants.c
_gobject_la_CFLAGS = \
$(PYTHON_INCLUDES) \
diff --git a/gobject/Makefile.in b/gobject/Makefile.in
index c4c2efa..5bd0c08 100644
--- a/gobject/Makefile.in
+++ b/gobject/Makefile.in
@@ -15,7 +15,6 @@
@SET_MAKE@
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -38,7 +37,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined
-noinst_PROGRAMS = generate-constants$(EXEEXT)
@HAVE_LIBFFI_TRUE@am__append_2 = ffi-marshaller.c ffi-marshaller.h
@PLATFORM_WIN32_TRUE@am__append_3 = -DPLATFORM_WIN32
subdir = gobject
@@ -66,6 +64,9 @@ am__installdirs = "$(DESTDIR)$(pygobjectdir)" \
"$(DESTDIR)$(pkgincludedir)"
pygobjectLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(pygobject_LTLIBRARIES)
+_constants_la_LIBADD =
+am__constants_la_OBJECTS = _constants_la-_constants.lo
+_constants_la_OBJECTS = $(am__constants_la_OBJECTS)
am__DEPENDENCIES_1 =
am___gobject_la_SOURCES_DIST = gobjectmodule.c pygboxed.c pygboxed.h \
pygenum.c pygenum.h pygflags.c pygflags.h pyginterface.c \
@@ -80,11 +81,6 @@ am__gobject_la_OBJECTS = _gobject_la-gobjectmodule.lo \
_gobject_la-pygpointer.lo _gobject_la-pygtype.lo \
$(am__objects_1)
_gobject_la_OBJECTS = $(am__gobject_la_OBJECTS)
-PROGRAMS = $(noinst_PROGRAMS)
-generate_constants_SOURCES = generate-constants.c
-generate_constants_OBJECTS = \
- generate_constants-generate-constants.$(OBJEXT)
-generate_constants_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -96,8 +92,9 @@ LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(_gobject_la_SOURCES) generate-constants.c
-DIST_SOURCES = $(am___gobject_la_SOURCES_DIST) generate-constants.c
+SOURCES = $(_constants_la_SOURCES) $(_gobject_la_SOURCES)
+DIST_SOURCES = $(_constants_la_SOURCES) \
+ $(am___gobject_la_SOURCES_DIST)
nodist_pygobjectPYTHON_INSTALL = $(INSTALL_DATA)
pygobjectPYTHON_INSTALL = $(INSTALL_DATA)
py_compile = $(top_srcdir)/py-compile
@@ -265,12 +262,13 @@ pygobject_PYTHON = \
__init__.py \
propertyhelper.py
-pygobject_LTLIBRARIES = _gobject.la
+pygobject_LTLIBRARIES = _gobject.la _constants.la
nodist_pygobject_PYTHON = constants.py
common_ldflags = -module -avoid-version $(am__append_1)
-generate_constants_CFLAGS = $(GLIB_CFLAGS) $(PYTHON_INCLUDES)
CLEANFILES = constants.py
-EXTRA_DIST = constants.py.in
+_constants_la_CFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+_constants_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_constants
+_constants_la_SOURCES = _constants.c
_gobject_la_CFLAGS = $(PYTHON_INCLUDES) $(FFI_CFLAGS) $(GLIB_CFLAGS) \
-DPY_SSIZE_T_CLEAN -I$(top_srcdir)/glib $(am__append_3)
_gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject"
@@ -345,25 +343,18 @@ clean-pygobjectLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
+_constants.la: $(_constants_la_OBJECTS) $(_constants_la_DEPENDENCIES)
+ $(LINK) -rpath $(pygobjectdir) $(_constants_la_LDFLAGS) $(_constants_la_OBJECTS) $(_constants_la_LIBADD) $(LIBS)
_gobject.la: $(_gobject_la_OBJECTS) $(_gobject_la_DEPENDENCIES)
$(LINK) -rpath $(pygobjectdir) $(_gobject_la_LDFLAGS) $(_gobject_la_OBJECTS) $(_gobject_la_LIBADD) $(LIBS)
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-generate-constants$(EXEEXT): $(generate_constants_OBJECTS) $(generate_constants_DEPENDENCIES)
- @rm -f generate-constants$(EXEEXT)
- $(LINK) $(generate_constants_LDFLAGS) $(generate_constants_OBJECTS) $(generate_constants_LDADD) $(LIBS)
-
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_constants_la-_constants.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-ffi-marshaller.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-gobjectmodule.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygboxed.Plo@am__quote@
@@ -374,7 +365,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygparamspec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygpointer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygtype.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_constants-generate-constants.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@@ -397,6 +387,13 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+_constants_la-_constants.lo: _constants.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_constants_la_CFLAGS) $(CFLAGS) -MT _constants_la-_constants.lo -MD -MP -MF "$(DEPDIR)/_constants_la-_constants.Tpo" -c -o _constants_la-_constants.lo `test -f '_constants.c' || echo '$(srcdir)/'`_constants.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/_constants_la-_constants.Tpo" "$(DEPDIR)/_constants_la-_constants.Plo"; else rm -f "$(DEPDIR)/_constants_la-_constants.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='_constants.c' object='_constants_la-_constants.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_constants_la_CFLAGS) $(CFLAGS) -c -o _constants_la-_constants.lo `test -f '_constants.c' || echo '$(srcdir)/'`_constants.c
+
_gobject_la-gobjectmodule.lo: gobjectmodule.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-gobjectmodule.lo -MD -MP -MF "$(DEPDIR)/_gobject_la-gobjectmodule.Tpo" -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/_gobject_la-gobjectmodule.Tpo" "$(DEPDIR)/_gobject_la-gobjectmodule.Plo"; else rm -f "$(DEPDIR)/_gobject_la-gobjectmodule.Tpo"; exit 1; fi
@@ -467,20 +464,6 @@ _gobject_la-ffi-marshaller.lo: ffi-marshaller.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c
-generate_constants-generate-constants.o: generate-constants.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -MT generate_constants-generate-constants.o -MD -MP -MF "$(DEPDIR)/generate_constants-generate-constants.Tpo" -c -o generate_constants-generate-constants.o `test -f 'generate-constants.c' || echo '$(srcdir)/'`generate-constants.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/generate_constants-generate-constants.Tpo" "$(DEPDIR)/generate_constants-generate-constants.Po"; else rm -f "$(DEPDIR)/generate_constants-generate-constants.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-constants.c' object='generate_constants-generate-constants.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -c -o generate_constants-generate-constants.o `test -f 'generate-constants.c' || echo '$(srcdir)/'`generate-constants.c
-
-generate_constants-generate-constants.obj: generate-constants.c
-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -MT generate_constants-generate-constants.obj -MD -MP -MF "$(DEPDIR)/generate_constants-generate-constants.Tpo" -c -o generate_constants-generate-constants.obj `if test -f 'generate-constants.c'; then $(CYGPATH_W) 'generate-constants.c'; else $(CYGPATH_W) '$(srcdir)/generate-constants.c'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/generate_constants-generate-constants.Tpo" "$(DEPDIR)/generate_constants-generate-constants.Po"; else rm -f "$(DEPDIR)/generate_constants-generate-constants.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-constants.c' object='generate_constants-generate-constants.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -c -o generate_constants-generate-constants.obj `if test -f 'generate-constants.c'; then $(CYGPATH_W) 'generate-constants.c'; else $(CYGPATH_W) '$(srcdir)/generate-constants.c'; fi`
-
mostlyclean-libtool:
-rm -f *.lo
@@ -641,7 +624,7 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
@@ -673,8 +656,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
- clean-pygobjectLTLIBRARIES mostlyclean-am
+clean-am: clean-generic clean-libtool clean-pygobjectLTLIBRARIES \
+ mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -727,28 +710,21 @@ uninstall-am: uninstall-info-am uninstall-nodist_pygobjectPYTHON \
uninstall-pygobjectPYTHON
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstPROGRAMS clean-pygobjectLTLIBRARIES \
- ctags distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-nodist_pygobjectPYTHON \
- install-pkgincludeHEADERS install-pygobjectLTLIBRARIES \
- install-pygobjectPYTHON install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-nodist_pygobjectPYTHON uninstall-pkgincludeHEADERS \
- uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON
-
-
-constants.py: generate-constants$(EXEEXT) constants.py.in
- rm -f constants.py
- cp $(srcdir)/constants.py.in constants.py
- chmod 644 constants.py
- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py
- chmod 444 constants.py
+ clean-libtool clean-pygobjectLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-nodist_pygobjectPYTHON install-pkgincludeHEADERS \
+ install-pygobjectLTLIBRARIES install-pygobjectPYTHON \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-info-am uninstall-nodist_pygobjectPYTHON \
+ uninstall-pkgincludeHEADERS uninstall-pygobjectLTLIBRARIES \
+ uninstall-pygobjectPYTHON
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/gobject/_constants.c b/gobject/_constants.c
index e69de29..c304105 100644
--- a/gobject/_constants.c
+++ b/gobject/_constants.c
@@ -0,0 +1,26 @@
+#include <Python.h>
+#include <glibconfig.h>
+
+DL_EXPORT(void)
+init_constants(void)
+{
+ PyObject *m, *d;
+
+ m = Py_InitModule("gobject._constants", NULL);
+ d = PyModule_GetDict(m);
+
+ PyDict_SetItemString(d, "G_MINFLOAT", PyFloat_FromDouble(G_MINFLOAT));
+ PyDict_SetItemString(d, "G_MAXFLOAT", PyFloat_FromDouble(G_MAXFLOAT));
+ PyDict_SetItemString(d, "G_MINDOUBLE", PyFloat_FromDouble(G_MINDOUBLE));
+ PyDict_SetItemString(d, "G_MAXDOUBLE", PyFloat_FromDouble(G_MAXDOUBLE));
+ PyDict_SetItemString(d, "G_MINSHORT", PyLong_FromLong(G_MINSHORT));
+ PyDict_SetItemString(d, "G_MAXSHORT", PyLong_FromLong(G_MAXSHORT));
+ PyDict_SetItemString(d, "G_MAXUSHORT", PyLong_FromUnsignedLong(G_MAXUSHORT));
+ PyDict_SetItemString(d, "G_MININT", PyLong_FromLong(G_MININT));
+ PyDict_SetItemString(d, "G_MAXINT", PyLong_FromLong(G_MAXINT));
+ PyDict_SetItemString(d, "G_MAXUINT", PyLong_FromUnsignedLong(G_MAXUINT));
+ PyDict_SetItemString(d, "G_MINLONG", PyLong_FromLong(G_MINLONG));
+ PyDict_SetItemString(d, "G_MAXLONG", PyLong_FromLong(G_MAXLONG));
+ PyDict_SetItemString(d, "G_MAXULONG", PyLong_FromUnsignedLong(G_MAXULONG));
+}
+
diff --git a/gobject/constants.py b/gobject/constants.py
--- a/gobject/constants.py
+++ b/gobject/constants.py
@@ -0,0 +1,51 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# pygobject - Python bindings for the GObject library
+# Copyright (C) 2006-2007 Johan Dahlin
+#
+# gobject/constants.py: GObject type constants
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+
+import sys
+
+import gobject._gobject
+_gobject = sys.modules['gobject._gobject']
+from _constants import *
+
+# TYPE_INVALID defined in gobjectmodule.c
+TYPE_NONE = _gobject.type_from_name('void')
+TYPE_INTERFACE = _gobject.type_from_name('GInterface')
+TYPE_CHAR = _gobject.type_from_name('gchar')
+TYPE_UCHAR = _gobject.type_from_name('guchar')
+TYPE_BOOLEAN = _gobject.type_from_name('gboolean')
+TYPE_INT = _gobject.type_from_name('gint')
+TYPE_UINT = _gobject.type_from_name('guint')
+TYPE_LONG = _gobject.type_from_name('glong')
+TYPE_ULONG = _gobject.type_from_name('gulong')
+TYPE_INT64 = _gobject.type_from_name('gint64')
+TYPE_UINT64 = _gobject.type_from_name('guint64')
+TYPE_ENUM = _gobject.type_from_name('GEnum')
+TYPE_FLAGS = _gobject.type_from_name('GFlags')
+TYPE_FLOAT = _gobject.type_from_name('gfloat')
+TYPE_DOUBLE = _gobject.type_from_name('gdouble')
+TYPE_STRING = _gobject.type_from_name('gchararray')
+TYPE_POINTER = _gobject.type_from_name('gpointer')
+TYPE_BOXED = _gobject.type_from_name('GBoxed')
+TYPE_PARAM = _gobject.type_from_name('GParam')
+TYPE_OBJECT = _gobject.type_from_name('GObject')
+TYPE_PYOBJECT = _gobject.type_from_name('PyObject')
+TYPE_UNICHAR = TYPE_UINT
+
diff --git a/gobject/constants.py.in b/gobject/constants.py.in
deleted file mode 100644
index 80bf920..0000000
--- a/gobject/constants.py.in
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- Mode: Python; py-indent-offset: 4 -*-
-# pygobject - Python bindings for the GObject library
-# Copyright (C) 2006-2007 Johan Dahlin
-#
-# gobject/constants.py: GObject type constants
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
-
-import sys
-
-import gobject._gobject
-_gobject = sys.modules['gobject._gobject']
-
-# TYPE_INVALID defined in gobjectmodule.c
-TYPE_NONE = _gobject.type_from_name('void')
-TYPE_INTERFACE = _gobject.type_from_name('GInterface')
-TYPE_CHAR = _gobject.type_from_name('gchar')
-TYPE_UCHAR = _gobject.type_from_name('guchar')
-TYPE_BOOLEAN = _gobject.type_from_name('gboolean')
-TYPE_INT = _gobject.type_from_name('gint')
-TYPE_UINT = _gobject.type_from_name('guint')
-TYPE_LONG = _gobject.type_from_name('glong')
-TYPE_ULONG = _gobject.type_from_name('gulong')
-TYPE_INT64 = _gobject.type_from_name('gint64')
-TYPE_UINT64 = _gobject.type_from_name('guint64')
-TYPE_ENUM = _gobject.type_from_name('GEnum')
-TYPE_FLAGS = _gobject.type_from_name('GFlags')
-TYPE_FLOAT = _gobject.type_from_name('gfloat')
-TYPE_DOUBLE = _gobject.type_from_name('gdouble')
-TYPE_STRING = _gobject.type_from_name('gchararray')
-TYPE_POINTER = _gobject.type_from_name('gpointer')
-TYPE_BOXED = _gobject.type_from_name('GBoxed')
-TYPE_PARAM = _gobject.type_from_name('GParam')
-TYPE_OBJECT = _gobject.type_from_name('GObject')
-TYPE_PYOBJECT = _gobject.type_from_name('PyObject')
-TYPE_UNICHAR = TYPE_UINT
-