diff --git setupext.py setupext.py index 9219c88..e3a9653 100644 --- setupext.py +++ setupext.py @@ -1495,52 +1495,11 @@ class BackendTkAgg(OptionalBackendPackage): ext.library_dirs.extend([os.path.join(sys.prefix, 'dlls')]) elif sys.platform == 'darwin': - # this config section lifted directly from Imaging - thanks to - # the effbot! - - # First test for a MacOSX/darwin framework install from os.path import join, exists - framework_dirs = [ - join(os.getenv('HOME'), '/Library/Frameworks'), - '/Library/Frameworks', - '/System/Library/Frameworks/', - ] - - # Find the directory that contains the Tcl.framework and - # Tk.framework bundles. - tk_framework_found = 0 - for F in framework_dirs: - # both Tcl.framework and Tk.framework should be present - for fw in 'Tcl', 'Tk': - if not exists(join(F, fw + '.framework')): - break - else: - # ok, F is now directory with both frameworks. Continure - # building - tk_framework_found = 1 - break - if tk_framework_found: - # For 8.4a2, we must add -I options that point inside - # the Tcl and Tk frameworks. In later release we - # should hopefully be able to pass the -F option to - # gcc, which specifies a framework lookup path. - - tk_include_dirs = [ - join(F, fw + '.framework', H) - for fw in ('Tcl', 'Tk') - for H in ('Headers', 'Versions/Current/PrivateHeaders') - ] - - # For 8.4a2, the X11 headers are not included. Rather - # than include a complicated search, this is a - # hard-coded path. It could bail out if X11 libs are - # not found... - # tk_include_dirs.append('/usr/X11R6/include') - frameworks = ['-framework', 'Tcl', '-framework', 'Tk'] - ext.include_dirs.extend(tk_include_dirs) - ext.extra_link_args.extend(frameworks) - ext.extra_compile_args.extend(frameworks) + ext.include_dirs.append(join(sys.prefix, 'include')) + ext.libraries.extend(['tk8.5', 'tcl8.5']) + ext.library_dirs.append(join(sys.prefix, 'lib')) # you're still here? ok we'll try it this way... else: