webtools-cli 1.2.2__tar.gz → 1.2.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webtools-cli
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
5
5
  Author: Abhinav Adarsh
6
6
  License-Expression: MIT
@@ -31,6 +31,7 @@ Requires-Dist: colorama
31
31
  Requires-Dist: playwright
32
32
  Requires-Dist: mega.py
33
33
  Requires-Dist: pycryptodome
34
+ Requires-Dist: tenacity>=8.2.3
34
35
  Requires-Dist: pyreadline3; platform_system == "Windows"
35
36
  Provides-Extra: playwright
36
37
  Requires-Dist: playwright; extra == "playwright"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "webtools-cli"
7
- version = "1.2.2"
7
+ version = "1.2.3"
8
8
  description = "Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -38,6 +38,7 @@ dependencies = [
38
38
  "playwright",
39
39
  "mega.py",
40
40
  "pycryptodome",
41
+ "tenacity>=8.2.3",
41
42
  "pyreadline3; platform_system == 'Windows'",
42
43
  ]
43
44
 
@@ -12,24 +12,42 @@ def ensure_dependencies():
12
12
  """Checks and installs missing dependencies at runtime"""
13
13
  dependencies = {
14
14
  "mega": "mega.py",
15
- "Crypto": "pycryptodome"
15
+ "Crypto": "pycryptodome",
16
+ "tenacity": "tenacity>=8.2.3"
16
17
  }
17
18
  missing = []
19
+
20
+ # Check for missing or broken modules
18
21
  for module_name, package_name in dependencies.items():
19
22
  try:
23
+ # We use __import__ to check if the module is available and functional
20
24
  __import__(module_name)
21
- except ImportError:
25
+
26
+ # Special check for tenacity version if it exists
27
+ if module_name == "tenacity":
28
+ from importlib.metadata import version as get_version
29
+ try:
30
+ v = get_version("tenacity")
31
+ major = int(v.split('.')[0])
32
+ if major < 8:
33
+ missing.append(package_name)
34
+ except Exception:
35
+ pass
36
+ except Exception:
37
+ # If import fails for ANY reason (ImportError, AttributeError, etc.)
38
+ # we mark it as missing/broken so we can try to fix it.
22
39
  missing.append(package_name)
23
40
 
24
41
  if missing:
25
- print(f"\n[!] Missing dependencies detected: {', '.join(missing)}")
26
- print("[*] Attempting automatic installation...")
42
+ print(f"\n[!] Missing or outdated dependencies detected: {', '.join(missing)}")
43
+ print("[*] Attempting automatic installation/upgrade...")
27
44
  try:
28
- subprocess.check_call([sys.executable, "-m", "pip", "install"] + missing)
29
- print("[+] Dependencies installed successfully!\n")
45
+ # Added --upgrade to ensure tenacity gets bumped if it's too old
46
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade"] + missing)
47
+ print("[+] Dependencies updated successfully!\n")
30
48
  except Exception as e:
31
49
  print(f"[-] Auto-installation failed: {e}")
32
- print("[!] Please run: pip install mega.py pycryptodome")
50
+ print(f"[!] Please run: pip install --upgrade {' '.join(missing)}")
33
51
 
34
52
  ensure_dependencies()
35
53
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webtools-cli
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
5
5
  Author: Abhinav Adarsh
6
6
  License-Expression: MIT
@@ -31,6 +31,7 @@ Requires-Dist: colorama
31
31
  Requires-Dist: playwright
32
32
  Requires-Dist: mega.py
33
33
  Requires-Dist: pycryptodome
34
+ Requires-Dist: tenacity>=8.2.3
34
35
  Requires-Dist: pyreadline3; platform_system == "Windows"
35
36
  Provides-Extra: playwright
36
37
  Requires-Dist: playwright; extra == "playwright"
@@ -11,6 +11,7 @@ colorama
11
11
  playwright
12
12
  mega.py
13
13
  pycryptodome
14
+ tenacity>=8.2.3
14
15
 
15
16
  [:platform_system == "Windows"]
16
17
  pyreadline3
File without changes
File without changes
File without changes