From 00875c034b45a04f8c9702e108b1464d61b41a55 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 29 Apr 2016 14:14:28 +0200 Subject: [PATCH] buildorder.py: Handle version qualifiers --- scripts/buildorder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/buildorder.py b/scripts/buildorder.py index fa02f7a9e..b65815349 100755 --- a/scripts/buildorder.py +++ b/scripts/buildorder.py @@ -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 ])