Repository navigation
Expand file tree
/
Copy pathcheck_deps.py
More file actions
58 lines (47 loc) · 1.62 KB
/
Copy pathcheck_deps.py
File metadata and controls
58 lines (47 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python3
"""Test script to verify SoloKeys GUI setup without running GUI."""
import sys
import importlib.util
def check_module_import(module_name, description):
"""Check if a module can be imported."""
try:
spec = importlib.util.find_spec(module_name)
if spec is not None:
print(f"✓ {description}")
return True
else:
print(f"✗ {description} - Not found")
return False
except ImportError as e:
print(f"✗ {description} - Error: {e}")
return False
def main():
"""Check all required dependencies."""
print("SoloKeys GUI - Dependency Check")
print("=" * 40)
# Check required modules
modules = [
("PySide6", "Qt6 GUI framework"),
("fido2", "FIDO2/WebAuthn library"),
("usb.core", "USB device access"),
# ("pyscard", "Smart card interface"), # Optional - requires PCSC dev headers
("cryptography", "Cryptographic functions"),
("requests", "HTTP client"),
]
all_available = True
for module, description in modules:
if not check_module_import(module, description):
all_available = False
print("\n" + "=" * 40)
if all_available:
print("✓ All dependencies are available!")
print("The GUI should run successfully.")
print("\nTo run the GUI:")
print(" PYTHONPATH=src python -m solo_gui.main")
return 0
else:
print("✗ Some dependencies are missing.")
print("Install with: pip install -r requirements.txt")
return 1
if __name__ == "__main__":
sys.exit(main())