Unable to compile due to Tkinter.__version__ value

setupext.py contains the code:

    if gotit:
        print_status("Tkinter", "Tkinter: %s, Tk: %s, Tcl: %s" %
                     (Tkinter.__version__, Tkinter.TkVersion, Tkinter.TclVersion))

Because I built from source, the Tkinter.__version__ value is
'$Revision$'. It seems poor practice to assume specific formatting
of this field.

Also, I built my copy of Python using "ccache gcc" as the compiler.
The matplotlib build gets confused by this and tries to link with:

    c++ gcc -pthread -shared build/temp.linux-x86_64-2.7/src/ft2font.o ...

I suspect somewhere that the "ccache" part is split off and "c++"
added.

Regards,

  Neil