pyhw 0.4.1__py3-none-any.whl → 0.5.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pyhw/backend/nic/macos.py +12 -3
- pyhw/backend/npu/macos.py +1 -1
- {pyhw-0.4.1.dist-info → pyhw-0.5.0.dist-info}/METADATA +1 -1
- {pyhw-0.4.1.dist-info → pyhw-0.5.0.dist-info}/RECORD +8 -8
- {pyhw-0.4.1.dist-info → pyhw-0.5.0.dist-info}/LICENSE +0 -0
- {pyhw-0.4.1.dist-info → pyhw-0.5.0.dist-info}/WHEEL +0 -0
- {pyhw-0.4.1.dist-info → pyhw-0.5.0.dist-info}/entry_points.txt +0 -0
- {pyhw-0.4.1.dist-info → pyhw-0.5.0.dist-info}/top_level.txt +0 -0
pyhw/backend/nic/macos.py
CHANGED
@@ -7,12 +7,21 @@ class NICDetectMacOS:
|
|
7
7
|
self.__nicInfo = NICInfo()
|
8
8
|
|
9
9
|
def getNICInfo(self):
|
10
|
-
self.
|
11
|
-
self.__nicInfo.number = 1
|
10
|
+
self.__getNICInfo()
|
12
11
|
return self.__nicInfo
|
13
12
|
|
14
13
|
def __getNICInfo(self):
|
15
14
|
# Placeholder for a more advanced method.
|
16
|
-
|
15
|
+
try:
|
16
|
+
interface = subprocess.run(["bash", "-c", "route get default | grep interface"], capture_output=True, text=True).stdout.strip().split(":")[1]
|
17
|
+
if_ip = subprocess.run(["bash", "-c", f"ipconfig getifaddr {interface}"], capture_output=True, text=True).stdout.strip()
|
18
|
+
self.__nicInfo.nics.append(f"{interface} @ {if_ip}")
|
19
|
+
self.__nicInfo.number += 1
|
20
|
+
except:
|
21
|
+
self.__handleError()
|
22
|
+
|
23
|
+
def __handleError(self):
|
24
|
+
self.__nicInfo.nics.append("en0")
|
25
|
+
self.__nicInfo.number = 1
|
17
26
|
|
18
27
|
|
pyhw/backend/npu/macos.py
CHANGED
@@ -18,7 +18,7 @@ class NPUDetectMacOS:
|
|
18
18
|
|
19
19
|
def __getNPUAppleSilicon(self):
|
20
20
|
# Place holder
|
21
|
-
self.__npuInfo.npus.append("Neural Engine [SOC Integrated]")
|
21
|
+
self.__npuInfo.npus.append("Apple Neural Engine [SOC Integrated]")
|
22
22
|
self.__npuInfo.number += 1
|
23
23
|
|
24
24
|
def __getNPUIntel(self):
|
@@ -32,12 +32,12 @@ pyhw/backend/memory/memoryInfo.py,sha256=OQF165uEyuapAsi7cKacQYDRnKdrQHeldfyFwzS
|
|
32
32
|
pyhw/backend/metal/t.py,sha256=52yv-JoXNfaIOfcxEEidIg0MoyFtzWvTRm550kQKPZA,391
|
33
33
|
pyhw/backend/nic/__init__.py,sha256=eP4eOYIvMF3LcTf954hJa6TnB8R4Qahss2g-UcgypKY,57
|
34
34
|
pyhw/backend/nic/linux.py,sha256=2IDhesM77qLt7QK8HzYiMeLyuKWOVVrrDtkLHs7R6lU,1321
|
35
|
-
pyhw/backend/nic/macos.py,sha256=
|
35
|
+
pyhw/backend/nic/macos.py,sha256=63gZjSmUGwGqfs41IWrEXmSz9O8eQy4G5oql3JLZmoo,855
|
36
36
|
pyhw/backend/nic/nicBase.py,sha256=hmVbiPOrDFClQrOBgAUgE8GVkC5nVH280jnlb65CDV4,539
|
37
37
|
pyhw/backend/nic/nicInfo.py,sha256=wuBuL-aIzD441IUDPGz5e0xctcZ-opdpgqkVxgbvZLg,133
|
38
38
|
pyhw/backend/npu/__init__.py,sha256=PgLKbwpgT5vw9xpa294Zxb94McyxNXW46_vMbT2Iqyc,58
|
39
39
|
pyhw/backend/npu/linux.py,sha256=eQLozhGOh3iHoFXdRYp_Fn9OsrmJ7tsyxcOPUvopOSw,1286
|
40
|
-
pyhw/backend/npu/macos.py,sha256
|
40
|
+
pyhw/backend/npu/macos.py,sha256=mNnfvjjPQNlA-mViuhmfeb__uI1be93ZSZvv7PVD52s,1037
|
41
41
|
pyhw/backend/npu/npuBase.py,sha256=6lPYmsOGHO-lT-GqaJ2hNXRV_FLYqguuZ_7L6JJCG-g,411
|
42
42
|
pyhw/backend/npu/npuInfo.py,sha256=82dK6XvW_XKw4O5-RfR4-qQRR7Plh8qqJLj0YDzISmU,135
|
43
43
|
pyhw/backend/os/__init__.py,sha256=rPHQYdQK3qU6ZwwodqVoEWeqBnKffXlJyi4k3-8ViPY,53
|
@@ -82,9 +82,9 @@ pyhw/pyhwException/pyhwException.py,sha256=wxuzFQa9g7XB1q9TUKO_55lw7wMEJMpzG8w1G
|
|
82
82
|
pyhw/pyhwUtil/__init__.py,sha256=PzeP9fXsIhvr3sUpJ4DxW9_H25DEIasBFfXd_NztfR4,226
|
83
83
|
pyhw/pyhwUtil/pyhwUtil.py,sha256=CKXJrt6KGhZCV1J7MjsQ21c_jPmC1I3wZBPCKJfdqbM,2478
|
84
84
|
pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
|
85
|
-
pyhw-0.
|
86
|
-
pyhw-0.
|
87
|
-
pyhw-0.
|
88
|
-
pyhw-0.
|
89
|
-
pyhw-0.
|
90
|
-
pyhw-0.
|
85
|
+
pyhw-0.5.0.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
|
86
|
+
pyhw-0.5.0.dist-info/METADATA,sha256=3lm4E421hVwSbbutVT-vi0FJEbBT1RXVCylpBTF-SdM,4136
|
87
|
+
pyhw-0.5.0.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
88
|
+
pyhw-0.5.0.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
|
89
|
+
pyhw-0.5.0.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
|
90
|
+
pyhw-0.5.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|