From daa2c596ca7456298722002a9f42eff49adc1ae7 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 31 Oct 2024 11:35:11 +0900 Subject: [PATCH] GH-44578: [Release][Packaging] Verify wheel version --- ci/scripts/python_wheel_unix_test.sh | 5 +++++ dev/release/verify-release-candidate.sh | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ci/scripts/python_wheel_unix_test.sh b/ci/scripts/python_wheel_unix_test.sh index 1487581eaef51..e30d2899605a8 100755 --- a/ci/scripts/python_wheel_unix_test.sh +++ b/ci/scripts/python_wheel_unix_test.sh @@ -88,6 +88,11 @@ import pyarrow.parquet fi fi +if [ "${CHECK_VERSION}" == "ON" ]; then + pyarrow_version=$(python -c "import pyarrow; print(pyarrow.__version__)") + [ "${pyarrow_version}" = "${ARROW_VERSION}" ] +fi + if [ "${CHECK_WHEEL_CONTENT}" == "ON" ]; then python ${source_dir}/ci/scripts/python_wheel_validate_contents.py \ --path ${source_dir}/python/repaired_wheels diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index d9f973562aa78..9dddcbc0ba75b 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -1061,7 +1061,11 @@ test_linux_wheels() { continue fi pip install pyarrow-${TEST_PYARROW_VERSION:-${VERSION}}-cp${pyver/.}-cp${python/.}-${platform}.whl - CHECK_WHEEL_CONTENT=${wheel_content:-"ON"} INSTALL_PYARROW=OFF ARROW_GCS=${check_gcs} \ + ARROW_GCS=${check_gcs} \ + ARROW_VERSION=${VERSION} \ + CHECK_VERSION=ON \ + CHECK_WHEEL_CONTENT=${wheel_content:-"ON"} \ + INSTALL_PYARROW=OFF \ ${ARROW_DIR}/ci/scripts/python_wheel_unix_test.sh ${ARROW_SOURCE_DIR} done done @@ -1102,8 +1106,13 @@ test_macos_wheels() { fi pip install pyarrow-${VERSION}-cp${pyver/.}-cp${python/.}-${platform}.whl - CHECK_WHEEL_CONTENT=${wheel_content:-"ON"} INSTALL_PYARROW=OFF ARROW_FLIGHT=${check_flight} \ - ARROW_GCS=${check_gcs} ARROW_S3=${check_s3} \ + ARROW_FLIGHT=${check_flight} \ + ARROW_GCS=${check_gcs} + ARROW_S3=${check_s3} \ + ARROW_VERSION=${VERSION} \ + CHECK_WHEEL_CONTENT=${wheel_content:-"ON"} \ + CHECK_VERSION=ON \ + INSTALL_PYARROW=OFF ${ARROW_DIR}/ci/scripts/python_wheel_unix_test.sh ${ARROW_SOURCE_DIR} done done