From d3bde6a13bb323391949f63b4fe6ec512c7ee17b Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Mon, 26 Jul 2004 08:44:26 +0000 Subject: Don't hardcode automake-1.7, Fixes #148377 * autogen.sh: Don't hardcode automake-1.7, Fixes #148377 * gtk/__init__.py: Readd _gobject, but warn if it's used --- ChangeLog | 6 ++++++ autogen.sh | 8 ++++---- gtk/__init__.py | 15 +++++++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index d4a585e4..7967d77b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-07-26 Johan Dahlin + + * autogen.sh: Don't hardcode automake-1.7, Fixes #148377 + + * gtk/__init__.py: Readd _gobject, but warn if it's used + 2004-07-25 John Finlay * gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_value) diff --git a/autogen.sh b/autogen.sh index 0cdcde62..61b0a898 100755 --- a/autogen.sh +++ b/autogen.sh @@ -32,13 +32,13 @@ test -z "$AUTOHEADER" && AUTOHEADER=autoheader } if test -z "$AUTOMAKE"; then - if automake-1.7 --version < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake-1.7 - ACLOCAL=aclocal-1.7 + if automake --version < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + ACLOCAL=aclocal else echo echo "You must have automake installed to compile $PROJECT." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.7.6.tar.gz" + echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.8.5.tar.gz" echo "(or a newer version if it is available)" DIE=1 fi diff --git a/gtk/__init__.py b/gtk/__init__.py index 51090433..2bd18f2c 100644 --- a/gtk/__init__.py +++ b/gtk/__init__.py @@ -58,9 +58,19 @@ gdk.INPUT_READ = _gobject.IO_IN | _gobject.IO_HUP | _gobject.IO_ERR gdk.INPUT_WRITE = _gobject.IO_OUT | _gobject.IO_HUP gdk.INPUT_EXCEPTION = _gobject.IO_PRI -del _gobject +# _gobject deprecation +from types import ModuleType as _module +class _GObjectWrapper(_module): + from warnings import warn + warn = staticmethod(warn) + _gobject = _gobject + def __getattr__(self, attr): + self.warn('gtk._gobject is deprecated, use gobject directly instead') + return getattr(self._gobject, attr) +_gobject = _GObjectWrapper('gtk._gobject') +del _GObjectWrapper, _module -# Warnings +# other deprecated symbols class _Deprecated: from warnings import warn warn = staticmethod(warn) @@ -85,6 +95,7 @@ class _Deprecated: self.warn(message, DeprecationWarning) return self.func(*args, **kwargs) + # old names compatibility ... mainloop = _Deprecated(main, 'mainloop') mainquit = _Deprecated(main_quit, 'mainquit') -- cgit v1.2.1