Updated new_source tool to respect a modules set C++ namespace. Fixed generation of modules with templates without config.json.

This commit is contained in:
2025-06-19 16:48:28 +02:00
parent 9bfbd44e34
commit b1c461387f
5 changed files with 43 additions and 5 deletions

View File

@@ -43,6 +43,16 @@ def get_project_config() -> dict:
raw = exec_get_output(('scons', '-s', '--disable_auto_update', '--dump=config', '--dump_format=json'))
return json.loads(raw)
def get_module_config() -> dict:
raw = exec_get_output(('scons', '-s', '--disable_auto_update', '--dump=modules', '--dump_format=json'))
return json.loads(raw)
def find_module_folder(subpath: Path) -> Optional[Path]:
for parent in subpath.parents:
if (parent / 'SModule').exists():
return parent
return None
def prompt(prefix: str = '> ') -> str:
sys.stdout.write(prefix)
sys.stdout.flush()