From cfeb86db36ab9e3d85692bf47316f0ea07ba4d68 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Thu, 23 Apr 2026 17:05:15 -0400 Subject: missing environment variables breaks wheel packages with native build deps --- python/scriptingprovider.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py index fde6c6cb..a956f8e3 100644 --- a/python/scriptingprovider.py +++ b/python/scriptingprovider.py @@ -1210,7 +1210,11 @@ class PythonScriptingProvider(ScriptingProvider): def _get_python_environment(self, using_bundled_python: bool=False) -> Optional[Dict]: if using_bundled_python and sys.platform == "darwin": - return {"PYTHONHOME": Path(binaryninja.get_install_directory()).parent / f"Resources/bundled-python3"} + env = os.environ.copy() + env.pop("PYTHONPATH", None) + env.pop("PYTHONSTARTUP", None) + env["PYTHONHOME"] = str(Path(binaryninja.get_install_directory()).parent / "Resources/bundled-python3") + return env return None def _install_modules(self, ctx, _modules: bytes) -> bool: -- cgit v1.3.1