pyhw 0.9.0__tar.gz → 0.10.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. {pyhw-0.9.0/src/pyhw.egg-info → pyhw-0.10.1}/PKG-INFO +40 -27
  2. {pyhw-0.9.0 → pyhw-0.10.1}/README.md +38 -25
  3. {pyhw-0.9.0 → pyhw-0.10.1}/pyproject.toml +2 -2
  4. pyhw-0.10.1/src/pyhw/__init__.py +1 -0
  5. pyhw-0.10.1/src/pyhw/__main__.py +135 -0
  6. {pyhw-0.9.0 → pyhw-0.10.1/src/pyhw.egg-info}/PKG-INFO +40 -27
  7. pyhw-0.10.1/src/pyhw.egg-info/requires.txt +1 -0
  8. pyhw-0.9.0/src/pyhw/__init__.py +0 -1
  9. pyhw-0.9.0/src/pyhw/__main__.py +0 -46
  10. pyhw-0.9.0/src/pyhw.egg-info/requires.txt +0 -1
  11. {pyhw-0.9.0 → pyhw-0.10.1}/LICENSE +0 -0
  12. {pyhw-0.9.0 → pyhw-0.10.1}/setup.cfg +0 -0
  13. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/__init__.py +0 -0
  14. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/backendBase.py +0 -0
  15. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/cpu/__init__.py +0 -0
  16. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/cpu/bsd.py +0 -0
  17. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/cpu/cpuBase.py +0 -0
  18. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/cpu/cpuInfo.py +0 -0
  19. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/cpu/linux.py +0 -0
  20. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/cpu/macos.py +0 -0
  21. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/cpu/windows.py +0 -0
  22. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/gpu/__init__.py +0 -0
  23. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/gpu/bsd.py +0 -0
  24. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/gpu/gpuBase.py +0 -0
  25. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/gpu/gpuInfo.py +0 -0
  26. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/gpu/linux.py +0 -0
  27. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/gpu/macos.py +0 -0
  28. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/gpu/windows.py +0 -0
  29. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/host/__init__.py +0 -0
  30. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/host/bsd.py +0 -0
  31. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/host/hostBase.py +0 -0
  32. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/host/hostInfo.py +0 -0
  33. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/host/linux.py +0 -0
  34. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/host/macos.py +0 -0
  35. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/host/windows.py +0 -0
  36. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/kernel/__init__.py +0 -0
  37. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/kernel/kernelBase.py +0 -0
  38. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/kernel/kernelInfo.py +0 -0
  39. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/kernel/unix.py +0 -0
  40. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/kernel/windows.py +0 -0
  41. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/memory/__init__.py +0 -0
  42. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/memory/bsd.py +0 -0
  43. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/memory/linux.py +0 -0
  44. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/memory/macos.py +0 -0
  45. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/memory/memoryBase.py +0 -0
  46. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/memory/memoryInfo.py +0 -0
  47. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/memory/windows.py +0 -0
  48. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/metal/t.py +0 -0
  49. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/nic/__init__.py +0 -0
  50. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/nic/bsd.py +0 -0
  51. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/nic/linux.py +0 -0
  52. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/nic/macos.py +0 -0
  53. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/nic/nicBase.py +0 -0
  54. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/nic/nicInfo.py +0 -0
  55. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/nic/windows.py +0 -0
  56. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/npu/__init__.py +0 -0
  57. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/npu/bsd.py +0 -0
  58. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/npu/linux.py +0 -0
  59. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/npu/macos.py +0 -0
  60. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/npu/npuBase.py +0 -0
  61. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/npu/npuInfo.py +0 -0
  62. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/npu/windows.py +0 -0
  63. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/os/__init__.py +0 -0
  64. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/os/bsd.py +0 -0
  65. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/os/linux.py +0 -0
  66. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/os/macos.py +0 -0
  67. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/os/osBase.py +0 -0
  68. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/os/osInfo.py +0 -0
  69. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/os/windows.py +0 -0
  70. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/shell/__init__.py +0 -0
  71. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/shell/shellBase.py +0 -0
  72. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/shell/shellInfo.py +0 -0
  73. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/shell/unix.py +0 -0
  74. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/shell/windows.py +0 -0
  75. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/title/__init__.py +0 -0
  76. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/title/titleBase.py +0 -0
  77. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/title/titleInfo.py +0 -0
  78. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/title/unix.py +0 -0
  79. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/title/windows.py +0 -0
  80. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/uptime/__init__.py +0 -0
  81. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/uptime/bsd.py +0 -0
  82. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/uptime/linux.py +0 -0
  83. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/uptime/macos.py +0 -0
  84. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/uptime/uptimeBase.py +0 -0
  85. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/uptime/uptimeInfo.py +0 -0
  86. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/backend/uptime/windows.py +0 -0
  87. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/__init__.py +0 -0
  88. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/color/__init__.py +0 -0
  89. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/color/colorConfig.py +0 -0
  90. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/color/colorSet.py +0 -0
  91. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/color/colorUtil.py +0 -0
  92. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/frontendBase.py +0 -0
  93. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/__init__.py +0 -0
  94. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/alpine.pyhw +0 -0
  95. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/arch.pyhw +0 -0
  96. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/armbian.pyhw +0 -0
  97. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/centos.pyhw +0 -0
  98. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/debian.pyhw +0 -0
  99. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/fedora.pyhw +0 -0
  100. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/fedora_small.pyhw +0 -0
  101. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/freebsd.pyhw +0 -0
  102. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/linux.pyhw +0 -0
  103. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/macOS.pyhw +0 -0
  104. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/raspbian.pyhw +0 -0
  105. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/ubuntu.pyhw +0 -0
  106. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/ubuntu_small.pyhw +0 -0
  107. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/windows_10.pyhw +0 -0
  108. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/windows_11.pyhw +0 -0
  109. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/windows_2025.pyhw +0 -0
  110. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/ascii/windows_old.pyhw +0 -0
  111. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/frontend/logo/logoBase.py +0 -0
  112. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/library/lib/iokitGPULib.dylib +0 -0
  113. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/pyhwException/__init__.py +0 -0
  114. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/pyhwException/pyhwException.py +0 -0
  115. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/pyhwUtil/__init__.py +0 -0
  116. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/pyhwUtil/pyhwUtil.py +0 -0
  117. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw/pyhwUtil/sysctlUtil.py +0 -0
  118. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw.egg-info/SOURCES.txt +0 -0
  119. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw.egg-info/dependency_links.txt +0 -0
  120. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw.egg-info/entry_points.txt +0 -0
  121. {pyhw-0.9.0 → pyhw-0.10.1}/src/pyhw.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pyhw
