]> granicus.if.org Git - python/commitdiff
Keep distutils Python 2.1 compatible (or even Python 2.4 in this case).
authorMarc-André Lemburg <mal@egenix.com>
Tue, 5 Feb 2008 14:50:40 +0000 (14:50 +0000)
committerMarc-André Lemburg <mal@egenix.com>
Tue, 5 Feb 2008 14:50:40 +0000 (14:50 +0000)
Lib/distutils/sysconfig.py

index 3cd647becc11b719fb70fff0668a261636ac0b7f..1aaaa28fbfd43e0afffa6ad9c23bef3e4cad2ebb 100644 (file)
@@ -37,8 +37,12 @@ if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower():
 # different (hard-wired) directories.
 # Setup.local is available for Makefile builds including VPATH builds,
 # Setup.dist is available on Windows
-python_build = any(os.path.isfile(os.path.join(project_base, "Modules", fn))
-                   for fn in ("Setup.dist", "Setup.local"))
+def _python_build():
+    for fn in ("Setup.dist", "Setup.local"):
+        if os.path.isfile(os.path.join(project_base, "Modules", fn)):
+            return True
+    return False
+python_build = _python_build()
 
 
 def get_python_version():