[Python-checkins] python/dist/src setup.py,1.130,1.131

jlt63@users.sourceforge.net jlt63@users.sourceforge.net
2002年12月31日 12:30:49 -0800


Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1:/tmp/cvs-serv20954
Modified Files:
	setup.py 
Log Message:
Patch #660485: Cygwin _tkinter Tcl/Tk 8.3 patch
The attached patch enables Cygwin Python to
build cleanly against the latest Cygwin Tcl/Tk
which is based on Tcl/Tk 8.3. It also prevents
building against the real X headers, if installed.
Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.130
retrieving revision 1.131
diff -C2 -d -r1.130 -r1.131
*** setup.py	30 Dec 2002 20:51:12 -0000	1.130
--- setup.py	31 Dec 2002 20:30:46 -0000	1.131
***************
*** 888,891 ****
--- 888,897 ----
 return
 
+ # Set platform specific library prefix, if any
+ if platform == 'cygwin':
+ lib_prefix = 'cyg'
+ else:
+ lib_prefix = ''
+ 
 # Assume we haven't found any of the libraries or include files
 # The versions with dots are used on Unix, and the versions without
***************
*** 895,901 ****
 '82', '8.1', '81', '8.0', '80']:
 tklib = self.compiler.find_library_file(lib_dirs,
! 'tk' + version )
 tcllib = self.compiler.find_library_file(lib_dirs,
! 'tcl' + version )
 if tklib and tcllib:
 # Exit the loop when we've found the Tcl/Tk libraries
--- 901,907 ----
 '82', '8.1', '81', '8.0', '80']:
 tklib = self.compiler.find_library_file(lib_dirs,
! lib_prefix + 'tk' + version)
 tcllib = self.compiler.find_library_file(lib_dirs,
! lib_prefix + 'tcl' + version)
 if tklib and tcllib:
 # Exit the loop when we've found the Tcl/Tk libraries
***************
*** 928,931 ****
--- 934,942 ----
 include_dirs.append('/usr/openwin/include')
 added_lib_dirs.append('/usr/openwin/lib')
+ elif platform == 'cygwin':
+ # Verify that the pseudo-X headers are installed before proceeding
+ x11_inc = find_file('X11/Xlib.h', [], inc_dirs)
+ if x11_inc is None:
+ return
 elif os.path.exists('/usr/X11R6/include'):
 include_dirs.append('/usr/X11R6/include')
***************
*** 939,949 ****
 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,
--- 950,953 ----
***************
*** 957,962 ****
 
 # Add the Tcl/Tk libraries
! libs.append('tk'+version)
! libs.append('tcl'+version)
 
 if platform in ['aix3', 'aix4']:
--- 961,966 ----
 
 # Add the Tcl/Tk libraries
! libs.append(lib_prefix + 'tk'+ version)
! libs.append(lib_prefix + 'tcl'+ version)
 
 if platform in ['aix3', 'aix4']:

AltStyle によって変換されたページ (->オリジナル) /