pyhw 0.6.3__py3-none-any.whl → 0.6.5__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/backend/cpu/macos.py +3 -1
- pyhw/backend/host/linux.py +10 -2
- pyhw/backend/host/macos.py +9 -1
- {pyhw-0.6.3.dist-info → pyhw-0.6.5.dist-info}/METADATA +14 -2
- {pyhw-0.6.3.dist-info → pyhw-0.6.5.dist-info}/RECORD +9 -9
- {pyhw-0.6.3.dist-info → pyhw-0.6.5.dist-info}/WHEEL +1 -1
- {pyhw-0.6.3.dist-info → pyhw-0.6.5.dist-info}/LICENSE +0 -0
- {pyhw-0.6.3.dist-info → pyhw-0.6.5.dist-info}/entry_points.txt +0 -0
- {pyhw-0.6.3.dist-info → pyhw-0.6.5.dist-info}/top_level.txt +0 -0
pyhw/backend/cpu/macos.py
CHANGED
@@ -64,6 +64,8 @@ class CPUDetectMacOS:
|
|
64
64
|
"Apple M3": "4.05 GHz",
|
65
65
|
"Apple M3 Pro": "4.05 GHz",
|
66
66
|
"Apple M3 Max": "4.05 GHz",
|
67
|
-
"Apple M4": "4.40 GHz"
|
67
|
+
"Apple M4": "4.40 GHz",
|
68
|
+
"Apple M4 Pro": "4.40 GHz",
|
69
|
+
"Apple M4 Max": "4.40 GHz"
|
68
70
|
}
|
69
71
|
self.__cpuInfo.frequency = freq.get(self.__cpuInfo.model, "Unknown")
|
pyhw/backend/host/linux.py
CHANGED
@@ -19,9 +19,17 @@ class HostDetectLinux:
|
|
19
19
|
if self.__arch in ["x86_64", "x86"]:
|
20
20
|
try:
|
21
21
|
with open("/sys/devices/virtual/dmi/id/product_name", "r") as f:
|
22
|
-
|
22
|
+
product_name = f.read().strip()
|
23
|
+
if product_name.startswith("To be filled by O.E.M."):
|
24
|
+
self.__hostInfo.name = f"General {self.__arch} Host"
|
25
|
+
else:
|
26
|
+
self.__hostInfo.name = product_name
|
23
27
|
with open("/sys/devices/virtual/dmi/id/product_version", "r") as f:
|
24
|
-
|
28
|
+
version = f.read().strip()
|
29
|
+
if version.startswith("To be filled by O.E.M."):
|
30
|
+
self.__hostInfo.version = ""
|
31
|
+
else:
|
32
|
+
self.__hostInfo.version = version
|
25
33
|
self.__hostInfo.model = self.__hostInfo.name + " " + self.__hostInfo.version
|
26
34
|
except FileNotFoundError:
|
27
35
|
pass
|
pyhw/backend/host/macos.py
CHANGED
@@ -172,7 +172,15 @@ class HostDetectMacOS:
|
|
172
172
|
|
173
173
|
elif hw_model.startswith("Mac"):
|
174
174
|
version = hw_model[len("Mac"):]
|
175
|
-
if self.__hwModelCheck(version, "16,
|
175
|
+
if self.__hwModelCheck(version, "16,3"):
|
176
|
+
return "iMac (24-inch, 2024, Four Thunderbolt / USB 4 ports)"
|
177
|
+
if self.__hwModelCheck(version, "16,2"):
|
178
|
+
return "iMac (24-inch, 2024, Two Thunderbolt / USB 4 ports)"
|
179
|
+
if self.__hwModelCheck(version, "16,1") or self.__hwModelCheck(version, "16,6") or self.__hwModelCheck(version, "16,8"):
|
180
|
+
return "MacBook Pro (14-inch, 2024, Three Thunderbolt 4 ports)"
|
181
|
+
if self.__hwModelCheck(version, "16,5") or self.__hwModelCheck(version, "16,7"):
|
182
|
+
return "MacBook Pro (16-inch, 2024, Three Thunderbolt 4 ports)"
|
183
|
+
if self.__hwModelCheck(version, "16,10") or self.__hwModelCheck(version, "16,15"):
|
176
184
|
return "Mac mini (M4, 2024)"
|
177
185
|
if self.__hwModelCheck(version, "15,13"):
|
178
186
|
return "MacBook Air (15-inch, M3, 2024)"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyhw
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.5
|
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
|
@@ -53,6 +53,18 @@ pyhw
|
|
53
53
|
```
|
54
54
|
Please note that the command line entry for __pyhw__ is created by pip, and depending on the user, this entry may not in the __system PATH__. If you encounter this problem, pip will give you a prompt, follow the prompts to add entry to the __system PATH__.
|
55
55
|
|
56
|
+
### Install by pipx
|
57
|
+
**pipx** is an amazing tool to help you install and run applications written in Python. It is more like **brew** or **apt**. You can find more information about it here [pipx](https://github.com/pypa/pipx).
|
58
|
+
|
59
|
+
You can install pyhw by the following command:
|
60
|
+
```shell
|
61
|
+
pipx install pyhw
|
62
|
+
```
|
63
|
+
You can then use this tool directly from the command line with the following command, just like neofetch.
|
64
|
+
```shell
|
65
|
+
pyhw
|
66
|
+
```
|
67
|
+
|
56
68
|
### Important note about debian 12:
|
57
69
|
If you use system pip to install pyhw, you will encounter this problem on debian12 and some related distributions:
|
58
70
|
```text
|
@@ -73,7 +85,7 @@ error: externally-managed-environment
|
|
73
85
|
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
|
74
86
|
hint: See PEP 668 for the detailed specification.
|
75
87
|
```
|
76
|
-
This is due to the fact that system python is not supposed to be managed by pip. You can use a virtual environment (venv) or force remove this restriction (not recommended).
|
88
|
+
This is due to the fact that system python is not supposed to be managed by pip. You can simply use **pipx** to install **pyhw**. Or you can use a virtual environment (venv) or force remove this restriction (not recommended).
|
77
89
|
|
78
90
|
## Supported (Tested) OS
|
79
91
|
* macOS arm64, x86_64
|
@@ -7,7 +7,7 @@ pyhw/backend/cpu/__init__.py,sha256=5YfANJVRwNwTRodG0ENOgusrdN592aaSnfq5ok4dKTo,
|
|
7
7
|
pyhw/backend/cpu/cpuBase.py,sha256=AGWqVjdvb82NiH4kxk3GERdBLwBNhkR23j2ei_l3S18,464
|
8
8
|
pyhw/backend/cpu/cpuInfo.py,sha256=A_nNGElq9W7oZ5DFJowLdFBE0ZvXKr5h29E6TGAvbRc,251
|
9
9
|
pyhw/backend/cpu/linux.py,sha256=zJ2cOwQHtolJrMMY1WXVbLLIRNPxeClUgzLAAkd7As4,3346
|
10
|
-
pyhw/backend/cpu/macos.py,sha256=
|
10
|
+
pyhw/backend/cpu/macos.py,sha256=pacU-yT7q-HKerkh2Q0BSdzSY6dKzHfSnRZBmimqqXk,2953
|
11
11
|
pyhw/backend/gpu/__init__.py,sha256=EpMjPvUaXt0LTNMvGmB8WgXbUB9keCxuOhu8NT3Re6o,56
|
12
12
|
pyhw/backend/gpu/gpuBase.py,sha256=Ge0DX2P8_EB7ovM7glmPUnVsPJL3OUHV2t_1T5mimR0,409
|
13
13
|
pyhw/backend/gpu/gpuInfo.py,sha256=d_z_z5DiZAg85wP0VOBQEU0QHdaK3qFqA2Tp9Eq8-Zs,133
|
@@ -16,8 +16,8 @@ pyhw/backend/gpu/macos.py,sha256=SmTqqTrIMRW-GVPmDs8xAiOX7HsCjrGh9qkxLQCdvO8,385
|
|
16
16
|
pyhw/backend/host/__init__.py,sha256=Efaj7-Oya7H8HdpZHQCLrwn-mcfPb-d6yfh4dzsE_7I,58
|
17
17
|
pyhw/backend/host/hostBase.py,sha256=POyDW3f5JSWtEKyCfrVSBEddSwoywe_OBgUExCEuje8,563
|
18
18
|
pyhw/backend/host/hostInfo.py,sha256=Xvz0LugPiCSWMkcDsp4p2rrojYFZauL6Q-gCZ6NLz5k,184
|
19
|
-
pyhw/backend/host/linux.py,sha256=
|
20
|
-
pyhw/backend/host/macos.py,sha256=
|
19
|
+
pyhw/backend/host/linux.py,sha256=wp65o_BJUxq-rkts_1UVP6IuK6U54Cl066G3QfZksiQ,2424
|
20
|
+
pyhw/backend/host/macos.py,sha256=KW-EJK9g1xHNrFsVxJv5GPLpc_ZevX0Zv1WjZUzRkzo,15369
|
21
21
|
pyhw/backend/host/windows.py,sha256=rjDJaIs-5zspzFsNCMCh6m2yZXEXI0vccqeBpmAdEBk,53
|
22
22
|
pyhw/backend/kernel/__init__.py,sha256=fGjwjpOhwA_PnsWbwoq102hwhTay2ufYKaTqxjSV2-I,65
|
23
23
|
pyhw/backend/kernel/kernelBase.py,sha256=CMvBszl4_aP48YWnFI03I2GtngYStkcY4uDU3ub8C3E,555
|
@@ -83,9 +83,9 @@ pyhw/pyhwException/pyhwException.py,sha256=wxuzFQa9g7XB1q9TUKO_55lw7wMEJMpzG8w1G
|
|
83
83
|
pyhw/pyhwUtil/__init__.py,sha256=PzeP9fXsIhvr3sUpJ4DxW9_H25DEIasBFfXd_NztfR4,226
|
84
84
|
pyhw/pyhwUtil/pyhwUtil.py,sha256=CKXJrt6KGhZCV1J7MjsQ21c_jPmC1I3wZBPCKJfdqbM,2478
|
85
85
|
pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
|
86
|
-
pyhw-0.6.
|
87
|
-
pyhw-0.6.
|
88
|
-
pyhw-0.6.
|
89
|
-
pyhw-0.6.
|
90
|
-
pyhw-0.6.
|
91
|
-
pyhw-0.6.
|
86
|
+
pyhw-0.6.5.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
|
87
|
+
pyhw-0.6.5.dist-info/METADATA,sha256=uVDEqgQ1fOLbwd9ydzgaKxs43MWavliFVm_z2avsg-k,5225
|
88
|
+
pyhw-0.6.5.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
89
|
+
pyhw-0.6.5.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
|
90
|
+
pyhw-0.6.5.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
|
91
|
+
pyhw-0.6.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|