[Python-checkins] python/dist/src setup.py,1.183,1.184

akuchling at users.sourceforge.net akuchling at users.sourceforge.net
Sun Mar 21 13:57:51 EST 2004


Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31225

Modified Files:
	setup.py 
Log Message:
[Patch #850977] Detect Tcl/Tk libraries on FreeBSD/OpenBSD.  Bugfix candidate

Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.183
retrieving revision 1.184
diff -C2 -d -r1.183 -r1.184
*** setup.py	7 Feb 2004 12:50:19 -0000	1.183
--- setup.py	21 Mar 2004 18:57:35 -0000	1.184
***************
*** 974,988 ****
          # Now check for the header files
          if tklib and tcllib:
!             # 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 ] + \
!                                  debian_tcl_include
!             tcl_includes = find_file('tcl.h', inc_dirs, debian_tcl_include)
!             tk_includes = find_file('tk.h', inc_dirs, debian_tk_include)
  
          if (tcllib is None or tklib is None or
              tcl_includes is None or tk_includes is None):
!             # Something's missing, so give up
              return
  
--- 974,996 ----
          # Now check for the header files
          if tklib and tcllib:
!             # Check for the include files on Debian and {Free,Open}BSD, where
              # they're put in /usr/include/{tcl,tk}X.Y
!             dotversion = version
!             if '.' not in dotversion and "bsd" in sys.platform.lower():
!                 # OpenBSD and FreeBSD use Tcl/Tk library names like libtcl83.a,
!                 # but the include subdirs are named like .../include/tcl8.3.
!                 dotversion = dotversion[:-1] + '.' + dotversion[-1]
!             tcl_include_sub = []
!             tk_include_sub = []
!             for dir in inc_dirs:
!                 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
!                 tk_include_sub += [dir + os.sep + "tk" + dotversion]
!             tk_include_sub += tcl_include_sub
!             tcl_includes = find_file('tcl.h', inc_dirs, tcl_include_sub)
!             tk_includes = find_file('tk.h', inc_dirs, tk_include_sub)
  
          if (tcllib is None or tklib is None or
              tcl_includes is None or tk_includes is None):
!             self.announce("INFO: Can't locate Tcl/Tk libs and/or headers", 2)
              return
  




More information about the Python-checkins mailing list