diff --git a/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml index bd5afa9065..935235e663 100644 --- a/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/templates/py-packaging-stage.yml @@ -397,6 +397,9 @@ stages: system_profiler SPSoftwareDataType SPHardwareDataType displayName: 'Mac machine info' + # Don't remove _PYTHON_HOST_PLATFORM, it's used to generate correct package name + # Setting _PYTHON_HOST_PLATFORM overwrites the value return by get_platform() + # Ref: https://wiki.debian.org/Python/MultiArch - script: | set -e -x pushd . @@ -415,8 +418,14 @@ stages: displayName: 'Command Line Script' - script: | + set -ex python -m pip install --upgrade delocate cd '$(Build.BinariesDirectory)/Release/dist' + ls + for file in *.whl + do + [[ "$file" == *arm64* ]] || ( echo "Mac Silicon package name is NOT correct" && exit 1) + done for file in *.whl do delocate-listdeps "$file" @@ -487,4 +496,4 @@ stages: arch: 'x86_64' machine_pool: 'Linux-CPU' ${{ if contains(parameters.build_py_parameters, '--use_azure') }}: - device: '-d AZURE' \ No newline at end of file + device: '-d AZURE'