Merge branch 'version_check_fix_dev_4.4' into 'release/v4.4'

fix(tools): check_python_version accept dev releases as requirement (v4.4)

See merge request espressif/esp-idf!25189
This commit is contained in:
Roland Dobai 2023-08-08 15:22:13 +08:00
commit 013b6b3d4f

View File

@ -48,7 +48,7 @@ if __name__ == '__main__':
def version_check(requirement: Requirement) -> None:
# compare installed version with required
version = Version(get_version(requirement.name))
if version.base_version not in requirement.specifier:
if not requirement.specifier.contains(version, prereleases=True):
not_satisfied.append(f"Requirement '{requirement}' was not met. Installed version: {version}")
with open(args.requirements) as f: