From 7cf92fa1c891b53e6143e090009911c0231bb24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Thu, 26 Jul 2001 18:06:58 +0000 Subject: [PATCH] Add backwards compatibility. --- Lib/distutils/sysconfig.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index 529d0e6dd39..bbf7c4afabb 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -140,7 +140,12 @@ 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") + 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) def get_makefile_filename():