Skip to content

Commit 7216514

Browse files
authored
Merge pull request #177 from thewtex/linux-tag
BUG: Patch tag in Linux wheel
2 parents ed5c539 + fcde2a7 commit 7216514

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

scripts/internal/manylinux-build-wheels.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,22 @@ else
178178
rm ${whl}
179179
done
180180
fi
181+
itk_core_whl=$(ls dist/itk_core*whl | head -n 1)
182+
repaired_plat1=$(echo $itk_core_whl | cut -d- -f5 | cut -d. -f1)
183+
repaired_plat2=$(echo $itk_core_whl | cut -d- -f5 | cut -d. -f2)
181184
for itk_wheel in dist/itk*-linux*.whl; do
182-
mv ${itk_wheel} ${itk_wheel/linux/manylinux2014}
185+
mkdir -p unpacked_whl packed_whl
186+
/opt/python/cp39-cp39/bin/wheel unpack -d unpacked_whl ${itk_wheel}
187+
version=$(echo ${itk_wheel} | cut -d- -f3-4)
188+
echo "Wheel-Version: 1.0" > unpacked_whl/itk-*/*.dist-info/WHEEL
189+
echo "Generator: skbuild 0.8.1" >> unpacked_whl/itk-*/*.dist-info/WHEEL
190+
echo "Root-Is-Purelib: false" >> unpacked_whl/itk-*/*.dist-info/WHEEL
191+
echo "Tag: ${version}-${repaired_plat1}" >> unpacked_whl/itk-*/*.dist-info/WHEEL
192+
echo "Tag: ${version}-${repaired_plat2}" >> unpacked_whl/itk-*/*.dist-info/WHEEL
193+
echo "" >> unpacked_whl/itk-*/*.dist-info/WHEEL
194+
/opt/python/cp39-cp39/bin/wheel pack -d packed_whl ./unpacked_whl/itk-*
195+
mv packed_whl/*.whl dist/
196+
rm -rf unpacked_whl packed_whl ${itk_wheel}
183197
done
184198

185199
# Install packages and test

0 commit comments

Comments
 (0)