水commit啦

This commit is contained in:
shenjack 2023-09-17 22:21:27 +08:00
parent 5155c05d74
commit 225882dcf8
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -20,13 +20,13 @@ def ensure_cmd_readable(cmd: str) -> str:
:param cmd: 要格式化的命令行参数
:return: 格式化后的命令行参数
"""
if ' ' in cmd:
if ' ' in str(cmd):
return f'"{cmd}"'
return cmd
def format_cmd(arg_name: Optional[str] = None,
arg_value: Optional[Union[str, List[str]]] = None,,
arg_value: Optional[Union[str, List[str]]] = None,
write: Optional[Any] = True) -> List[str]:
"""
用来格式化输出命令行参数
@ -66,7 +66,7 @@ class CompilerHelper(Options):
src_file: Path = Path('DR.py')
python_cmd: str = 'python'
compat_nuitka_version: VersionRequirement = VersionRequirement("~1.7.1") # STATIC VERSION
compat_nuitka_version: VersionRequirement = VersionRequirement("~1.8.1") # STATIC VERSION
# 以下为 nuitka 的参数
use_lto: bool = False # --lto=yes (no is faster)
@ -105,7 +105,7 @@ class CompilerHelper(Options):
include_packages: List[str] = ['Difficult_Rocket.api']
enable_plugin: List[str] = [] # --enable-plugin=xxx,xxx
disable_plugin: List[str] = [] # --disable-plugin=xxx,xxx
disable_plugin: List[str] = ['pyqt5', 'tk-inter'] # --disable-plugin=xxx,xxx
def init(self, **kwargs) -> None:
if (compat_version := kwargs.get('compat_nuitka_version')) is not None: