Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Mailer: 21.2 (beta45) "Thelxepeia" XEmacs Lucid (via feedmail 8 I) To: Dennis Wilson Cc: cygwin AT cygwin DOT com Subject: Re: building the _tkinter.a or _tkinter.dll for cygwin References: <5 DOT 0 DOT 2 DOT 1 DOT 0 DOT 20010322171335 DOT 00a24210 AT mail DOT teleport DOT com> X-Face: I-*}xvwusAv%MlABo'jVNP7TDXf5bb*L[q,r{DnsR1GoL07^Wf)sAu%>!LjXAFlZZN+`OQu }?#du]C)[*%ERKR#+l#sX'EoNbSO~|.x AT ogoS5|"-u? Date: 23 Mar 2001 08:50:12 +0100 In-Reply-To: <5.0.2.1.0.20010322171335.00a24210@mail.teleport.com> Message-ID: Lines: 121 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.2 (Thelxepeia) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>>> "Dennis" == Dennis Wilson writes: Dennis> Thanks to advice from this mailing list, I was able to get python to Dennis> compile. Once again thanks. Dennis> The next lack of knowledge I am exhibiting is that I can't get the Dennis> _tkinter.c to compile and link. Dennis> What I have found so far is that there is a python script called Dennis> setup.py that is run. It tries to detect where Below is the relevant portion of my version of setup.py: Note that I moved the cygwin tcl/tk stuff from usr/include, usr/lib out of the way and compiled the X11 variant of tcl/tk. I have the relevant header and libs now under /usr/local/... I also compiled o BLT2.4u - http://www.scriptics.com/ftp/blt/ and have that under /usr/local tree. I can only say that with this setup python compiles OOTB and also the _tkinter module. It even works fine. I checked with the supplied demos. --------------------- cut here -------------- def detect_tkinter(self, inc_dirs, lib_dirs): # The _tkinter module. # # The command for _tkinter is long and site specific. Please # uncomment and/or edit those parts as indicated. If you don't have a # specific extension (e.g. Tix or BLT), leave the corresponding line # commented out. (Leave the trailing backslashes in! If you # experience strange errors, you may want to join all uncommented # lines and remove the backslashes -- the backslash interpretation is # done by the shell's "read" command and it may not be implemented on # every system. # Assume we haven't found any of the libraries or include files tcllib = tklib = tcl_includes = tk_includes = None for version in ['8.0']: 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 break # Now check for the header files if tklib and tcllib: # Cygwin cygwin_tcl_include = ( '/usr/include/tcl' + version ) cygwin_tk_include = ( '/usr/include/tk' + version ) # Check for the include files on Debian, where # they're put in /usr/include/{tcl,tk}X.Y debian_tcl_include = ( '/usr/include/tcl' + version ) debian_tk_include = ( '/usr/include/tk' + version ) tcl_includes = find_file('tcl.h',inc_dirs, [cygwin_tcl_include] ) tk_includes = find_file('tk.h',inc_dirs, [cygwin_tk_include] ) if (tcllib is None or tklib is None and tcl_includes is None or tk_includes is None): # Something's missing, so give up return # OK... everything seems to be present for Tcl/Tk. include_dirs = [] ; libs = [] ; defs = [] ; added_lib_dirs = [] for dir in tcl_includes + tk_includes: if dir not in include_dirs: include_dirs.append(dir) # Check for various platform-specific directories platform = self.get_platform() if platform == 'sunos5': include_dirs.append('/usr/openwin/include') added_lib_dirs.append('/usr/openwin/lib') elif os.path.exists('/usr/X11R6/include'): include_dirs.append('/usr/X11R6/include') added_lib_dirs.append('/usr/X11R6/lib') elif os.path.exists('/usr/X11R5/include'): include_dirs.append('/usr/X11R5/include') added_lib_dirs.append('/usr/X11R5/lib') else: include_dirs.append('/usr/local/include/tcl8.0') include_dirs.append('/usr/local/include/tk8.0') # Assume default location for X11 include_dirs.append('/usr/X11/include') added_lib_dirs.append('/usr/X11/lib') # Check for Tix extension if self.compiler.find_library_file(lib_dirs + added_lib_dirs, 'tix4.1.8.0'): defs.append( ('WITH_TIX', 1) ) libs.append('tix4.1.8.0') # Check for BLT extension if self.compiler.find_library_file(lib_dirs + added_lib_dirs, 'BLT24'): defs.append( ('WITH_BLT', 1) ) libs.append('BLT24') libs.append('jpeg') # Add the Tcl/Tk libraries libs.append('tk'+version) libs.append('tcl'+version) --------------------- cut here -------------- Ciao Volker -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple