1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-28 22:35:21 +00:00

🛠Fix deps script version regex

This commit is contained in:
Scott Lahteine 2021-01-24 21:20:51 -06:00
parent 786bba39ff
commit 24a801b660

View File

@ -83,7 +83,7 @@ def add_to_feat_cnf(feature, flines):
feat[name] = '='.join(parts) feat[name] = '='.join(parts)
else: else:
for dep in line.split(','): for dep in line.split(','):
lib_name = re.sub(r'([@~^=]|[<>]=?)[\d.]+', '', dep.strip()).split('=').pop(0) lib_name = re.sub(r'@([~^]|[<>]=?)?[\d.]+', '', dep.strip()).split('=').pop(0)
lib_re = re.compile('(?!^' + lib_name + '\\b)') lib_re = re.compile('(?!^' + lib_name + '\\b)')
feat['lib_deps'] = list(filter(lib_re.match, feat['lib_deps'])) + [dep] feat['lib_deps'] = list(filter(lib_re.match, feat['lib_deps'])) + [dep]