forked from infstellar/genshin_impact_assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
25 lines (20 loc) · 858 Bytes
/
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
import os.path
import subprocess
import sys
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()