pyhw 0.9.0__tar.gz → 0.10.0__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.0}/PKG-INFO +39 -27
  2. {pyhw-0.9.0 → pyhw-0.10.0}/README.md +36 -24
  3. {pyhw-0.9.0 → pyhw-0.10.0}/pyproject.toml +3 -3
  4. pyhw-0.10.0/src/pyhw/__init__.py +1 -0
  5. pyhw-0.10.0/src/pyhw/__main__.py +135 -0
  6. {pyhw-0.9.0 → pyhw-0.10.0/src/pyhw.egg-info}/PKG-INFO +39 -27
  7. pyhw-0.10.0/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.0}/LICENSE +0 -0
  12. {pyhw-0.9.0 → pyhw-0.10.0}/setup.cfg +0 -0
  13. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/__init__.py +0 -0
  14. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/backendBase.py +0 -0
  15. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/cpu/__init__.py +0 -0
  16. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/cpu/bsd.py +0 -0
  17. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/cpu/cpuBase.py +0 -0
  18. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/cpu/cpuInfo.py +0 -0
  19. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/cpu/linux.py +0 -0
  20. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/cpu/macos.py +0 -0
  21. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/cpu/windows.py +0 -0
  22. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/gpu/__init__.py +0 -0
  23. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/gpu/bsd.py +0 -0
  24. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/gpu/gpuBase.py +0 -0
  25. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/gpu/gpuInfo.py +0 -0
  26. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/gpu/linux.py +0 -0
  27. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/gpu/macos.py +0 -0
  28. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/gpu/windows.py +0 -0
  29. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/host/__init__.py +0 -0
  30. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/host/bsd.py +0 -0
  31. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/host/hostBase.py +0 -0
  32. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/host/hostInfo.py +0 -0
  33. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/host/linux.py +0 -0
  34. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/host/macos.py +0 -0
  35. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/host/windows.py +0 -0
  36. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/kernel/__init__.py +0 -0
  37. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/kernel/kernelBase.py +0 -0
  38. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/kernel/kernelInfo.py +0 -0
  39. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/kernel/unix.py +0 -0
  40. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/kernel/windows.py +0 -0
  41. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/memory/__init__.py +0 -0
  42. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/memory/bsd.py +0 -0
  43. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/memory/linux.py +0 -0
  44. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/memory/macos.py +0 -0
  45. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/memory/memoryBase.py +0 -0
  46. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/memory/memoryInfo.py +0 -0
  47. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/memory/windows.py +0 -0
  48. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/metal/t.py +0 -0
  49. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/nic/__init__.py +0 -0
  50. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/nic/bsd.py +0 -0
  51. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/nic/linux.py +0 -0
  52. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/nic/macos.py +0 -0
  53. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/nic/nicBase.py +0 -0
  54. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/nic/nicInfo.py +0 -0
  55. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/nic/windows.py +0 -0
  56. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/npu/__init__.py +0 -0
  57. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/npu/bsd.py +0 -0
  58. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/npu/linux.py +0 -0
  59. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/npu/macos.py +0 -0
  60. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/npu/npuBase.py +0 -0
  61. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/npu/npuInfo.py +0 -0
  62. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/npu/windows.py +0 -0
  63. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/os/__init__.py +0 -0
  64. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/os/bsd.py +0 -0
  65. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/os/linux.py +0 -0
  66. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/os/macos.py +0 -0
  67. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/os/osBase.py +0 -0
  68. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/os/osInfo.py +0 -0
  69. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/os/windows.py +0 -0
  70. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/shell/__init__.py +0 -0
  71. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/shell/shellBase.py +0 -0
  72. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/shell/shellInfo.py +0 -0
  73. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/shell/unix.py +0 -0
  74. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/shell/windows.py +0 -0
  75. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/title/__init__.py +0 -0
  76. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/title/titleBase.py +0 -0
  77. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/title/titleInfo.py +0 -0
  78. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/title/unix.py +0 -0
  79. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/title/windows.py +0 -0
  80. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/uptime/__init__.py +0 -0
  81. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/uptime/bsd.py +0 -0
  82. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/uptime/linux.py +0 -0
  83. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/uptime/macos.py +0 -0
  84. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/uptime/uptimeBase.py +0 -0
  85. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/uptime/uptimeInfo.py +0 -0
  86. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/backend/uptime/windows.py +0 -0
  87. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/__init__.py +0 -0
  88. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/color/__init__.py +0 -0
  89. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/color/colorConfig.py +0 -0
  90. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/color/colorSet.py +0 -0
  91. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/color/colorUtil.py +0 -0
  92. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/frontendBase.py +0 -0
  93. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/__init__.py +0 -0
  94. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/alpine.pyhw +0 -0
  95. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/arch.pyhw +0 -0
  96. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/armbian.pyhw +0 -0
  97. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/centos.pyhw +0 -0
  98. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/debian.pyhw +0 -0
  99. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/fedora.pyhw +0 -0
  100. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/fedora_small.pyhw +0 -0
  101. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/freebsd.pyhw +0 -0
  102. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/linux.pyhw +0 -0
  103. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/macOS.pyhw +0 -0
  104. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/raspbian.pyhw +0 -0
  105. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/ubuntu.pyhw +0 -0
  106. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/ubuntu_small.pyhw +0 -0
  107. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/windows_10.pyhw +0 -0
  108. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/windows_11.pyhw +0 -0
  109. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/windows_2025.pyhw +0 -0
  110. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/ascii/windows_old.pyhw +0 -0
  111. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/frontend/logo/logoBase.py +0 -0
  112. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/library/lib/iokitGPULib.dylib +0 -0
  113. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/pyhwException/__init__.py +0 -0
  114. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/pyhwException/pyhwException.py +0 -0
  115. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/pyhwUtil/__init__.py +0 -0
  116. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/pyhwUtil/pyhwUtil.py +0 -0
  117. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw/pyhwUtil/sysctlUtil.py +0 -0
  118. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw.egg-info/SOURCES.txt +0 -0
  119. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw.egg-info/dependency_links.txt +0 -0
  120. {pyhw-0.9.0 → pyhw-0.10.0}/src/pyhw.egg-info/entry_points.txt +0 -0
  121. {pyhw-0.9.0 → pyhw-0.10.0}/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.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.9
