diff --git a/config.yaml b/config.yaml index fb14ebaad..02dab56b1 100644 --- a/config.yaml +++ b/config.yaml @@ -1,3 +1,5 @@ +project_name: PyConverter-GeneratedCommands # Name of the project + library_name_structured: # Future name of the library - pyconverter - generatedcommands diff --git a/src/pyconverter/xml2py/writer.py b/src/pyconverter/xml2py/writer.py index f95a00405..24123974d 100644 --- a/src/pyconverter/xml2py/writer.py +++ b/src/pyconverter/xml2py/writer.py @@ -220,6 +220,7 @@ def write_global__init__file(library_path: Path, config_path: Path) -> None: Path object of the directory containing the generated package. """ + project_name = get_config_data_value(config_path, "project_name") subfolder_values = get_config_data_value(config_path, "subfolders") if subfolder_values: @@ -244,7 +245,7 @@ def write_global__init__file(library_path: Path, config_path: Path) -> None: fid.write("except ModuleNotFoundError:\n") fid.write(" import importlib_metadata\n\n") fid.write("__version__ = importlib_metadata.version(__name__.replace('.', '-'))\n") - fid.write('"""PyConverter-GeneratedCommands version."""\n') + fid.write(f'"""{project_name} version."""\n') fid.close()