mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/remove_PIP_USER_v4.3' into 'release/v4.3'
tools: Add check for PIP_USER variable (backport v4.3) See merge request espressif/esp-idf!16337
This commit is contained in:
commit
9d0fca67a9
@ -1517,6 +1517,10 @@ def action_install_python_env(args): # type: ignore
|
||||
|
||||
subprocess.check_call([sys.executable, '-m', 'virtualenv', '--seeder', 'pip', idf_python_env_path],
|
||||
stdout=sys.stdout, stderr=sys.stderr)
|
||||
env_copy = os.environ.copy()
|
||||
if env_copy.get('PIP_USER') == 'yes':
|
||||
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'
|
||||
run_args = [virtualenv_python, '-m', 'pip', 'install', '--no-warn-script-location']
|
||||
requirements_txt = os.path.join(global_idf_path, 'requirements.txt')
|
||||
run_args += ['-r', requirements_txt]
|
||||
@ -1532,7 +1536,7 @@ def action_install_python_env(args): # type: ignore
|
||||
run_args += ['--find-links', wheels_dir]
|
||||
|
||||
info('Installing Python packages from {}'.format(requirements_txt))
|
||||
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr)
|
||||
subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr, env=env_copy)
|
||||
|
||||
|
||||
def action_add_version(args):
|
||||
|
Loading…
Reference in New Issue
Block a user