summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-07-26 13:41:06 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-07-26 13:41:06 (GMT)
commit4f1cd8bdcbd20bb0acdbe9e240f28c09dd38370f (patch)
tree06e19685ad77879ee4df995bf669235489786995 /Lib
parent4eb5940a4d350d250ab4af08a8b5b6e553e1814d (diff)
downloadcpython-4f1cd8bdcbd20bb0acdbe9e240f28c09dd38370f.zip
cpython-4f1cd8bdcbd20bb0acdbe9e240f28c09dd38370f.tar.gz
cpython-4f1cd8bdcbd20bb0acdbe9e240f28c09dd38370f.tar.bz2
Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/command/build_ext.py4
-rw-r--r--Lib/distutils/cygwinccompiler.py16
-rw-r--r--Lib/distutils/sysconfig.py6
3 files changed, 13 insertions, 13 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index f732373..259a844 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -125,7 +125,7 @@ class build_ext (Command):
self.extensions = self.distribution.ext_modules
- # Make sure Python's include directories (for Python.h, config.h,
+ # Make sure Python's include directories (for Python.h, pyconfig.h,
# etc.) are in the include search path.
py_include = sysconfig.get_python_inc()
plat_py_include = sysconfig.get_python_inc(plat_specific=1)
@@ -592,7 +592,7 @@ class build_ext (Command):
"""
# The python library is always needed on Windows. For MSVC, this
# is redundant, since the library is mentioned in a pragma in
- # config.h that MSVC groks. The other Windows compilers all seem
+ # pyconfig.h that MSVC groks. The other Windows compilers all seem
# to need it mentioned explicitly, though, so that's what we do.
# Append '_d' to the python import library on debug builds.
from distutils.msvccompiler import MSVCCompiler
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
index 92def16..07e1665 100644
--- a/Lib/distutils/cygwinccompiler.py
+++ b/Lib/distutils/cygwinccompiler.py
@@ -73,7 +73,7 @@ class CygwinCCompiler (UnixCCompiler):
(status, details))
if status is not CONFIG_H_OK:
self.warn(
- "Python's config.h doesn't seem to support your compiler. " +
+ "Python's pyconfig.h doesn't seem to support your compiler. " +
("Reason: %s." % details) +
"Compiling may fail because of undefined preprocessor macros.")
@@ -335,7 +335,7 @@ class Mingw32CCompiler (CygwinCCompiler):
# class Mingw32CCompiler
-# Because these compilers aren't configured in Python's config.h file by
+# 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.
@@ -345,7 +345,7 @@ CONFIG_H_UNCERTAIN = "uncertain"
def check_config_h():
- """Check if the current Python installation (specifically, 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:
CONFIG_H_OK
@@ -353,21 +353,21 @@ def check_config_h():
CONFIG_H_NOTOK
doesn't look good
CONFIG_H_UNCERTAIN
- not sure -- unable to read config.h
+ 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 "config.h" contains the string "__GNUC__".
+ installed "pyconfig.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...
+ # "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 config.h file should be OK
+ # GCC, and the pyconfig.h file should be OK
if string.find(sys.version,"GCC") >= 0:
return (CONFIG_H_OK, "sys.version mentions 'GCC'")
@@ -386,7 +386,7 @@ def check_config_h():
"couldn't read '%s': %s" % (fn, exc.strerror))
else:
- # "config.h" contains an "#ifdef __GNUC__" or something similar
+ # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar
if string.find(s,"__GNUC__") >= 0:
return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn)
else:
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 16e8023..529d0e6 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -43,7 +43,7 @@ def get_python_inc(plat_specific=0, prefix=None):
If 'plat_specific' is false (the default), this is the path to the
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).
+ (namely pyconfig.h).
If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.
@@ -137,10 +137,10 @@ def customize_compiler(compiler):
def get_config_h_filename():
- """Return full pathname of installed config.h file."""
+ """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, "config.h")
+ return os.path.join(inc_dir, "pyconfig.h")
def get_makefile_filename():