Skip to content

Commit fdc6726

Browse files
committed
Add sunos and haiku
Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent cff2a3b commit fdc6726

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/commoncode/system.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ def os_arch():
3030
os = "mac"
3131
elif "freebsd" in sys_platform:
3232
os = "freebsd"
33+
elif "sunos" in sys_platform:
34+
os = "sunos"
35+
elif "haiku" in sys_platform:
36+
os = "haiku"
3337
else:
3438
raise Exception("Unsupported OS/platform %r" % sys_platform)
3539
return os, arch
@@ -45,7 +49,9 @@ def os_arch():
4549
on_mac = current_os == "mac"
4650
on_linux = current_os == "linux"
4751
on_freebsd = current_os == "freebsd"
48-
on_posix = not on_windows and (on_mac or on_linux or on_freebsd)
52+
on_sunos = current_os == "sunos"
53+
on_haiku = current_os == "haiku"
54+
on_posix = not on_windows and (on_mac or on_linux or on_freebsd or on_sunos or on_haiku)
4955

5056
current_os_arch = "%(current_os)s-%(current_arch)s" % locals()
5157
noarch = "noarch"

0 commit comments

Comments
 (0)