Compare commits
2 Commits
367209cbe5
...
0e642f8611
Author | SHA1 | Date | |
---|---|---|---|
0e642f8611 | |||
59497b596f |
@ -6,7 +6,7 @@ A python lib came from [Difficult Rocket](https://github.com/shenjackyuanjie/Dif
|
|||||||
|
|
||||||
## Information/信息
|
## Information/信息
|
||||||
|
|
||||||
- Version / 版本: 0.3.18
|
- Version / 版本: 0.4.0
|
||||||
- Author / 作者: shenjackyuanjie <3695888@qq.com>
|
- Author / 作者: shenjackyuanjie <3695888@qq.com>
|
||||||
|
|
||||||
[shenjackyuanjie](https://github.com/shenjackyuanjie)
|
[shenjackyuanjie](https://github.com/shenjackyuanjie)
|
||||||
|
@ -55,4 +55,4 @@ def main():
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
lndl_logger()
|
lndl_logger()
|
||||||
logging_logger()
|
# logging_logger()
|
||||||
|
@ -59,6 +59,7 @@ post_publish = { call = "scripts.pub:upload_gitea" }
|
|||||||
version = { attr = "lib_not_dr._version_"}
|
version = { attr = "lib_not_dr._version_"}
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
|
Issues = "https://github.com/shenjackyuanjie/lib-not-dr/issues"
|
||||||
Homepage = "https://github.com/shenjackyuanjie/lib-not-dr"
|
Homepage = "https://github.com/shenjackyuanjie/lib-not-dr"
|
||||||
Repository = "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"
|
Changelog = "https://github.com/shenjackyuanjie/lib-not-dr/blob/main/docs/change_logs"
|
||||||
|
@ -9,7 +9,7 @@ from typing import TYPE_CHECKING
|
|||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from lib_not_dr import loggers, nuitka, types, command
|
from lib_not_dr import loggers, nuitka, types, command
|
||||||
|
|
||||||
_version_ = "0.3.18"
|
_version_ = "0.4.0"
|
||||||
|
|
||||||
# fmt: off
|
# fmt: off
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
@ -79,7 +79,13 @@ def get_cli_nuitka_args() -> dict:
|
|||||||
return {}
|
return {}
|
||||||
|
|
||||||
# start from --
|
# start from --
|
||||||
|
try:
|
||||||
index = sys.argv.index("--")
|
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 :]
|
new_args = sys.argv[index + 1 :]
|
||||||
arg_dict = {}
|
arg_dict = {}
|
||||||
for arg in new_args:
|
for arg in new_args:
|
||||||
@ -87,11 +93,14 @@ def get_cli_nuitka_args() -> dict:
|
|||||||
warn(f"invalid arg: {arg}")
|
warn(f"invalid arg: {arg}")
|
||||||
else:
|
else:
|
||||||
arg = arg[2:] # remove --
|
arg = arg[2:] # remove --
|
||||||
# arg_name: --<name>=<value>
|
|
||||||
arg_name = arg.split("=")[0]
|
|
||||||
if "=" in arg:
|
if "=" in arg:
|
||||||
arg_value = arg.split("=")[1]
|
# arg: --<name>=<value>
|
||||||
|
spilter = arg.find("=")
|
||||||
|
arg_name = arg[:spilter]
|
||||||
|
arg_value = arg[spilter + 1 :]
|
||||||
else:
|
else:
|
||||||
|
# arg: --<name>
|
||||||
|
arg_name = arg
|
||||||
arg_value = True
|
arg_value = True
|
||||||
arg_dict[arg_name] = arg_value
|
arg_dict[arg_name] = arg_value
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user