buildorder.py: Handle version qualifiers

This commit is contained in:
Fredrik Fornwall 2016-04-29 14:14:28 +02:00
parent 4873188f26
commit 00875c034b

View File

@ -2,6 +2,7 @@
# buildorder.py - script to generate a build order respecting package dependencies
import os
import re
import sys
from itertools import filterfalse
@ -52,7 +53,8 @@ class TermuxBuildFile(object):
comma_deps = line[len(prefix):].replace('"', '')
return set([
dep.strip() for dep in comma_deps.split(',')
# Replace parenthesis to handle version qualifiers, as in "gcc (>= 5.0)":
re.sub(r'\(.*?\)', '', dep).strip() for dep in comma_deps.split(',')
if 'libandroid-support' not in dep
])