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/mesonmain.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/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 4dd47e4..86ae973 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -12,7 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Work around some pathlib bugs... +from . import _pathlib import sys +sys.modules['pathlib'] = _pathlib + import os.path import importlib import traceback @@ -96,7 +100,7 @@ def setup_vsenv() -> None: bat_separator = '---SPLIT---' bat_contents = bat_template.format(bat_path, bat_separator) - bat_file.write_text(bat_contents) + bat_file.write_text(bat_contents, encoding='utf-8') try: bat_output = subprocess.check_output(str(bat_file), universal_newlines=True) finally: |