Added setup scripts
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import venv
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
def main():
|
||||
venv_path = Path(".venv")
|
||||
if not venv_path.exists():
|
||||
print("Creating virtual environment...")
|
||||
venv.create(venv_path, with_pip=True)
|
||||
|
||||
pip_path = venv_path / "bin" / "pip" if sys.platform != "win32" else venv_path / "Scripts" / "pip.exe"
|
||||
|
||||
print("Installing dependencies...")
|
||||
subprocess.run([str(pip_path), "install", "-r", "requirements.txt"])
|
||||
|
||||
print("Virtual environment setup complete.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user