pyhw 0.11.7__py3-none-any.whl → 0.11.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyhw/__init__.py +1 -1
- pyhw/backend/host/linux.py +2 -2
- pyhw/backend/npu/macos.py +14 -14
- pyhw/backend/shell/shellInfo.py +3 -0
- pyhw/backend/shell/windows.py +22 -2
- pyhw/library/lib/iokitHostLib.dylib +0 -0
- {pyhw-0.11.7.dist-info → pyhw-0.11.9.dist-info}/METADATA +1 -1
- {pyhw-0.11.7.dist-info → pyhw-0.11.9.dist-info}/RECORD +12 -11
- {pyhw-0.11.7.dist-info → pyhw-0.11.9.dist-info}/WHEEL +1 -1
- {pyhw-0.11.7.dist-info → pyhw-0.11.9.dist-info}/LICENSE +0 -0
- {pyhw-0.11.7.dist-info → pyhw-0.11.9.dist-info}/entry_points.txt +0 -0
- {pyhw-0.11.7.dist-info → pyhw-0.11.9.dist-info}/top_level.txt +0 -0
pyhw/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.11.
|
1
|
+
__version__ = '0.11.9'
|
pyhw/backend/host/linux.py
CHANGED
@@ -26,13 +26,13 @@ class HostDetectLinux:
|
|
26
26
|
try:
|
27
27
|
with open("/sys/devices/virtual/dmi/id/product_name", "r") as f:
|
28
28
|
product_name = f.read().strip()
|
29
|
-
if product_name.startswith("To be filled by O.E.M."):
|
29
|
+
if product_name.startswith("To be filled by O.E.M.") or product_name.startswith("Default string"):
|
30
30
|
self._hostInfo.name = f"General {self._arch} Host"
|
31
31
|
else:
|
32
32
|
self._hostInfo.name = product_name
|
33
33
|
with open("/sys/devices/virtual/dmi/id/product_version", "r") as f:
|
34
34
|
version = f.read().strip()
|
35
|
-
if version.startswith("To be filled by O.E.M."):
|
35
|
+
if version.startswith("To be filled by O.E.M.") or product_name.startswith("Default string"):
|
36
36
|
self._hostInfo.version = ""
|
37
37
|
else:
|
38
38
|
self._hostInfo.version = version
|
pyhw/backend/npu/macos.py
CHANGED
@@ -46,20 +46,20 @@ class NPUDetectMacOS:
|
|
46
46
|
# see https://apple.fandom.com/wiki/Neural_Engine for more details.
|
47
47
|
model_name = CPUDetect(os=getOS()).getCPUInfo().model
|
48
48
|
npu = {
|
49
|
-
"Apple M1": "Apple Neural Engine 16 Cores (
|
50
|
-
"Apple M1 Pro": "Apple Neural Engine 16 Cores (
|
51
|
-
"Apple M1 Max": "Apple Neural Engine 16 Cores (
|
52
|
-
"Apple M1 Ultra": "Apple Neural Engine 32 Cores (
|
53
|
-
"Apple M2": "Apple Neural Engine 16 Cores (
|
54
|
-
"Apple M2 Pro": "Apple Neural Engine 16 Cores (
|
55
|
-
"Apple M2 Max": "Apple Neural Engine 16 Cores (
|
56
|
-
"Apple M2 Ultra": "Apple Neural Engine 32 Cores (
|
57
|
-
"Apple M3": "Apple Neural Engine 16 Cores (
|
58
|
-
"Apple M3 Pro": "Apple Neural Engine 16 Cores (
|
59
|
-
"Apple M3 Max": "Apple Neural Engine 16 Cores (
|
60
|
-
"Apple M4": "Apple Neural Engine 16 Cores (
|
61
|
-
"Apple M4 Pro": "Apple Neural Engine 16 Cores (
|
62
|
-
"Apple M4 Max": "Apple Neural Engine 16 Cores (
|
49
|
+
"Apple M1": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
50
|
+
"Apple M1 Pro": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
51
|
+
"Apple M1 Max": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
52
|
+
"Apple M1 Ultra": "Apple Neural Engine 32 Cores (5nm) [SOC Integrated]",
|
53
|
+
"Apple M2": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
54
|
+
"Apple M2 Pro": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
55
|
+
"Apple M2 Max": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
56
|
+
"Apple M2 Ultra": "Apple Neural Engine 32 Cores (5nm) [SOC Integrated]",
|
57
|
+
"Apple M3": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
58
|
+
"Apple M3 Pro": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
59
|
+
"Apple M3 Max": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
60
|
+
"Apple M4": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
61
|
+
"Apple M4 Pro": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
62
|
+
"Apple M4 Max": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]"
|
63
63
|
}
|
64
64
|
return npu.get(model_name, "Not Found")
|
65
65
|
|
pyhw/backend/shell/shellInfo.py
CHANGED
pyhw/backend/shell/windows.py
CHANGED
@@ -5,6 +5,7 @@ from ...pyhwException import BackendException
|
|
5
5
|
from .shellInfo import ShellInfo
|
6
6
|
import json
|
7
7
|
import subprocess
|
8
|
+
import os
|
8
9
|
|
9
10
|
|
10
11
|
class ShellDetectWindows:
|
@@ -12,6 +13,27 @@ class ShellDetectWindows:
|
|
12
13
|
self.__shellInfo = ShellInfo()
|
13
14
|
|
14
15
|
def getShellInfo(self):
|
16
|
+
if not self.__getShellBash():
|
17
|
+
self.__getShellPowerShell()
|
18
|
+
self.__shellInfo.info = self.__shellInfo.shell + " " + self.__shellInfo.version
|
19
|
+
return self.__shellInfo
|
20
|
+
|
21
|
+
def __getShellBash(self) -> bool:
|
22
|
+
try:
|
23
|
+
shell_env = os.getenv("SHELL", "")
|
24
|
+
if "bash" in shell_env:
|
25
|
+
self.__shellInfo.shell = "bash"
|
26
|
+
self.__shellInfo.path = shell_env
|
27
|
+
result = subprocess.run(["bash", "-c", "echo $BASH_VERSION"], capture_output=True, text=True)
|
28
|
+
self.__shellInfo.version = result.stdout.strip().split("(")[0]
|
29
|
+
self.__shellInfo.info = self.__shellInfo.shell + " " + self.__shellInfo.version
|
30
|
+
return True
|
31
|
+
else:
|
32
|
+
return False
|
33
|
+
except:
|
34
|
+
return False
|
35
|
+
|
36
|
+
def __getShellPowerShell(self):
|
15
37
|
COMMAND = "$PSVersionTable.PSVersion | ConvertTo-JSON"
|
16
38
|
|
17
39
|
try:
|
@@ -25,5 +47,3 @@ class ShellDetectWindows:
|
|
25
47
|
|
26
48
|
self.__shellInfo.shell = "PowerShell"
|
27
49
|
self.__shellInfo.version = f"{major}.{minor}"
|
28
|
-
self.__shellInfo.info = f"PowerShell {major}.{minor}"
|
29
|
-
return self.__shellInfo
|
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pyhw/__init__.py,sha256=
|
1
|
+
pyhw/__init__.py,sha256=ZB-5GtuYKdZV45Kzpsu1hjO7QDZzBW0Q7jn8K1ls6Gg,23
|
2
2
|
pyhw/__main__.py,sha256=oZpFtvSyYTM8cMsulvi51zJV0gtmw3OCQVdgoaHbtxc,4977
|
3
3
|
pyhw/backend/__init__.py,sha256=knn_3Yroow1h0dqdrozk3zyy3vz-kQyNBRjR6OLmVoY,50
|
4
4
|
pyhw/backend/backendBase.py,sha256=mloo8mPEbgbIdmyQ3I4vdEXMSSjxWi_wnwACmzvHbEo,506
|
@@ -20,7 +20,7 @@ pyhw/backend/host/__init__.py,sha256=Efaj7-Oya7H8HdpZHQCLrwn-mcfPb-d6yfh4dzsE_7I
|
|
20
20
|
pyhw/backend/host/bsd.py,sha256=9gKnM6yysHBKwS3EQvb0pCeylh3dzHvoEuPe14zo9wQ,382
|
21
21
|
pyhw/backend/host/hostBase.py,sha256=gM49SY6rEaxec_0bUOMk7QlEfR7vjfWp3BXEUqgdncc,762
|
22
22
|
pyhw/backend/host/hostInfo.py,sha256=grz15M2t3f_enqQvc7Qn6HlEfYwa66bu2NYvm8VpJ-g,452
|
23
|
-
pyhw/backend/host/linux.py,sha256=
|
23
|
+
pyhw/backend/host/linux.py,sha256=aU-tWTI2Wjg1HCx2lGFenoaiM94axutXmL7Auu8ilhM,2925
|
24
24
|
pyhw/backend/host/macos.py,sha256=KW-EJK9g1xHNrFsVxJv5GPLpc_ZevX0Zv1WjZUzRkzo,15369
|
25
25
|
pyhw/backend/host/windows.py,sha256=qn2QiTK2wIijyyw_QKdiSizY3teyS-9RNBu5RxEPRSw,1185
|
26
26
|
pyhw/backend/kernel/__init__.py,sha256=fGjwjpOhwA_PnsWbwoq102hwhTay2ufYKaTqxjSV2-I,65
|
@@ -46,7 +46,7 @@ pyhw/backend/nic/windows.py,sha256=c67JwHARtPxNsZ-0_MVKUfc7DwpsRVn7kiHdx_NyDn8,1
|
|
46
46
|
pyhw/backend/npu/__init__.py,sha256=PgLKbwpgT5vw9xpa294Zxb94McyxNXW46_vMbT2Iqyc,58
|
47
47
|
pyhw/backend/npu/bsd.py,sha256=eKkOWZ4MBybR_KOGGcsWUpzCGgghhvuBy5VNsnEE8cI,134
|
48
48
|
pyhw/backend/npu/linux.py,sha256=fPsaXClSC-Py2kHRi17y4eGWrjwRDmjsIX4lgMxRVPc,1806
|
49
|
-
pyhw/backend/npu/macos.py,sha256=
|
49
|
+
pyhw/backend/npu/macos.py,sha256=QQxm9K6bmIdKLiaW7buNUZ_YOdfcEKz9mWPS5xVN2kY,2611
|
50
50
|
pyhw/backend/npu/npuBase.py,sha256=1cVWRmr8g-mDXrJAx2cUO4qWZft2TtT7L2-HzRot2nI,748
|
51
51
|
pyhw/backend/npu/npuInfo.py,sha256=82dK6XvW_XKw4O5-RfR4-qQRR7Plh8qqJLj0YDzISmU,135
|
52
52
|
pyhw/backend/npu/windows.py,sha256=Z2v5CORSa1ap66k48G7uVLbon3zaoT4ug5sX2_rt6vM,1196
|
@@ -59,9 +59,9 @@ pyhw/backend/os/osInfo.py,sha256=NEr76aicI9N3SFrwi1skcpUEjzsyCryTjdE9X1nBjBM,536
|
|
59
59
|
pyhw/backend/os/windows.py,sha256=xjU8NaQwcLusuRw6J7RwwwJiGSv5H_LRBvg2LYEyvNg,1514
|
60
60
|
pyhw/backend/shell/__init__.py,sha256=SeQ7OLNSl_V1JCCWnJGjLilAWiSe9e5kgsMEt63TMS0,62
|
61
61
|
pyhw/backend/shell/shellBase.py,sha256=829rchiqXfyA-oKT81mkGGoKBjZflM5NHIRs0_ZSwaY,531
|
62
|
-
pyhw/backend/shell/shellInfo.py,sha256=
|
62
|
+
pyhw/backend/shell/shellInfo.py,sha256=8Z2geV-2agtpKQl1OJ58cdiEiyVsCbC59AL3MgYnY_E,261
|
63
63
|
pyhw/backend/shell/unix.py,sha256=qTP3Mk8prI2lnQmUJ41G1Fgu1l8nGn9PB3pyBoewtJg,2010
|
64
|
-
pyhw/backend/shell/windows.py,sha256=
|
64
|
+
pyhw/backend/shell/windows.py,sha256=FT8m7pijSw0vtAEtES25ulFCmEyziNor4B7o9q1E-Q8,1639
|
65
65
|
pyhw/backend/title/__init__.py,sha256=l6_WqreSBeK7krapCrbrr4ndnydrXB1aZ50Ve-beV_w,62
|
66
66
|
pyhw/backend/title/titleBase.py,sha256=RVWwtTea8G1MutrN3Ttkjky9wwVtRxnHIsOJKpBbvF8,519
|
67
67
|
pyhw/backend/title/titleInfo.py,sha256=lUsbQNx80MLHuSCgMzWhc72mj0ykcRuWngn9wydYSos,166
|
@@ -105,15 +105,16 @@ pyhw/frontend/logo/ascii/windows_11.pyhw,sha256=VuQTzbBabaEQhm2JBVhy6Ja6lClUGacQ
|
|
105
105
|
pyhw/frontend/logo/ascii/windows_2025.pyhw,sha256=o8eWsiyhNpDoEjiWFiBMfkd-8MdIslGc1Jpm85LU4P8,643
|
106
106
|
pyhw/frontend/logo/ascii/windows_old.pyhw,sha256=AMsvWAZ50HM8lweWEmzDWbRNDGkKFJo9qLY_VRKrciY,580
|
107
107
|
pyhw/library/lib/iokitGPULib.dylib,sha256=KAz0VyeRspD3U7WeedUnPvJVUZEKn_Pw0AKk5zm42ZM,154808
|
108
|
+
pyhw/library/lib/iokitHostLib.dylib,sha256=PKNLMhHwB6-sKDaeo3izbPR88OgzjuRGaLV0NvNWVRk,149256
|
108
109
|
pyhw/pyhwException/__init__.py,sha256=8JsFvtF13g0Y5t4z9fRndDXtfCzuBM59jDf6PhWSFSk,220
|
109
110
|
pyhw/pyhwException/pyhwException.py,sha256=wxuzFQa9g7XB1q9TUKO_55lw7wMEJMpzG8w1GVTFVa0,197
|
110
111
|
pyhw/pyhwUtil/__init__.py,sha256=34ygvVBBqfJ_9OMzHToCcV_BVahixNsa_Z5yh6VsaPQ,304
|
111
112
|
pyhw/pyhwUtil/cliUtil.py,sha256=42Gdi9wTg5XOYuEvGHEgOaZJ6dJk1qSuHIprR8pCA-g,2344
|
112
113
|
pyhw/pyhwUtil/pyhwUtil.py,sha256=RokrE7X99pkS0LtN4wyJS_ZQmjtMwiNxA7MwXMoO96c,7664
|
113
114
|
pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
|
114
|
-
pyhw-0.11.
|
115
|
-
pyhw-0.11.
|
116
|
-
pyhw-0.11.
|
117
|
-
pyhw-0.11.
|
118
|
-
pyhw-0.11.
|
119
|
-
pyhw-0.11.
|
115
|
+
pyhw-0.11.9.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
|
116
|
+
pyhw-0.11.9.dist-info/METADATA,sha256=MAmJ5-P9M0YXtyoszz49Lau58TDcfuZNHZpXfxit3oY,6753
|
117
|
+
pyhw-0.11.9.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
118
|
+
pyhw-0.11.9.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
|
119
|
+
pyhw-0.11.9.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
|
120
|
+
pyhw-0.11.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|