Skip to content

Commit 76bd7cf

Browse files
authored
release: separate out version suffixes for torch pypi promotion (#1179)
1 parent eb011e3 commit 76bd7cf

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

release/pypi/prep_binary_for_pypi.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,20 @@ for whl_file in "$@"; do
6363
mv "${dist_info_folder}" "${dirname_dist_info_folder}/${basename_dist_info_folder/${version_with_suffix}/${version_no_suffix}}"
6464
cd "${whl_dir}"
6565

66-
# copied from manywheel/build_common.sh
67-
# regenerate the RECORD file with new hashes
68-
record_file="${dirname_dist_info_folder}/${basename_dist_info_folder/${version_with_suffix}/${version_no_suffix}}/RECORD"
69-
if [[ -e $record_file ]]; then
70-
echo "Generating new record file $record_file"
71-
rm -f $record_file
72-
# generate records for folders in wheel
73-
find * -type f | while read fname; do
74-
echo $(make_wheel_record $fname) >>$record_file
75-
done
76-
fi
66+
(
67+
set +x
68+
# copied from manywheel/build_common.sh
69+
# regenerate the RECORD file with new hashes
70+
record_file="${dirname_dist_info_folder}/${basename_dist_info_folder/${version_with_suffix}/${version_no_suffix}}/RECORD"
71+
if [[ -e $record_file ]]; then
72+
echo "Generating new record file $record_file"
73+
rm -f $record_file
74+
# generate records for folders in wheel
75+
find * -type f | while read fname; do
76+
echo $(make_wheel_record $fname) >>$record_file
77+
done
78+
fi
79+
)
7780

7881
zip -qr "${new_whl_file}" .
7982
)

release/pypi/promote_pypi_to_staging.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,17 @@ upload_pypi_to_staging() {
2121
}
2222

2323
# Uncomment these to promote to pypi
24-
LINUX_VERSION_SUFFIX="%2Bcu102"
24+
PYTORCH_LINUX_VERSION_SUFFIX="%2Bcu117.with.pypi.cudnn"
25+
LINUX_VERSION_SUFFIX="%2Bcu117"
2526
WIN_VERSION_SUFFIX="%2Bcpu"
2627
MACOS_X86_64="macosx_.*_x86_64"
2728
MACOS_ARM64="macosx_.*_arm64"
2829

29-
PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
30-
PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
31-
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
32-
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # intel mac
33-
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # m1 mac
30+
PLATFORM="linux_x86_64" VERSION_SUFFIX="${PYTORCH_LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
31+
PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
32+
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
33+
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # intel mac
34+
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # m1 mac
3435

3536
PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
3637
PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"

0 commit comments

Comments
 (0)