3
- Version: 0.9.0
3
+ Version: 0.10.1
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
@@ -13,7 +13,7 @@ Classifier: Operating System :: OS Independent
13
13
  Requires-Python: >=3.9
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: pypci-ng>=0.1.2
16
+ Requires-Dist: pypci-ng>=0.1.3
17
17
 
18
18
  # PyHw
19
19
  [![Downloads](https://static.pepy.tech/badge/pyhw)](https://pepy.tech/project/pyhw)
@@ -26,7 +26,8 @@ Requires-Dist: pypci-ng>=0.1.2
26
26
  ![Static Badge](https://img.shields.io/badge/Windows-yellow)
27
27
 
28
28
  ![Static Badge](https://img.shields.io/badge/amd64-green)
29
- ![Static Badge](https://img.shields.io/badge/arm-blue)
29
+ ![Static Badge](https://img.shields.io/badge/aarch64-blue)
30
+ ![Static Badge](https://img.shields.io/badge/arm32-yellow)
30
31
  ![Static Badge](https://img.shields.io/badge/riscv64-%238A2BE2)
31
32
 
32
33
 
@@ -42,8 +43,23 @@ This project is a Python reimplementation of [neofetch](https://github.com/dylan
42
43
 
43
44
 
44
45
 
45
- ## 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, just install it directly by pip.
46
+ ## 1. Install
47
+ 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.
48
+
49
+ ### 1.1 Install by pipx
50
+ **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.
51
+
52
+ You can install pyhw by the following command:
53
+ ```shell
54
+ pipx install pyhw
55
+ ```
56
+ You can then use this tool directly from the command line with the following command, just like neofetch.
57
+ ```shell
58
+ pyhw
59
+ ```
60
+
61
+ ### 1.2 Install by pip
62
+ 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:
47
63
  ```shell
48
64
  pip install pyhw
49
65
  ```
@@ -61,19 +77,8 @@ python -m pyhw
61
77
  ```
62
78
  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__.
63
79
 
64
- ### Install by pipx
65
- **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).
66
-
67
- You can install pyhw by the following command:
68
- ```shell
69
- pipx install pyhw
70
- ```
71
- You can then use this tool directly from the command line with the following command, just like neofetch.
72
- ```shell
73
- pyhw
74
- ```
75
80
 
76
- ### Important note about debian 12:
81
+ ### 1.3 Important note about debian 12:
77
82
  If you use system pip to install pyhw, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):
78
83
  ```text
79
84
  error: externally-managed-environment
@@ -93,32 +98,34 @@ error: externally-managed-environment
93
98
  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.
94
99
  hint: See PEP 668 for the detailed specification.
95
100
  ```
96
- 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).
101
+ 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).
97
102
 
98
- ## Tested OS
103
+ ## 2. Tested OS
99
104
  * macOS arm64, x86_64
100
105
  * Linux arm64, x86_64, riscv64
101
106
  * FreeBSD arm64
102
- * Windows 10 X86_64
107
+ * Windows 10 x86_64
108
+ * Windows 11 arm64, x86_64
109
+
110
+ For more detailed information, please refer to [Tested Platform](docs/tested_platform.md).
103
111
 
104
- ## Add Logo
112
+ ## 3. Add Logo
105
113
  1. Create a file named **\<os>.pyhw** in **logo/ascii** folder
106
114
  2. Modify **colorConfig.py** file to add a new logo style
107
115
  3. Update **pyhwUtil.py** to enable new logo style.
108
116
 
109
- ## Build from source
110
- 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.
117
+ ## 4. Build from source
111
118
 
112
- ### Dependencies
119
+ ### 4.1 Dependencies
113
120
  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).
114
121
 
115
- ### Build tools
122
+ ### 4.2 Build tools
116
123
  Make sure the following Python build tools are already installed.
117
124
  * setuptools
118
125
  * build
119
126
  * twine
120
127
 
121
- ### Build package
128
+ ### 4.3 Build package
122
129
  clone the project, and run:
123
130
  ```shell
124
131
  python -m build
@@ -127,11 +134,17 @@ After the build process, the source package and the binary whl package can be fo
127
134
  ```shell
128
135
  pip install dist/*.whl --force-reinstall
129
136
  ```
130
- Or simply type:
137
+
138
+ ### 4.4 Build Full Feature package
139
+ 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.
140
+
141
+ Simply type:
131
142
  ```shell
132
143
  make build
133
144
  make install
134
145
  ```
146
+
147
+ ## 5. Test Package
135
148
  If you have docker installed, you can test this package through docker by type:
136
149
  ```shell
137
150
  make test # local build
@@ -9,7 +9,8 @@
9
9
  ![Static Badge](https://img.shields.io/badge/Windows-yellow)
10
10
 
11
11
  ![Static Badge](https://img.shields.io/badge/amd64-green)
12
- ![Static Badge](https://img.shields.io/badge/arm-blue)
12
+ ![Static Badge](https://img.shields.io/badge/aarch64-blue)
13
+ ![Static Badge](https://img.shields.io/badge/arm32-yellow)
13
14
  ![Static Badge](https://img.shields.io/badge/riscv64-%238A2BE2)
14
15
 
15
16
 
@@ -25,8 +26,23 @@ This project is a Python reimplementation of [neofetch](https://github.com/dylan
25
26
 
26
27
 
27
28
 
28
- ## Install
29
- 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, just install it directly by pip.
29
+ ## 1. Install
30
+ 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.
31
+
32
+ ### 1.1 Install by pipx
33
+ **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.
34
+
35
+ You can install pyhw by the following command:
36
+ ```shell
37
+ pipx install pyhw
38
+ ```
39
+ You can then use this tool directly from the command line with the following command, just like neofetch.
40
+ ```shell
41
+ pyhw
42
+ ```
43
+
44
+ ### 1.2 Install by pip
45
+ 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:
30
46
  ```shell
31
47
  pip install pyhw
32
48
  ```
@@ -44,19 +60,8 @@ python -m pyhw
44
60
  ```
45
61
  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__.
46
62
 
47
- ### Install by pipx
48
- **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).
49
-
50
- You can install pyhw by the following command:
51
- ```shell
52
- pipx install pyhw
53
- ```
54
- You can then use this tool directly from the command line with the following command, just like neofetch.
55
- ```shell
56
- pyhw
57
- ```
58
63
 
59
- ### Important note about debian 12:
64
+ ### 1.3 Important note about debian 12:
60
65
  If you use system pip to install pyhw, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):
61
66
  ```text
62
67
  error: externally-managed-environment
@@ -76,32 +81,34 @@ error: externally-managed-environment
76
81
  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.
77
82
  hint: See PEP 668 for the detailed specification.
78
83
  ```
79
- 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).
84
+ 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).
80
85
 
81
- ## Tested OS
86
+ ## 2. Tested OS
82
87
  * macOS arm64, x86_64
83
88
  * Linux arm64, x86_64, riscv64
84
89
  * FreeBSD arm64
85
- * Windows 10 X86_64
90
+ * Windows 10 x86_64
91
+ * Windows 11 arm64, x86_64
92
+
93
+ For more detailed information, please refer to [Tested Platform](docs/tested_platform.md).
86
94
 
87
- ## Add Logo
95
+ ## 3. Add Logo
88
96
  1. Create a file named **\<os>.pyhw** in **logo/ascii** folder
89
97
  2. Modify **colorConfig.py** file to add a new logo style
90
98
  3. Update **pyhwUtil.py** to enable new logo style.
91
99
 
92
- ## Build from source
93
- 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.
100
+ ## 4. Build from source
94
101
 
95
- ### Dependencies
102
+ ### 4.1 Dependencies
96
103
  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).
97
104
 
98
- ### Build tools
105
+ ### 4.2 Build tools
99
106
  Make sure the following Python build tools are already installed.
100
107
  * setuptools
101
108
  * build
102
109
  * twine
103
110
 
104
- ### Build package
111
+ ### 4.3 Build package
105
112
  clone the project, and run:
106
113
  ```shell
107
114
  python -m build
@@ -110,11 +117,17 @@ After the build process, the source package and the binary whl package can be fo
110
117
  ```shell
111
118
  pip install dist/*.whl --force-reinstall
112
119
  ```
113
- Or simply type:
120
+
121
+ ### 4.4 Build Full Feature package
122
+ 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.
123
+
124
+ Simply type:
114
125
  ```shell
115
126
  make build
116
127
  make install
117
128
  ```
129
+
130
+ ## 5. Test Package
118
131
  If you have docker installed, you can test this package through docker by type:
119
132
  ```shell
120
133
  make test # local build
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pyhw"
7
- version = "0.9.0"
7
+ version = "0.10.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 = [
@@ -14,7 +14,7 @@ readme = "README.md"
14
14
  license = {text = "BSD-3-Clause"}
15
15
  requires-python = ">=3.9"
16
16
  dependencies = [
17
- "pypci-ng>=0.1.2"
17
+ "pypci-ng>=0.1.3"
18
18
  ]
19
19
  classifiers = [
20
20
  "Development Status :: 4 - Beta",
@@ -0,0 +1 @@
1
+ __version__ = '0.10.1'
@@ -0,0 +1,135 @@
1
+ from .frontend import Printer
2
+ from .backend import Data
3
+ from .backend.title import TitleDetect
4
+ from .backend.host import HostDetect
5
+ from .backend.kernel import KernelDetect
6
+ from .backend.shell import ShellDetect
7
+ from .backend.uptime import UptimeDetect
8
+ from .backend.os import OSDetect
9
+ from .backend.cpu import CPUDetect
10
+ from .backend.gpu import GPUDetect
11
+ from .backend.memory import MemoryDetect
12
+ from .backend.nic import NICDetect
13
+ from .backend.npu import NPUDetect
14
+ from .pyhwUtil import createDataString
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
67
+
68
+
69
+ def main():
70
+ current_os = getOS()
71
+ if current_os not in ["linux", "macos", "freebsd", "windows"]:
72
+ print(f"Only Linux, macOS, FreeBSD, and Windows are supported for now. Current OS: {current_os}")
73
+ return
74
+
75
+ data = Data()
76
+
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()
132
+
133
+
134
+ if __name__ == "__main__":
135
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pyhw
3
- Version: 0.9.0
3
+ Version: 0.10.1
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
@@ -13,7 +13,7 @@ Classifier: Operating System :: OS Independent
13
13
  Requires-Python: >=3.9
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: pypci-ng>=0.1.2
16
+ Requires-Dist: pypci-ng>=0.1.3
17
17
 
18
18
  # PyHw
19
19
  [![Downloads](https://static.pepy.tech/badge/pyhw)](https://pepy.tech/project/pyhw)
@@ -26,7 +26,8 @@ Requires-Dist: pypci-ng>=0.1.2
26
26
  ![Static Badge](https://img.shields.io/badge/Windows-yellow)
27
27
 
28
28
  ![Static Badge](https://img.shields.io/badge/amd64-green)
29
- ![Static Badge](https://img.shields.io/badge/arm-blue)
29
+ ![Static Badge](https://img.shields.io/badge/aarch64-blue)
30
+ ![Static Badge](https://img.shields.io/badge/arm32-yellow)
30
31
  ![Static Badge](https://img.shields.io/badge/riscv64-%238A2BE2)
31
32
 
32
33
 
@@ -42,8 +43,23 @@ This project is a Python reimplementation of [neofetch](https://github.com/dylan
42
43
 
43
44
 
44
45
 
45
- ## 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, just install it directly by pip.
46
+ ## 1. Install
47
+ 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.
48
+
49
+ ### 1.1 Install by pipx
50
+ **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.
51
+
52
+ You can install pyhw by the following command:
53
+ ```shell
54
+ pipx install pyhw
55
+ ```
56
+ You can then use this tool directly from the command line with the following command, just like neofetch.
57
+ ```shell
58
+ pyhw
59
+ ```
60
+
61
+ ### 1.2 Install by pip
62
+ 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:
47
63
  ```shell
48
64
  pip install pyhw
49
65
  ```
@@ -61,19 +77,8 @@ python -m pyhw
61
77
  ```
62
78
  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__.
63
79
 
64
- ### Install by pipx
65
- **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).
66
-
67
- You can install pyhw by the following command:
68
- ```shell
69
- pipx install pyhw
70
- ```
71
- You can then use this tool directly from the command line with the following command, just like neofetch.
72
- ```shell
73
- pyhw
74
- ```
75
80
 
76
- ### Important note about debian 12:
81
+ ### 1.3 Important note about debian 12:
77
82
  If you use system pip to install pyhw, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):
78
83
  ```text
79
84
  error: externally-managed-environment
@@ -93,32 +98,34 @@ error: externally-managed-environment
93
98
  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.
94
99
  hint: See PEP 668 for the detailed specification.
95
100
  ```
96
- 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).
101
+ 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).
97
102
 
98
- ## Tested OS
103
+ ## 2. Tested OS
99
104
  * macOS arm64, x86_64
100
105
  * Linux arm64, x86_64, riscv64
101
106
  * FreeBSD arm64
102
- * Windows 10 X86_64
107
+ * Windows 10 x86_64
108
+ * Windows 11 arm64, x86_64
109
+
110
+ For more detailed information, please refer to [Tested Platform](docs/tested_platform.md).
103
111
 
104
- ## Add Logo
112
+ ## 3. Add Logo
105
113
  1. Create a file named **\<os>.pyhw** in **logo/ascii** folder
106
114
  2. Modify **colorConfig.py** file to add a new logo style
107
115
  3. Update **pyhwUtil.py** to enable new logo style.
108
116
 
109
- ## Build from source
110
- 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.
117
+ ## 4. Build from source
111
118
 
112
- ### Dependencies
119
+ ### 4.1 Dependencies
113
120
  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).
114
121
 
115
- ### Build tools
122
+ ### 4.2 Build tools
116
123
  Make sure the following Python build tools are already installed.
117
124
  * setuptools
118
125
  * build
119
126
  * twine
120
127
 
121
- ### Build package
128
+ ### 4.3 Build package
122
129
  clone the project, and run:
123
130
  ```shell
124
131
  python -m build
@@ -127,11 +134,17 @@ After the build process, the source package and the binary whl package can be fo
127
134
  ```shell
128
135
  pip install dist/*.whl --force-reinstall
129
136
  ```
130
- Or simply type:
137
+
138
+ ### 4.4 Build Full Feature package
139
+ 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.
140
+
141
+ Simply type:
131
142
  ```shell
132
143
  make build
133
144
  make install
134
145
  ```
146
+
147
+ ## 5. Test Package
135
148
  If you have docker installed, you can test this package through docker by type:
136
149
  ```shell
137
150
  make test # local build
@@ -0,0 +1 @@
1
+ pypci-ng>=0.1.3
@@ -1 +0,0 @@
1
- __version__ = '0.9.0'
@@ -1,46 +0,0 @@
1
- from .frontend import Printer
2
- from .backend import Data
3
- from .backend.title import TitleDetect
4
- from .backend.host import HostDetect
5
- from .backend.kernel import KernelDetect
6
- from .backend.shell import ShellDetect
7
- from .backend.uptime import UptimeDetect
8
- from .backend.os import OSDetect
9
- from .backend.cpu import CPUDetect
10
- from .backend.gpu import GPUDetect
11
- from .backend.memory import MemoryDetect
12
- from .backend.nic import NICDetect
13
- from .backend.npu import NPUDetect
14
- from .pyhwUtil import createDataString
15
- from .pyhwUtil import getOS, selectOSLogo
16
-
17
-
18
- def main():
19
- current_os = getOS()
20
- 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}")
22
- return
23
- 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
-
42
- Printer(logo_os=selectOSLogo(OSDetect(os=current_os).getOSInfo().id), data=createDataString(data)).cPrint()
43
-
44
-
45
- if __name__ == "__main__":
46
- main()
@@ -1 +0,0 @@
1
- pypci-ng>=0.1.2
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