From: Marc-André Lemburg Date: Tue, 5 Feb 2008 14:50:40 +0000 (+0000) Subject: Keep distutils Python 2.1 compatible (or even Python 2.4 in this case). X-Git-Tag: v2.6a1~268 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2db7cd3ae2fbf8c4acde0b31f28c5c3a1e1d1bb8;p=python Keep distutils Python 2.1 compatible (or even Python 2.4 in this case). --- diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index 3cd647becc..1aaaa28fbf 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -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():