Browse Source

Handle dependencies like 'a | b' in buildorder.py

android-5
Fredrik Fornwall 7 years ago
parent
commit
d3e81b1c11
  1. 5
      scripts/buildorder.py

5
scripts/buildorder.py

@ -53,10 +53,13 @@ def parse_build_file_dependencies(path):
for char in "\"'\n":
dependencies_string = dependencies_string.replace(char, '')
for dependency_value in dependencies_string.split(','):
# Split also on '|' to dependencies with '|', as in 'nodejs | nodejs-current':
for dependency_value in re.split(',|\\|', dependencies_string):
# Replace parenthesis to ignore version qualifiers as in "gcc (>= 5.0)":
dependency_value = re.sub(r'\(.*?\)', '', dependency_value).strip()
# Handle dependencies on *-dev packages:
dependency_value = re.sub('-dev$', '', dependency_value)
dependencies.append(dependency_value)
return set(dependencies)

Loading…
Cancel
Save