SEDED=""" s/tk = Tkinter.Tk()/tk = ${TKEQ}/; s/tk.getvar('tk_version')/str(Tkinter.TkVersion)/g; s/tk.getvar( 'tk_version' )/str(Tkinter.TkVersion)/g; s/tk.getvar('tcl_version')/str(Tkinter.TclVersion)/g; s/tk.getvar('tk_library')/${TKLIBRARY}/g; s/tk.getvar('tcl_library')/${TCLLIBRARY}/g;""" sed -i -e "${SEDED}" togl_setup.py Doesn't work. The variables might/will contain slashes which will completely break the sed command. Colon would be a better choice.
totally right, I didn't realize that $(get_libdir) can return subpaths. Thanks for the notice. Fixed in the tree.