From: <ef...@us...> - 2009-10-05 22:44:53
|
Revision: 7846 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7846&view=rev Author: efiring Date: 2009-10-05 22:44:38 +0000 (Mon, 05 Oct 2009) Log Message: ----------- Tk directory-finding patch by Benjamin Drung. Fixes the following: Guess the correct directory in Debian/Ubuntu fails. Replacing all tcl by tk does not lead to a correct directory: /usr/share/tcltk/tcl8.5 -> /usr/share/tktk/tk8.5 The correct directory is /usr/share/tcltk/tk8.5 Modified Paths: -------------- branches/v0_99_maint/setupext.py Modified: branches/v0_99_maint/setupext.py =================================================================== --- branches/v0_99_maint/setupext.py 2009-10-05 02:12:36 UTC (rev 7845) +++ branches/v0_99_maint/setupext.py 2009-10-05 22:44:38 UTC (rev 7846) @@ -850,7 +850,11 @@ else: tcl_lib_dir = str(tcl.getvar('tcl_library')) # Guess Tk location based on Tcl location - tk_lib_dir = tcl_lib_dir.replace('Tcl', 'Tk').replace('tcl', 'tk') + (head, tail) = os.path.split(tcl_lib_dir) + tail = tail.replace('Tcl', 'Tk').replace('tcl', 'tk') + tk_lib_dir = os.path.join(head, tail) + if not os.path.exists(tk_lib_dir): + tk_lib_dir = tcl_lib_dir.replace('Tcl', 'Tk').replace('tcl', 'tk') else: # Obtain Tcl and Tk locations from Tk widget tk.withdraw() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |