mirror of
https://github.com/python/cpython.git
synced 2025-10-30 01:47:38 +00:00
Patch #443669: Permit _tkinter to build on cygwin32.
This commit is contained in:
parent
791bfda2b3
commit
3db5b8cc76
1 changed files with 7 additions and 3 deletions
10
setup.py
10
setup.py
|
|
@ -527,8 +527,11 @@ class PyBuildExt(build_ext):
|
||||||
# The _tkinter module.
|
# The _tkinter module.
|
||||||
|
|
||||||
# Assume we haven't found any of the libraries or include files
|
# Assume we haven't found any of the libraries or include files
|
||||||
|
# The versions with dots are used on Unix, and the versions without
|
||||||
|
# dots on Windows, for detection by cygwin.
|
||||||
tcllib = tklib = tcl_includes = tk_includes = None
|
tcllib = tklib = tcl_includes = tk_includes = None
|
||||||
for version in ['8.4', '8.3', '8.2', '8.1', '8.0']:
|
for version in ['8.4', '84', '8.3', '83', '8.2',
|
||||||
|
'82', '8.1', '81', '8.0', '80']:
|
||||||
tklib = self.compiler.find_library_file(lib_dirs,
|
tklib = self.compiler.find_library_file(lib_dirs,
|
||||||
'tk' + version )
|
'tk' + version )
|
||||||
tcllib = self.compiler.find_library_file(lib_dirs,
|
tcllib = self.compiler.find_library_file(lib_dirs,
|
||||||
|
|
@ -586,8 +589,9 @@ class PyBuildExt(build_ext):
|
||||||
if platform in ['aix3', 'aix4']:
|
if platform in ['aix3', 'aix4']:
|
||||||
libs.append('ld')
|
libs.append('ld')
|
||||||
|
|
||||||
# Finally, link with the X11 libraries
|
# Finally, link with the X11 libraries (not appropriate on cygwin)
|
||||||
libs.append('X11')
|
if platform != "cygwin":
|
||||||
|
libs.append('X11')
|
||||||
|
|
||||||
ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
|
ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
|
||||||
define_macros=[('WITH_APPINIT', 1)] + defs,
|
define_macros=[('WITH_APPINIT', 1)] + defs,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue