diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-14 23:42:36 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-14 23:42:36 +0000 |
commit | c67a15d86552245f1a55b58e319ffda345196854 (patch) | |
tree | feced34dfc384aca47a71484efebf1b358615c02 /Lib/distutils/sysconfig.py | |
parent | 90921cc4b50cb58f8b91067313c3a1d441638255 (diff) | |
download | cpython-git-c67a15d86552245f1a55b58e319ffda345196854.tar.gz |
Fixed bug #1628
The detection now works on Unix with Makefile, Makefile with VPATH and on Windows.
Diffstat (limited to 'Lib/distutils/sysconfig.py')
-rw-r--r-- | Lib/distutils/sysconfig.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index aead1a19ba..32b165ffd1 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -31,8 +31,10 @@ if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): # python_build: (Boolean) if true, we're either building Python or # building an extension with an un-installed Python, so we use # different (hard-wired) directories. -python_build = os.path.isfile(os.path.join(project_base, "Modules", - "Setup.local")) +# 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 get_python_version(): |