Skip to content

Commit 1917473

Browse files
committed
winbuild fix license
1 parent 06fb9ae commit 1917473

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

winbuild/build_prepare.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,11 @@ def build_dep(name: str) -> str:
392392
if "license_pattern" in dep:
393393
match = re.search(dep["license_pattern"], license_text, re.DOTALL)
394394
license_text = "\n".join(match.groups())
395-
assert len(license_text) > 50
396-
with open(os.path.join(license_dir, f"{dir}.txt"), "w") as f:
397-
print(f"Writing license {dir}.txt")
398-
f.write(license_text)
395+
if licenses:
396+
assert len(license_text) > 50
397+
with open(os.path.join(license_dir, f"{dir}.txt"), "w") as f:
398+
print(f"Writing license {dir}.txt")
399+
f.write(license_text)
399400

400401
for patch_file, patch_list in dep.get("patch", {}).items():
401402
patch_file = os.path.join(sources_dir, dir, patch_file.format(**prefs))

0 commit comments

Comments
 (0)