stream-bot/scripts/install_auth_deps.py
Joey Yakimowich-Payne ec1c5958ce Initial working version
2025-05-14 17:45:07 -06:00

40 lines
No EOL
1.4 KiB
Python

#!/usr/bin/env python3
"""
Helper script to install authentication dependencies
"""
import sys
import subprocess
import platform
def main():
"""Install the dependencies required for Twitch authentication"""
print("Installing dependencies for Twitch authentication...")
# Required packages
packages = [
"requests",
"python-dotenv",
"cryptography"
]
# Use pip to install the packages
try:
subprocess.check_call([sys.executable, "-m", "pip", "install"] + packages)
print("\nSuccessfully installed authentication dependencies!")
print("You can now run: python scripts/setup_twitch_auth.py")
except subprocess.CalledProcessError:
print("\nError: Failed to install dependencies.")
print("Please try installing them manually:")
print(" pip install requests python-dotenv cryptography")
sys.exit(1)
# Show additional information for Windows users
if platform.system() == "Windows":
print("\nNote for Windows users:")
print("This script uses the 'cryptography' library for generating certificates,")
print("which has C dependencies that should be automatically installed.")
print("If you encounter any issues, please refer to the documentation:")
print("https://cryptography.io/en/latest/installation/")
if __name__ == "__main__":
main()