diff --git a/ci/build_wheel_cuproj.sh b/ci/build_wheel_cuproj.sh index 6001e44e9..4b29fbb46 100755 --- a/ci/build_wheel_cuproj.sh +++ b/ci/build_wheel_cuproj.sh @@ -3,4 +3,7 @@ set -euo pipefail -ci/build_wheel.sh cuproj python/cuproj python +package_dir="python/cuproj" + +ci/build_wheel.sh cuproj ${package_dir} python +ci/validate_wheel.sh ${package_dir} final_dist diff --git a/ci/build_wheel_cuspatial.sh b/ci/build_wheel_cuspatial.sh index e581a3e76..780ac0710 100755 --- a/ci/build_wheel_cuspatial.sh +++ b/ci/build_wheel_cuspatial.sh @@ -3,6 +3,8 @@ set -euo pipefail +package_dir="python/cuspatial" + RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" # Downloads libcuspatial wheel from this current build, @@ -14,4 +16,5 @@ RAPIDS_PY_WHEEL_NAME="libcuspatial_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-whe echo "libcuspatial-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo /tmp/libcuspatial_dist/libcuspatial_*.whl)" > /tmp/constraints.txt export PIP_CONSTRAINT="/tmp/constraints.txt" -ci/build_wheel.sh cuspatial python/cuspatial python +ci/build_wheel.sh cuspatial ${package_dir} python +ci/validate_wheel.sh ${package_dir} final_dist diff --git a/ci/build_wheel_libcuspatial.sh b/ci/build_wheel_libcuspatial.sh index ed3822207..b6582d87f 100755 --- a/ci/build_wheel_libcuspatial.sh +++ b/ci/build_wheel_libcuspatial.sh @@ -3,6 +3,7 @@ set -euo pipefail +package_dir="python/libcuspatial" package_name="libcuspatial" rapids-logger "Generating build requirements" @@ -25,4 +26,5 @@ python -m pip install \ # 0 really means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/5735) export PIP_NO_BUILD_ISOLATION=0 -ci/build_wheel.sh "${package_name}" python/libcuspatial cpp +ci/build_wheel.sh "${package_name}" ${package_dir} cpp +ci/validate_wheel.sh ${package_dir} final_dist diff --git a/ci/validate_wheel.sh b/ci/validate_wheel.sh new file mode 100755 index 000000000..5910a5c59 --- /dev/null +++ b/ci/validate_wheel.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright (c) 2024, NVIDIA CORPORATION. + +set -euo pipefail + +package_dir=$1 +wheel_dir_relative_path=$2 + +cd "${package_dir}" + +rapids-logger "validate packages with 'pydistcheck'" + +pydistcheck \ + --inspect \ + "$(echo ${wheel_dir_relative_path}/*.whl)" + +rapids-logger "validate packages with 'twine'" + +twine check \ + --strict \ + "$(echo ${wheel_dir_relative_path}/*.whl)" diff --git a/python/cuproj/pyproject.toml b/python/cuproj/pyproject.toml index 35a95c728..c8049eadb 100644 --- a/python/cuproj/pyproject.toml +++ b/python/cuproj/pyproject.toml @@ -126,3 +126,11 @@ requires = [ "ninja", "wheel", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. + +[tool.pydistcheck] +select = [ + "distro-too-large-compressed", +] + +# PyPI limit is 100 MiB, fail CI before we get too close to that +max_allowed_size_compressed = '75M' diff --git a/python/cuspatial/pyproject.toml b/python/cuspatial/pyproject.toml index c497434c4..662648337 100644 --- a/python/cuspatial/pyproject.toml +++ b/python/cuspatial/pyproject.toml @@ -145,3 +145,11 @@ requires = [ "rmm==24.12.*,>=0.0.0a0", "wheel", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. + +[tool.pydistcheck] +select = [ + "distro-too-large-compressed", +] + +# PyPI limit is 100 MiB, fail CI before we get too close to that +max_allowed_size_compressed = '75M' diff --git a/python/libcuspatial/pyproject.toml b/python/libcuspatial/pyproject.toml index 1de8df8c1..725d2d882 100644 --- a/python/libcuspatial/pyproject.toml +++ b/python/libcuspatial/pyproject.toml @@ -75,3 +75,11 @@ requires = [ "ninja", "wheel", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. + +[tool.pydistcheck] +select = [ + "distro-too-large-compressed", +] + +# PyPI limit is 100 MiB, fail CI before we get too close to that +max_allowed_size_compressed = '75M'