views:

136

answers:

2

The MSI installers downloadable from python.org does not include Tcl/Tk header (not source) files (that are required to compile some packages like matplotlib). Does anyone know of the rationale behind not including them?

+1  A: 

The windows installers don't include ANY source files. Simply because that's how windows apps work. It can be compiled on one computer and it will work on all. So windows versions of things like python and php come precompiled with all options enabled.

If you want the source files you have to download a source tarball or something.

Tor Valamo
I asked about **header** files (.h), not source files. Python.org MSI installers includes **header** files (.h) for Python itself. Take a look at `C:\Python26\include` -- thus, my question is about not including Tcl/tk developer **header** files, not source files.
Sridhar Ratnakumar
Header files *are* source files, Sridhar. The surprise isn't that the Windows installer doesn't include the header files for Tcl/Tk, the surprise is that it includes any header files at all. It seems the package maintainer thought the header files for core Python would be useful for Windows binary package users. — If you want to compile software against Python, you should download the source distribution.
Travis Bradshaw
the python header files are required to make c modules, the tcl/tk headers aren't.
Tor Valamo
If you have C modules integrating with Tk, chances are you'll need the Tk headers. Not so many write modules at that level though.
Donal Fellows
What @Donal says. Some packages like matplotlib requires Tk header files.
Sridhar Ratnakumar
What i meant was, the reason the python headers are distributed and the rest aren't, is that to make ANY python c module, you need the python headers. All other headers are optional.
Tor Valamo
A: 

Users, even on Unix systems, do not really need the Tcl/Tk headers to just use the Python interpreter.

If you were to wanting to embed the interpreter in another application, you only need the python headers and lib files (which are included in the installer). The tkinter module, which is what is linked to Tcl/Tk, is already compiled for you in the binary distribution, so your Python scripts can just use Tcl/Tk through tkinter...though you probably shouldn't in an embedded scenario. The reason being, your application can expose its UI features to Python through the Python/C API, and then you don't have a weird disconnect (visually and programmatically) between host-app windows and Python-source windows.

Long story short, the only real reason that I can see for needing the Tcl & Tk headers would be if you were trying to build the tkinter module from source, which pretty much nobody does on Windows, so they leave them out to save space.

ntcolonel