[Python-checkins] CVS: python/dist/src/Lib/distutils cygwinccompiler.py,1.12,1.13 sysconfig.py,1.37,1.38
Martin v. L?wis
loewis@users.sourceforge.net
Thu, 26 Jul 2001 06:41:07 -0700
Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv9816/Lib/distutils
Modified Files:
cygwinccompiler.py sysconfig.py
Log Message:
Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774.
Index: cygwinccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/cygwinccompiler.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** cygwinccompiler.py 2001/03/22 03:50:09 1.12
--- cygwinccompiler.py 2001/07/26 13:41:05 1.13
***************
*** 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: sysconfig.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** sysconfig.py 2001/07/18 18:39:56 1.37
--- sysconfig.py 2001/07/26 13:41:05 1.38
***************
*** 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,145 ----
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)
! return os.path.join(inc_dir, "pyconfig.h")