-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.py
41 lines (37 loc) · 1.1 KB
/
install.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
39
40
41
"""
Installs dependencies for the project.
Supports the windows and osx operating systems.
"""
from pip._internal.cli import main
import sys
def install_packages(package_names):
"""
Installs all the packages in the package_names
:param package_names: list of all the packages
"""
for package in package_names:
ret=main.main(["install", package])
if ret != 0:
raise Exception("Installation failed.Check logs")
# Packages common in all the Operating systems.
common_packages=["requests","pywebview",
"pyinstaller"]
# Packages specific for windows
Windows_packages=[]
# Pakcages specific for OSX
OSX_Packages=[]
def check_prerequisites():
"""
Checks if all the requirements are satisfied
"""
pass
if __name__ == '__main__':
# Install the common packages
install_packages(common_packages)
# Install OS dependent packages
if sys.platform == "win32":
install_packages(Windows_packages)
elif sys.platform == "darwin":
install_packages(OSX_Packages)
else:
raise Exception("Platform not supported")