aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmkwheels21
1 files changed, 21 insertions, 0 deletions
diff --git a/mkwheels b/mkwheels
index 6e14e84..bc14696 100755
--- a/mkwheels
+++ b/mkwheels
@@ -105,3 +105,24 @@ for f in "$wheels"/*; do
printf '%s==%s --hash=sha256:%s\n' "$name" "$version" "$hash" >> "$req"
done
sort -o "$req" "$req"
+
+mkdir -p "$OUTPUT"
+tarball="$OUTPUT/$pkg-wheels-$ver.tar.gz"
+
+# Reproducible archive: sorted entries, normalized ownership/mtime, gzip -n.
+# Run from $work so the archive holds a top-level 'wheels/' dir.
+( cd "$work" \
+ && find wheels -print0 | LC_ALL=C sort -z \
+ | tar --no-recursion --null --files-from=- \
+ --mtime="@$SOURCE_DATE_EPOCH" \
+ --owner=0 --group=0 --numeric-owner \
+ -cf - \
+ | gzip -n > "$tarball" )
+
+cp "$work/requirements.txt" "$OUTPUT/requirements.txt"
+
+md5=$(md5sum "$tarball" | cut -d' ' -f1)
+echo "wheels tarball: $tarball"
+echo "requirements: $OUTPUT/requirements.txt"
+echo "epoch: $SOURCE_DATE_EPOCH"
+echo "md5sum: $md5"