diff options
Diffstat (limited to 'mesonbuild/mdist.py')
-rw-r--r-- | mesonbuild/mdist.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/mdist.py b/mesonbuild/mdist.py index 397f8cd..22196d8 100644 --- a/mesonbuild/mdist.py +++ b/mesonbuild/mdist.py @@ -49,7 +49,7 @@ def create_hash(fname): hashname = fname + '.sha256sum' m = hashlib.sha256() m.update(open(fname, 'rb').read()) - with open(hashname, 'w') as f: + with open(hashname, 'w', encoding='utf-8') as f: # A space and an asterisk because that is the format defined by GNU coreutils # and accepted by busybox and the Perl shasum tool. f.write('{} *{}\n'.format(m.hexdigest(), os.path.basename(fname))) @@ -67,7 +67,7 @@ def process_submodules(dirname): if not os.path.exists(module_file): return subprocess.check_call(['git', 'submodule', 'update', '--init', '--recursive'], cwd=dirname) - for line in open(module_file): + for line in open(module_file, encoding='utf-8'): line = line.strip() if '=' not in line: continue @@ -242,7 +242,7 @@ def check_dist(packagename, meson_command, extra_meson_args, bld_root, privdir): unpacked_files = glob(os.path.join(unpackdir, '*')) assert(len(unpacked_files) == 1) unpacked_src_dir = unpacked_files[0] - with open(os.path.join(bld_root, 'meson-info', 'intro-buildoptions.json')) as boptions: + with open(os.path.join(bld_root, 'meson-info', 'intro-buildoptions.json'), encoding='utf-8') as boptions: meson_command += ['-D{name}={value}'.format(**o) for o in json.load(boptions) if o['name'] not in ['backend', 'install_umask', 'buildtype']] meson_command += extra_meson_args |