-
Notifications
You must be signed in to change notification settings - Fork 222
/
setup.py
33 lines (25 loc) · 1.12 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
import subprocess
import os, sys
ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
sys.argv.pop(0)
if len(sys.argv) == 1:
if sys.argv[0] == 'install':
if not os.path.exists('DTISTREQ'):
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-r', 'requirements.txt', '-i',
'https://pypi.tuna.tsinghua.edu.cn/simple'])
open('DTISTREQ', 'x')
# import installer_setup
# installer_setup.auto_setup()
elif sys.argv[0] == 'update':
subprocess.check_call(['git', 'pull'])
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-r', 'requirements.txt', '-i',
'https://pypi.tuna.tsinghua.edu.cn/simple'])
if not os.path.exists('DTISTREQ'):
open('DTISTREQ', 'x')
# import installer_setup
# installer_setup.auto_setup()
elif sys.argv[0] == 'build':
import source.config.config_updater
import source.manager.asset_index_generator
import source.map.extractor.get_domain_list
import source.commission.index_generator