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 @@ -908,15 +908,20 @@ def query_tcltk():
908908 return TCL_TK_CACHE
909909
910910def parse_tcl_config (tcl_lib_dir , tk_lib_dir ):
911- # This is where they live on Ubuntu Hardy (at least)
912- tcl_config = os .path .join (tcl_lib_dir , "tclConfig.sh" )
913- tk_config = os .path .join (tk_lib_dir , "tkConfig.sh" )
911+ import Tkinter
912+ tcl_poss = [tcl_lib_dir ,
913+ "/usr/lib/tcl" + str (Tkinter .TclVersion ),
914+ "/usr/lib" ]
915+ tk_poss = [tk_lib_dir ,
916+ "/usr/lib/tk" + str (Tkinter .TkVersion ),
917+ "/usr/lib" ]
918+ for ptcl , ptk in zip (tcl_poss , tk_poss ):
919+ tcl_config = os .path .join (ptcl , "tclConfig.sh" )
920+ tk_config = os .path .join (ptk , "tkConfig.sh" )
921+ if (os .path .exists (tcl_config ) and os .path .exists (tk_config )):
922+ break
914923 if not (os .path .exists (tcl_config ) and os .path .exists (tk_config )):
915- # This is where they live on RHEL4 (at least)
916- tcl_config = "/usr/lib/tclConfig.sh"
917- tk_config = "/usr/lib/tkConfig.sh"
918- if not (os .path .exists (tcl_config ) and os .path .exists (tk_config )):
919- return None
924+ return None
920925
921926 # These files are shell scripts that set a bunch of
922927 # environment variables. To actually get at the
You can’t perform that action at this time.
0 commit comments