pyhw 0.11.2__py3-none-any.whl → 0.11.4__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
pyhw/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.11.2'
1
+ __version__ = '0.11.4'
pyhw/__main__.py CHANGED
@@ -115,7 +115,15 @@ def main():
115
115
  logo_os = selectOSLogo(OSDetect(os=current_os).getOSInfo().id)
116
116
  Printer(logo_os=logo_os, data=createDataString(data)).cPrint()
117
117
 
118
- processes[0].join()
118
+ timeout = 3
119
+ processes[0].join(timeout)
120
+ if processes[0].is_alive():
121
+ processes[0].terminate()
122
+ processes[0].join()
123
+ release_dict["is_new_release"] = False
124
+ else:
125
+ pass
126
+
119
127
  if release_dict["is_new_release"]:
120
128
  print(f"🔔 Found a newer version: v{release_dict['release']} (current: v{release_dict['current']})")
121
129
  print("🚀 You can use the following command to upgrade:")
pyhw/pyhwUtil/cliUtil.py CHANGED
@@ -7,9 +7,15 @@ import importlib.metadata
7
7
 
8
8
 
9
9
  class ReleaseChecker:
10
+ """
11
+ Helper Class to check if there is a newer version of the package.
12
+ """
10
13
  PACKAGE_NAME = "pyhw"
11
14
 
12
15
  def __init__(self):
16
+ """
17
+ Initialize the ReleaseChecker.
18
+ """
13
19
  self.isInPIPX = self.__is_running_in_pipx()
14
20
  self.CurrentVersion = self.__get_installed_version()
15
21
  self.LatestVersion = self.__get_latest_version()
@@ -39,6 +45,11 @@ class ReleaseChecker:
39
45
 
40
46
  @staticmethod
41
47
  def parse_version(version):
48
+ """
49
+ Parse the version string to a tuple of integers.
50
+ :param version: version string
51
+ :return: tuple of integers
52
+ """
42
53
  return tuple(map(int, version.split(".")))
43
54
 
44
55
  def __is_newer_version(self):
@@ -48,6 +59,10 @@ class ReleaseChecker:
48
59
  return self.parse_version(self.CurrentVersion) < self.parse_version(self.LatestVersion)
49
60
 
50
61
  def check_for_updates(self):
62
+ """
63
+ Check if there is a newer version of the package.
64
+ :return: Boolean
65
+ """
51
66
  return self.__is_newer_version()
52
67
 
53
68
  def check_for_updates_print(self):
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pyhw
3
- Version: 0.11.2
3
+ Version: 0.11.4
4
4
  Summary: PyHw, a neofetch-like command line tool for fetching system information but written mostly in python.
5
- Author-email: Xiao Ran <xiaoran.007@icloud.com>
5
+ Author: Xiao Ran
6
+ Maintainer-email: Xiao Ran <xiaoran.007@icloud.com>
6
7
  License: BSD-3-Clause
7
8
  Project-URL: homepage, https://github.com/xiaoran007/pyhw
8
9
  Keywords: neofetch,system information,command line tool,python,hardware information,fastfetch,fetching
@@ -13,7 +14,7 @@ Classifier: Operating System :: OS Independent
13
14
  Requires-Python: >=3.9
14
15
  Description-Content-Type: text/markdown
15
16
  License-File: LICENSE
16
- Requires-Dist: pypci-ng>=0.1.4
17
+ Requires-Dist: pypci-ng>=0.1.5
17
18
 
18
19
  # PyHw
19
20
  [![Downloads](https://static.pepy.tech/badge/pyhw)](https://pepy.tech/project/pyhw)
@@ -1,5 +1,5 @@
1
- pyhw/__init__.py,sha256=GVW5OUsne42Hc51Qp5bYDLyYK2DyGUCaZC1c77xCNO4,23
2
- pyhw/__main__.py,sha256=8HSnrBI8lNTo8K4iQTqBkiMGdwvtuXR3S05qdHKR42I,4790
1
+ pyhw/__init__.py,sha256=jD0OdMKXNs3xHt2gNqlOtdecU5cQJpmHM7s2rjz0CQ4,23
2
+ pyhw/__main__.py,sha256=oZpFtvSyYTM8cMsulvi51zJV0gtmw3OCQVdgoaHbtxc,4977
3
3
  pyhw/backend/__init__.py,sha256=knn_3Yroow1h0dqdrozk3zyy3vz-kQyNBRjR6OLmVoY,50
4
4
  pyhw/backend/backendBase.py,sha256=mloo8mPEbgbIdmyQ3I4vdEXMSSjxWi_wnwACmzvHbEo,506
5
5
  pyhw/backend/cpu/__init__.py,sha256=5YfANJVRwNwTRodG0ENOgusrdN592aaSnfq5ok4dKTo,56
@@ -103,12 +103,12 @@ pyhw/library/lib/iokitGPULib.dylib,sha256=KAz0VyeRspD3U7WeedUnPvJVUZEKn_Pw0AKk5z
103
103
  pyhw/pyhwException/__init__.py,sha256=8JsFvtF13g0Y5t4z9fRndDXtfCzuBM59jDf6PhWSFSk,220
104
104
  pyhw/pyhwException/pyhwException.py,sha256=wxuzFQa9g7XB1q9TUKO_55lw7wMEJMpzG8w1GVTFVa0,197
105
105
  pyhw/pyhwUtil/__init__.py,sha256=34ygvVBBqfJ_9OMzHToCcV_BVahixNsa_Z5yh6VsaPQ,304
106
- pyhw/pyhwUtil/cliUtil.py,sha256=SuXAs-ousXw6h5i8psazJEP5Q9X5VaxZlxhPSFYdM-4,1933
106
+ pyhw/pyhwUtil/cliUtil.py,sha256=42Gdi9wTg5XOYuEvGHEgOaZJ6dJk1qSuHIprR8pCA-g,2344
107
107
  pyhw/pyhwUtil/pyhwUtil.py,sha256=TxAgsDlrz-AJFyeXnOjL1MVnh1uR9dEqli5dmYPZcog,6915
108
108
  pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
109
- pyhw-0.11.2.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
110
- pyhw-0.11.2.dist-info/METADATA,sha256=T-an2HtTGEA2otXJ-7-TYiY9Vu9TTdKnKhkQfHYWycQ,6732
111
- pyhw-0.11.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
112
- pyhw-0.11.2.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
113
- pyhw-0.11.2.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
114
- pyhw-0.11.2.dist-info/RECORD,,
109
+ pyhw-0.11.4.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
110
+ pyhw-0.11.4.dist-info/METADATA,sha256=WYsWPNLc5YdJhWy7J_8y0qr5YbPGHrxV8Sm5m5mOMOU,6753
111
+ pyhw-0.11.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
112
+ pyhw-0.11.4.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
113
+ pyhw-0.11.4.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
114
+ pyhw-0.11.4.dist-info/RECORD,,
File without changes
File without changes