mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
Merge branch 'fix/virtualenv_dir_v4.4' into 'release/v4.4'
Tools: Keep making virtual environments with python in the bin directory See merge request espressif/esp-idf!20589
This commit is contained in:
@@ -1590,10 +1590,16 @@ def action_install_python_env(args): # type: ignore
|
|||||||
if with_seeder_option:
|
if with_seeder_option:
|
||||||
virtualenv_options += ['--seeder', 'pip']
|
virtualenv_options += ['--seeder', 'pip']
|
||||||
|
|
||||||
|
env_copy = os.environ.copy()
|
||||||
|
# Virtualenv with setuptools>=60 produces on recent Debian/Ubuntu systems virtual environments with
|
||||||
|
# local/bin/python paths. SETUPTOOLS_USE_DISTUTILS=stdlib is a workaround to keep bin/python paths.
|
||||||
|
# See https://github.com/pypa/setuptools/issues/3278 for more information.
|
||||||
|
env_copy['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib'
|
||||||
subprocess.check_call([sys.executable, '-m', 'virtualenv',
|
subprocess.check_call([sys.executable, '-m', 'virtualenv',
|
||||||
*virtualenv_options,
|
*virtualenv_options,
|
||||||
idf_python_env_path],
|
idf_python_env_path],
|
||||||
stdout=sys.stdout, stderr=sys.stderr)
|
stdout=sys.stdout, stderr=sys.stderr,
|
||||||
|
env=env_copy)
|
||||||
env_copy = os.environ.copy()
|
env_copy = os.environ.copy()
|
||||||
if env_copy.get('PIP_USER') == 'yes':
|
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.')
|
warn('Found PIP_USER="yes" in the environment. Disabling PIP_USER in this shell to install packages into a virtual environment.')
|
||||||
|
Reference in New Issue
Block a user