-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.py
More file actions
56 lines (45 loc) · 1.58 KB
/
install.py
File metadata and controls
56 lines (45 loc) · 1.58 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
#!/usr/bin/env python3
"""
DaimalyadNodes - Post-installation setup script
This script runs after pip installs the package dependencies.
"""
import os
import sys
from pathlib import Path
def main():
"""Post-installation setup for DaimalyadNodes."""
print("DaimalyadNodes: Post-installation setup...")
# Get the package directory
try:
import daimalyadnodes
package_dir = Path(daimalyadnodes.__file__).parent
except ImportError:
# Fallback: assume we're in the package directory
package_dir = Path(__file__).parent
print(f"Package directory: {package_dir}")
# Verify the package structure
required_files = [
"__init__.py",
"daimalyad_model_downloader.py",
"daimalyad_wildcard_processor.py"
]
missing_files = []
for file in required_files:
if not (package_dir / file).exists():
missing_files.append(file)
if missing_files:
print(f"Warning: Missing required files: {missing_files}")
return False
print("✓ All required files present")
# Check if we're in a ComfyUI custom_nodes directory
custom_nodes_dir = package_dir.parent
if custom_nodes_dir.name == "custom_nodes":
print("✓ Installed in ComfyUI custom_nodes directory")
else:
print("ℹ Package not in ComfyUI custom_nodes directory")
print(" This is normal if installing for development")
print("DaimalyadNodes: Setup complete!")
return True
if __name__ == "__main__":
success = main()
sys.exit(0 if success else 1)