--- setupext.py 2009-08-23 00:27:32.000000000 -0500 +++ setupext.py 2009-09-23 06:46:31.000000000 -0500 @@ -50,15 +50,7 @@ 'linux2' : ['/usr/local', '/usr'], 'linux' : ['/usr/local', '/usr',], 'cygwin' : ['/usr/local', '/usr',], - '_darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local', - '/usr', '/sw'], - # it appears builds with darwin are broken because of all the - # different flags the deps can be compile with, so I am pushing - # people to : - # make -f make.osx fetch deps mpl_build mpl_install - - 'darwin' : [], - + 'darwin' : ['@@MPORTS_PREFIX@@'], 'freebsd4' : ['/usr/local', '/usr'], 'freebsd5' : ['/usr/local', '/usr'], 'freebsd6' : ['/usr/local', '/usr'], @@ -327,6 +319,7 @@ [os.path.join(p, 'lib64') for p in basedir[sys.platform] ] ) module.include_dirs.extend(incdirs) + module.include_dirs.extend(['@@MPORTS_PREFIX@@/include/python2.6']) module.include_dirs.append('.') module.library_dirs.extend(libdirs) @@ -956,10 +949,10 @@ return tcl_lib, tcl_inc, tk_lib, tk_inc def hardcoded_tcl_config(): - tcl_inc = "/usr/local/include" - tk_inc = "/usr/local/include" - tcl_lib = "/usr/local/lib" - tk_lib = "/usr/local/lib" + tcl_inc = "@@MPORTS_PREFIX@@/include" + tk_inc = "@@MPORTS_PREFIX@@/include" + tcl_lib = "@@MPORTS_PREFIX@@/lib" + tk_lib = "@@MPORTS_PREFIX@@/lib" return tcl_lib, tcl_inc, tk_lib, tk_inc def add_tk_flags(module): @@ -980,52 +973,6 @@ raise RuntimeError('No tk/win32 support for this python version yet') module.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. - # XXX distutils should support -F! - 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'] - module.include_dirs.extend(tk_include_dirs) - module.extra_link_args.extend(frameworks) - module.extra_compile_args.extend(frameworks) - # you're still here? ok we'll try it this way... else: success = False