python: Unset Python environment variables

This will prevent the user's environment variables from affecting host
Python, removing the need to manually override these variables.

It is also not necessary to set PYTHONPATH (when not working on target
Python packages) because the given directories are already included in
Python's search path by default.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 6ef46bb919)
This commit is contained in:
Jeffery To
2023-03-02 23:35:00 +08:00
committed by Josef Schlehofer
parent 05342e9897
commit 912aaaa9cf
2 changed files with 46 additions and 5 deletions

View File

@@ -42,7 +42,6 @@ PYTHON3_VARS = \
__PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \
PYTHONPATH="$(PYTHON3PATH)" \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONOPTIMIZE="" \
_python_sysroot="$(STAGING_DIR)" \
_python_prefix="/usr" \
_python_exec_prefix="/usr"