Make build with the new ab --- but the tests fail.

This commit is contained in:
David Given
2025-03-17 22:33:54 +01:00
parent 0f763fe06b
commit 15a69f6dcb
57 changed files with 220 additions and 148 deletions

View File

@@ -3,14 +3,6 @@ from build.ab import (
simplerule,
TargetsMap,
filenameof,
emit,
)
emit(
"""
ZIP ?= zip
ZIPNOTE ?= zipnote
"""
)
@@ -18,20 +10,18 @@ ZIPNOTE ?= zipnote
def zip(
self, name, flags="", items: TargetsMap = {}, extension="zip", label="ZIP"
):
cs = ["rm -f {outs[0]}"]
cs = ["$(PYTHON) build/_zip.py -z $[outs]"]
ins = []
for k, v in items.items():
cs += [
"cat %s | $(ZIP) -q %s {outs[0]} -" % (filenameof(v), flags),
"printf '@ -\\n@=%s\\n' | $(ZIPNOTE) -w {outs[0]}" % k,
]
cs += [f"-f {k} {filenameof(v)}"]
ins += [v]
simplerule(
replaces=self,
ins=ins,
deps=["build/_zip.py"],
outs=[f"={self.localname}." + extension],
commands=cs,
commands=[" ".join(cs)],
label=label,
)