modify: nuitka 支持

This commit is contained in:
2026-05-02 20:58:04 +08:00
parent 6dbcea3060
commit 9da50e182c
8 changed files with 1623 additions and 1332 deletions
+7 -4
View File
@@ -78,12 +78,15 @@ max_size = 10485760 # 10MB
[production.cors]
allow_credentials = true
allow_headers = ["Authorization", "Content-Type"]
allow_methods = ["GET", "POST", "PUT", "DELETE"]
allow_origins = ["https://yourdomain.com", "http://localhost:8000", "http://127.0.0.1:8000"]
allow_headers = ["*"]
allow_methods = ["*"]
allow_origins = ["http://192.168.137.5:8000", "http://localhost:8000", "http://127.0.0.1:8000"]
[production.module_system]
path = ["resources/app.mbank", "resources/plugins.mbank"]
path = [
"resources/app.mbank",
"resources/plugins.mbank",
]
type = "module-bank"
[production.file_system]
+2 -2
View File
@@ -3,7 +3,6 @@ import os
from module_bank import PythonToSQLite
from typing import Callable
key = None
def init_module_bank(config):
@@ -27,10 +26,11 @@ def init_module_bank(config):
# 为每个模块路径创建PythonToSQLite打包器实例
packer_list = [
PythonToSQLite(module_path, key=key) for module_path in MODULE_BANK_PATH_LIST
PythonToSQLite(module_path) for module_path in MODULE_BANK_PATH_LIST
]
# 遍历所有打包器,列出模块信息并安装导入器
for packer in packer_list:
key = packer.get_key()
modules = packer.list_modules()
for module in modules:
print(f"{module['module_name']} {'[包]' if module['is_package'] else ''}")