mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-19 23:45:28 +02:00
Merge branch 'fix/export_without_constraint_download' into 'master'
Tools: The Python dependency checker should not update the constraint file Closes IDF-6010 See merge request espressif/esp-idf!20460
This commit is contained in:
+10
-2
@@ -1885,12 +1885,20 @@ def get_requirements(new_features): # type: (str) -> list[str]
|
||||
return [feature_to_requirements_path(feature) for feature in features]
|
||||
|
||||
|
||||
def get_constraints(idf_version): # type: (str) -> str
|
||||
def get_constraints(idf_version, online=True): # type: (str, bool) -> str
|
||||
constraint_file = 'espidf.constraints.v{}.txt'.format(idf_version)
|
||||
constraint_path = os.path.join(global_idf_tools_path or '', constraint_file)
|
||||
constraint_url = '/'.join([IDF_DL_URL, constraint_file])
|
||||
temp_path = constraint_path + '.tmp'
|
||||
|
||||
if not online:
|
||||
if os.path.isfile(constraint_path):
|
||||
return constraint_path
|
||||
else:
|
||||
fatal(f'{constraint_path} doesn\'t exist. Perhaps you\'ve forgotten to run the install scripts. '
|
||||
f'Please check the installation guide for more information.')
|
||||
raise SystemExit(1)
|
||||
|
||||
mkdir_p(os.path.dirname(temp_path))
|
||||
|
||||
try:
|
||||
@@ -2066,7 +2074,7 @@ def action_check_python_dependencies(args): # type: ignore
|
||||
raise SystemExit(1)
|
||||
|
||||
if use_constraints:
|
||||
constr_path = get_constraints(idf_version)
|
||||
constr_path = get_constraints(idf_version, online=False) # keep offline for checking
|
||||
info('Constraint file: {}'.format(constr_path))
|
||||
|
||||
info('Requirement files:')
|
||||
|
||||
Reference in New Issue
Block a user