From 00290ddef6c340575898974c63e57975e3866b75 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Dec 2021 13:40:15 +0300 Subject: 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. --- project/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'project/utils.py') 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 -- cgit v1.2.3