- Implemented caching for tool availability and versions. - Added functions to check for ExifTool and FFprobe availability. - Included version satisfaction checks against minimum required versions. - Created utility functions for parsing boolean and float values from environment variables. - Introduced shared utilities for error message sanitization and logging with emoji indicators. - Established a Result pattern for error handling without exceptions. - Added scan throttling helpers to manage background scans efficiently. - Implemented time utilities for timestamps and performance measurement. - Defined shared types, enums, and constants for consistent error handling and file classification. - Created version management utilities to retrieve version information from pyproject.toml. - Developed installation script for runtime dependencies. - Added tests for ExifTool batch processing and various configuration scenarios. - Implemented tests for version route aliases and runtime output root configuration.
26 lines
607 B
Python
26 lines
607 B
Python
"""Install Majoor Assets Manager runtime dependencies explicitly.
|
|
|
|
Usage:
|
|
python scripts/install-requirements.py
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def main() -> int:
|
|
root = Path(__file__).resolve().parents[1]
|
|
req = root / "requirements.txt"
|
|
if not req.exists():
|
|
print(f"requirements file not found: {req}")
|
|
return 1
|
|
cmd = [sys.executable, "-m", "pip", "install", "-r", str(req)]
|
|
print("running:", " ".join(cmd))
|
|
return subprocess.call(cmd)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|