-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
41 lines (39 loc) · 1.78 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
# -*- coding: utf-8 -*-
from PyInstaller.__main__ import run
import sys
import os
import shutil
if __name__ == '__main__':
sys.setrecursionlimit(1000)
if os.name == "nt":
opts = ['-F',
'-w',
'-y',
# '--icon=./image/avartar.ico',
# '--paths=D:\\ProgramData\\Anaconda3\\Lib\\site-packages\\PyQt5\\Qt\\bin',
# '--paths=D:\\ProgramData\\Anaconda3\\Lib\\site-packages\\PyQt5\\Qt\\plugins',
# '--paths=D:\\ProgramData\\Anaconda3\\Lib\\site-packages\\newspaper3k-0.2.6-py3.6.egg\\newspaper',
# '--add-data', '.\style.qss;.\style.qss',
# '--add-data', '.\config\*;.\config',
# '--add-data', 'image/*;image/',
# '--add-data', '.\data_save\*;.\data_save',
# '--clean',
# '--icon=icon\\icon.ico',
'main.py']
elif os.name=="posix": # 好像不太行,pyqtgraph的包好像要手动引入了...
opts = ['-F',
'-y',
'--icon=./image/avartar.png',
# '--paths=D:\\ProgramData\\Anaconda3\\Lib\\site-packages\\PyQt5\\Qt\\bin',
# '--paths=D:\\ProgramData\\Anaconda3\\Lib\\site-packages\\PyQt5\\Qt\\plugins',
# '--paths=D:\\ProgramData\\Anaconda3\\Lib\\site-packages\\newspaper3k-0.2.6-py3.6.egg\\newspaper',
# '--add-data', './style.qss;./style.qss',
# '--add-data', 'config/*;config/',
# '--add-data', 'image/*;image/',
# '--add-data', 'data_save/;data_save/',
# '--clean',
# '--icon=icon\\icon.ico',
'main.py']
run(opts)
shutil.copy("style.qss","./dist/")
shutil.copytree("./config","./dist/config")