-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.py
More file actions
36 lines (33 loc) · 1.09 KB
/
dev.py
File metadata and controls
36 lines (33 loc) · 1.09 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
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
import os
import subprocess
import sys
if __name__ == "__main__":
from configuration import *
for arg in sys.argv[1:]:
ARGS.append(arg)
while len(ARGS):
arg = ARGS.pop(0)
print('Importing {}'.format(arg))
__import__(arg)
if not OPTIONS['platform']:
if sys.platform.startswith('linux'):
name = subprocess.check_output(['lsb_release', '-cs']).strip().decode()
print('Guessing linux platform {}'.format(name))
__import__(name)
elif sys.platform == 'darwin':
__import__('mac')
elif sys.platform == 'win32':
print('Guessing Windows platform')
__import__('windows')
else:
print('Don\'t know which platform this is')
print('sys.platform reports {}'.format(sys.platform))
sys.exit(1)
if len(ACTIONS):
while len(ACTIONS):
action = ACTIONS.pop(0)
action()
else:
print('No actions specified')
print('Loaded projects are {}'.format(', '.join(PROJECTS.keys())))