[Python-checkins] CVS: python/dist/src/Lib/distutils cygwinccompiler.py,1.12,1.12.4.1 file_util.py,1.8,1.8.6.1 sysconfig.py,1.34.6.2,1.34.6.3

Tim Peters tim_one@users.sourceforge.net
Fri, 27 Jul 2001 22:03:01 -0700


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv14630/descr/dist/src/Lib/distutils

Modified Files:
      Tag: descr-branch
	cygwinccompiler.py file_util.py sysconfig.py 
Log Message:
Merge of trunk tags date2001-07-21 to date2001-07-28.


Index: cygwinccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/cygwinccompiler.py,v
retrieving revision 1.12
retrieving revision 1.12.4.1
diff -C2 -d -r1.12 -r1.12.4.1
*** cygwinccompiler.py	2001/03/22 03:50:09	1.12
--- cygwinccompiler.py	2001/07/28 05:02:59	1.12.4.1
***************
*** 74,78 ****
          if status is not CONFIG_H_OK:
              self.warn(
!                 "Python's config.h doesn't seem to support your compiler.  " +
                  ("Reason: %s." % details) +
                  "Compiling may fail because of undefined preprocessor macros.")
--- 74,78 ----
          if status is not CONFIG_H_OK:
              self.warn(
!                 "Python's pyconfig.h doesn't seem to support your compiler.  " +
                  ("Reason: %s." % details) +
                  "Compiling may fail because of undefined preprocessor macros.")
***************
*** 336,340 ****
  # class Mingw32CCompiler
  
! # Because these compilers aren't configured in Python's config.h file by
  # default, we should at least warn the user if he is using a unmodified
  # version.
--- 336,340 ----
  # class Mingw32CCompiler
  
! # Because these compilers aren't configured in Python's pyconfig.h file by
  # default, we should at least warn the user if he is using a unmodified
  # version.
***************
*** 346,350 ****
  def check_config_h():
  
!     """Check if the current Python installation (specifically, config.h)
      appears amenable to building extensions with GCC.  Returns a tuple
      (status, details), where 'status' is one of the following constants:
--- 346,350 ----
  def check_config_h():
  
!     """Check if the current Python installation (specifically, pyconfig.h)
      appears amenable to building extensions with GCC.  Returns a tuple
      (status, details), where 'status' is one of the following constants:
***************
*** 354,372 ****
          doesn't look good
        CONFIG_H_UNCERTAIN
!         not sure -- unable to read config.h
      'details' is a human-readable string explaining the situation.
  
      Note there are two ways to conclude "OK": either 'sys.version' contains
      the string "GCC" (implying that this Python was built with GCC), or the
!     installed "config.h" contains the string "__GNUC__".
      """
  
      # XXX since this function also checks sys.version, it's not strictly a
!     # "config.h" check -- should probably be renamed...
  
      from distutils import sysconfig
      import string
      # if sys.version contains GCC then python was compiled with
!     # GCC, and the config.h file should be OK
      if string.find(sys.version,"GCC") >= 0:
          return (CONFIG_H_OK, "sys.version mentions 'GCC'")
--- 354,372 ----
          doesn't look good
        CONFIG_H_UNCERTAIN
!         not sure -- unable to read pyconfig.h
      'details' is a human-readable string explaining the situation.
  
      Note there are two ways to conclude "OK": either 'sys.version' contains
      the string "GCC" (implying that this Python was built with GCC), or the
!     installed "pyconfig.h" contains the string "__GNUC__".
      """
  
      # XXX since this function also checks sys.version, it's not strictly a
!     # "pyconfig.h" check -- should probably be renamed...
  
      from distutils import sysconfig
      import string
      # if sys.version contains GCC then python was compiled with
!     # GCC, and the pyconfig.h file should be OK
      if string.find(sys.version,"GCC") >= 0:
          return (CONFIG_H_OK, "sys.version mentions 'GCC'")
***************
*** 387,391 ****
  
      else:
!         # "config.h" contains an "#ifdef __GNUC__" or something similar
          if string.find(s,"__GNUC__") >= 0:
              return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn)
--- 387,391 ----
  
      else:
!         # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar
          if string.find(s,"__GNUC__") >= 0:
              return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn)

Index: file_util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/file_util.py,v
retrieving revision 1.8
retrieving revision 1.8.6.1
diff -C2 -d -r1.8 -r1.8.6.1
*** file_util.py	2001/01/31 20:07:17	1.8
--- file_util.py	2001/07/28 05:02:59	1.8.6.1
***************
*** 9,13 ****
  
  import os
- from stat import *
  from distutils.errors import DistutilsFileError
  
--- 9,12 ----
***************
*** 109,112 ****
--- 108,112 ----
  
      from distutils.dep_util import newer
+     from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE
  
      if not os.path.isfile(src):

Index: sysconfig.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v
retrieving revision 1.34.6.2
retrieving revision 1.34.6.3
diff -C2 -d -r1.34.6.2 -r1.34.6.3
*** sysconfig.py	2001/07/21 06:07:12	1.34.6.2
--- sysconfig.py	2001/07/28 05:02:59	1.34.6.3
***************
*** 44,48 ****
      non-platform-specific header files, i.e. Python.h and so on;
      otherwise, this is the path to platform-specific header files
!     (namely config.h).
  
      If 'prefix' is supplied, use it instead of sys.prefix or
--- 44,48 ----
      non-platform-specific header files, i.e. Python.h and so on;
      otherwise, this is the path to platform-specific header files
!     (namely pyconfig.h).
  
      If 'prefix' is supplied, use it instead of sys.prefix or
***************
*** 138,145 ****
  
  def get_config_h_filename():
!     """Return full pathname of installed config.h file."""
      if python_build: inc_dir = '.'
      else:            inc_dir = get_python_inc(plat_specific=1)
!     return os.path.join(inc_dir, "config.h")
  
  
--- 138,150 ----
  
  def get_config_h_filename():
!     """Return full pathname of installed pyconfig.h file."""
      if python_build: inc_dir = '.'
      else:            inc_dir = get_python_inc(plat_specific=1)
!     if sys.version < '2.2':
!         config_h = 'config.h'
!     else:
!         # The name of the config.h file changed in 2.2
!         config_h = 'pyconfig.h'
!     return os.path.join(inc_dir, config_h)