Skip to content

Commit

Permalink
Simplify a regex pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Dec 8, 2024
1 parent 61a4f46 commit 722ea8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conans/model/build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def _find_matching(dirs, pattern):
component_sanitized = re.escape(component_name)
regex_static = re.compile(rf"(?:lib)?{lib_sanitized}(?:[._-].+)?\.(?:a|lib)")
regex_shared = re.compile(rf"(?:lib)?{lib_sanitized}(?:[._-].+)?\.(?:so|dylib)")
regex_dll = re.compile(rf"(?:.+)?({lib_sanitized}|{component_sanitized})(?:.+)?\.dll")
regex_dll = re.compile(rf".*({lib_sanitized}|{component_sanitized}).*\.dll")
static_location = _find_matching(libdirs, regex_static)
shared_location = _find_matching(libdirs, regex_shared)
if static_location or not shared_location:
Expand Down

0 comments on commit 722ea8a

Please sign in to comment.