fixed: #I1010R 找不到板块文件

This commit is contained in:
fasiondog 2019-11-30 23:26:39 +08:00
parent a69a8800dc
commit a5c6606477
2 changed files with 6 additions and 2 deletions

View File

@ -61,7 +61,10 @@ class MyMainWindow(QMainWindow, Ui_MainWindow):
f.write(hku_config_template.hdf5_template.format(dir=data_dir)) f.write(hku_config_template.hdf5_template.format(dir=data_dir))
if not os.path.lexists(data_dir + '/block'): if not os.path.lexists(data_dir + '/block'):
shutil.copytree('../../config/block', data_dir + '/block') current_dir = os.path.dirname(__file__)
dirname, _ = os.path.split(current_dir)
dirname = os.path.join(dirname, 'config/block')
shutil.copytree(dirname, data_dir + '/block')
os.remove(data_dir + '/block/__init__.py') os.remove(data_dir + '/block/__init__.py')
if not os.path.lexists(data_dir + '/tmp'): if not os.path.lexists(data_dir + '/tmp'):

View File

@ -18,7 +18,7 @@ if not hku_version:
print('current hikyuu version:', hku_version) print('current hikyuu version:', hku_version)
hku_name = "Hikyuu" hku_name = "hikyuu"
#hku_version = "1.0.9" #hku_version = "1.0.9"
hku_author = "fasiondog" hku_author = "fasiondog"
hku_author_email = "fasiondog@sina.com" hku_author_email = "fasiondog@sina.com"
@ -36,6 +36,7 @@ hku_data_files = []
packages = ['hikyuu', packages = ['hikyuu',
'hikyuu/config', 'hikyuu/config',
'hikyuu/config/block',
'hikyuu/data', 'hikyuu/data',
'hikyuu/data/mysql_upgrade', 'hikyuu/data/mysql_upgrade',
'hikyuu/data/sqlite_upgrade', 'hikyuu/data/sqlite_upgrade',