diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-04-25 11:59:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-25 11:59:34 +0200 |
commit | 0ef8c157e9195df0115c54ba875a5efb92ac22fb (patch) | |
tree | 943d3a9b3d7c84d1688393acca0d35be27c80286 /Lib/distutils/command/build.py | |
parent | 235e7b2b0d937ba8b4a9172aa72206187e3e1f54 (diff) | |
download | cpython-git-0ef8c157e9195df0115c54ba875a5efb92ac22fb.tar.gz |
bpo-28552: Fix distutils.sysconfig for empty sys.executable (GH-12875)
bpo-28552, bpo-7774: Fix distutils.sysconfig if sys.executable is
None or an empty string: use os.getcwd() to initialize project_base.
Fix also the distutils build command: don't use sys.executable if
it's evaluated as false (None or empty string).
Diffstat (limited to 'Lib/distutils/command/build.py')
-rw-r--r-- | Lib/distutils/command/build.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/distutils/command/build.py b/Lib/distutils/command/build.py index c6f52e61e1..a86df0bc7f 100644 --- a/Lib/distutils/command/build.py +++ b/Lib/distutils/command/build.py @@ -116,7 +116,7 @@ class build(Command): self.build_scripts = os.path.join(self.build_base, 'scripts-%d.%d' % sys.version_info[:2]) - if self.executable is None: + if self.executable is None and sys.executable: self.executable = os.path.normpath(sys.executable) if isinstance(self.parallel, str): |