diff options
| author | U2FsdGVkX1 <U2FsdGVkX1@gmail.com> | 2024-02-05 17:24:21 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-05 17:24:21 +0800 |
| commit | 7a60218dcaf0e11694ff1cb0531168fe576dc390 (patch) | |
| tree | ab29a0ac338008ac92a258e77f246dd24fc9435d | |
| parent | 91caf7aa56ba622926f7056d4a42083a75c24e5a (diff) | |
| download | meson-7a60218dcaf0e11694ff1cb0531168fe576dc390.tar.gz | |
Turn on strict mode, as it is no longer the default since Python 3.6
| -rw-r--r-- | mesonbuild/compilers/mixins/gnu.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py index ef7f120f8..79f271607 100644 --- a/mesonbuild/compilers/mixins/gnu.py +++ b/mesonbuild/compilers/mixins/gnu.py @@ -470,9 +470,12 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta): # which is wrong and breaks things. Store everything, just to be sure. pobj = pathlib.Path(p) if pobj.exists(): - resolved = pobj.resolve().as_posix() - if resolved not in result: - result.append(resolved) + try: + resolved = pobj.resolve(True).as_posix() + if resolved not in result: + result.append(resolved) + except FileNotFoundError: + pass unresolved = pobj.as_posix() if unresolved not in result: result.append(unresolved) |
