Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9181c94

Browse files
committed
This patch reverts the following:
It also prevents building against the real X headers, if installed. After discussions with the Cygwin project lead, I believe that building against the real X headers is OK. Especially, since the psuedo-X headers are *not* installed by the Cygwin Tcl/Tk binary package.
1 parent cccac1a commit 9181c94

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -953,11 +953,6 @@ def detect_tkinter(self, inc_dirs, lib_dirs):
953953
if platform == 'sunos5':
954954
include_dirs.append('/usr/openwin/include')
955955
added_lib_dirs.append('/usr/openwin/lib')
956-
elif platform == 'cygwin':
957-
# Verify that the pseudo-X headers are installed before proceeding
958-
x11_inc = find_file('X11/Xlib.h', [], inc_dirs)
959-
if x11_inc is None:
960-
return
961956
elif os.path.exists('/usr/X11R6/include'):
962957
include_dirs.append('/usr/X11R6/include')
963958
added_lib_dirs.append('/usr/X11R6/lib')
@@ -969,6 +964,12 @@ def detect_tkinter(self, inc_dirs, lib_dirs):
969964
include_dirs.append('/usr/X11/include')
970965
added_lib_dirs.append('/usr/X11/lib')
971966

967+
# If Cygwin, then verify that X is installed before proceeding
968+
if platform == 'cygwin':
969+
x11_inc = find_file('X11/Xlib.h', [], include_dirs)
970+
if x11_inc is None:
971+
return
972+
972973
# Check for BLT extension
973974
if self.compiler.find_library_file(lib_dirs + added_lib_dirs,
974975
'BLT8.0'):

0 commit comments

Comments
 (0)