Skip to content

Commit 013ece8

Browse files
dnicolodirgommers
authored andcommitted
BUG: the native and cross files must be UTF-8 encoded
1 parent 8ea9bb6 commit 013ece8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mesonpy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,15 +703,15 @@ def __init__(
703703
cpu_family = {family!r}
704704
endian = 'little'
705705
''')
706-
self._meson_cross_file.write_text(cross_file_data)
706+
self._meson_cross_file.write_text(cross_file_data, encoding='utf-8')
707707
self._meson_args['setup'].extend(('--cross-file', os.fspath(self._meson_cross_file)))
708708

709709
# write the native file
710710
native_file_data = textwrap.dedent(f'''
711711
[binaries]
712712
python = '{sys.executable}'
713713
''')
714-
self._meson_native_file.write_text(native_file_data)
714+
self._meson_native_file.write_text(native_file_data, encoding='utf-8')
715715

716716
# reconfigure if we have a valid Meson build directory. Meson
717717
# uses the presence of the 'meson-private/coredata.dat' file

0 commit comments

Comments
 (0)