From 43e02370d994e8aede021a9541b1e125956ccc44 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sat, 25 Nov 2023 20:40:22 +0800 Subject: [PATCH] bump rc3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 简直刷版本号 --- README.md | 2 +- docs/change_log.md | 8 ++++++++ src/lib_not_dr/__init__.py | 2 +- src/lib_not_dr/nuitka/reader/arg_parser.py | 9 +++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87b511d..d16dd24 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A python lib came from [Difficult Rocket](https://github.com/shenjackyuanjie/Dif ## Information/信息 -- Version / 版本: 0.2.0-rc.2 +- Version / 版本: 0.2.0-rc.3 - Author / 作者: shenjackyuanjie <3695888@qq.com> > [shenjackyuanjie](https://github.com/shenjackyuanjie) diff --git a/docs/change_log.md b/docs/change_log.md index 1d02861..8ff3b52 100644 --- a/docs/change_log.md +++ b/docs/change_log.md @@ -1,5 +1,13 @@ # Change log / 更新日志 +## 0.2.0-rc.3 + +### lndl-nuitka + +- 在 `arg_parser` 中添加了函数 `subprocess_to_bash` + - 用于将 `arg_parser` 中的参数转换为 `bash` 命令 + - 理论上可以直接运行 + ## 0.2.0-rc.1/2 ### lndl-nuitka diff --git a/src/lib_not_dr/__init__.py b/src/lib_not_dr/__init__.py index b6e9c44..f79487b 100644 --- a/src/lib_not_dr/__init__.py +++ b/src/lib_not_dr/__init__.py @@ -4,7 +4,7 @@ # All rights reserved # ------------------------------- -__version__ = '0.2.0-rc.2' +__version__ = '0.2.0-rc.3' from typing import TYPE_CHECKING diff --git a/src/lib_not_dr/nuitka/reader/arg_parser.py b/src/lib_not_dr/nuitka/reader/arg_parser.py index 4c949b3..0ceba5f 100644 --- a/src/lib_not_dr/nuitka/reader/arg_parser.py +++ b/src/lib_not_dr/nuitka/reader/arg_parser.py @@ -165,3 +165,12 @@ def gen_subprocess_args(nuitka_config: continue return cmd_list + + +def subprocess_to_bash(cmd_list: List[str]) -> str: + """ + :param cmd_list: list + :return: str + """ + cmd_list = [item if ' ' not in item else f'"{item}"' for item in cmd_list] + return " ".join(cmd_list)