From edf1cf070b6cd927227d86abb2658b772ec36061 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 1 Jul 2022 08:32:07 -0700 Subject: [PATCH] Ensure that PYTHON's folder is on the PATH --- build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.py b/build.py index b66c48b6..60e7359f 100755 --- a/build.py +++ b/build.py @@ -168,6 +168,12 @@ def main(args): os.environ['PYTHONUNBUFFERED'] = 'yes' os.environ['WXWIN'] = wxDir() + # Ensure that PYTHON's containing folder is on the PATH. Normally it will + # already be there, and probably at the beginning. But if this script was + # invoked with a venv Python without activating the venv (like we do on the + # BuildBot) then it may not be in the PATH at all. + os.environ['PATH'] += os.pathsep + os.path.dirname(PYTHON) + wxpydir = os.path.join(phoenixDir(), "wx") if not os.path.exists(wxpydir): os.makedirs(wxpydir)