adjust build script and Makefile

This commit is contained in:
Maximilian Keßler 2021-10-06 23:10:25 +02:00
parent 1b442a50fd
commit c18b4ad0e4
2 changed files with 6 additions and 2 deletions

4
Makefile Normal file
View File

@ -0,0 +1,4 @@
.PHONY: build
build:
python3 build.py

View File

@ -6,12 +6,12 @@ from package_formatter import PackageFormatter
from replacements import make_default_commands
def build(build_dir: str):
input_root = Path('.').resolve()
input_root = Path('./packages').resolve()
output = input_root / build_dir
for file in input_root.rglob('*.pysty'):
formatter = PackageFormatter(package_name=file.with_suffix('').name)
make_default_commands(formatter)
formatter.format_package(file, input_root / build_dir / str(file.parent.relative_to(input_root)))
formatter.format_package(file, Path('./').resolve() / build_dir / str(file.parent.relative_to(input_root)))
if __name__ == "__main__":
build('build')