-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstallDependencies.py
More file actions
29 lines (24 loc) · 1.44 KB
/
InstallDependencies.py
File metadata and controls
29 lines (24 loc) · 1.44 KB
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
import subprocess
import sys
import StringPrinter
import PrintableString
import PackageInstaller
import DependencyListParser
def DependencyInstallerMain():
DependencyInstallerWelcomeString = PrintableString.PrintableString("Welcome to the Dependency Installing module of the Hello World Application.")
DependencyInstallerWelcomeStringPrinter = StringPrinter.StringPrinter(DependencyInstallerWelcomeString)
DependencyInstallerWelcomeStringPrinter.PrintString()
PackageInstaller.UpgradePIP()
DependenciesToInstall = DependencyListParser.ParseDependencyList("DependencyList.txt")
for Dependency in DependenciesToInstall:
PackageInstaller.InstallPackage(Dependency)
DependencyInstallerFinishedString = PrintableString.PrintableString("Dependency Installer has finished installing the required dependenciies for the Hello World Application.\nNow you can use the following line to run the Hello World Application:\npython (or python3, depending on your OS) HelloWorldApplication.py")
DependencyInstallerFinishedStringPrinter = StringPrinter.StringPrinter(DependencyInstallerFinishedString)
DependencyInstallerFinishedStringPrinter.PrintString()
if __name__ == "__main__":
DependencyInstallerMain()
else:
ErrorString = PrintableString.PrintableString("The DependencyInstaller.py script should not be imported.")
ErrorStringPrinter = StringPrinter.StringPrinter(ErrorString)
ErrorStringPrinter.PrintString()
exit(1)