File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -827,15 +827,20 @@ def query_tcltk():
827827 return TCL_TK_CACHE
828828
829829def parse_tcl_config (tcl_lib_dir , tk_lib_dir ):
830- # This is where they live on Ubuntu Hardy (at least)
831- tcl_config = os .path .join (tcl_lib_dir , "tclConfig.sh" )
832- tk_config = os .path .join (tk_lib_dir , "tkConfig.sh" )
830+ import Tkinter
831+ tcl_poss = [tcl_lib_dir ,
832+ "/usr/lib/tcl" + str (Tkinter .TclVersion ),
833+ "/usr/lib" ]
834+ tk_poss = [tk_lib_dir ,
835+ "/usr/lib/tk" + str (Tkinter .TkVersion ),
836+ "/usr/lib" ]
837+ for ptcl , ptk in zip (tcl_poss , tk_poss ):
838+ tcl_config = os .path .join (ptcl , "tclConfig.sh" )
839+ tk_config = os .path .join (ptk , "tkConfig.sh" )
840+ if (os .path .exists (tcl_config ) and os .path .exists (tk_config )):
841+ break
833842 if not (os .path .exists (tcl_config ) and os .path .exists (tk_config )):
834- # This is where they live on RHEL4 (at least)
835- tcl_config = "/usr/lib/tclConfig.sh"
836- tk_config = "/usr/lib/tkConfig.sh"
837- if not (os .path .exists (tcl_config ) and os .path .exists (tk_config )):
838- return None
843+ return None
839844
840845 # These files are shell scripts that set a bunch of
841846 # environment variables. To actually get at the
You can’t perform that action at this time.
0 commit comments