diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2001-07-26 13:41:06 +0000 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2001-07-26 13:41:06 +0000 |
| commit | 853724a093730bff94e89528c3117b032c8af6cc (patch) | |
| tree | e89b66baa6315c0c732c49f29b49c2d440f2d0ea | |
| parent | 49b8a8e81d33296018e5454c1d42c9a8321510da (diff) | |
| download | python-setuptools-git-853724a093730bff94e89528c3117b032c8af6cc.tar.gz | |
Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774.
| -rw-r--r-- | command/build_ext.py | 4 | ||||
| -rw-r--r-- | cygwinccompiler.py | 16 | ||||
| -rw-r--r-- | sysconfig.py | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/command/build_ext.py b/command/build_ext.py index f732373e..259a8447 100644 --- a/command/build_ext.py +++ b/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/cygwinccompiler.py b/cygwinccompiler.py index 92def164..07e16655 100644 --- a/cygwinccompiler.py +++ b/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/sysconfig.py b/sysconfig.py index 16e80231..529d0e6d 100644 --- a/sysconfig.py +++ b/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(): |
