diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-12-04 11:56:02 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-12-04 11:56:02 +0200 |
| commit | 66ff4a0e9134b7c7c646092c77351268bd121dbe (patch) | |
| tree | c9d7e6f3011a34aa8bc370969d7344adb046079e | |
| parent | 33558cd9799d7e1d056ccd5946c8cb575c760ffd (diff) | |
| parent | b15aa49af2c30921368cf6bf330919da476762eb (diff) | |
| download | meson-66ff4a0e9134b7c7c646092c77351268bd121dbe.tar.gz | |
Merge Python 3.3 fix.
| -rw-r--r-- | compilers.py | 7 | ||||
| -rw-r--r-- | interpreter.py | 2 | ||||
| -rwxr-xr-x | meson.py | 4 | ||||
| -rw-r--r-- | readme.txt | 2 |
4 files changed, 10 insertions, 5 deletions
diff --git a/compilers.py b/compilers.py index b205cd5fc..7907235d5 100644 --- a/compilers.py +++ b/compilers.py @@ -406,7 +406,12 @@ int someSymbolHereJustForFun; cmdlist = self.exe_wrapper + [exename] else: cmdlist = exename - pe = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + try: + pe = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + except Exception as e: + mlog.debug('Could not run: %s (error: %s)\n' % (cmdlist, e)) + return RunResult(False) + (so, se) = pe.communicate() so = so.decode() se = se.decode() diff --git a/interpreter.py b/interpreter.py index cacfe05e3..f4c09a485 100644 --- a/interpreter.py +++ b/interpreter.py @@ -1150,7 +1150,7 @@ class Interpreter(): raise InvalidCode('First argument to set_variable must be a string.') if not self.is_assignable(variable): raise InvalidCode('Assigned value not of assignable type.') - if re.fullmatch('[_a-zA-Z][_0-9a-zA-Z]*', varname) is None: + if re.match('[_a-zA-Z][_0-9a-zA-Z]*$', varname) is None: raise InvalidCode('Invalid variable name: ' + varname) if varname in self.builtin: raise InvalidCode('Tried to overwrite internal variable "%s"' % varname) @@ -164,8 +164,8 @@ itself as required.''' pickle.dump(b, open(dumpfile, 'wb')) def run(args): - if sys.version_info < (3, 4): - print('Meson works correctly only with python 3.4+.') + if sys.version_info < (3, 3): + print('Meson works correctly only with python 3.3+.') print('You have python %s.' % sys.version) print('Please update your environment') return 1 diff --git a/readme.txt b/readme.txt index f72104ada..2ecc3462e 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ build system. Dependencies -Python http://python.org (version 3.4 or newer) +Python http://python.org (version 3.3 or newer) Ninja http://martine.github.com/ninja/ |
