]> granicus.if.org Git - python/commitdiff
[Patch #462258] On Cygwin, don't build Tkinter unless the X header files
authorAndrew M. Kuchling <amk@amk.ca>
Tue, 18 Sep 2001 20:32:13 +0000 (20:32 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Tue, 18 Sep 2001 20:32:13 +0000 (20:32 +0000)
    can be found.

setup.py

index 9cb43efe1c94f8cb2aaf1b9aeda790909360b72e..bb4be3f7f9ce24ceb75580bd940952baf64a5d7b 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -653,6 +653,13 @@ class PyBuildExt(build_ext):
             include_dirs.append('/usr/X11/include')
             added_lib_dirs.append('/usr/X11/lib')
 
+        # If Cygwin, then verify that X is installed before proceeding
+        if platform == 'cygwin':
+            x11_inc = find_file('X11/Xlib.h', [], inc_dirs)
+            if x11_inc is None:
+                # X header files missing, so give up
+                return
+
         # Check for BLT extension
         if self.compiler.find_library_file(lib_dirs + added_lib_dirs, 'BLT8.0'):
             defs.append( ('WITH_BLT', 1) )