]> granicus.if.org Git - python/commitdiff
Add backwards compatibility.
authorMarc-André Lemburg <mal@egenix.com>
Thu, 26 Jul 2001 18:06:58 +0000 (18:06 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Thu, 26 Jul 2001 18:06:58 +0000 (18:06 +0000)
Lib/distutils/sysconfig.py

index 529d0e6dd391116a452a4003fab83d43775b6eea..bbf7c4afabbd29ebc06072c0627584cf0313eec8 100644 (file)
@@ -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():