aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/environment.py8
-rw-r--r--mesonbuild/wrap/wrap.py5
-rwxr-xr-xmesontest.py8
3 files changed, 11 insertions, 10 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index c34b2e7..cd35285 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -459,11 +459,11 @@ class Environment:
for compiler in compilers:
if isinstance(compiler, str):
compiler = [compiler]
+ if 'cl' in compiler or 'cl.exe' in compiler:
+ arg = '/?'
+ else:
+ arg = '--version'
try:
- if 'cl' in compiler or 'cl.exe' in compiler:
- arg = '/?'
- else:
- arg = '--version'
p, out, err = Popen_safe(compiler + [arg])
except OSError as e:
popen_exceptions[' '.join(compiler + [arg])] = e
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 4dc539a..b17d931 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -301,12 +301,13 @@ class Resolver:
try:
import lzma
del lzma
+ except ImportError:
+ pass
+ else:
try:
shutil.register_unpack_format('xztar', ['.tar.xz', '.txz'], shutil._unpack_tarfile, [], "xz'ed tar-file")
except shutil.RegistryError:
pass
- except ImportError:
- pass
target_dir = os.path.join(self.subdir_root, package.get('directory'))
if os.path.isdir(target_dir):
return
diff --git a/mesontest.py b/mesontest.py
index bdbb44a..9421c7f 100755
--- a/mesontest.py
+++ b/mesontest.py
@@ -457,11 +457,11 @@ TIMEOUT: %4d
return test.name
def run_tests(self, tests):
+ executor = None
+ logfile = None
+ jsonlogfile = None
+ futures = []
try:
- executor = None
- logfile = None
- jsonlogfile = None
- futures = []
numlen = len('%d' % len(tests))
(logfile, logfilename, jsonlogfile, jsonlogfilename) = self.open_log_files()
wrap = self.get_wrapper()