diff options
-rw-r--r-- | dependencies.py | 8 | ||||
-rw-r--r-- | mparser.py | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/dependencies.py b/dependencies.py index 3767d63..aa22533 100644 --- a/dependencies.py +++ b/dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2013-2014 The Meson development team +# Copyright 2013-2015 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -145,8 +145,8 @@ class PkgConfigDependency(Dependency): self.libs.append(lib) def get_variable(self, variable_name): - p = subprocess.Popen([self.pkgbin, '--variable=%s' % - variable_name, self.name], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen([self.pkgbin, '--variable=%s' % variable_name, self.name], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) out = p.communicate()[0] if p.returncode != 0: if required: @@ -154,7 +154,7 @@ class PkgConfigDependency(Dependency): (type_string, self.name)) else: variable = out.decode().strip() - mlog.debug ("return of subprocess : ", variable) + mlog.debug('return of subprocess : %s' % variable) return variable @@ -50,6 +50,7 @@ class Lexer: ('rparen', re.compile(r'\)')), ('lbracket', re.compile(r'\[')), ('rbracket', re.compile(r'\]')), + ('dblquote', re.compile(r'"')), ('string', re.compile(r"'([^'\\]|(\\.))*'")), ('comma', re.compile(r',')), ('dot', re.compile(r'\.')), @@ -91,6 +92,8 @@ class Lexer: bracket_count += 1 elif tid == 'rbracket': bracket_count -= 1 + elif tid == 'dblquote': + raise ParseException('Double quotes are not supported. Use single quotes.', lineno, col) elif tid == 'string': value = match_text[1:-1].replace(r"\'", "'").replace(r" \\ ".strip(), r" \ ".strip())\ .replace("\\n", "\n") |