diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-06-29 20:52:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 20:52:55 +0300 |
commit | 4bfee181c5a166e3d429bd265e06d299dce50f30 (patch) | |
tree | 8918a0e09f668ed55748ec254c51b4d92b5403a9 /mesonbuild/cmake/fileapi.py | |
parent | 81ca0ec7ae975723b8b399b9f142286895a45dab (diff) | |
parent | c0a2025d038a08092212bfc45e7bbb46ff1e8e52 (diff) | |
download | meson-4bfee181c5a166e3d429bd265e06d299dce50f30.zip meson-4bfee181c5a166e3d429bd265e06d299dce50f30.tar.gz meson-4bfee181c5a166e3d429bd265e06d299dce50f30.tar.bz2 |
Merge pull request #8918 from mensinda/pathlibFixes
pathlib: Patch pathlib to work around some bugs (fixes #8263 #7295)
Diffstat (limited to 'mesonbuild/cmake/fileapi.py')
-rw-r--r-- | mesonbuild/cmake/fileapi.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/cmake/fileapi.py b/mesonbuild/cmake/fileapi.py index 6773e9a..5d4d01a 100644 --- a/mesonbuild/cmake/fileapi.py +++ b/mesonbuild/cmake/fileapi.py @@ -51,7 +51,7 @@ class CMakeFileAPI: } query_file = self.request_dir / 'query.json' - query_file.write_text(json.dumps(query, indent=2)) + query_file.write_text(json.dumps(query, indent=2), encoding='utf-8') def load_reply(self) -> None: if not self.reply_dir.is_dir(): @@ -75,7 +75,7 @@ class CMakeFileAPI: # Debug output debug_json = self.build_dir / '..' / 'fileAPI.json' debug_json = debug_json.resolve() - debug_json.write_text(json.dumps(index, indent=2)) + debug_json.write_text(json.dumps(index, indent=2), encoding='utf-8') mlog.cmd_ci_include(debug_json.as_posix()) # parse the JSON @@ -313,7 +313,7 @@ class CMakeFileAPI: if not real_path.exists(): raise CMakeException(f'File "{real_path}" does not exist') - data = json.loads(real_path.read_text()) + data = json.loads(real_path.read_text(encoding='utf-8')) assert isinstance(data, dict) for i in data.keys(): assert isinstance(i, str) |