-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrequirements.py
More file actions
28 lines (23 loc) · 823 Bytes
/
requirements.py
File metadata and controls
28 lines (23 loc) · 823 Bytes
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
import subprocess
import sys
import os
def install_requirements():
"""Install all required packages for GitSwift"""
requirements = [
'gitpython',
'PyGithub',
'pywin32;platform_system=="Windows"'
]
print("Installing required packages...")
for package in requirements:
try:
print(f"Installing {package}...")
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
except subprocess.CalledProcessError as e:
print(f"Error installing {package}: {e}")
return False
print("\nAll requirements installed successfully!")
print("\nYou can now run GitSwift by executing: python GitSwift.py")
return True
if __name__ == "__main__":
install_requirements()