Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r91940:3c1c88df6ea9
Date: 2017-07-20 10:00 +0200
http://bitbucket.org/pypy/pypy/changeset/3c1c88df6ea9/

Log:    Minor tweaks, be more explicit about the fact that if we don't
        really find anything we'll fall back to ``linklibs=['tcl','tk']``

diff --git a/lib_pypy/_tkinter/tklib_build.py b/lib_pypy/_tkinter/tklib_build.py
--- a/lib_pypy/_tkinter/tklib_build.py
+++ b/lib_pypy/_tkinter/tklib_build.py
@@ -24,21 +24,25 @@
 else:
     # On some Linux distributions, the tcl and tk libraries are
     # stored in /usr/include, so we must check this case also
+    libdirs = []
     found = False
-    for _ver in ['', '8.6', '8.5', '']:
+    for _ver in ['', '8.6', '8.5']:
         incdirs = ['/usr/include/tcl' + _ver]
         linklibs = ['tcl' + _ver, 'tk' + _ver]
-        libdirs = []
         if os.path.isdir(incdirs[0]):
             found = True
             break
     if not found:
         for _ver in ['8.6', '8.5', '']:
-            incdirs = ['/usr/include']
+            incdirs = []
             linklibs = ['tcl' + _ver, 'tk' + _ver]
-            libdirs=[]
             if os.path.isfile(''.join(['/usr/lib/lib', linklibs[1], '.so'])):
+                found = True
                 break
+    if not found:
+        sys.stderr.write("*** TCL libraries not found!  Falling back...\n")
+        incdirs = []
+        linklibs = ['tcl', 'tk']
 
 config_ffi = FFI()
 config_ffi.cdef("""
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to