pyhw 0.8.0__py3-none-any.whl → 0.10.0__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/__main__.py +108 -19
- pyhw/backend/cpu/linux.py +3 -0
- pyhw/backend/gpu/linux.py +1 -1
- pyhw/backend/host/linux.py +1 -1
- pyhw/backend/kernel/windows.py +11 -2
- pyhw/backend/nic/linux.py +2 -0
- pyhw/backend/npu/linux.py +18 -2
- pyhw/backend/os/windows.py +11 -3
- pyhw/pyhwUtil/pyhwUtil.py +3 -1
- {pyhw-0.8.0.dist-info → pyhw-0.10.0.dist-info}/METADATA +41 -28
- {pyhw-0.8.0.dist-info → pyhw-0.10.0.dist-info}/RECORD +16 -16
- {pyhw-0.8.0.dist-info → pyhw-0.10.0.dist-info}/LICENSE +0 -0
- {pyhw-0.8.0.dist-info → pyhw-0.10.0.dist-info}/WHEEL +0 -0
- {pyhw-0.8.0.dist-info → pyhw-0.10.0.dist-info}/entry_points.txt +0 -0
- {pyhw-0.8.0.dist-info → pyhw-0.10.0.dist-info}/top_level.txt +0 -0
pyhw/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.
|
1
|
+
__version__ = '0.10.0'
|
pyhw/__main__.py
CHANGED
@@ -13,33 +13,122 @@ from .backend.nic import NICDetect
|
|
13
13
|
from .backend.npu import NPUDetect
|
14
14
|
from .pyhwUtil import createDataString
|
15
15
|
from .pyhwUtil import getOS, selectOSLogo
|
16
|
+
import multiprocessing
|
17
|
+
|
18
|
+
|
19
|
+
def detect_title(os, result_dict):
|
20
|
+
result_dict["title"] = TitleDetect(os=os).getTitle().title
|
21
|
+
|
22
|
+
|
23
|
+
def detect_host(os, result_dict):
|
24
|
+
result_dict["Host"] = HostDetect(os=os).getHostInfo().model
|
25
|
+
|
26
|
+
|
27
|
+
def detect_kernel(os, result_dict):
|
28
|
+
result_dict["Kernel"] = KernelDetect(os=os).getKernelInfo().kernel
|
29
|
+
|
30
|
+
|
31
|
+
def detect_shell(os, result_dict):
|
32
|
+
result_dict["Shell"] = ShellDetect(os=os).getShellInfo().info
|
33
|
+
|
34
|
+
|
35
|
+
def detect_uptime(os, result_dict):
|
36
|
+
result_dict["Uptime"] = UptimeDetect(os=os).getUptime().uptime
|
37
|
+
|
38
|
+
|
39
|
+
def detect_os(os, result_dict):
|
40
|
+
result_dict["OS"] = OSDetect(os=os).getOSInfo().prettyName
|
41
|
+
|
42
|
+
|
43
|
+
def detect_cpu(os, result_dict):
|
44
|
+
result_dict["CPU"] = CPUDetect(os=os).getCPUInfo().cpu
|
45
|
+
|
46
|
+
|
47
|
+
def detect_gpu(os, result_dict):
|
48
|
+
gpu_info = GPUDetect(os=os).getGPUInfo()
|
49
|
+
if gpu_info.number > 0:
|
50
|
+
result_dict["GPU"] = gpu_info.gpus
|
51
|
+
|
52
|
+
|
53
|
+
def detect_memory(os, result_dict):
|
54
|
+
result_dict["Memory"] = MemoryDetect(os=os).getMemoryInfo().memory
|
55
|
+
|
56
|
+
|
57
|
+
def detect_nic(os, result_dict):
|
58
|
+
nic_info = NICDetect(os=os).getNICInfo()
|
59
|
+
if nic_info.number > 0:
|
60
|
+
result_dict["NIC"] = nic_info.nics
|
61
|
+
|
62
|
+
|
63
|
+
def detect_npu(os, result_dict):
|
64
|
+
npu_info = NPUDetect(os=os).getNPUInfo()
|
65
|
+
if npu_info.number > 0:
|
66
|
+
result_dict["NPU"] = npu_info.npus
|
16
67
|
|
17
68
|
|
18
69
|
def main():
|
19
70
|
current_os = getOS()
|
20
71
|
if current_os not in ["linux", "macos", "freebsd", "windows"]:
|
21
|
-
print(f"Only Linux, macOS, FreeBSD and Windows are supported for now. Current OS: {current_os}")
|
72
|
+
print(f"Only Linux, macOS, FreeBSD, and Windows are supported for now. Current OS: {current_os}")
|
22
73
|
return
|
74
|
+
|
23
75
|
data = Data()
|
24
|
-
data.title = TitleDetect(os=current_os).getTitle().title
|
25
|
-
data.Host = HostDetect(os=current_os).getHostInfo().model
|
26
|
-
data.Kernel = KernelDetect(os=current_os).getKernelInfo().kernel
|
27
|
-
data.Shell = ShellDetect(os=current_os).getShellInfo().info
|
28
|
-
data.Uptime = UptimeDetect(os=current_os).getUptime().uptime
|
29
|
-
data.OS = OSDetect(os=current_os).getOSInfo().prettyName
|
30
|
-
data.CPU = CPUDetect(os=current_os).getCPUInfo().cpu
|
31
|
-
gpu_info = GPUDetect(os=current_os).getGPUInfo()
|
32
|
-
if gpu_info.number > 0:
|
33
|
-
data.GPU = gpu_info.gpus
|
34
|
-
data.Memory = MemoryDetect(os=current_os).getMemoryInfo().memory
|
35
|
-
nic_info = NICDetect(os=current_os).getNICInfo()
|
36
|
-
if nic_info.number > 0:
|
37
|
-
data.NIC = nic_info.nics
|
38
|
-
npu_info = NPUDetect(os=current_os).getNPUInfo()
|
39
|
-
if npu_info.number > 0:
|
40
|
-
data.NPU = npu_info.npus
|
41
76
|
|
42
|
-
|
77
|
+
manager = multiprocessing.Manager()
|
78
|
+
result_dict = manager.dict()
|
79
|
+
|
80
|
+
processes = [
|
81
|
+
multiprocessing.Process(target=detect_title, args=(current_os, result_dict)),
|
82
|
+
multiprocessing.Process(target=detect_host, args=(current_os, result_dict)),
|
83
|
+
multiprocessing.Process(target=detect_kernel, args=(current_os, result_dict)),
|
84
|
+
multiprocessing.Process(target=detect_shell, args=(current_os, result_dict)),
|
85
|
+
multiprocessing.Process(target=detect_uptime, args=(current_os, result_dict)),
|
86
|
+
multiprocessing.Process(target=detect_os, args=(current_os, result_dict)),
|
87
|
+
multiprocessing.Process(target=detect_cpu, args=(current_os, result_dict)),
|
88
|
+
multiprocessing.Process(target=detect_gpu, args=(current_os, result_dict)),
|
89
|
+
multiprocessing.Process(target=detect_memory, args=(current_os, result_dict)),
|
90
|
+
multiprocessing.Process(target=detect_nic, args=(current_os, result_dict)),
|
91
|
+
multiprocessing.Process(target=detect_npu, args=(current_os, result_dict)),
|
92
|
+
]
|
93
|
+
|
94
|
+
for process in processes:
|
95
|
+
process.start()
|
96
|
+
|
97
|
+
for process in processes:
|
98
|
+
process.join()
|
99
|
+
|
100
|
+
for key, value in result_dict.items():
|
101
|
+
setattr(data, key, value)
|
102
|
+
|
103
|
+
logo_os = selectOSLogo(OSDetect(os=current_os).getOSInfo().id)
|
104
|
+
Printer(logo_os=logo_os, data=createDataString(data)).cPrint()
|
105
|
+
|
106
|
+
|
107
|
+
# def main():
|
108
|
+
# current_os = getOS()
|
109
|
+
# if current_os not in ["linux", "macos", "freebsd", "windows"]:
|
110
|
+
# print(f"Only Linux, macOS, FreeBSD and Windows are supported for now. Current OS: {current_os}")
|
111
|
+
# return
|
112
|
+
# data = Data()
|
113
|
+
# data.title = TitleDetect(os=current_os).getTitle().title
|
114
|
+
# data.Host = HostDetect(os=current_os).getHostInfo().model
|
115
|
+
# data.Kernel = KernelDetect(os=current_os).getKernelInfo().kernel
|
116
|
+
# data.Shell = ShellDetect(os=current_os).getShellInfo().info
|
117
|
+
# data.Uptime = UptimeDetect(os=current_os).getUptime().uptime
|
118
|
+
# data.OS = OSDetect(os=current_os).getOSInfo().prettyName
|
119
|
+
# data.CPU = CPUDetect(os=current_os).getCPUInfo().cpu
|
120
|
+
# gpu_info = GPUDetect(os=current_os).getGPUInfo()
|
121
|
+
# if gpu_info.number > 0:
|
122
|
+
# data.GPU = gpu_info.gpus
|
123
|
+
# data.Memory = MemoryDetect(os=current_os).getMemoryInfo().memory
|
124
|
+
# nic_info = NICDetect(os=current_os).getNICInfo()
|
125
|
+
# if nic_info.number > 0:
|
126
|
+
# data.NIC = nic_info.nics
|
127
|
+
# npu_info = NPUDetect(os=current_os).getNPUInfo()
|
128
|
+
# if npu_info.number > 0:
|
129
|
+
# data.NPU = npu_info.npus
|
130
|
+
#
|
131
|
+
# Printer(logo_os=selectOSLogo(OSDetect(os=current_os).getOSInfo().id), data=createDataString(data)).cPrint()
|
43
132
|
|
44
133
|
|
45
134
|
if __name__ == "__main__":
|
pyhw/backend/cpu/linux.py
CHANGED
@@ -73,6 +73,9 @@ class CPUDetectLinux:
|
|
73
73
|
model = compatible.split(",")[-1]
|
74
74
|
if model.startswith("sun"):
|
75
75
|
self.__cpuInfo.model = f"Allwinner {model.split('-')[-1].upper()} ({model})"
|
76
|
+
elif "cvitek" in compatible:
|
77
|
+
model = compatible.split(",")[-1]
|
78
|
+
self.__cpuInfo.model = f"Cvitek {model}"
|
76
79
|
else:
|
77
80
|
pass
|
78
81
|
|
pyhw/backend/gpu/linux.py
CHANGED
@@ -29,7 +29,7 @@ class GPUDetectLinux:
|
|
29
29
|
|
30
30
|
def __handleNonePciDevices(self):
|
31
31
|
# if detector can't find any VGA/Display/3D GPUs, assume the host is a sbc device, this function is a placeholder for a more advanced method.
|
32
|
-
if getArch()
|
32
|
+
if getArch() in ["aarch64", "arm32", "riscv64"]:
|
33
33
|
self.__gpuInfo.number = 1
|
34
34
|
self.__gpuInfo.gpus.append(f"{CPUDetect(os='linux').getCPUInfo().model} [SOC Integrated]")
|
35
35
|
else:
|
pyhw/backend/host/linux.py
CHANGED
@@ -39,7 +39,7 @@ class HostDetectLinux:
|
|
39
39
|
self._hostInfo.model = self._hostInfo.name + " " + self._hostInfo.version
|
40
40
|
except FileNotFoundError:
|
41
41
|
pass
|
42
|
-
elif self._arch in ["aarch64", "arm32"]:
|
42
|
+
elif self._arch in ["aarch64", "arm32", "riscv64"]:
|
43
43
|
# try to find dmi folder since some arm based desktops and servers may have same structure as x86_64 machines.
|
44
44
|
if os.path.exists("/sys/devices/virtual/dmi/id"):
|
45
45
|
try:
|
pyhw/backend/kernel/windows.py
CHANGED
@@ -15,7 +15,10 @@ class KernelDetectWindows:
|
|
15
15
|
version = platform.version()
|
16
16
|
machine = platform.machine()
|
17
17
|
display = self.__get_windows_version()
|
18
|
-
|
18
|
+
if display != "":
|
19
|
+
self.__kernelInfo.kernel = f"{version} ({display}) {machine}"
|
20
|
+
else:
|
21
|
+
self.__kernelInfo.kernel = f"{version} {machine}"
|
19
22
|
return self.__kernelInfo
|
20
23
|
|
21
24
|
@staticmethod
|
@@ -26,4 +29,10 @@ class KernelDetectWindows:
|
|
26
29
|
winreg.CloseKey(key)
|
27
30
|
return str(display_version)
|
28
31
|
except:
|
29
|
-
|
32
|
+
try:
|
33
|
+
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion")
|
34
|
+
release_id, _ = winreg.QueryValueEx(key, "ReleaseId")
|
35
|
+
winreg.CloseKey(key)
|
36
|
+
return str(release_id)
|
37
|
+
except:
|
38
|
+
return ""
|
pyhw/backend/nic/linux.py
CHANGED
@@ -39,6 +39,8 @@ class NICDetectLinux:
|
|
39
39
|
for interface in interfaces:
|
40
40
|
try:
|
41
41
|
if_ip = subprocess.run(["bash", "-c", f"ip -4 addr show {interface} | grep inet | awk '{{print $2}}'"], capture_output=True, text=True).stdout.strip().split("/")[0]
|
42
|
+
if if_ip == "":
|
43
|
+
continue
|
42
44
|
self._nicInfo.nics.append(f"{interface} @ {if_ip}")
|
43
45
|
self._nicInfo.number += 1
|
44
46
|
except:
|
pyhw/backend/npu/linux.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
from .npuInfo import NPUInfo
|
2
2
|
import pypci
|
3
|
+
import os
|
3
4
|
|
4
5
|
|
5
6
|
class NPUDetectLinux:
|
@@ -25,9 +26,24 @@ class NPUDetectLinux:
|
|
25
26
|
self._npuInfo.number += 1
|
26
27
|
|
27
28
|
def _handleNonePciDevices(self):
|
29
|
+
if os.path.exists("/sys/firmware/devicetree/base/tpu/compatible"):
|
30
|
+
try:
|
31
|
+
with open("/sys/firmware/devicetree/base/tpu/compatible", "r") as f:
|
32
|
+
compatible = f.read().strip()
|
33
|
+
except FileNotFoundError:
|
34
|
+
compatible = ""
|
35
|
+
if "cvitek" in compatible:
|
36
|
+
model = compatible.split(",")[-1]
|
37
|
+
self._npuInfo.npus.append(f"Cvitek {model}")
|
38
|
+
self._npuInfo.number = 1
|
39
|
+
else:
|
40
|
+
pass
|
41
|
+
else:
|
42
|
+
pass
|
28
43
|
# Place Holder for unknown NPU
|
29
|
-
self._npuInfo.number
|
30
|
-
|
44
|
+
if self._npuInfo.number == 0:
|
45
|
+
self._npuInfo.number = 1
|
46
|
+
self._npuInfo.npus.append("Not found")
|
31
47
|
|
32
48
|
@staticmethod
|
33
49
|
def _npuNameClean(npu_name: str):
|
pyhw/backend/os/windows.py
CHANGED
@@ -14,7 +14,10 @@ class OSDetectWindows:
|
|
14
14
|
edition = platform.win32_edition()
|
15
15
|
machine = platform.machine()
|
16
16
|
display = self.__get_windows_version()
|
17
|
-
|
17
|
+
if display != "":
|
18
|
+
self._osInfo.prettyName = f"{system} {release} {display} ({edition}) {machine}"
|
19
|
+
else:
|
20
|
+
self._osInfo.prettyName = f"{system} {release} ({edition}) {machine}"
|
18
21
|
if release == "10":
|
19
22
|
self._osInfo.id = "windows_10"
|
20
23
|
elif release == "11":
|
@@ -31,5 +34,10 @@ class OSDetectWindows:
|
|
31
34
|
winreg.CloseKey(key)
|
32
35
|
return str(display_version)
|
33
36
|
except:
|
34
|
-
|
35
|
-
|
37
|
+
try:
|
38
|
+
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion")
|
39
|
+
release_id, _ = winreg.QueryValueEx(key, "ReleaseId")
|
40
|
+
winreg.CloseKey(key)
|
41
|
+
return str(release_id)
|
42
|
+
except:
|
43
|
+
return ""
|
pyhw/pyhwUtil/pyhwUtil.py
CHANGED
@@ -25,7 +25,7 @@ def getOS():
|
|
25
25
|
def getArch():
|
26
26
|
"""
|
27
27
|
Get the machine architecture.
|
28
|
-
:return: str, value in [x86_64, x86, aarch64, arm32].
|
28
|
+
:return: str, value in [x86_64, x86, aarch64, arm32, riscv64].
|
29
29
|
"""
|
30
30
|
arch = platform.machine()
|
31
31
|
if arch == "x86_64" or arch == "AMD64" or arch == "amd64":
|
@@ -36,6 +36,8 @@ def getArch():
|
|
36
36
|
return "aarch64"
|
37
37
|
elif arch.find("arm") != -1:
|
38
38
|
return "arm32"
|
39
|
+
elif arch == "riscv64":
|
40
|
+
return "riscv64"
|
39
41
|
else:
|
40
42
|
return "unknown"
|
41
43
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: pyhw
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.10.0
|
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
|
@@ -10,10 +10,10 @@ Classifier: Development Status :: 4 - Beta
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
11
|
Classifier: License :: OSI Approved :: BSD License
|
12
12
|
Classifier: Operating System :: OS Independent
|
13
|
-
Requires-Python: >=3.
|
13
|
+
Requires-Python: >=3.8
|
14
14
|
Description-Content-Type: text/markdown
|
15
15
|
License-File: LICENSE
|
16
|
-
Requires-Dist: pypci-ng>=0.1.
|
16
|
+
Requires-Dist: pypci-ng>=0.1.3
|
17
17
|
|
18
18
|
# PyHw
|
19
19
|
[](https://pepy.tech/project/pyhw)
|
@@ -27,6 +27,7 @@ Requires-Dist: pypci-ng>=0.1.2
|
|
27
27
|
|
28
28
|

|
29
29
|

|
30
|
+

|
30
31
|
|
31
32
|
|
32
33
|
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, FreeBSD and Windows are supported.**
|
@@ -41,8 +42,23 @@ This project is a Python reimplementation of [neofetch](https://github.com/dylan
|
|
41
42
|
|
42
43
|
|
43
44
|
|
44
|
-
## Install
|
45
|
-
There are already a lot of similar tools so you can choose any of them; they're all essentially no different. If you want to try this tool,
|
45
|
+
## 1. Install
|
46
|
+
There are already a lot of similar tools so you can choose any of them; they're all essentially no different. If you want to try this tool, There are two convenient ways to install it.
|
47
|
+
|
48
|
+
### 1.1 Install by pipx
|
49
|
+
**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). **pipx** is available on almost all major platforms and is usually provided by the corresponding package manager. If you haven't used pipx before, you can refer to this [document](https://pipx.pypa.io/stable/installation/) to install it.
|
50
|
+
|
51
|
+
You can install pyhw by the following command:
|
52
|
+
```shell
|
53
|
+
pipx install pyhw
|
54
|
+
```
|
55
|
+
You can then use this tool directly from the command line with the following command, just like neofetch.
|
56
|
+
```shell
|
57
|
+
pyhw
|
58
|
+
```
|
59
|
+
|
60
|
+
### 1.2 Install by pip
|
61
|
+
In any case, pip is always available, so if you can't install this program using **pipx**, you can install pyhw by the following command:
|
46
62
|
```shell
|
47
63
|
pip install pyhw
|
48
64
|
```
|
@@ -60,19 +76,8 @@ python -m pyhw
|
|
60
76
|
```
|
61
77
|
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__.
|
62
78
|
|
63
|
-
### Install by pipx
|
64
|
-
**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).
|
65
|
-
|
66
|
-
You can install pyhw by the following command:
|
67
|
-
```shell
|
68
|
-
pipx install pyhw
|
69
|
-
```
|
70
|
-
You can then use this tool directly from the command line with the following command, just like neofetch.
|
71
|
-
```shell
|
72
|
-
pyhw
|
73
|
-
```
|
74
79
|
|
75
|
-
### Important note about debian 12:
|
80
|
+
### 1.3 Important note about debian 12:
|
76
81
|
If you use system pip to install pyhw, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):
|
77
82
|
```text
|
78
83
|
error: externally-managed-environment
|
@@ -92,32 +97,34 @@ error: externally-managed-environment
|
|
92
97
|
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.
|
93
98
|
hint: See PEP 668 for the detailed specification.
|
94
99
|
```
|
95
|
-
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).
|
100
|
+
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), conda environment or force remove this restriction (not recommended).
|
96
101
|
|
97
|
-
## Tested OS
|
102
|
+
## 2. Tested OS
|
98
103
|
* macOS arm64, x86_64
|
99
|
-
* Linux arm64, x86_64
|
104
|
+
* Linux arm64, x86_64, riscv64
|
100
105
|
* FreeBSD arm64
|
101
|
-
* Windows 10
|
106
|
+
* Windows 10 x86_64
|
107
|
+
* Windows 11 arm64, x86_64
|
108
|
+
|
109
|
+
For more detailed information, please refer to [Tested Platform](docs/tested_platform.md).
|
102
110
|
|
103
|
-
## Add Logo
|
111
|
+
## 3. Add Logo
|
104
112
|
1. Create a file named **\<os>.pyhw** in **logo/ascii** folder
|
105
113
|
2. Modify **colorConfig.py** file to add a new logo style
|
106
114
|
3. Update **pyhwUtil.py** to enable new logo style.
|
107
115
|
|
108
|
-
## Build from source
|
109
|
-
Currently, build process relay on swiftc and macOS IOKit framework. To build package from source, you need a Mac machine with macOS 11 and newer.
|
116
|
+
## 4. Build from source
|
110
117
|
|
111
|
-
### Dependencies
|
118
|
+
### 4.1 Dependencies
|
112
119
|
This package was originally implemented in pure python and only depends on the python standard library. However, in subsequent development, the code for the pci part was separated into a separate package **pypci-ng**, which can be obtained using pip (or check out [this](https://github.com/xiaoran007/pypci) GitHub repository).
|
113
120
|
|
114
|
-
### Build tools
|
121
|
+
### 4.2 Build tools
|
115
122
|
Make sure the following Python build tools are already installed.
|
116
123
|
* setuptools
|
117
124
|
* build
|
118
125
|
* twine
|
119
126
|
|
120
|
-
### Build package
|
127
|
+
### 4.3 Build package
|
121
128
|
clone the project, and run:
|
122
129
|
```shell
|
123
130
|
python -m build
|
@@ -126,11 +133,17 @@ After the build process, the source package and the binary whl package can be fo
|
|
126
133
|
```shell
|
127
134
|
pip install dist/*.whl --force-reinstall
|
128
135
|
```
|
129
|
-
|
136
|
+
|
137
|
+
### 4.4 Build Full Feature package
|
138
|
+
Currently, build process relay on swiftc and macOS IOKit framework. To build Full Feature Package from source, you need a Mac machine with macOS 11 and newer.
|
139
|
+
|
140
|
+
Simply type:
|
130
141
|
```shell
|
131
142
|
make build
|
132
143
|
make install
|
133
144
|
```
|
145
|
+
|
146
|
+
## 5. Test Package
|
134
147
|
If you have docker installed, you can test this package through docker by type:
|
135
148
|
```shell
|
136
149
|
make test # local build
|
@@ -1,33 +1,33 @@
|
|
1
|
-
pyhw/__init__.py,sha256=
|
2
|
-
pyhw/__main__.py,sha256=
|
1
|
+
pyhw/__init__.py,sha256=RYs3cR49NZ5Zwt0avo2mYyRcdWjLbrKBCHRHpqCJx24,23
|
2
|
+
pyhw/__main__.py,sha256=Gp50LaRF9vl_czdLNJRoa0OIzctLKhcZU0XH3EjNVjM,4741
|
3
3
|
pyhw/backend/__init__.py,sha256=knn_3Yroow1h0dqdrozk3zyy3vz-kQyNBRjR6OLmVoY,50
|
4
4
|
pyhw/backend/backendBase.py,sha256=mloo8mPEbgbIdmyQ3I4vdEXMSSjxWi_wnwACmzvHbEo,506
|
5
5
|
pyhw/backend/cpu/__init__.py,sha256=5YfANJVRwNwTRodG0ENOgusrdN592aaSnfq5ok4dKTo,56
|
6
6
|
pyhw/backend/cpu/bsd.py,sha256=Ls97NAsvZGVJj3_fBUcYXjY2gsZvFKhXYtkTHxVVXSs,288
|
7
7
|
pyhw/backend/cpu/cpuBase.py,sha256=2YAOz1K8VLKtLY7iYBxUV9Ikuf4I4d4YivocvZDrdUU,748
|
8
8
|
pyhw/backend/cpu/cpuInfo.py,sha256=A_nNGElq9W7oZ5DFJowLdFBE0ZvXKr5h29E6TGAvbRc,251
|
9
|
-
pyhw/backend/cpu/linux.py,sha256=
|
9
|
+
pyhw/backend/cpu/linux.py,sha256=TAHTi3hKt9uVyaVS1BP4BtpTHOcmH_6NslnbIAp3afo,3494
|
10
10
|
pyhw/backend/cpu/macos.py,sha256=pacU-yT7q-HKerkh2Q0BSdzSY6dKzHfSnRZBmimqqXk,2953
|
11
11
|
pyhw/backend/cpu/windows.py,sha256=A3oIvVUVMGPEqiM9QBiK0OwElcEf1LDhNi_23AimooQ,1723
|
12
12
|
pyhw/backend/gpu/__init__.py,sha256=EpMjPvUaXt0LTNMvGmB8WgXbUB9keCxuOhu8NT3Re6o,56
|
13
13
|
pyhw/backend/gpu/bsd.py,sha256=hNFiCek770CXOh3DK3I3-g272-a1S5D7LolGJBsLXaU,124
|
14
14
|
pyhw/backend/gpu/gpuBase.py,sha256=ZPT9o7PhYpzlwign0GsCT519F9DGx-1UEMVVOM8MV_k,748
|
15
15
|
pyhw/backend/gpu/gpuInfo.py,sha256=d_z_z5DiZAg85wP0VOBQEU0QHdaK3qFqA2Tp9Eq8-Zs,133
|
16
|
-
pyhw/backend/gpu/linux.py,sha256=
|
16
|
+
pyhw/backend/gpu/linux.py,sha256=M6pRlu3GREMw1Gm7MA-dY_yYI94MliHW3tyS8JjMw5Q,1617
|
17
17
|
pyhw/backend/gpu/macos.py,sha256=SmTqqTrIMRW-GVPmDs8xAiOX7HsCjrGh9qkxLQCdvO8,3850
|
18
18
|
pyhw/backend/gpu/windows.py,sha256=Hv-vtWQGKv6_Nxc8raEBq7NNm5TR6xg6x6BK3Aa2uP4,1249
|
19
19
|
pyhw/backend/host/__init__.py,sha256=Efaj7-Oya7H8HdpZHQCLrwn-mcfPb-d6yfh4dzsE_7I,58
|
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=alqNkp-yn7xoVXcQXxvJFXVOv7azvu3_4QQi-3P7s8g,2835
|
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
|
27
27
|
pyhw/backend/kernel/kernelBase.py,sha256=3ZmkRkvwoWk3R-by2cgBlZnMSQzVjTC8Owmv53Pm4II,539
|
28
28
|
pyhw/backend/kernel/kernelInfo.py,sha256=Nkumd0McbimCjc7yJrvz6bcwpWu1Tdo_LKomjZr7Jgk,341
|
29
29
|
pyhw/backend/kernel/unix.py,sha256=XDV2GIjamERcmlrQFaKFZY-OJO1xj76Im_7lmg2uFzo,1192
|
30
|
-
pyhw/backend/kernel/windows.py,sha256=
|
30
|
+
pyhw/backend/kernel/windows.py,sha256=MpY6S54VYQ_5l4f93GLOaXd4l-uIjg_k6AEYftkgvcc,1246
|
31
31
|
pyhw/backend/memory/__init__.py,sha256=zGBWxfPAAk8ivCBWPLJIpuD-lB7wUJT3x8u2jHiAoCY,65
|
32
32
|
pyhw/backend/memory/bsd.py,sha256=GKTCs6RocdoWj-5ZZRMB4xAWGWljor6leuwX-L-7bW0,251
|
33
33
|
pyhw/backend/memory/linux.py,sha256=kxP0LxXdTWYRtu9nDyKqZeIzZrQI84kVOPMeN1GwSOo,917
|
@@ -38,14 +38,14 @@ pyhw/backend/memory/windows.py,sha256=T_yWJCu-joWvXXuaIgnMRGaDtsp-frQD_cx8IFVgdp
|
|
38
38
|
pyhw/backend/metal/t.py,sha256=52yv-JoXNfaIOfcxEEidIg0MoyFtzWvTRm550kQKPZA,391
|
39
39
|
pyhw/backend/nic/__init__.py,sha256=eP4eOYIvMF3LcTf954hJa6TnB8R4Qahss2g-UcgypKY,57
|
40
40
|
pyhw/backend/nic/bsd.py,sha256=lIXnPqzSA2qexUt0P9OHMmxoI5c5XBi2V80RY9S0wsM,135
|
41
|
-
pyhw/backend/nic/linux.py,sha256=
|
41
|
+
pyhw/backend/nic/linux.py,sha256=oxWCcGIA8u_k_QhbKpxjoo2x5-NcwvfJ0UYem9MzN8s,2045
|
42
42
|
pyhw/backend/nic/macos.py,sha256=63gZjSmUGwGqfs41IWrEXmSz9O8eQy4G5oql3JLZmoo,855
|
43
43
|
pyhw/backend/nic/nicBase.py,sha256=Kng5qoe7FHcnQaf6S-LUe_HyOaBJe0L1SVstdIQ_WJY,962
|
44
44
|
pyhw/backend/nic/nicInfo.py,sha256=wuBuL-aIzD441IUDPGz5e0xctcZ-opdpgqkVxgbvZLg,133
|
45
45
|
pyhw/backend/nic/windows.py,sha256=c67JwHARtPxNsZ-0_MVKUfc7DwpsRVn7kiHdx_NyDn8,1297
|
46
46
|
pyhw/backend/npu/__init__.py,sha256=PgLKbwpgT5vw9xpa294Zxb94McyxNXW46_vMbT2Iqyc,58
|
47
47
|
pyhw/backend/npu/bsd.py,sha256=eKkOWZ4MBybR_KOGGcsWUpzCGgghhvuBy5VNsnEE8cI,134
|
48
|
-
pyhw/backend/npu/linux.py,sha256=
|
48
|
+
pyhw/backend/npu/linux.py,sha256=fPsaXClSC-Py2kHRi17y4eGWrjwRDmjsIX4lgMxRVPc,1806
|
49
49
|
pyhw/backend/npu/macos.py,sha256=c-iSmGfBWYeoh7nXuCFmPlVH6bc6sil_yRsAlabl93k,2513
|
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
|
@@ -56,7 +56,7 @@ pyhw/backend/os/linux.py,sha256=U7dIOKZaG5MSw0S65hAfDfFaBMvbwSCHFIHTwckU9iI,1957
|
|
56
56
|
pyhw/backend/os/macos.py,sha256=DwgpwRD1a2oTANR_XL3kkMzNawqrt23F79dqBw3ULK8,1906
|
57
57
|
pyhw/backend/os/osBase.py,sha256=2zaOGhaXLrNJS9-9qR4hH9_uFTgA2Sv4ab7YZvNVFaE,744
|
58
58
|
pyhw/backend/os/osInfo.py,sha256=NEr76aicI9N3SFrwi1skcpUEjzsyCryTjdE9X1nBjBM,536
|
59
|
-
pyhw/backend/os/windows.py,sha256=
|
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
62
|
pyhw/backend/shell/shellInfo.py,sha256=pU32_Akg0TDVFprTfPYaOKWcFkijJkm0FOowfILNRKk,184
|
@@ -103,11 +103,11 @@ pyhw/library/lib/iokitGPULib.dylib,sha256=DcJ0GZY79gTFckLFYtZgeKn1T0NFvdO_k_ccCa
|
|
103
103
|
pyhw/pyhwException/__init__.py,sha256=8JsFvtF13g0Y5t4z9fRndDXtfCzuBM59jDf6PhWSFSk,220
|
104
104
|
pyhw/pyhwException/pyhwException.py,sha256=wxuzFQa9g7XB1q9TUKO_55lw7wMEJMpzG8w1GVTFVa0,197
|
105
105
|
pyhw/pyhwUtil/__init__.py,sha256=diIqlNUBfuHu-2VAOJk5nipGLafnWxR3chAAOmX8QRo,250
|
106
|
-
pyhw/pyhwUtil/pyhwUtil.py,sha256=
|
106
|
+
pyhw/pyhwUtil/pyhwUtil.py,sha256=h4Xz0heMrBoj2ViHyWmWUNcWmIZlxAmMhqZXskEHpTU,6765
|
107
107
|
pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
|
108
|
-
pyhw-0.
|
109
|
-
pyhw-0.
|
110
|
-
pyhw-0.
|
111
|
-
pyhw-0.
|
112
|
-
pyhw-0.
|
113
|
-
pyhw-0.
|
108
|
+
pyhw-0.10.0.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
|
109
|
+
pyhw-0.10.0.dist-info/METADATA,sha256=CCpHUPKmL57ySsW9fPxag_Ef-Mkv8ClP7k_Z2gT8HKc,6669
|
110
|
+
pyhw-0.10.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
111
|
+
pyhw-0.10.0.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
|
112
|
+
pyhw-0.10.0.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
|
113
|
+
pyhw-0.10.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|