diff options
| author | Jordan Wiens <github@psifertex.com> | 2026-04-23 17:05:15 -0400 |
|---|---|---|
| committer | Jordan Wiens <github@psifertex.com> | 2026-04-23 17:28:26 -0400 |
| commit | cfeb86db36ab9e3d85692bf47316f0ea07ba4d68 (patch) | |
| tree | 502841e3a1b821ca0088fed90324d4f88bd05f99 /python/scriptingprovider.py | |
| parent | ca64b858f6c4ae95c1ea5b0aa6c2fc32292cf8c7 (diff) | |
missing environment variables breaks wheel packages with native build deps
Diffstat (limited to 'python/scriptingprovider.py')
| -rw-r--r-- | python/scriptingprovider.py | 6 |
1 files changed, 5 insertions, 1 deletions
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: |
