diff --git a/setup.py b/setup.py index e1a69ea..386b8dd 100644 --- a/setup.py +++ b/setup.py @@ -2,9 +2,8 @@ setup( name='szu-autoconnect', - packages=find_packages(include=['szu-autoconnect'], exclude=['build', 'dist']), - package_dir={'szu-autoconnect': 'szu-autoconnect'}, - version='1.0.1', + packages=find_packages(), + version='1.0.2', license='MIT', description='A simple way to get different DEXs abis for block chains.', author='Yong', diff --git a/szu-autoconnect/core/__init__.py b/szu-autoconnect/core/__init__.py deleted file mode 100644 index d68ecc7..0000000 --- a/szu-autoconnect/core/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .auto import Connector -from .ui import main_loop diff --git a/szu-autoconnect/only_ui.py b/szu-autoconnect/only_ui.py deleted file mode 100644 index 4d53af4..0000000 --- a/szu-autoconnect/only_ui.py +++ /dev/null @@ -1,4 +0,0 @@ -from core import main_loop - -if __name__ == '__main__': - main_loop() diff --git a/szu_autoconnect/__init__.py b/szu_autoconnect/__init__.py new file mode 100644 index 0000000..daee44e --- /dev/null +++ b/szu_autoconnect/__init__.py @@ -0,0 +1 @@ +from szu_autoconnect.core import auto, ui diff --git a/szu-autoconnect/__init__.py b/szu_autoconnect/core/__init__.py similarity index 100% rename from szu-autoconnect/__init__.py rename to szu_autoconnect/core/__init__.py diff --git a/szu-autoconnect/core/auto.py b/szu_autoconnect/core/auto.py similarity index 100% rename from szu-autoconnect/core/auto.py rename to szu_autoconnect/core/auto.py diff --git a/szu-autoconnect/core/ui.py b/szu_autoconnect/core/ui.py similarity index 98% rename from szu-autoconnect/core/ui.py rename to szu_autoconnect/core/ui.py index 9d1e6ab..1d6e59c 100644 --- a/szu-autoconnect/core/ui.py +++ b/szu_autoconnect/core/ui.py @@ -5,9 +5,8 @@ import PySimpleGUI as sg from apscheduler.schedulers.background import BlockingScheduler -from . import Connector +from szu_autoconnect.core.auto import Connector -# SETTINGS_FILE = path.join(path.dirname(__file__), r'settings.cfg') SETTINGS_FILE = 'settings.cfg' DEFAULT_SETTINGS = { 'username': '', @@ -231,6 +230,5 @@ def main_loop(): window.close() - -if __name__ == '__main__': - main_loop() +# if __name__ == '__main__': +# main_loop() diff --git a/szu_autoconnect/open_ui.py b/szu_autoconnect/open_ui.py new file mode 100644 index 0000000..efcc665 --- /dev/null +++ b/szu_autoconnect/open_ui.py @@ -0,0 +1,4 @@ +from szu_autoconnect.core.ui import main_loop + +if __name__ == '__main__': + main_loop() diff --git a/szu-autoconnect/run.py b/szu_autoconnect/run.py similarity index 93% rename from szu-autoconnect/run.py rename to szu_autoconnect/run.py index b4acb9d..56e2f4e 100644 --- a/szu-autoconnect/run.py +++ b/szu_autoconnect/run.py @@ -14,7 +14,7 @@ def build_config(): def create_job(configs): import datetime - from .core.auto import Connector + from szu_autoconnect.core.auto import Connector from apscheduler.schedulers.background import BlockingScheduler assert configs.username != '', "please input your username with -u" @@ -38,7 +38,7 @@ def create_job(configs): def run(): config = build_config() if config.use_ui: - from .core import main_loop + from szu_autoconnect.core.ui import main_loop main_loop() else: