aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/externalproject.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-06-29 20:52:55 +0300
committerGitHub <noreply@github.com>2021-06-29 20:52:55 +0300
commit4bfee181c5a166e3d429bd265e06d299dce50f30 (patch)
tree8918a0e09f668ed55748ec254c51b4d92b5403a9 /mesonbuild/scripts/externalproject.py
parent81ca0ec7ae975723b8b399b9f142286895a45dab (diff)
parentc0a2025d038a08092212bfc45e7bbb46ff1e8e52 (diff)
downloadmeson-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/externalproject.py')
-rw-r--r--mesonbuild/scripts/externalproject.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/scripts/externalproject.py b/mesonbuild/scripts/externalproject.py
index 657ef2f..a8e3bfe 100644
--- a/mesonbuild/scripts/externalproject.py
+++ b/mesonbuild/scripts/externalproject.py
@@ -34,7 +34,7 @@ class ExternalProject:
self.make = options.make
def write_depfile(self) -> None:
- with open(self.depfile, 'w') as f:
+ with open(self.depfile, 'w', encoding='utf-8') as f:
f.write(f'{self.stampfile}: \\\n')
for dirpath, dirnames, filenames in os.walk(self.src_dir):
dirnames[:] = [d for d in dirnames if not d.startswith('.')]
@@ -45,7 +45,7 @@ class ExternalProject:
f.write(' {} \\\n'.format(path.as_posix().replace(' ', '\\ ')))
def write_stampfile(self) -> None:
- with open(self.stampfile, 'w') as f:
+ with open(self.stampfile, 'w', encoding='utf-8') as f:
pass
def gnu_make(self) -> bool:
@@ -78,7 +78,7 @@ class ExternalProject:
log_filename = Path(self.log_dir, f'{self.name}-{step}.log')
output = None
if not self.verbose:
- output = open(log_filename, 'w')
+ output = open(log_filename, 'w', encoding='utf-8')
output.write(m + '\n')
output.flush()
else: