From 8fcaea6e9006c4d14539d7f4b212296803fd7d0d Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 4 Nov 2024 15:28:06 +0100 Subject: [PATCH] makepanda: pip-install interrogate before setting PYTHONHOME --- makepanda/makepanda.py | 5 +++++ makepanda/makepandacore.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index fef557e2fc..66a73c5ff8 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -560,6 +560,11 @@ if GetHost() == 'windows' and GetTarget() == 'windows': else: COMPILER = "GCC" +# Ensure we've pip-installed interrogate if we need it before setting +# PYTHONHOME, etc. +if not PkgSkip("PYTHON"): + GetInterrogate() + SetupBuildEnvironment(COMPILER) ######################################################################## diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 3c50e1aec0..58321cb4bd 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -2160,7 +2160,6 @@ def SdkLocatePython(prefer_thirdparty_python=False): ver = py_dllver[0] + '.' + py_dllver[1:] SDK["PYTHONVERSION"] = "python" + ver + abiflags - os.environ["PYTHONHOME"] = SDK["PYTHON"] running_ver = '%d.%d' % sys.version_info[:2] if ver != running_ver: @@ -3090,6 +3089,7 @@ def SetupBuildEnvironment(compiler): # extension_native_helpers.py currently expects to find libpandaexpress on sys.path. AddToPathEnv("PYTHONPATH", os.path.join(builtdir, "bin")) AddToPathEnv("PATH", os.path.join(builtdir, "plugins")) + os.environ["PYTHONHOME"] = SDK["PYTHON"] # Now for the special (DY)LD_LIBRARY_PATH on Unix-esque systems. if GetHost() != 'windows':