11#! /bin/bash
22
3- # SPDX-FileCopyrightText: Copyright (c) 2019-2025 , NVIDIA CORPORATION.
3+ # SPDX-FileCopyrightText: Copyright (c) 2019-2026 , NVIDIA CORPORATION.
44# SPDX-License-Identifier: Apache-2.0
55
66# cugraph build script
@@ -89,7 +89,11 @@ BUILD_CPP_MG_TESTS=OFF
8989BUILD_CPP_MTMG_TESTS=OFF
9090BUILD_ALL_GPU_ARCH=0
9191CMAKE_GENERATOR_OPTION=(-G Ninja)
92- PYTHON_ARGS_FOR_INSTALL=(-m pip install --no-build-isolation --no-deps --config-settings rapidsai.disable-cuda=true)
92+ PYTHON_ARGS_FOR_INSTALL=(
93+ --no-build-isolation
94+ --no-deps
95+ --config-settings=" rapidsai.disable-cuda=true"
96+ )
9397
9498# Set defaults for vars that may not have been defined externally
9599# FIXME: if PREFIX is not set, check CONDA_PREFIX, but there is no fallback
@@ -279,13 +283,19 @@ if buildDefault || hasArg libcugraph_etl || hasArg all; then
279283 fi
280284fi
281285
286+ # If `RAPIDS_PY_VERSION` is set, use that as the lower-bound for the stable ABI CPython version
287+ if [ -n " ${RAPIDS_PY_VERSION:- } " ]; then
288+ RAPIDS_PY_API=" cp${RAPIDS_PY_VERSION// ./ } "
289+ PYTHON_ARGS_FOR_INSTALL+=(" --config-settings" " skbuild.wheel.py-api=${RAPIDS_PY_API} " )
290+ fi
291+
282292# Build, and install pylibcugraph
283293if buildDefault || hasArg pylibcugraph || hasArg all; then
284294 if hasArg --clean; then
285295 cleanPythonDir " ${REPODIR} /python/pylibcugraph"
286296 else
287297 SKBUILD_CMAKE_ARGS=" ${SKBUILD_EXTRA_CMAKE_ARGS} " \
288- python " ${PYTHON_ARGS_FOR_INSTALL[@]} " " ${REPODIR} /python/pylibcugraph"
298+ python -m pip install " ${PYTHON_ARGS_FOR_INSTALL[@]} " " ${REPODIR} /python/pylibcugraph"
289299 fi
290300fi
291301
@@ -295,7 +305,7 @@ if buildDefault || hasArg cugraph || hasArg all; then
295305 cleanPythonDir " ${REPODIR} /python/cugraph"
296306 else
297307 SKBUILD_CMAKE_ARGS=" ${SKBUILD_EXTRA_CMAKE_ARGS} " \
298- python " ${PYTHON_ARGS_FOR_INSTALL[@]} " " ${REPODIR} /python/cugraph"
308+ python -m pip install " ${PYTHON_ARGS_FOR_INSTALL[@]} " " ${REPODIR} /python/cugraph"
299309 fi
300310fi
301311
0 commit comments