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

Skip to content

Commit cccac1a

Browse files
committed
This patch enables Cygwin Python to build _tkinter against Tcl/Tk 8.4.
Note that this patch just reverts the lib_prefix (i.e., "cyg") portion of my Tcl/Tk 8.3 patch. It seems that Cygwin Tcl/Tk is using a more normal file naming convention again.
1 parent 769e1ff commit cccac1a

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

setup.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -915,22 +915,14 @@ def detect_tkinter(self, inc_dirs, lib_dirs):
915915
self.detect_tkinter_darwin(inc_dirs, lib_dirs):
916916
return
917917

918-
# Set platform specific library prefix, if any
919-
if platform == 'cygwin':
920-
lib_prefix = 'cyg'
921-
else:
922-
lib_prefix = ''
923-
924918
# Assume we haven't found any of the libraries or include files
925919
# The versions with dots are used on Unix, and the versions without
926920
# dots on Windows, for detection by cygwin.
927921
tcllib = tklib = tcl_includes = tk_includes = None
928922
for version in ['8.4', '84', '8.3', '83', '8.2',
929923
'82', '8.1', '81', '8.0', '80']:
930-
tklib = self.compiler.find_library_file(lib_dirs,
931-
lib_prefix + 'tk' + version)
932-
tcllib = self.compiler.find_library_file(lib_dirs,
933-
lib_prefix + 'tcl' + version)
924+
tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
925+
tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
934926
if tklib and tcllib:
935927
# Exit the loop when we've found the Tcl/Tk libraries
936928
break
@@ -988,8 +980,8 @@ def detect_tkinter(self, inc_dirs, lib_dirs):
988980
libs.append('BLT')
989981

990982
# Add the Tcl/Tk libraries
991-
libs.append(lib_prefix + 'tk'+ version)
992-
libs.append(lib_prefix + 'tcl'+ version)
983+
libs.append('tk'+ version)
984+
libs.append('tcl'+ version)
993985

994986
if platform in ['aix3', 'aix4']:
995987
libs.append('ld')

0 commit comments

Comments
 (0)