Author ned.deily
Recipients asvetlov, ceball, christian.heimes, georg.brandl, ned.deily, ronaldoussoren, samueljohn
Date 2013-09-05.09:37:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378373830.59.0.513441606226.issue1584@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a patch. It is simple-minded but I think it should be powerful enough for advanced users to build with non-default Tcl and Tk libraries without having to modify the source.  It adds two new options to configure; if used, both must be specified:

  ./configure \
      --with-tcltk-includes="-I/opt/local/include" \
      --with-tcltk-libs="-L/opt/local/lib -ltcl8.5 -ltk8.5"

The values are passed into the top-level setup.py and override the default searches and values for include_dirs and libraries when building _tkinter.so.

In addition, the options can be overridden with make.  This can be useful when testing tkinter with different versions of Tcl/Tk:

   ./configure
   make
   make test  # test with platform default Tcl/Tk
   ( cd ./build/lib.xx && mv _tkinter.so _tkinter.so.default )
   make \
       TCLTK_INCLUDES="-I/opt/local/include" \
       TCLTK_LIBS="-L/opt/local/lib -ltcl8.6 -ltk8.6"
   make test  # test with another version of Tcl/Tk

I have some more testing to do on other platforms but, unless there are major objections, I intend to commit this soon for use with Issue15663.
History
Date User Action Args
2013-09-05 09:37:10ned.deilysetrecipients: + ned.deily, georg.brandl, ronaldoussoren, christian.heimes, ceball, asvetlov, samueljohn
2013-09-05 09:37:10ned.deilysetmessageid: <1378373830.59.0.513441606226.issue1584@psf.upfronthosting.co.za>
2013-09-05 09:37:10ned.deilylinkissue1584 messages
2013-09-05 09:37:10ned.deilycreate