diff --git a/hikyuu/gui/HikyuuTDX.py b/hikyuu/gui/HikyuuTDX.py index ae3d833c..6e4f892d 100644 --- a/hikyuu/gui/HikyuuTDX.py +++ b/hikyuu/gui/HikyuuTDX.py @@ -61,7 +61,10 @@ class MyMainWindow(QMainWindow, Ui_MainWindow): f.write(hku_config_template.hdf5_template.format(dir=data_dir)) 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') if not os.path.lexists(data_dir + '/tmp'): diff --git a/sub_setup.py b/sub_setup.py index cc07eb3b..85ba4e76 100644 --- a/sub_setup.py +++ b/sub_setup.py @@ -18,7 +18,7 @@ if not hku_version: print('current hikyuu version:', hku_version) -hku_name = "Hikyuu" +hku_name = "hikyuu" #hku_version = "1.0.9" hku_author = "fasiondog" hku_author_email = "fasiondog@sina.com" @@ -36,6 +36,7 @@ hku_data_files = [] packages = ['hikyuu', 'hikyuu/config', + 'hikyuu/config/block', 'hikyuu/data', 'hikyuu/data/mysql_upgrade', 'hikyuu/data/sqlite_upgrade',