modify: 授权
This commit is contained in:
+10
-2
@@ -2,6 +2,7 @@ from .config import ConfigLoader
|
||||
import os
|
||||
from module_bank import PythonToSQLite
|
||||
from typing import Callable
|
||||
from pathlib import Path
|
||||
|
||||
# module_bank 依赖在每次加载 PyArmor 加密模块时都会 print 一行
|
||||
# "已部署 PyArmor 运行时",启动期会刷屏(约 50 行)。依赖包不便改动,
|
||||
@@ -36,8 +37,15 @@ def init_module_bank(config):
|
||||
]
|
||||
# 遍历所有打包器,安装导入器(模块清单不再打印,避免启动刷屏)
|
||||
for packer in packer_list:
|
||||
key = packer.get_key()
|
||||
packer.install_importer(key=key)
|
||||
key_file_path = Path(packer.db_path).with_suffix(".key")
|
||||
with open(key_file_path, "r", encoding="utf-8") as f:
|
||||
key = f.read().strip()
|
||||
packer.install_importer(
|
||||
key=key,
|
||||
signature_key="my_key",
|
||||
signature_key_id="ci-2026",
|
||||
allow_unsigned=False,
|
||||
)
|
||||
|
||||
|
||||
def launch(run_fun: Callable[[dict, dict], None], run_mode: str):
|
||||
|
||||
Reference in New Issue
Block a user