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/scripts/symbolextractor.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/scripts/symbolextractor.py')
-rw-r--r-- | mesonbuild/scripts/symbolextractor.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/scripts/symbolextractor.py b/mesonbuild/scripts/symbolextractor.py index 728d5e2..17501e2 100644 --- a/mesonbuild/scripts/symbolextractor.py +++ b/mesonbuild/scripts/symbolextractor.py @@ -38,18 +38,18 @@ RELINKING_WARNING = 'Relinking will always happen on source changes.' def dummy_syms(outfilename: str) -> None: """Just touch it so relinking happens always.""" - with open(outfilename, 'w'): + with open(outfilename, 'w', encoding='utf-8'): pass def write_if_changed(text: str, outfilename: str) -> None: try: - with open(outfilename) as f: + with open(outfilename, encoding='utf-8') as f: oldtext = f.read() if text == oldtext: return except FileNotFoundError: pass - with open(outfilename, 'w') as f: + with open(outfilename, 'w', encoding='utf-8') as f: f.write(text) def print_tool_warning(tools: T.List[str], msg: str, stderr: T.Optional[str] = None) -> None: @@ -61,7 +61,7 @@ def print_tool_warning(tools: T.List[str], msg: str, stderr: T.Optional[str] = N m += '\n' + stderr mlog.warning(m) # Write it out so we don't warn again - with open(TOOL_WARNING_FILE, 'w'): + with open(TOOL_WARNING_FILE, 'w', encoding='utf-8'): pass def get_tool(name: str) -> T.List[str]: @@ -309,7 +309,7 @@ def gen_symbols(libfilename: str, impfilename: str, outfilename: str, cross_host mlog.warning('Symbol extracting has not been implemented for this ' 'platform. ' + RELINKING_WARNING) # Write it out so we don't warn again - with open(TOOL_WARNING_FILE, 'w'): + with open(TOOL_WARNING_FILE, 'w', encoding='utf-8'): pass dummy_syms(outfilename) |