Compare commits

...

2 Commits

Author SHA1 Message Date
0e642f8611
0.4.0! 2024-03-16 19:47:30 +08:00
59497b596f
0.4.0 beta 1! 2024-03-09 17:41:17 +08:00
5 changed files with 17 additions and 7 deletions

View File

@ -6,7 +6,7 @@ A python lib came from [Difficult Rocket](https://github.com/shenjackyuanjie/Dif
## Information/信息
- Version / 版本: 0.3.18
- Version / 版本: 0.4.0
- Author / 作者: shenjackyuanjie <3695888@qq.com>
[shenjackyuanjie](https://github.com/shenjackyuanjie)

View File

@ -55,4 +55,4 @@ def main():
if __name__ == "__main__":
main()
lndl_logger()
logging_logger()
# logging_logger()

View File

@ -59,6 +59,7 @@ post_publish = { call = "scripts.pub:upload_gitea" }
version = { attr = "lib_not_dr._version_"}
[project.urls]
Issues = "https://github.com/shenjackyuanjie/lib-not-dr/issues"
Homepage = "https://github.com/shenjackyuanjie/lib-not-dr"
Repository = "https://github.com/shenjackyuanjie/lib-not-dr"
Changelog = "https://github.com/shenjackyuanjie/lib-not-dr/blob/main/docs/change_logs"

View File

@ -9,7 +9,7 @@ from typing import TYPE_CHECKING
if TYPE_CHECKING:
from lib_not_dr import loggers, nuitka, types, command
_version_ = "0.3.18"
_version_ = "0.4.0"
# fmt: off
__all__ = [

View File

@ -79,7 +79,13 @@ def get_cli_nuitka_args() -> dict:
return {}
# start from --
index = sys.argv.index("--")
try:
index = sys.argv.index("--")
except ValueError:
# 按理来说不应该出现这种情况
# 毕竟是先找到 -- 再进来的
warn("-- not found in sys.argv, but entered the get_cli_nuitka_args()")
return {}
new_args = sys.argv[index + 1 :]
arg_dict = {}
for arg in new_args:
@ -87,11 +93,14 @@ def get_cli_nuitka_args() -> dict:
warn(f"invalid arg: {arg}")
else:
arg = arg[2:] # remove --
# arg_name: --<name>=<value>
arg_name = arg.split("=")[0]
if "=" in arg:
arg_value = arg.split("=")[1]
# arg: --<name>=<value>
spilter = arg.find("=")
arg_name = arg[:spilter]
arg_value = arg[spilter + 1 :]
else:
# arg: --<name>
arg_name = arg
arg_value = True
arg_dict[arg_name] = arg_value