From 445095222747f340a4222178927e12ef1898b483 Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Wed, 18 Dec 2024 11:27:00 +0100 Subject: [PATCH] fix(idf_tools.py): Upgrade pip and setuptools separately This way the setuptools version dependency resolution will be done by the upgraded pip. --- tools/idf_tools.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/idf_tools.py b/tools/idf_tools.py index 489eccc688..46f77a880d 100755 --- a/tools/idf_tools.py +++ b/tools/idf_tools.py @@ -2084,8 +2084,14 @@ def action_install_python_env(args): # type: ignore constraint_file = get_constraints(idf_version) if use_constraints else None - info('Upgrading pip and setuptools...') - run_args = [virtualenv_python, '-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools'] + info('Upgrading pip...') + run_args = [virtualenv_python, '-m', 'pip', 'install', '--upgrade', 'pip'] + if constraint_file: + run_args += ['--constraint', constraint_file] + subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr, env=env_copy) + + info('Upgrading setuptools...') + run_args = [virtualenv_python, '-m', 'pip', 'install', '--upgrade', 'setuptools'] if constraint_file: run_args += ['--constraint', constraint_file] subprocess.check_call(run_args, stdout=sys.stdout, stderr=sys.stderr, env=env_copy)