setup.py doesn't find tk.h

Hi all,

I was using Red Hat 9 with matplotlib, but switched to Xandros (Debian
sarge based distro) recently. I installed all the prerequisites, but
setup.py died compiling tkagg. It didn't have the right include
directory for tk.h. My tk.h is at /usr/include/tcl8.4/tk.h.

setupext.py does the following to get the tcl include directory

import Tkinter
tk = Tkinter.Tk()
...
o.tcl_inc = os.path.join((tk.getvar('tcl_library')), '../../include')

but tk.getvar('tcl_library') gives '/usr/lib/tcl8.4' so the right
directory isn't found.

As a workaround I just hard-coded o.tcl_inc in the setupext.py and it
worked fine. I don't know what the general solution is.

Thanks,
Greg