13
+ Requires-Python: >=3.8
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)
@@ -42,8 +42,23 @@ This project is a Python reimplementation of [neofetch](https://github.com/dylan
42
42
 
43
43
 
44
44
 
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.
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:
47
62
  ```shell
48
63
  pip install pyhw
49
64
  ```
@@ -61,19 +76,8 @@ python -m pyhw
61
76
  ```
62
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__.
63
78
 
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
79
 
76
- ### Important note about debian 12:
80
+ ### 1.3 Important note about debian 12:
77
81
  If you use system pip to install pyhw, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):
78
82
  ```text
79
83
  error: externally-managed-environment
@@ -93,32 +97,34 @@ error: externally-managed-environment
93
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.
94
98
  hint: See PEP 668 for the detailed specification.
95
99
  ```
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).
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).
97
101
 
98
- ## Tested OS
102
+ ## 2. Tested OS
99
103
  * macOS arm64, x86_64
100
104
  * Linux arm64, x86_64, riscv64
101
105
  * FreeBSD arm64
102
- * Windows 10 X86_64
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).
103
110
 
104
- ## Add Logo
111
+ ## 3. Add Logo
105
112
  1. Create a file named **\<os>.pyhw** in **logo/ascii** folder
106
113
  2. Modify **colorConfig.py** file to add a new logo style
107
114
  3. Update **pyhwUtil.py** to enable new logo style.
108
115
 
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.
116
+ ## 4. Build from source
111
117
 
112
- ### Dependencies
118
+ ### 4.1 Dependencies
113
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).
114
120
 
115
- ### Build tools
121
+ ### 4.2 Build tools
116
122
  Make sure the following Python build tools are already installed.
117
123
  * setuptools
118
124
  * build
119
125
  * twine
120
126
 
121
- ### Build package
127
+ ### 4.3 Build package
122
128
  clone the project, and run:
123
129
  ```shell
124
130
  python -m build
@@ -127,11 +133,17 @@ After the build process, the source package and the binary whl package can be fo
127
133
  ```shell
128
134
  pip install dist/*.whl --force-reinstall
129
135
  ```
130
- Or simply type:
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:
131
141
  ```shell
132
142
  make build
133
143
  make install
134
144
  ```
145
+
146
+ ## 5. Test Package
135
147
  If you have docker installed, you can test this package through docker by type:
136
148
  ```shell
137
149
  make test # local build
@@ -25,8 +25,23 @@ This project is a Python reimplementation of [neofetch](https://github.com/dylan
25
25
 
26
26
 
27
27
 
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.
28
+ ## 1. 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, There are two convenient ways to install it.
30
+
31
+ ### 1.1 Install by pipx
32
+ **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.
33
+
34
+ You can install pyhw by the following command:
35
+ ```shell
36
+ pipx install pyhw
37
+ ```
38
+ You can then use this tool directly from the command line with the following command, just like neofetch.
39
+ ```shell
40
+ pyhw
41
+ ```
42
+
43
+ ### 1.2 Install by pip
44
+ 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
45
  ```shell
31
46
  pip install pyhw
32
47
  ```
@@ -44,19 +59,8 @@ python -m pyhw
44
59
  ```
45
60
  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
61
 
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
62
 
59
- ### Important note about debian 12:
63
+ ### 1.3 Important note about debian 12:
60
64
  If you use system pip to install pyhw, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):
