Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/build-ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,15 +529,20 @@ def main():

# build output tarball (reproducible: fixed timestamps, sorted entries)
os.makedirs(output_dir, exist_ok=True)
subdirs = ["include", "lib"]
if plat == "Windows":
subdirs.append("bin")
with gzip.GzipFile(output_tarball, "wb", mtime=0) as gz:
with tarfile.open(fileobj=gz, mode="w|") as tar:
for subdir in ("include", "lib"):
for subdir in subdirs:
subdir_path = os.path.join(dest_dir, subdir)
if not os.path.exists(subdir_path):
continue
for root, dirs, files in os.walk(subdir_path):
dirs.sort()
for name in sorted(files):
if subdir == "bin" and not name.endswith(".dll"):
continue
filepath = os.path.join(root, name)
arcname = os.path.relpath(filepath, dest_dir)
info = tar.gettarinfo(filepath, arcname=arcname)
Expand Down
Loading