diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-12-15 13:40:15 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-12-15 13:51:14 +0300 |
commit | 00290ddef6c340575898974c63e57975e3866b75 (patch) | |
tree | c20aa1c307deb3c658b5f86689f35a8be0ede8db /project/utils.py | |
parent | workflows/basic: minor fix (diff) | |
download | cmake-common-00290ddef6c340575898974c63e57975e3866b75.tar.gz cmake-common-00290ddef6c340575898974c63e57975e3866b75.zip |
basic macOS support
I don't have a Mac to test on, but the knowledge that there is basic
support for macOS is still nice.
Diffstat (limited to '')
-rw-r--r-- | project/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/project/utils.py b/project/utils.py index 39dfb0d..6697ff7 100644 --- a/project/utils.py +++ b/project/utils.py @@ -13,7 +13,7 @@ import sys import tempfile import time -from project.os import on_cygwin, on_linux +import project.os def normalize_path(s): @@ -25,7 +25,7 @@ def mkdir_parent(path): def full_exe_name(exe): - if on_linux(): + if not project.os.on_windows_like(): # There's no PATHEXT on Linux. return exe # b2 on Windows/Cygwin doesn't like it when the executable name doesn't @@ -34,7 +34,7 @@ def full_exe_name(exe): path = shutil.which(exe, path=dir_path) if not path: raise RuntimeError(f"executable '{exe}' could not be found") - if on_cygwin(): + if project.os.on_cygwin(): # On Cygwin, shutil.which('gcc') == '/usr/bin/gcc' and shutil.which('gcc.exe') # == '/usr/bin/gcc.exe'; we want the latter version. shutil.which('clang++') # == '/usr/bin/clang++' is fine though, since it _is_ the complete path |