--- setup.py.orig 2007-06-05 12:02:25.680689000 +0100 +++ setup.py 2007-06-05 12:29:59.507990500 +0100 @@ -226,50 +226,26 @@ havegtk.gotit = None -if BUILD_GTK and havegtk(): +if BUILD_GTK: build_gdk(ext_modules, packages, NUMERIX) rc['backend'] = 'GTK' -if BUILD_GTKAGG and havegtk(): +if BUILD_GTKAGG: BUILD_AGG = 1 build_gtkagg(ext_modules, packages, NUMERIX) rc['backend'] = 'GTKAgg' if BUILD_TKAGG: - try: - import Tkinter - except ImportError: - print 'TKAgg requires TkInter' - BUILD_TKAGG = 0 - except RuntimeError: - print 'Tkinter present but import failed' - BUILD_TKAGG = 0 - else: - try: - tk = Tkinter.Tk() - tk.withdraw() - except Tkinter.TclError: - print 'Tkinter present, but window failed to open' - BUILD_TKAGG = 0 - else: - BUILD_AGG = 1 - build_tkagg(ext_modules, packages, NUMERIX) - rc['backend'] = 'TkAgg' + BUILD_AGG = 1 + build_tkagg(ext_modules, packages, NUMERIX) + rc['backend'] = 'TkAgg' if BUILD_WXAGG: - try: - import wx - except ImportError: - if BUILD_WXAGG != 'auto': - print 'WXAgg\'s accelerator requires wxPython' - BUILD_WXAGG = 0 - else: - if getattr(wx, '__version__', '0.0')[0:3] < '2.8': - BUILD_AGG = 1 - build_wxagg(ext_modules, packages, NUMERIX, - not (isinstance(BUILD_WXAGG, str) # don't abort if BUILD_WXAGG - and BUILD_WXAGG.lower() == 'auto')) # is "auto" - rc['backend'] = 'WXAgg' + BUILD_AGG = 1 + build_wxagg(ext_modules, packages, NUMERIX, + not (isinstance(BUILD_WXAGG, str) # don't abort if BUILD_WXAGG + and BUILD_WXAGG.lower() == 'auto')) # is "auto" + rc['backend'] = 'WXAgg' if BUILD_AGG: build_agg(ext_modules, packages, NUMERIX)