pyhw 0.7.0__py3-none-any.whl → 0.7.2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pyhw/__init__.py +1 -1
- pyhw/backend/npu/macos.py +31 -5
- pyhw/pyhwUtil/pyhwUtil.py +1 -1
- {pyhw-0.7.0.dist-info → pyhw-0.7.2.dist-info}/METADATA +6 -4
- {pyhw-0.7.0.dist-info → pyhw-0.7.2.dist-info}/RECORD +9 -9
- {pyhw-0.7.0.dist-info → pyhw-0.7.2.dist-info}/LICENSE +0 -0
- {pyhw-0.7.0.dist-info → pyhw-0.7.2.dist-info}/WHEEL +0 -0
- {pyhw-0.7.0.dist-info → pyhw-0.7.2.dist-info}/entry_points.txt +0 -0
- {pyhw-0.7.0.dist-info → pyhw-0.7.2.dist-info}/top_level.txt +0 -0
pyhw/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.
|
1
|
+
__version__ = '0.7.2'
|
pyhw/backend/npu/macos.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
from .npuInfo import NPUInfo
|
2
|
-
from ...pyhwUtil import getArch
|
2
|
+
from ...pyhwUtil import getArch, getOS
|
3
3
|
import json
|
4
4
|
import subprocess
|
5
|
+
from ..cpu import CPUDetect
|
5
6
|
|
6
7
|
|
7
8
|
class NPUDetectMacOS:
|
@@ -10,10 +11,12 @@ class NPUDetectMacOS:
|
|
10
11
|
self.__arch = getArch()
|
11
12
|
|
12
13
|
def getNPUInfo(self):
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
self.__npuInfo.npus.append(self.__getNPUbyModelName())
|
15
|
+
self.__npuInfo.number += 1
|
16
|
+
# if self.__arch == "aarch64":
|
17
|
+
# self.__getNPUAppleSilicon()
|
18
|
+
# else: # Does not consider powerPC based Macs.
|
19
|
+
# self.__getNPUIntel()
|
17
20
|
return self.__npuInfo
|
18
21
|
|
19
22
|
def __getNPUAppleSilicon(self):
|
@@ -37,3 +40,26 @@ class NPUDetectMacOS:
|
|
37
40
|
else:
|
38
41
|
return vendor
|
39
42
|
|
43
|
+
@staticmethod
|
44
|
+
def __getNPUbyModelName():
|
45
|
+
# Placeholder
|
46
|
+
# see https://apple.fandom.com/wiki/Neural_Engine for more details.
|
47
|
+
model_name = CPUDetect(os=getOS()).getCPUInfo().model
|
48
|
+
npu = {
|
49
|
+
"Apple M1": "Apple Neural Engine 16 Core [SOC Integrated]",
|
50
|
+
"Apple M1 Pro": "Apple Neural Engine 16 Core [SOC Integrated]",
|
51
|
+
"Apple M1 Max": "Apple Neural Engine 16 Core [SOC Integrated]",
|
52
|
+
"Apple M1 Ultra": "Apple Neural Engine 32 Core [SOC Integrated]",
|
53
|
+
"Apple M2": "Apple Neural Engine 16 Core [SOC Integrated]",
|
54
|
+
"Apple M2 Pro": "Apple Neural Engine 16 Core [SOC Integrated]",
|
55
|
+
"Apple M2 Max": "Apple Neural Engine 16 Core [SOC Integrated]",
|
56
|
+
"Apple M2 Ultra": "Apple Neural Engine 32 Core [SOC Integrated]",
|
57
|
+
"Apple M3": "Apple Neural Engine 16 Core [SOC Integrated]",
|
58
|
+
"Apple M3 Pro": "Apple Neural Engine 16 Core [SOC Integrated]",
|
59
|
+
"Apple M3 Max": "Apple Neural Engine 16 Core [SOC Integrated]",
|
60
|
+
"Apple M4": "Apple Neural Engine 16 Core [SOC Integrated]",
|
61
|
+
"Apple M4 Pro": "Apple Neural Engine 16 Core [SOC Integrated]",
|
62
|
+
"Apple M4 Max": "Apple Neural Engine 16 Core [SOC Integrated]"
|
63
|
+
}
|
64
|
+
return npu.get(model_name, "Not Found")
|
65
|
+
|
pyhw/pyhwUtil/pyhwUtil.py
CHANGED
@@ -145,9 +145,9 @@ def createDataString(data: Data):
|
|
145
145
|
data_string += data_string_processor.getShell()
|
146
146
|
data_string += data_string_processor.getCPU()
|
147
147
|
data_string += data_string_processor.getGPU()
|
148
|
+
data_string += data_string_processor.getNPU()
|
148
149
|
data_string += data_string_processor.getMemory()
|
149
150
|
data_string += data_string_processor.getNIC()
|
150
|
-
data_string += data_string_processor.getNPU()
|
151
151
|
return data_string
|
152
152
|
|
153
153
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyhw
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.2
|
4
4
|
Summary: PyHw, a neofetch-like command line tool for fetching system information but written mostly in python.
|
5
5
|
Author-email: Xiao Ran <xiaoran.007@icloud.com>
|
6
6
|
License: BSD-3-Clause
|
@@ -13,17 +13,19 @@ Classifier: Operating System :: OS Independent
|
|
13
13
|
Requires-Python: >=3.9
|
14
14
|
Description-Content-Type: text/markdown
|
15
15
|
License-File: LICENSE
|
16
|
-
Requires-Dist: pypci-ng>=0.0.
|
16
|
+
Requires-Dist: pypci-ng>=0.0.9
|
17
17
|
|
18
18
|
# PyHw
|
19
19
|
[](https://pepy.tech/project/pyhw)
|
20
20
|

|
21
21
|
|
22
|
-

|
22
|
+

|
24
23
|

|
25
24
|

|
26
25
|
|
26
|
+

|
27
|
+

|
28
|
+
|
27
29
|
|
28
30
|
PyHw, a neofetch-like command line tool for fetching system information but written mostly in Python. **Currently, this project is still in the initial stage, only Linux, macOS, and FreeBSD are supported.**
|
29
31
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pyhw/__init__.py,sha256=
|
1
|
+
pyhw/__init__.py,sha256=0eAFjnFVSWI6_301EfFzaXJIiwNScF9GpeINoCLd-XM,22
|
2
2
|
pyhw/__main__.py,sha256=A0t0jkcwdTXd6ca7POUfm8krjCn2FQaXTIss5gNmNcI,1775
|
3
3
|
pyhw/backend/__init__.py,sha256=knn_3Yroow1h0dqdrozk3zyy3vz-kQyNBRjR6OLmVoY,50
|
4
4
|
pyhw/backend/backendBase.py,sha256=mloo8mPEbgbIdmyQ3I4vdEXMSSjxWi_wnwACmzvHbEo,506
|
@@ -42,7 +42,7 @@ pyhw/backend/nic/nicInfo.py,sha256=wuBuL-aIzD441IUDPGz5e0xctcZ-opdpgqkVxgbvZLg,1
|
|
42
42
|
pyhw/backend/npu/__init__.py,sha256=PgLKbwpgT5vw9xpa294Zxb94McyxNXW46_vMbT2Iqyc,58
|
43
43
|
pyhw/backend/npu/bsd.py,sha256=eKkOWZ4MBybR_KOGGcsWUpzCGgghhvuBy5VNsnEE8cI,134
|
44
44
|
pyhw/backend/npu/linux.py,sha256=mXHSYRION3pghwk6_4vgHxjSkNxI68ksGLkFZstR0mc,1192
|
45
|
-
pyhw/backend/npu/macos.py,sha256=
|
45
|
+
pyhw/backend/npu/macos.py,sha256=c-iSmGfBWYeoh7nXuCFmPlVH6bc6sil_yRsAlabl93k,2513
|
46
46
|
pyhw/backend/npu/npuBase.py,sha256=qiioBmHDeh2Et1F7lwmNight-2W32C0VmMtx2DIOCz4,523
|
47
47
|
pyhw/backend/npu/npuInfo.py,sha256=82dK6XvW_XKw4O5-RfR4-qQRR7Plh8qqJLj0YDzISmU,135
|
48
48
|
pyhw/backend/os/__init__.py,sha256=rPHQYdQK3qU6ZwwodqVoEWeqBnKffXlJyi4k3-8ViPY,53
|
@@ -89,11 +89,11 @@ pyhw/library/lib/iokitGPULib.dylib,sha256=DcJ0GZY79gTFckLFYtZgeKn1T0NFvdO_k_ccCa
|
|
89
89
|
pyhw/pyhwException/__init__.py,sha256=8JsFvtF13g0Y5t4z9fRndDXtfCzuBM59jDf6PhWSFSk,220
|
90
90
|
pyhw/pyhwException/pyhwException.py,sha256=wxuzFQa9g7XB1q9TUKO_55lw7wMEJMpzG8w1GVTFVa0,197
|
91
91
|
pyhw/pyhwUtil/__init__.py,sha256=diIqlNUBfuHu-2VAOJk5nipGLafnWxR3chAAOmX8QRo,250
|
92
|
-
pyhw/pyhwUtil/pyhwUtil.py,sha256=
|
92
|
+
pyhw/pyhwUtil/pyhwUtil.py,sha256=6aKYh7sEPkqrfevckJO7MGmehGwgu_QVniFjVOw4dYk,6297
|
93
93
|
pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
|
94
|
-
pyhw-0.7.
|
95
|
-
pyhw-0.7.
|
96
|
-
pyhw-0.7.
|
97
|
-
pyhw-0.7.
|
98
|
-
pyhw-0.7.
|
99
|
-
pyhw-0.7.
|
94
|
+
pyhw-0.7.2.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
|
95
|
+
pyhw-0.7.2.dist-info/METADATA,sha256=48oKoqP9W07NgvgrDNK7s1reQW14yp6VXaxmOpr5HuQ,5543
|
96
|
+
pyhw-0.7.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
97
|
+
pyhw-0.7.2.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
|
98
|
+
pyhw-0.7.2.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
|
99
|
+
pyhw-0.7.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|