MCPcopy Index your code
hub / github.com/nodejs/node / GuessOS

Function GuessOS

tools/utils.py:48–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47
48def GuessOS():
49 id = platform.system()
50 if id == 'Linux':
51 return 'linux'
52 elif id == 'Darwin':
53 return 'macos'
54 elif id.find('CYGWIN') >= 0:
55 return 'cygwin'
56 elif id == 'Windows' or id == 'Microsoft':
57 # On Windows Vista platform.system() can return 'Microsoft' with some
58 # versions of Python, see http://bugs.python.org/issue1082
59 return 'win32'
60 elif id == 'FreeBSD':
61 return 'freebsd'
62 elif id == 'OpenBSD':
63 return 'openbsd'
64 elif id == 'SunOS':
65 return 'solaris'
66 elif id == 'NetBSD':
67 return 'netbsd'
68 elif id == 'DragonFly':
69 # Doing so on purpose as they are pretty close
70 # minus few features
71 return 'freebsd'
72 elif id == 'AIX':
73 return 'aix'
74 elif id == 'OS400':
75 return 'ibmi'
76 else:
77 return None
78
79
80# This will default to building the 32 bit VM even on machines that are capable

Callers 1

IsWindowsFunction · 0.70

Calls 1

findMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…