-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.py
executable file
·38 lines (24 loc) · 843 Bytes
/
update.py
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
import os
SEP = os.sep
def main():
run_updates()
def run_updates():
_ver3 = set_for_unix()
print("\nUpdating PIP...")
os.system(f"python{_ver3} -m pip install --upgrade pip")
print("\nInstalling Python Environment...")
os.system(f"python{_ver3} -m pip install pipenv")
print("\nSetting a new Python Environment...")
os.system(f"python{_ver3} -m virtualenv venv")
print("\nUpdating all packages and resources...")
os.system(f"python{_ver3} -m pip install -r requirements.txt")
os.system(f"python{_ver3} -m pip install -U black")
os.system(f"python{_ver3} -m pip install -U rope")
print("\nPackages installed:")
os.system(f"python{_ver3} -m pip list")
def set_for_unix():
if os.name != "nt":
return "3"
class Update:
if __name__ == "__main__":
main()