Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r76732:394dd8a2203a Date: 2015-04-07 11:26 +0200 http://bitbucket.org/pypy/pypy/changeset/394dd8a2203a/
Log: Pick the first of /usr/include/tcl{,8.6,8.5} that exists, and select the libraries to link with by appending the same version number. diff --git a/lib_pypy/_tkinter/tklib.py b/lib_pypy/_tkinter/tklib.py --- a/lib_pypy/_tkinter/tklib.py +++ b/lib_pypy/_tkinter/tklib.py @@ -135,9 +135,12 @@ linklibs = ['tcl', 'tk'] libdirs = [] else: - incdirs=['/usr/include/tcl', '/usr/include/tcl8.6', '/usr/include/tcl8.5'] - linklibs=['tcl', 'tk'] - libdirs = [] + for _ver in ['', '8.6', '8.5', '']: + incdirs = ['/usr/include/tcl' + _ver] + linklibs = ['tcl' + _ver, 'tk' + _ver] + libdirs = [] + if os.path.isdir(incdirs[0]): + break tklib = tkffi.verify(""" #include <tcl.h> _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit