Skip to content

Commit

Permalink
release: separate out version suffixes for torch pypi promotion (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
seemethere committed Oct 27, 2022
1 parent eb011e3 commit 76bd7cf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
25 changes: 14 additions & 11 deletions release/pypi/prep_binary_for_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,20 @@ for whl_file in "$@"; do
mv "${dist_info_folder}" "${dirname_dist_info_folder}/${basename_dist_info_folder/${version_with_suffix}/${version_no_suffix}}"
cd "${whl_dir}"

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

zip -qr "${new_whl_file}" .
)
Expand Down
13 changes: 7 additions & 6 deletions release/pypi/promote_pypi_to_staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ upload_pypi_to_staging() {
}

# Uncomment these to promote to pypi
LINUX_VERSION_SUFFIX="%2Bcu102"
PYTORCH_LINUX_VERSION_SUFFIX="%2Bcu117.with.pypi.cudnn"
LINUX_VERSION_SUFFIX="%2Bcu117"
WIN_VERSION_SUFFIX="%2Bcpu"
MACOS_X86_64="macosx_.*_x86_64"
MACOS_ARM64="macosx_.*_arm64"

PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # intel mac
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # m1 mac
PLATFORM="linux_x86_64" VERSION_SUFFIX="${PYTORCH_LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # intel mac
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # m1 mac

PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
Expand Down

0 comments on commit 76bd7cf

Please sign in to comment.