diff --git a/pyproject.toml b/pyproject.toml index 230fb6b..787456c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,9 @@ build-backend = "setuptools.build_meta" #lib_not_dr = "lib_not_dr" #lndl_nuitka = "lndl_nuitka" +[project.optional-dependencies] +toml = ["tomli >= 2.0.1"] + [tool.setuptools.dynamic] version = { attr = "lib_not_dr.__version__"} diff --git a/src/lib_not_dr/nuitka/parse.py b/src/lib_not_dr/nuitka/parse.py index 3e03a65..1544cbf 100644 --- a/src/lib_not_dr/nuitka/parse.py +++ b/src/lib_not_dr/nuitka/parse.py @@ -64,7 +64,8 @@ def get_toml_reader(): return toml_loads except ImportError: continue - error_msg = """No toml reader found, please install any below by pip:\n%s + error_msg = """No toml reader found, please install any below by pip: + %s or use Python 3.11+""" % " ".join( TOML_READERS ) @@ -100,15 +101,15 @@ def gen_subprocess_args(nuitka_config: dict) -> list: for name, value in nuitka_config.items(): if value is True: # -- - cmd_list.append("--%s" % name) + cmd_list.append(f"--{name}") continue elif isinstance(value, str): # --= - cmd_list.append("--%s=%s" % (name, value)) + cmd_list.append(f"--{name}={value}") continue elif isinstance(value, Iterable): # --=,,... - cmd_list.append("--%s=%s" % (name, ",".join(value))) + cmd_list.append(f"--{name}={','.join(value)}") continue return cmd_list