61
65
  ```text
62
66
  error: externally-managed-environment
@@ -76,32 +80,34 @@ error: externally-managed-environment
76
80
  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
81
  hint: See PEP 668 for the detailed specification.
78
82
  ```
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).
83
+ 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
84
 
81
- ## Tested OS
85
+ ## 2. Tested OS
82
86
  * macOS arm64, x86_64
83
87
  * Linux arm64, x86_64, riscv64
84
88
  * FreeBSD arm64
85
- * Windows 10 X86_64
89
+ * Windows 10 x86_64
90
+ * Windows 11 arm64, x86_64
91
+
92
+ For more detailed information, please refer to [Tested Platform](docs/tested_platform.md).
86
93
 
87
- ## Add Logo
94
+ ## 3. Add Logo
88
95
  1. Create a file named **\<os>.pyhw** in **logo/ascii** folder
89
96
  2. Modify **colorConfig.py** file to add a new logo style
90
97
  3. Update **pyhwUtil.py** to enable new logo style.
91
98
 
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.
99
+ ## 4. Build from source
94
100
 
95
- ### Dependencies
101
+ ### 4.1 Dependencies
96
102
  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
103
 
98
- ### Build tools
104
+ ### 4.2 Build tools
99
105
  Make sure the following Python build tools are already installed.
100
106
  * setuptools
101
107
  * build
102
108
  * twine
103
109
 
104
- ### Build package
110
+ ### 4.3 Build package
105
111
  clone the project, and run:
106
112
  ```shell
107
113
  python -m build
@@ -110,11 +116,17 @@ After the build process, the source package and the binary whl package can be fo
110
116
  ```shell
111
117
  pip install dist/*.whl --force-reinstall
112
118
  ```
113
- Or simply type:
119
+
120
+ ### 4.4 Build Full Feature package
121
+ 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.
122
+
123
+ Simply type:
114
124
  ```shell
115
125
  make build
116
126
  make install
117
127
  ```
128
+
129
+ ## 5. Test Package
118
130
  If you have docker installed, you can test this package through docker by type:
119
131
  ```shell
120
132
  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.0"
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 = [
@@ -12,9 +12,9 @@ authors = [
12
12
  ]
13
13
  readme = "README.md"
14
14
  license = {text = "BSD-3-Clause"}
15
- requires-python = ">=3.9"
15
+ requires-python = ">=3.8"
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.0'
@@ -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.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.9
13
+ Requires-Python: >=3.8
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)
@@ -42,8 +42,23 @@ This project is a Python reimplementation of [neofetch](https://github.com/dylan
42
42
 
43
43
 
44
44
 
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.
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:
47
62
  ```shell
48
63
  pip install pyhw
49
64
  ```
@@ -61,19 +76,8 @@ python -m pyhw
61
76
  ```
62
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__.
63
78
 
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
79
 
76
- ### Important note about debian 12:
80
+ ### 1.3 Important note about debian 12:
77
81
  If you use system pip to install pyhw, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):
78
82
  ```text
79
83
  error: externally-managed-environment
@@ -93,32 +97,34 @@ error: externally-managed-environment
93
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.
94
98
  hint: See PEP 668 for the detailed specification.
95
99
  ```
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).
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).
97
101
 
98
- ## Tested OS
102
+ ## 2. Tested OS
99
103
  * macOS arm64, x86_64
100
104
  * Linux arm64, x86_64, riscv64
101
105
  * FreeBSD arm64
102
- * Windows 10 X86_64
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).
103
110
 
104
- ## Add Logo
111
+ ## 3. Add Logo
105
112
  1. Create a file named **\<os>.pyhw** in **logo/ascii** folder
106
113
  2. Modify **colorConfig.py** file to add a new logo style
107
114
  3. Update **pyhwUtil.py** to enable new logo style.
108
115
 
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.
116
+ ## 4. Build from source
111
117
 
112
- ### Dependencies
118
+ ### 4.1 Dependencies
113
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).
114
120
 
115
- ### Build tools
121
+ ### 4.2 Build tools
116
122
  Make sure the following Python build tools are already installed.
117
123
  * setuptools
118
124
  * build
119
125
  * twine
120
126
 
121
- ### Build package
127
+ ### 4.3 Build package
122
128
  clone the project, and run:
123
129
  ```shell
124
130
  python -m build
@@ -127,11 +133,17 @@ After the build process, the source package and the binary whl package can be fo
127
133
  ```shell
128
134
  pip install dist/*.whl --force-reinstall
129
135
  ```
130
- Or simply type:
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:
131
141
  ```shell
132
142
  make build
133
143
  make install
134
144
  ```
145
+
146
+ ## 5. Test Package
135
147
  If you have docker installed, you can test this package through docker by type:
136
148
  ```shell
137
149
  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