14
14
import shutil
15
15
import subprocess
16
16
import sys
17
- from functools import lru_cache
18
17
from typing import cast
19
18
20
19
import distro
21
20
22
21
23
- @lru_cache (maxsize = None )
24
22
def is_windows () -> bool :
25
23
"""
26
24
Simple function to return if a host is Windows or not.
@@ -30,7 +28,6 @@ def is_windows() -> bool:
30
28
return sys .platform .startswith ("win" )
31
29
32
30
33
- @lru_cache (maxsize = None )
34
31
def is_linux () -> bool :
35
32
"""
36
33
Simple function to return if a host is Linux or not.
@@ -41,7 +38,6 @@ def is_linux() -> bool:
41
38
return sys .platform .startswith ("linux" )
42
39
43
40
44
- @lru_cache (maxsize = None )
45
41
def is_darwin () -> bool :
46
42
"""
47
43
Simple function to return if a host is Darwin (macOS) or not.
@@ -51,7 +47,6 @@ def is_darwin() -> bool:
51
47
return sys .platform .startswith ("darwin" )
52
48
53
49
54
- @lru_cache (maxsize = None )
55
50
def is_sunos () -> bool :
56
51
"""
57
52
Simple function to return if host is SunOS or not.
@@ -61,7 +56,6 @@ def is_sunos() -> bool:
61
56
return sys .platform .startswith ("sunos" )
62
57
63
58
64
- @lru_cache (maxsize = None )
65
59
def is_smartos () -> bool :
66
60
"""
67
61
Simple function to return if host is SmartOS (Illumos) or not.
@@ -73,7 +67,6 @@ def is_smartos() -> bool:
73
67
return False
74
68
75
69
76
- @lru_cache (maxsize = None )
77
70
def is_freebsd () -> bool :
78
71
"""
79
72
Simple function to return if host is FreeBSD or not.
@@ -83,7 +76,6 @@ def is_freebsd() -> bool:
83
76
return sys .platform .startswith ("freebsd" )
84
77
85
78
86
- @lru_cache (maxsize = None )
87
79
def is_netbsd () -> bool :
88
80
"""
89
81
Simple function to return if host is NetBSD or not.
@@ -93,7 +85,6 @@ def is_netbsd() -> bool:
93
85
return sys .platform .startswith ("netbsd" )
94
86
95
87
96
- @lru_cache (maxsize = None )
97
88
def is_openbsd () -> bool :
98
89
"""
99
90
Simple function to return if host is OpenBSD or not.
@@ -103,7 +94,6 @@ def is_openbsd() -> bool:
103
94
return sys .platform .startswith ("openbsd" )
104
95
105
96
106
- @lru_cache (maxsize = None )
107
97
def is_aix () -> bool :
108
98
"""
109
99
Simple function to return if host is AIX or not.
@@ -113,15 +103,13 @@ def is_aix() -> bool:
113
103
return sys .platform .startswith ("aix" )
114
104
115
105
116
- @lru_cache (maxsize = None )
117
106
def is_aarch64 () -> bool :
118
107
"""
119
108
Simple function to return if host is AArch64 or not.
120
109
"""
121
110
return platform .machine ().startswith ("aarch64" )
122
111
123
112
124
- @lru_cache (maxsize = None )
125
113
def is_photonos () -> bool :
126
114
"""
127
115
Simple function to return if host is Photon OS or not.
0 commit comments