diff options
author | Jürg Billeter <j@bitron.ch> | 2020-02-20 17:39:09 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-02-27 12:18:07 +0100 |
commit | 6b77daa40a2a07d2eb16fbcf6cafa1f2ce229114 (patch) | |
tree | 7927a74dbf061c6c7649a6ed98f680dfb276e7e8 /src/buildstream/_platform | |
parent | e76ee5796f0eea0e4a0fc9d892b0272fab0885f2 (diff) | |
download | buildstream-6b77daa40a2a07d2eb16fbcf6cafa1f2ce229114.tar.gz |
Canonicalize OS name
This matches the REAPI platform lexicon.
Diffstat (limited to 'src/buildstream/_platform')
-rw-r--r-- | src/buildstream/_platform/platform.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/buildstream/_platform/platform.py b/src/buildstream/_platform/platform.py index c838ef6c2..e0a0cf7ce 100644 --- a/src/buildstream/_platform/platform.py +++ b/src/buildstream/_platform/platform.py @@ -138,7 +138,13 @@ class Platform: @staticmethod def get_host_os(): - return platform.uname().system + system = platform.uname().system.lower() + + if system == "darwin" and platform.mac_ver()[0]: + # mac_ver() returns a non-empty release string on macOS. + return "macos" + else: + return system # canonicalize_arch(): # |