diff --git a/pywxdump/api/__init__.py b/pywxdump/api/__init__.py index c06ef572..490e5168 100644 --- a/pywxdump/api/__init__.py +++ b/pywxdump/api/__init__.py @@ -5,7 +5,7 @@ # Author: xaoyaoo # Date: 2023/12/14 # ------------------------------------------------------------------------------- - +from .api import api if __name__ == '__main__': pass diff --git a/pywxdump/cli.py b/pywxdump/cli.py index cd7b0243..42237107 100644 --- a/pywxdump/cli.py +++ b/pywxdump/cli.py @@ -206,7 +206,7 @@ def run(self, args): app.logger.setLevel(logging.ERROR) from flask_cors import CORS - from pywxdump.api.api import api + from pywxdump.api import api CORS(app, resources={r"/*": {"origins": "*"}}, supports_credentials=True) # 允许所有域名跨域 @app.before_request def before_request(): diff --git a/setup.py b/setup.py index ffdce2f6..3fe10ced 100644 --- a/setup.py +++ b/setup.py @@ -39,15 +39,16 @@ url="https://github.com/xaoyaoo/PyWxDump", license='MIT', - packages=['pywxdump', 'pywxdump.ui', 'pywxdump.wx_info', 'pywxdump.analyzer'], + packages=['pywxdump', 'pywxdump.ui', 'pywxdump.wx_info', 'pywxdump.analyzer', 'pywxdump.api'], package_dir={'pywxdump': 'pywxdump', 'pywxdump.wx_info': 'pywxdump/wx_info', 'pywxdump.analyzer': 'pywxdump/analyzer', 'pywxdump.ui': 'pywxdump/ui', + 'pywxdump.api': 'pywxdump/api', }, package_data={ - 'pywxdump': ['version_list.json', 'ui/templates/*'] + 'pywxdump': ['version_list.json', 'ui/templates/*', 'ui/web/*', 'ui/web/assets/*'] }, classifiers=[ "Programming Language :: Python :: 3",