pyhw 0.7.0__tar.gz → 0.7.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pyhw-0.7.0/src/pyhw.egg-info → pyhw-0.7.1}/PKG-INFO +1 -1
- {pyhw-0.7.0 → pyhw-0.7.1}/pyproject.toml +1 -1
- pyhw-0.7.1/src/pyhw/backend/npu/macos.py +65 -0
- {pyhw-0.7.0 → pyhw-0.7.1/src/pyhw.egg-info}/PKG-INFO +1 -1
- pyhw-0.7.0/src/pyhw/backend/npu/macos.py +0 -39
- {pyhw-0.7.0 → pyhw-0.7.1}/LICENSE +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/README.md +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/setup.cfg +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/__main__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/backendBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/cpu/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/cpu/bsd.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/cpu/cpuBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/cpu/cpuInfo.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/cpu/linux.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/cpu/macos.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/gpu/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/gpu/bsd.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/gpu/gpuBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/gpu/gpuInfo.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/gpu/linux.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/gpu/macos.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/host/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/host/bsd.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/host/hostBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/host/hostInfo.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/host/linux.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/host/macos.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/host/windows.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/kernel/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/kernel/kernelBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/kernel/kernelInfo.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/kernel/unix.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/kernel/windows.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/memory/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/memory/bsd.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/memory/linux.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/memory/macos.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/memory/memoryBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/memory/memoryInfo.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/metal/t.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/nic/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/nic/bsd.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/nic/linux.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/nic/macos.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/nic/nicBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/nic/nicInfo.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/npu/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/npu/bsd.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/npu/linux.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/npu/npuBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/npu/npuInfo.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/os/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/os/bsd.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/os/linux.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/os/macos.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/os/osBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/os/osInfo.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/shell/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/shell/shellBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/shell/unix.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/title/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/title/titleBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/title/unix.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/title/windows.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/uptime/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/uptime/bsd.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/uptime/linux.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/uptime/macos.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/uptime/uptimeBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/backend/uptime/uptimeInfo.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/color/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/color/colorConfig.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/color/colorSet.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/color/colorUtil.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/frontendBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/alpine.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/arch.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/armbian.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/centos.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/debian.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/fedora.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/fedora_small.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/freebsd.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/linux.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/macOS.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/raspbian.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/ubuntu.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/ascii/ubuntu_small.pyhw +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/frontend/logo/logoBase.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/library/lib/iokitGPULib.dylib +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/pyhwException/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/pyhwException/pyhwException.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/pyhwUtil/__init__.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/pyhwUtil/pyhwUtil.py +1 -1
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw/pyhwUtil/sysctlUtil.py +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw.egg-info/SOURCES.txt +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw.egg-info/dependency_links.txt +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw.egg-info/entry_points.txt +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw.egg-info/requires.txt +0 -0
- {pyhw-0.7.0 → pyhw-0.7.1}/src/pyhw.egg-info/top_level.txt +0 -0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "pyhw"
|
7
|
-
version = "0.7.
|
7
|
+
version = "0.7.1"
|
8
8
|
description = "PyHw, a neofetch-like command line tool for fetching system information but written mostly in python."
|
9
9
|
keywords = ["neofetch", "system information", "command line tool", "python", "hardware information", "fastfetch", "fetching"]
|
10
10
|
authors = [
|
@@ -0,0 +1,65 @@
|
|
1
|
+
from .npuInfo import NPUInfo
|
2
|
+
from ...pyhwUtil import getArch, getOS
|
3
|
+
import json
|
4
|
+
import subprocess
|
5
|
+
from ..cpu import CPUDetect
|
6
|
+
|
7
|
+
|
8
|
+
class NPUDetectMacOS:
|
9
|
+
def __init__(self):
|
10
|
+
self.__npuInfo = NPUInfo()
|
11
|
+
self.__arch = getArch()
|
12
|
+
|
13
|
+
def getNPUInfo(self):
|
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()
|
20
|
+
return self.__npuInfo
|
21
|
+
|
22
|
+
def __getNPUAppleSilicon(self):
|
23
|
+
# Place holder
|
24
|
+
self.__npuInfo.npus.append("Apple Neural Engine [SOC Integrated]")
|
25
|
+
self.__npuInfo.number += 1
|
26
|
+
|
27
|
+
def __getNPUIntel(self):
|
28
|
+
# Place holder
|
29
|
+
self.__npuInfo.npus.append("Not Found")
|
30
|
+
self.__npuInfo.number += 1
|
31
|
+
|
32
|
+
@staticmethod
|
33
|
+
def __handleVendor(vendor):
|
34
|
+
if vendor == "sppci_vendor_Apple":
|
35
|
+
return "Apple"
|
36
|
+
elif vendor == "sppci_vendor_intel":
|
37
|
+
return "Intel"
|
38
|
+
elif vendor == "sppci_vendor_amd":
|
39
|
+
return "AMD"
|
40
|
+
else:
|
41
|
+
return vendor
|
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
|
+
|
@@ -1,39 +0,0 @@
|
|
1
|
-
from .npuInfo import NPUInfo
|
2
|
-
from ...pyhwUtil import getArch
|
3
|
-
import json
|
4
|
-
import subprocess
|
5
|
-
|
6
|
-
|
7
|
-
class NPUDetectMacOS:
|
8
|
-
def __init__(self):
|
9
|
-
self.__npuInfo = NPUInfo()
|
10
|
-
self.__arch = getArch()
|
11
|
-
|
12
|
-
def getNPUInfo(self):
|
13
|
-
if self.__arch == "aarch64":
|
14
|
-
self.__getNPUAppleSilicon()
|
15
|
-
else: # Does not consider powerPC based Macs.
|
16
|
-
self.__getNPUIntel()
|
17
|
-
return self.__npuInfo
|
18
|
-
|
19
|
-
def __getNPUAppleSilicon(self):
|
20
|
-
# Place holder
|
21
|
-
self.__npuInfo.npus.append("Apple Neural Engine [SOC Integrated]")
|
22
|
-
self.__npuInfo.number += 1
|
23
|
-
|
24
|
-
def __getNPUIntel(self):
|
25
|
-
# Place holder
|
26
|
-
self.__npuInfo.npus.append("Not Found")
|
27
|
-
self.__npuInfo.number += 1
|
28
|
-
|
29
|
-
@staticmethod
|
30
|
-
def __handleVendor(vendor):
|
31
|
-
if vendor == "sppci_vendor_Apple":
|
32
|
-
return "Apple"
|
33
|
-
elif vendor == "sppci_vendor_intel":
|
34
|
-
return "Intel"
|
35
|
-
elif vendor == "sppci_vendor_amd":
|
36
|
-
return "AMD"
|
37
|
-
else:
|
38
|
-
return vendor
|
39
|
-
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|