Merge branch 'feat/extend_pip_user_option_check_v5.1' into 'release/v5.1'

feat(tools): Disabled pip 'user' option, when installing ESP-IDF python virtual environment (v5.1)

See merge request espressif/esp-idf!40574
This commit is contained in:
Roland Dobai
2025-07-15 13:00:27 +02:00

View File

@@ -2291,8 +2291,7 @@ def action_install_python_env(args): # type: ignore
install_legacy_python_virtualenv(idf_python_env_path) install_legacy_python_virtualenv(idf_python_env_path)
env_copy = os.environ.copy() env_copy = os.environ.copy()
if env_copy.get('PIP_USER') == 'yes': # Enforce disabling possible pip 'user' option to prevent installation error with virtual environment
warn('Found PIP_USER="yes" in the environment. Disabling PIP_USER in this shell to install packages into a virtual environment.')
env_copy['PIP_USER'] = 'no' env_copy['PIP_USER'] = 'no'
constraint_file = get_constraints(idf_version) if use_constraints else None constraint_file = get_constraints(idf_version) if use_constraints else None