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/os.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'project/os.py') diff --git a/project/os.py b/project/os.py index eaa63db..cb5bd44 100644 --- a/project/os.py +++ b/project/os.py @@ -11,6 +11,7 @@ class OS(Enum): WINDOWS = 'Windows' LINUX = 'Linux' CYGWIN = 'Cygwin' + MACOS = 'macOS' def __str__(self): return str(self.value) @@ -22,6 +23,8 @@ class OS(Enum): return OS.WINDOWS if system == 'Linux': return OS.LINUX + if system == 'Darwin': + return OS.MACOS if system.startswith('CYGWIN_NT'): return OS.CYGWIN raise NotImplementedError(f'unsupported OS: {system}') @@ -42,7 +45,7 @@ def on_linux(): def on_linux_like(): os = OS.current() - return os is OS.LINUX or os is OS.CYGWIN + return os is OS.LINUX or os is OS.CYGWIN or os is OS.MACOS def on_cygwin(): -- cgit v1.2.3