[3.7] bpo-28552: Fix distutils.sysconfig for empty sys.executable (GH-12875) by miss-islington · Pull Request #12948 · python/cpython (original) (raw)

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).
(cherry picked from commit 0ef8c15)

Co-authored-by: Victor Stinner vstinner@redhat.com

https://bugs.python.org/issue28552