-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathsetup.py
executable file
·41 lines (29 loc) · 1.04 KB
/
setup.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
import pip
import os
def install():
"""Installing as Program Dependencies"""
try:
with open("requirements.txt", "r") as requirements:
dependencies = requirements.read().splitlines()
except IOError:
print ("{}".format("requirements.txt not found, please redownload or do pull request again"))
exit(1)
for lib in dependencies:
try:
pip.main(["install", lib])
except Exception as e:
print("Unable to install %s using pip. Please read the instructions for \
manual installation.. Exiting" % (lib))
print("Error: %s" % e)
def createfolder() :
"""Creating the necessary directories output / build output / extension"""
try:
folders = ['builds', 'extensions']
if not os.path.exists("output/") :
for folder in folders :
os.makedirs("output/{}".format(folder))
except OSError as e:
raise e
if __name__== "__main__" :
createfolder()
install()