summaryrefslogtreecommitdiff
blob: 0b8b5a1e500f37a4074047e8361f598f1ab65a12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
=== modified file 'setup.py'
--- setup.py	2006-11-28 22:06:24 +0000
+++ setup.py	2006-11-28 22:16:00 +0000
@@ -201,80 +201,25 @@
 build_enthought(ext_modules, packages)
 
 if BUILD_GTK:
-    try:
-        import gtk
-    except ImportError:
-        print 'GTK requires pygtk'
-        BUILD_GTK = 0
-    except RuntimeError:
-        print 'pygtk present but import failed'
-        BUILD_GTK = 0
-    else:
-        version = (2,2,0)
-        if gtk.pygtk_version < version:
-            print "Error: GTK backend requires PyGTK %d.%d.%d (or later), " \
-                  "%d.%d.%d was detected." % (
-                version + gtk.pygtk_version)
-            BUILD_GTK = 0
-        else:
-            build_gdk(ext_modules, packages, NUMERIX)
-            rc['backend'] = 'GTK'
+    build_gdk(ext_modules, packages, NUMERIX)
+    rc['backend'] = 'GTK'
 
 if BUILD_GTKAGG:
-    try:
-        import gtk
-    except ImportError:
-        print 'GTKAgg requires pygtk'
-        BUILD_GTKAGG=0
-    except RuntimeError:
-        print 'pygtk present but import failed'
-        BUILD_GTKAGG = 0
-    else:
-        version = (2,2,0)
-        if gtk.pygtk_version < version:
-            print "Error: GTKAgg backend requires PyGTK %d.%d.%d " \
-                  "(or later), %d.%d.%d was detected." % (
-                version + gtk.pygtk_version)
-            BUILD_GTKAGG=0
-        else:
-            BUILD_AGG = 1
-            build_gtkagg(ext_modules, packages, NUMERIX)
-            rc['backend'] = '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 wxPython
-    except ImportError:
-        if BUILD_WXAGG != 'auto':
-            print 'WXAgg\'s accelerator requires wxPython'
-        BUILD_WXAGG = 0
-    else:
-        BUILD_AGG = 1
-        build_wxagg(ext_modules, packages, NUMERIX,
-            not (isinstance(BUILD_WXAGG, str) # don't about 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 about if BUILD_WXAGG
+                     and BUILD_WXAGG.lower() == 'auto')) # is "auto"
+    rc['backend'] = 'WXAgg'
 
 if BUILD_AGG:
     build_agg(ext_modules, packages, NUMERIX)