Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
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
18 changes: 18 additions & 0 deletions manywheel/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,24 @@ for whl in /$WHEELHOUSE_DIR/torch*manylinux*.whl; do
# libshm
patchelf --set-rpath '$ORIGIN' torch/lib/libshm.so

# regenerate the RECORD file with new hashes
record_file=`echo $(basename whl) | sed -e 's/-cp.*$/.dist-info\/RECORD/g'`
new_record_file="$record_file"_new
while read -r line
do
record_item="$line"
IFS=, read -r filename digestmethod digest size <<< "$record_item"
if [ $filename == $record_file ]
then
echo "$line" >> $new_record_file
else
new_digest=`openssl dgst -sha256 -binary $filename | openssl base64 | sed -e 's/+/-/g' | sed -e 's/\//_/g' | sed -e 's/=//g'`
new_size=`ls -nl $filename | awk '{print $5}'`
echo $filename,$digestmethod,$new_digest,$new_size >> $new_record_file
fi
done < "$record_file"
mv $new_record_file $record_file

# zip up the wheel back
zip -r $(basename $whl) torch*

Expand Down