pyhw 0.12.1__tar.gz → 0.12.2__tar.gz
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-0.12.1/src/pyhw.egg-info → pyhw-0.12.2}/PKG-INFO +3 -2
- {pyhw-0.12.1 → pyhw-0.12.2}/pyproject.toml +1 -1
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/__init__.py +1 -1
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/host/linux.py +6 -4
- pyhw-0.12.2/src/pyhw/pyhwUtil/__init__.py +5 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/pyhwUtil/pyhwUtil.py +16 -0
- {pyhw-0.12.1 → pyhw-0.12.2/src/pyhw.egg-info}/PKG-INFO +3 -2
- pyhw-0.12.1/src/pyhw/pyhwUtil/__init__.py +0 -5
- {pyhw-0.12.1 → pyhw-0.12.2}/LICENSE +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/README.md +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/setup.cfg +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/__main__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/backendBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/cpu/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/cpu/bsd.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/cpu/cpuBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/cpu/cpuInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/cpu/linux.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/cpu/macos.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/cpu/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/gpu/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/gpu/bsd.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/gpu/gpuBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/gpu/gpuInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/gpu/linux.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/gpu/macos.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/gpu/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/host/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/host/bsd.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/host/hostBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/host/hostInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/host/macos.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/host/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/kernel/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/kernel/kernelBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/kernel/kernelInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/kernel/unix.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/kernel/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/memory/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/memory/bsd.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/memory/linux.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/memory/macos.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/memory/memoryBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/memory/memoryInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/memory/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/metal/t.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/nic/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/nic/bsd.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/nic/linux.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/nic/macos.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/nic/nicBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/nic/nicInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/nic/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/npu/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/npu/bsd.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/npu/linux.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/npu/macos.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/npu/npuBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/npu/npuInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/npu/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/os/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/os/bsd.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/os/linux.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/os/macos.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/os/osBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/os/osInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/os/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/shell/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/shell/shellBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/shell/shellInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/shell/unix.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/shell/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/title/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/title/titleBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/title/titleInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/title/unix.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/title/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/uptime/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/uptime/bsd.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/uptime/linux.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/uptime/macos.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/uptime/uptimeBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/uptime/uptimeInfo.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/backend/uptime/windows.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/color/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/color/colorConfig.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/color/colorSet.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/color/colorUtil.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/frontendBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/alpine.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/arch.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/armbian.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/centos.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/debian.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/fedora.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/fedora_small.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/freebsd.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/kali.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/linux.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/linuxmint.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/macOS.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/opensuse-leap.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/opensuse-tumbleweed.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/raspbian.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/rhel.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/ubuntu.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/ubuntu_small.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/windows_10.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/windows_11.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/windows_2025.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/ascii/windows_old.pyhw +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/frontend/logo/logoBase.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/library/lib/iokitGPULib.dylib +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/library/lib/iokitHostLib.dylib +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/library/test/iokitHostLibTest.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/pyhwException/__init__.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/pyhwException/pyhwException.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/pyhwUtil/cliUtil.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw/pyhwUtil/sysctlUtil.py +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw.egg-info/SOURCES.txt +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw.egg-info/dependency_links.txt +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw.egg-info/entry_points.txt +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw.egg-info/requires.txt +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/src/pyhw.egg-info/top_level.txt +0 -0
- {pyhw-0.12.1 → pyhw-0.12.2}/test/test_cliUtil.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: pyhw
|
3
|
-
Version: 0.12.
|
3
|
+
Version: 0.12.2
|
4
4
|
Summary: PyHw, a neofetch-like command line tool for fetching system information but written mostly in python.
|
5
5
|
Author: Xiao Ran
|
6
6
|
Maintainer-email: Xiao Ran <xiaoran.007@icloud.com>
|
@@ -15,6 +15,7 @@ Requires-Python: >=3.9
|
|
15
15
|
Description-Content-Type: text/markdown
|
16
16
|
License-File: LICENSE
|
17
17
|
Requires-Dist: pypci-ng>=0.2.2
|
18
|
+
Dynamic: license-file
|
18
19
|
|
19
20
|
# PyHw
|
20
21
|
[](https://pepy.tech/project/pyhw)
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "pyhw"
|
7
|
-
version = "0.12.
|
7
|
+
version = "0.12.2"
|
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 = [
|
@@ -1,2 +1,2 @@
|
|
1
|
-
__version__ = '0.12.
|
1
|
+
__version__ = '0.12.2'
|
2
2
|
__author__ = 'xiaoran007'
|
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
In dev.
|
3
|
-
"""
|
4
|
-
from ...pyhwUtil import getArch, getDocker
|
1
|
+
from ...pyhwUtil import getArch, getDocker, getWSL
|
5
2
|
from .hostInfo import HostInfo
|
6
3
|
import os
|
7
4
|
|
@@ -11,6 +8,7 @@ class HostDetectLinux:
|
|
11
8
|
self._hostInfo = HostInfo()
|
12
9
|
self._arch = getArch()
|
13
10
|
self._docker = getDocker()
|
11
|
+
self._wsl = getWSL()
|
14
12
|
|
15
13
|
def getHostInfo(self):
|
16
14
|
self._getModel()
|
@@ -21,6 +19,10 @@ class HostDetectLinux:
|
|
21
19
|
self._hostInfo.name = f"General {self._arch} Docker Host"
|
22
20
|
self._hostInfo.version = ""
|
23
21
|
self._hostInfo.model = self._hostInfo.name + " " + self._hostInfo.version
|
22
|
+
if self._wsl:
|
23
|
+
self._hostInfo.name = f"Windows WSL {self._arch} Host"
|
24
|
+
self._hostInfo.version = ""
|
25
|
+
self._hostInfo.model = self._hostInfo.name + " " + self._hostInfo.version
|
24
26
|
else:
|
25
27
|
if self._arch in ["x86_64", "x86"]:
|
26
28
|
try:
|
@@ -0,0 +1,5 @@
|
|
1
|
+
from .pyhwUtil import getOS, getArch, getDocker, getWSL, createDataString, selectOSLogo
|
2
|
+
from .sysctlUtil import sysctlGetString, sysctlGetInt
|
3
|
+
from .cliUtil import ReleaseChecker
|
4
|
+
|
5
|
+
__all__ = ["getOS", "getArch", "getDocker", "getWSL", "createDataString", "selectOSLogo", "sysctlGetString", "sysctlGetInt", "ReleaseChecker"]
|
@@ -51,6 +51,22 @@ def getDocker() -> bool:
|
|
51
51
|
return os.path.exists("/.dockerenv")
|
52
52
|
|
53
53
|
|
54
|
+
def getWSL() -> bool:
|
55
|
+
"""
|
56
|
+
Check if the current environment is running in Windows Subsystem for Linux.
|
57
|
+
:return: bool, True if running in WSL, False otherwise.
|
58
|
+
"""
|
59
|
+
try:
|
60
|
+
result = subprocess.run(['uname', '-r'], capture_output=True, text=True)
|
61
|
+
version = result.stdout.strip()
|
62
|
+
if "WSL" in version or "microsoft" in version:
|
63
|
+
return True
|
64
|
+
else:
|
65
|
+
return False
|
66
|
+
except subprocess.SubprocessError:
|
67
|
+
return False
|
68
|
+
|
69
|
+
|
54
70
|
class DataStringProcessor:
|
55
71
|
def __init__(self, data: Data):
|
56
72
|
self.data = data
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: pyhw
|
3
|
-
Version: 0.12.
|
3
|
+
Version: 0.12.2
|
4
4
|
Summary: PyHw, a neofetch-like command line tool for fetching system information but written mostly in python.
|
5
5
|
Author: Xiao Ran
|
6
6
|
Maintainer-email: Xiao Ran <xiaoran.007@icloud.com>
|
@@ -15,6 +15,7 @@ Requires-Python: >=3.9
|
|
15
15
|
Description-Content-Type: text/markdown
|
16
16
|
License-File: LICENSE
|
17
17
|
Requires-Dist: pypci-ng>=0.2.2
|
18
|
+
Dynamic: license-file
|
18
19
|
|
19
20
|
# PyHw
|
20
21
|
[](https://pepy.tech/project/pyhw)
|
@@ -1,5 +0,0 @@
|
|
1
|
-
from .pyhwUtil import getOS, getArch, getDocker, createDataString, selectOSLogo
|
2
|
-
from .sysctlUtil import sysctlGetString, sysctlGetInt
|
3
|
-
from .cliUtil import ReleaseChecker
|
4
|
-
|
5
|
-
__all__ = ["getOS", "getArch", "getDocker", "createDataString", "selectOSLogo", "sysctlGetString", "sysctlGetInt", "ReleaseChecker"]
|
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
|
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
|