pyhw 0.13.3__py3-none-any.whl → 0.13.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyhw/__init__.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = '0.13.3'
1
+ __version__ = '0.13.4'
2
2
  __author__ = 'xiaoran007'
pyhw/__main__.py CHANGED
@@ -16,6 +16,7 @@ from .pyhwUtil import getOS, selectOSLogo
16
16
  from .pyhwUtil import ReleaseChecker
17
17
  from .frontend.color import colorPrefix, colorSuffix, ColorSet
18
18
  import multiprocessing
19
+ import argparse
19
20
 
20
21
 
21
22
  def check_release(release_dict):
@@ -76,7 +77,21 @@ def detect_npu(os, result_dict):
76
77
  result_dict["NPU"] = npu_info.npus
77
78
 
78
79
 
80
+ def print_version():
81
+ releaseChecker = ReleaseChecker()
82
+ print(f"pyhw v{releaseChecker.CurrentVersion}")
83
+
84
+
79
85
  def main():
86
+ parser = argparse.ArgumentParser(description='PyHw, a neofetch-like command line tool for fetching system information')
87
+ parser.add_argument('-v', '--version', action='store_true', help='Print version information and exit')
88
+
89
+ args = parser.parse_args()
90
+
91
+ if args.version:
92
+ print_version()
93
+ return
94
+
80
95
  current_os = getOS()
81
96
  if current_os not in ["linux", "macos", "freebsd", "windows"]:
82
97
  print(f"Only Linux, macOS, FreeBSD, and Windows are supported for now. Current OS: {current_os}")
pyhw/backend/os/macos.py CHANGED
@@ -10,14 +10,15 @@ class OSDetectMacOS:
10
10
  self.__ProductVersion = ""
11
11
  self.__BuildVersion = ""
12
12
  self.__VersionName = ""
13
+ self.__Arch = self.__handleOSArch()
13
14
 
14
15
  def getOSInfo(self):
15
16
  self.__getOS()
16
17
  self.__handelOSName()
17
18
  if self.__VersionName != "":
18
- self.__osInfo.prettyName = f"{self.__ProductName} {self.__VersionName} {self.__ProductVersion} {self.__BuildVersion} {getArch()}"
19
+ self.__osInfo.prettyName = f"{self.__ProductName} {self.__VersionName} {self.__ProductVersion} {self.__BuildVersion} {self.__Arch}"
19
20
  else:
20
- self.__osInfo.prettyName = f"{self.__ProductName} {self.__ProductVersion} {self.__BuildVersion} {getArch()}"
21
+ self.__osInfo.prettyName = f"{self.__ProductName} {self.__ProductVersion} {self.__BuildVersion} {self.__Arch}"
21
22
  self.__osInfo.id = "macOS"
22
23
  return self.__osInfo
23
24
 
@@ -51,3 +52,11 @@ class OSDetectMacOS:
51
52
  version_name = macOSVersionMap.get(major, "")
52
53
  if version_name != "":
53
54
  self.__VersionName = version_name
55
+
56
+ @staticmethod
57
+ def __handleOSArch():
58
+ arch = getArch()
59
+ if arch == "aarch64":
60
+ return "arm64"
61
+ else:
62
+ return arch
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyhw
3
- Version: 0.13.3
3
+ Version: 0.13.4
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>
@@ -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.2.5
16
+ Requires-Dist: pypci-ng>=0.2.6
17
17
  Dynamic: license-file
18
18
 
19
19
  # PyHw, a neofetch-like system information fetching tool
@@ -1,5 +1,5 @@
1
- pyhw/__init__.py,sha256=za6jqyhmoHDFAJSHbaF-79R53cqRwMb3numElj1GevI,49
2
- pyhw/__main__.py,sha256=oZpFtvSyYTM8cMsulvi51zJV0gtmw3OCQVdgoaHbtxc,4977
1
+ pyhw/__init__.py,sha256=xxFswf8enN7kuEArYcxekQu970GRlfaYc-8QMH6xuEk,49
2
+ pyhw/__main__.py,sha256=iy1nzJ7Z4wB_bMyDGOZgTUZZmOoAru7CxSzpm9SMNbs,5431
3
3
  pyhw/backend/__init__.py,sha256=X1D1D28lSojDrUzUolgJvmbuctwBh_UxG3FwUeL8adA,51
4
4
  pyhw/backend/backendBase.py,sha256=mloo8mPEbgbIdmyQ3I4vdEXMSSjxWi_wnwACmzvHbEo,506
5
5
  pyhw/backend/cpu/__init__.py,sha256=5YfANJVRwNwTRodG0ENOgusrdN592aaSnfq5ok4dKTo,56
@@ -52,7 +52,7 @@ pyhw/backend/npu/windows.py,sha256=jyTZiSqKzfyKRbzS-SgGxx0dKoHwo8gr8BlwBlxR58o,1
52
52
  pyhw/backend/os/__init__.py,sha256=RMKN332tsAhn_EiReoCq9NOmp4po5uZyaGNzpKS_ZZs,54
53
53
  pyhw/backend/os/bsd.py,sha256=RtRh_8tKHCVikGwhKGXSDqM9sqbCJJQehJMEmZ9kJOs,130
54
54
  pyhw/backend/os/linux.py,sha256=SbwNLMAUr3exJY54nmSuVkZAtOxWDVFNsS55pAO8x4k,1937
55
- pyhw/backend/os/macos.py,sha256=WsB0y1Q5cmT4RMLyMGffJFoHHIkdQ6ZKZM09_rMC854,1905
55
+ pyhw/backend/os/macos.py,sha256=zlqXhX8Hjh7rkeFwgcT8ekXzTGa_1R6nYjgFkQrpcTk,2118
56
56
  pyhw/backend/os/osBase.py,sha256=2zaOGhaXLrNJS9-9qR4hH9_uFTgA2Sv4ab7YZvNVFaE,744
57
57
  pyhw/backend/os/osInfo.py,sha256=NEr76aicI9N3SFrwi1skcpUEjzsyCryTjdE9X1nBjBM,536
58
58
  pyhw/backend/os/windows.py,sha256=4qTYaQY19BiCIpmtHkp53yvChuYzlDmynbgICwHyfl8,1468
@@ -117,9 +117,9 @@ pyhw/pyhwUtil/__init__.py,sha256=n3jWo-q-jSouXvUHMg45DOHS5xLRG64E02A9rDQb44M,323
117
117
  pyhw/pyhwUtil/cliUtil.py,sha256=_zNrhzQvrtqUp6xyZ0JTs_KyL1wvLji-nBmU65XA1aI,2342
118
118
  pyhw/pyhwUtil/pyhwUtil.py,sha256=V3M6X9eTirwnwwRiSJaLUWrZKZYMbRihARJVQc879P8,8364
119
119
  pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
120
- pyhw-0.13.3.dist-info/licenses/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
121
- pyhw-0.13.3.dist-info/METADATA,sha256=3FkBeXJM-w9cvoBYb9io5HK87HUzApFsf_ZHsRB-vbU,7715
122
- pyhw-0.13.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
123
- pyhw-0.13.3.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
124
- pyhw-0.13.3.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
125
- pyhw-0.13.3.dist-info/RECORD,,
120
+ pyhw-0.13.4.dist-info/licenses/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
121
+ pyhw-0.13.4.dist-info/METADATA,sha256=BSaBljX207vWEU7JcnZVurvQDGfaA7hALkbUfRk5j94,7715
122
+ pyhw-0.13.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
123
+ pyhw-0.13.4.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
124
+ pyhw-0.13.4.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
125
+ pyhw-0.13.4.dist-info/RECORD,,
File without changes