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/dependencies/cuda.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/dependencies/cuda.py')
-rw-r--r-- | mesonbuild/dependencies/cuda.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/cuda.py b/mesonbuild/dependencies/cuda.py index 43bb622..21cc7ab 100644 --- a/mesonbuild/dependencies/cuda.py +++ b/mesonbuild/dependencies/cuda.py @@ -184,7 +184,7 @@ class CudaDependency(SystemDependency): def _read_cuda_runtime_api_version(self, path_str: str) -> T.Optional[str]: path = Path(path_str) for i in path.rglob('cuda_runtime_api.h'): - raw = i.read_text() + raw = i.read_text(encoding='utf-8') m = self.cudart_version_regex.search(raw) if not m: continue @@ -202,7 +202,7 @@ class CudaDependency(SystemDependency): # Read 'version.txt' at the root of the CUDA Toolkit directory to determine the tookit version version_file_path = os.path.join(path, 'version.txt') try: - with open(version_file_path) as version_file: + with open(version_file_path, encoding='utf-8') as version_file: version_str = version_file.readline() # e.g. 'CUDA Version 10.1.168' m = self.toolkit_version_regex.match(version_str) if m: |