From d8d8f32a8537e1c3a447e23269450abb2b24d323 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Mon, 10 Jan 2005 16:57:42 +0000 Subject: Make the build of atk, pango and gtk conditional. Fixes bug #74144. * .cvsignore: * Makefile.am: * configure.in: * gtk/Makefile.am: * pygtk-2.0.pc.in: * setup.py: * tests/common.py: * tests/testhelpermodule.c: Make the build of atk, pango and gtk conditional. Fixes bug #74144. --- tests/common.py | 8 +++++++- tests/testhelpermodule.c | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/common.py b/tests/common.py index 9429579..64fc6f4 100644 --- a/tests/common.py +++ b/tests/common.py @@ -41,6 +41,7 @@ def importModules(buildDir, srcDir): def importModule(module, directory, name=None): global isDistCheck + origName = module if '.' in module: fromlist = '.'.join(module.split('.')[:-1]) else: @@ -49,7 +50,12 @@ def importModule(module, directory, name=None): if not name: name = module + '.la' - obj = __import__(module, {}, {}, fromlist) + try: + obj = __import__(module, {}, {}, fromlist) + except ImportError: + print 'WARNING: %s could not be imported' % origName + return + if hasattr(obj, '__file__'): location = obj.__file__ else: diff --git a/tests/testhelpermodule.c b/tests/testhelpermodule.c index 791fe54..cb9a991 100644 --- a/tests/testhelpermodule.c +++ b/tests/testhelpermodule.c @@ -1,6 +1,5 @@ #include "pygobject.h" #include -#include #include "test-thread.h" #include "test-unknown.h" -- cgit