File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,24 @@ for whl in /$WHEELHOUSE_DIR/torch*manylinux*.whl; do
130
130
# libshm
131
131
patchelf --set-rpath ' $ORIGIN' torch/lib/libshm.so
132
132
133
+ # regenerate the RECORD file with new hashes
134
+ record_file=` echo $( basename whl) | sed -e ' s/-cp.*$/.dist-info\/RECORD/g' `
135
+ new_record_file=" $record_file " _new
136
+ while read -r line
137
+ do
138
+ record_item=" $line "
139
+ IFS=, read -r filename digestmethod digest size <<< " $record_item"
140
+ if [ $filename == $record_file ]
141
+ then
142
+ echo " $line " >> $new_record_file
143
+ else
144
+ new_digest=` openssl dgst -sha256 -binary $filename | openssl base64 | sed -e ' s/+/-/g' | sed -e ' s/\//_/g' | sed -e ' s/=//g' `
145
+ new_size=` ls -nl $filename | awk ' {print $5}' `
146
+ echo $filename ,$digestmethod ,$new_digest ,$new_size >> $new_record_file
147
+ fi
148
+ done < " $record_file "
149
+ mv $new_record_file $record_file
150
+
133
151
# zip up the wheel back
134
152
zip -r $( basename $whl ) torch*
135
153
You can’t perform that action at this time.
0 commit comments