From b63caf8fb0d2192cf4b3f615a636142eabb4792b Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 24 May 2024 17:54:38 -0400 Subject: [PATCH] Use rapids-build-backend (#2331) Contributes to https://github.com/rapidsai/build-planning/issues/31 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Corey J. Nolet (https://github.com/cjnolet) URL: https://github.com/rapidsai/raft/pull/2331 --- .pre-commit-config.yaml | 2 +- build.sh | 6 +- ci/build_python.sh | 6 -- ci/build_wheel.sh | 40 +----------- .../all_cuda-118_arch-aarch64.yaml | 7 ++- .../all_cuda-118_arch-x86_64.yaml | 7 ++- .../all_cuda-122_arch-aarch64.yaml | 7 ++- .../all_cuda-122_arch-x86_64.yaml | 7 ++- .../bench_ann_cuda-118_arch-aarch64.yaml | 3 +- .../bench_ann_cuda-118_arch-x86_64.yaml | 3 +- .../bench_ann_cuda-120_arch-aarch64.yaml | 3 +- .../bench_ann_cuda-120_arch-x86_64.yaml | 3 +- conda/recipes/pylibraft/meta.yaml | 1 + conda/recipes/raft-ann-bench-cpu/meta.yaml | 1 + conda/recipes/raft-ann-bench/meta.yaml | 1 + conda/recipes/raft-dask/meta.yaml | 1 + dependencies.yaml | 61 ++++++++++++++----- python/pylibraft/pylibraft/_version.py | 17 ++++-- python/pylibraft/pyproject.toml | 23 ++++--- python/raft-ann-bench/pyproject.toml | 9 ++- .../src/raft_ann_bench/_version.py | 15 ++++- python/raft-dask/pyproject.toml | 23 ++++--- python/raft-dask/raft_dask/_version.py | 17 ++++-- 23 files changed, 156 insertions(+), 107 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2b89948ec1..ecbaceb20f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -95,7 +95,7 @@ repos: args: ["--toml", "pyproject.toml"] exclude: (?x)^(^CHANGELOG.md$) - repo: https://github.com/rapidsai/dependency-file-generator - rev: v1.8.0 + rev: v1.13.9 hooks: - id: rapids-dependency-file-generator args: ["--clean"] diff --git a/build.sh b/build.sh index 148d23c9c1..289c3922ef 100755 --- a/build.sh +++ b/build.sh @@ -496,18 +496,18 @@ fi # Build and (optionally) install the pylibraft Python package if (( ${NUMARGS} == 0 )) || hasArg pylibraft; then SKBUILD_CMAKE_ARGS="${SKBUILD_EXTRA_CMAKE_ARGS}" \ - python -m pip install --no-build-isolation --no-deps ${REPODIR}/python/pylibraft + python -m pip install --no-build-isolation --no-deps --config-setting rapidsai.disable-cuda=true ${REPODIR}/python/pylibraft fi # Build and (optionally) install the raft-dask Python package if (( ${NUMARGS} == 0 )) || hasArg raft-dask; then SKBUILD_CMAKE_ARGS="${SKBUILD_EXTRA_CMAKE_ARGS}" \ - python -m pip install --no-build-isolation --no-deps ${REPODIR}/python/raft-dask + python -m pip install --no-build-isolation --no-deps --config-setting rapidsai.disable-cuda=true ${REPODIR}/python/raft-dask fi # Build and (optionally) install the raft-ann-bench Python package if (( ${NUMARGS} == 0 )) || hasArg bench-ann; then - python -m pip install --no-build-isolation --no-deps ${REPODIR}/python/raft-ann-bench -vvv + python -m pip install --no-build-isolation --no-deps --config-setting rapidsai.disable-cuda=true ${REPODIR}/python/raft-ann-bench -vvv fi if hasArg docs; then diff --git a/ci/build_python.sh b/ci/build_python.sh index a8b76269ae..80d37b5ae3 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -22,12 +22,6 @@ git_commit=$(git rev-parse HEAD) export RAPIDS_PACKAGE_VERSION=${version} echo "${version}" > VERSION -package_dir="python" -for package_name in pylibraft raft-dask; do - underscore_package_name=$(echo "${package_name}" | tr "-" "_") - sed -i "/^__git_commit__/ s/= .*/= \"${git_commit}\"/g" "${package_dir}/${package_name}/${underscore_package_name}/_version.py" -done - # TODO: Remove `--no-test` flags once importing on a CPU # node works correctly rapids-conda-retry mambabuild \ diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index e3e7ce9c89..62d93a668e 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -14,47 +14,9 @@ rm -rf /usr/lib64/libuc* source rapids-configure-sccache source rapids-date-string -version=$(rapids-generate-version) -git_commit=$(git rev-parse HEAD) - RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" -# This is the version of the suffix with a preceding hyphen. It's used -# everywhere except in the final wheel name. -PACKAGE_CUDA_SUFFIX="-${RAPIDS_PY_CUDA_SUFFIX}" - -# Patch project metadata files to include the CUDA version suffix and version override. -pyproject_file="${package_dir}/pyproject.toml" -version_file="${package_dir}/${underscore_package_name}/_version.py" - -sed -i "s/name = \"${package_name}\"/name = \"${package_name}${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file} -echo "${version}" > VERSION -sed -i "/^__git_commit__ / s/= .*/= \"${git_commit}\"/g" ${version_file} - -# For nightlies we want to ensure that we're pulling in alphas as well. The -# easiest way to do so is to augment the spec with a constraint containing a -# min alpha version that doesn't affect the version bounds but does allow usage -# of alpha versions for that dependency without --pre -alpha_spec='' -if ! rapids-is-release-build; then - alpha_spec=',>=0.0.0a0' -fi - -if [[ ${package_name} == "raft-dask" ]]; then - sed -r -i "s/pylibraft==(.*)\"/pylibraft${PACKAGE_CUDA_SUFFIX}==\1${alpha_spec}\"/g" ${pyproject_file} - sed -r -i "s/libucx(.*)\"/libucx${PACKAGE_CUDA_SUFFIX}\1${alpha_spec}\"/g" ${pyproject_file} - sed -r -i "s/ucx-py==(.*)\"/ucx-py${PACKAGE_CUDA_SUFFIX}==\1${alpha_spec}\"/g" ${pyproject_file} - sed -r -i "s/rapids-dask-dependency==(.*)\"/rapids-dask-dependency==\1${alpha_spec}\"/g" ${pyproject_file} - sed -r -i "s/dask-cuda==(.*)\"/dask-cuda==\1${alpha_spec}\"/g" ${pyproject_file} - sed -r -i "s/distributed-ucxx==(.*)\"/distributed-ucxx${PACKAGE_CUDA_SUFFIX}==\1${alpha_spec}\"/g" ${pyproject_file} -else - sed -r -i "s/rmm(.*)\"/rmm${PACKAGE_CUDA_SUFFIX}\1${alpha_spec}\"/g" ${pyproject_file} -fi - -if [[ $PACKAGE_CUDA_SUFFIX == "-cu12" ]]; then - sed -i "s/cuda-python[<=>\.,0-9a]*/cuda-python>=12.0,<13.0a0/g" ${pyproject_file} - sed -i "s/cupy-cuda11x/cupy-cuda12x/g" ${pyproject_file} -fi +rapids-generate-version > VERSION cd "${package_dir}" diff --git a/conda/environments/all_cuda-118_arch-aarch64.yaml b/conda/environments/all_cuda-118_arch-aarch64.yaml index 3d0f9347bc..2fad2e103d 100644 --- a/conda/environments/all_cuda-118_arch-aarch64.yaml +++ b/conda/environments/all_cuda-118_arch-aarch64.yaml @@ -20,7 +20,7 @@ dependencies: - cupy>=12.0.0 - cxx-compiler - cython>=3.0.0 -- dask-cuda==24.8.* +- dask-cuda==24.8.*,>=0.0.0a0 - distributed-ucxx==0.39.* - doxygen>=1.8.20 - gcc_linux-aarch64=11.* @@ -46,9 +46,10 @@ dependencies: - pydata-sphinx-theme - pytest-cov - pytest==7.* -- rapids-dask-dependency==24.8.* +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rapids-dask-dependency==24.8.*,>=0.0.0a0 - recommonmark -- rmm==24.8.* +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - scikit-learn - scipy diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index bedfc9a2a3..b141ebd7e0 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -20,7 +20,7 @@ dependencies: - cupy>=12.0.0 - cxx-compiler - cython>=3.0.0 -- dask-cuda==24.8.* +- dask-cuda==24.8.*,>=0.0.0a0 - distributed-ucxx==0.39.* - doxygen>=1.8.20 - gcc_linux-64=11.* @@ -46,9 +46,10 @@ dependencies: - pydata-sphinx-theme - pytest-cov - pytest==7.* -- rapids-dask-dependency==24.8.* +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rapids-dask-dependency==24.8.*,>=0.0.0a0 - recommonmark -- rmm==24.8.* +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - scikit-learn - scipy diff --git a/conda/environments/all_cuda-122_arch-aarch64.yaml b/conda/environments/all_cuda-122_arch-aarch64.yaml index 25543099f8..9333930e01 100644 --- a/conda/environments/all_cuda-122_arch-aarch64.yaml +++ b/conda/environments/all_cuda-122_arch-aarch64.yaml @@ -21,7 +21,7 @@ dependencies: - cupy>=12.0.0 - cxx-compiler - cython>=3.0.0 -- dask-cuda==24.8.* +- dask-cuda==24.8.*,>=0.0.0a0 - distributed-ucxx==0.39.* - doxygen>=1.8.20 - gcc_linux-aarch64=11.* @@ -42,9 +42,10 @@ dependencies: - pydata-sphinx-theme - pytest-cov - pytest==7.* -- rapids-dask-dependency==24.8.* +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rapids-dask-dependency==24.8.*,>=0.0.0a0 - recommonmark -- rmm==24.8.* +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - scikit-learn - scipy diff --git a/conda/environments/all_cuda-122_arch-x86_64.yaml b/conda/environments/all_cuda-122_arch-x86_64.yaml index 52adc54c55..e209b5b046 100644 --- a/conda/environments/all_cuda-122_arch-x86_64.yaml +++ b/conda/environments/all_cuda-122_arch-x86_64.yaml @@ -21,7 +21,7 @@ dependencies: - cupy>=12.0.0 - cxx-compiler - cython>=3.0.0 -- dask-cuda==24.8.* +- dask-cuda==24.8.*,>=0.0.0a0 - distributed-ucxx==0.39.* - doxygen>=1.8.20 - gcc_linux-64=11.* @@ -42,9 +42,10 @@ dependencies: - pydata-sphinx-theme - pytest-cov - pytest==7.* -- rapids-dask-dependency==24.8.* +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rapids-dask-dependency==24.8.*,>=0.0.0a0 - recommonmark -- rmm==24.8.* +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - scikit-learn - scipy diff --git a/conda/environments/bench_ann_cuda-118_arch-aarch64.yaml b/conda/environments/bench_ann_cuda-118_arch-aarch64.yaml index 729ae0c3d0..ac72b6424c 100644 --- a/conda/environments/bench_ann_cuda-118_arch-aarch64.yaml +++ b/conda/environments/bench_ann_cuda-118_arch-aarch64.yaml @@ -39,7 +39,8 @@ dependencies: - openblas - pandas - pyyaml -- rmm==24.8.* +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - sysroot_linux-aarch64==2.17 name: bench_ann_cuda-118_arch-aarch64 diff --git a/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml b/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml index 6a6eb09bee..b1058d6c57 100644 --- a/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml +++ b/conda/environments/bench_ann_cuda-118_arch-x86_64.yaml @@ -39,7 +39,8 @@ dependencies: - openblas - pandas - pyyaml -- rmm==24.8.* +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - sysroot_linux-64==2.17 name: bench_ann_cuda-118_arch-x86_64 diff --git a/conda/environments/bench_ann_cuda-120_arch-aarch64.yaml b/conda/environments/bench_ann_cuda-120_arch-aarch64.yaml index f368fa0c9c..b6d5b6c6f2 100644 --- a/conda/environments/bench_ann_cuda-120_arch-aarch64.yaml +++ b/conda/environments/bench_ann_cuda-120_arch-aarch64.yaml @@ -35,7 +35,8 @@ dependencies: - openblas - pandas - pyyaml -- rmm==24.8.* +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - sysroot_linux-aarch64==2.17 name: bench_ann_cuda-120_arch-aarch64 diff --git a/conda/environments/bench_ann_cuda-120_arch-x86_64.yaml b/conda/environments/bench_ann_cuda-120_arch-x86_64.yaml index 8f8cdf9b77..9e93941732 100644 --- a/conda/environments/bench_ann_cuda-120_arch-x86_64.yaml +++ b/conda/environments/bench_ann_cuda-120_arch-x86_64.yaml @@ -35,7 +35,8 @@ dependencies: - openblas - pandas - pyyaml -- rmm==24.8.* +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - sysroot_linux-64==2.17 name: bench_ann_cuda-120_arch-x86_64 diff --git a/conda/recipes/pylibraft/meta.yaml b/conda/recipes/pylibraft/meta.yaml index cbeaec3b55..16fecadd83 100644 --- a/conda/recipes/pylibraft/meta.yaml +++ b/conda/recipes/pylibraft/meta.yaml @@ -56,6 +56,7 @@ requirements: - rmm ={{ minor_version }} - scikit-build-core >=0.7.0 - setuptools + - rapids-build-backend>=0.3.0,<0.4.0.dev0 run: - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} {% if cuda_major == "11" %} diff --git a/conda/recipes/raft-ann-bench-cpu/meta.yaml b/conda/recipes/raft-ann-bench-cpu/meta.yaml index d0748fdb16..94f7102726 100644 --- a/conda/recipes/raft-ann-bench-cpu/meta.yaml +++ b/conda/recipes/raft-ann-bench-cpu/meta.yaml @@ -53,6 +53,7 @@ requirements: - python - pyyaml - pandas + - rapids-build-backend>=0.3.0,<0.4.0.dev0 run: - glog {{ glog_version }} diff --git a/conda/recipes/raft-ann-bench/meta.yaml b/conda/recipes/raft-ann-bench/meta.yaml index 8a6a3d033d..d6aeb5f860 100644 --- a/conda/recipes/raft-ann-bench/meta.yaml +++ b/conda/recipes/raft-ann-bench/meta.yaml @@ -82,6 +82,7 @@ requirements: - pyyaml # rmm is needed to determine if package is gpu-enabled - rmm ={{ minor_version }} + - rapids-build-backend>=0.3.0,<0.4.0.dev0 run: - python diff --git a/conda/recipes/raft-dask/meta.yaml b/conda/recipes/raft-dask/meta.yaml index af22c8853e..83ec1922e1 100644 --- a/conda/recipes/raft-dask/meta.yaml +++ b/conda/recipes/raft-dask/meta.yaml @@ -58,6 +58,7 @@ requirements: - setuptools - ucx-py {{ ucx_py_version }} - ucxx {{ ucxx_version }} + - rapids-build-backend>=0.3.0,<0.4.0.dev0 run: {% if cuda_major == "11" %} - cudatoolkit diff --git a/dependencies.yaml b/dependencies.yaml index c758620879..363d2588e1 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -7,6 +7,7 @@ files: arch: [x86_64, aarch64] includes: - build + - rapids_build - build_pylibraft - cuda - cuda_version @@ -28,6 +29,7 @@ files: arch: [x86_64, aarch64] includes: - build + - rapids_build - cuda - cuda_version - develop @@ -66,6 +68,14 @@ files: table: build-system includes: - build + py_rapids_build_pylibraft: + output: pyproject + pyproject_dir: python/pylibraft + extras: + table: tool.rapids-build-backend + key: requires + includes: + - rapids_build - build_pylibraft py_run_pylibraft: output: pyproject @@ -91,6 +101,14 @@ files: table: build-system includes: - build + py_rapids_build_raft_dask: + output: pyproject + pyproject_dir: python/raft-dask + extras: + table: tool.rapids-build-backend + key: requires + includes: + - rapids_build - depends_on_ucx_build py_run_raft_dask: output: pyproject @@ -130,6 +148,16 @@ channels: - nvidia dependencies: build: + common: + - output_types: [conda] + packages: + - rapids-build-backend>=0.3.0,<0.4.0.dev0 + - scikit-build-core>=0.7.0 + - output_types: [requirements, pyproject] + packages: + - rapids-build-backend>=0.3.0,<0.4.0.dev0 + - scikit-build-core[pyproject]>=0.7.0 + rapids_build: common: - output_types: [conda, requirements, pyproject] packages: @@ -142,10 +170,6 @@ dependencies: - cxx-compiler - nccl>=2.9.9 - libucxx==0.39.* - - scikit-build-core>=0.7.0 - - output_types: [requirements, pyproject] - packages: - - scikit-build-core[pyproject]>=0.7.0 specific: - output_types: conda matrices: @@ -184,7 +208,7 @@ dependencies: common: - output_types: [conda] packages: - - &rmm_conda rmm==24.8.* + - &rmm_conda rmm==24.8.*,>=0.0.0a0 - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -198,17 +222,21 @@ dependencies: cuda: "12.*" packages: - &cuda_python12 cuda-python>=12.0,<13.0a0 - - matrix: # All CUDA 11 versions + - matrix: + cuda: "11.*" packages: - &cuda_python11 cuda-python>=11.7.1,<12.0a0 + - matrix: + packages: + - &cuda_python cuda-python - output_types: [requirements, pyproject] matrices: - matrix: {cuda: "12.*"} packages: - - &rmm_cu12 rmm-cu12==24.8.* + - &rmm_cu12 rmm-cu12==24.8.*,>=0.0.0a0 - matrix: {cuda: "11.*"} packages: - - &rmm_cu11 rmm-cu11==24.8.* + - &rmm_cu11 rmm-cu11==24.8.*,>=0.0.0a0 - {matrix: null, packages: [*rmm_conda] } checks: common: @@ -381,6 +409,7 @@ dependencies: packages: - wheel - setuptools + - rapids-build-backend>=0.3.0,<0.4.0.dev0 py_version: specific: - output_types: conda @@ -421,9 +450,13 @@ dependencies: cuda: "12.*" packages: - *cuda_python12 - - matrix: # All CUDA 11 versions + - matrix: + cuda: "11.*" packages: - *cuda_python11 + - matrix: + packages: + - *cuda_python - output_types: [requirements, pyproject] matrices: - matrix: {cuda: "12.*"} @@ -437,18 +470,18 @@ dependencies: common: - output_types: [conda, pyproject] packages: - - dask-cuda==24.8.* + - dask-cuda==24.8.*,>=0.0.0a0 - joblib>=0.11 - numba>=0.57 - *numpy - - rapids-dask-dependency==24.8.* + - rapids-dask-dependency==24.8.*,>=0.0.0a0 - ucx-py==0.39.* - output_types: conda packages: - &ucx_py_conda ucx-py==0.39.* - output_types: pyproject packages: - - &pylibraft_conda pylibraft==24.8.* + - &pylibraft_conda pylibraft==24.8.*,>=0.0.0a0 - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -460,11 +493,11 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - &pylibraft_cu12 pylibraft-cu12==24.8.* + - &pylibraft_cu12 pylibraft-cu12==24.8.*,>=0.0.0a0 - &ucx_py_cu12 ucx-py-cu12==0.39.* - matrix: {cuda: "11.*"} packages: - - &pylibraft_cu11 pylibraft-cu11==24.8.* + - &pylibraft_cu11 pylibraft-cu11==24.8.*,>=0.0.0a0 - &ucx_py_cu11 ucx-py-cu11==0.39.* - {matrix: null, packages: [*pylibraft_conda, *ucx_py_conda]} test_python_common: diff --git a/python/pylibraft/pylibraft/_version.py b/python/pylibraft/pylibraft/_version.py index 3b359e2ff3..0fa0ba80bc 100644 --- a/python/pylibraft/pylibraft/_version.py +++ b/python/pylibraft/pylibraft/_version.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,13 +13,22 @@ # limitations under the License. # - import importlib.resources __version__ = ( - importlib.resources.files("pylibraft") + importlib.resources.files(__package__) .joinpath("VERSION") .read_text() .strip() ) -__git_commit__ = "" +try: + __git_commit__ = ( + importlib.resources.files(__package__) + .joinpath("GIT_COMMIT") + .read_text() + .strip() + ) +except FileNotFoundError: + __git_commit__ = "" + +__all__ = ["__version__", "__git_commit__"] diff --git a/python/pylibraft/pyproject.toml b/python/pylibraft/pyproject.toml index 9f77f22f6a..3c1b0ef118 100644 --- a/python/pylibraft/pyproject.toml +++ b/python/pylibraft/pyproject.toml @@ -15,14 +15,10 @@ [build-system] requires = [ - "cmake>=3.26.4", - "cuda-python>=11.7.1,<12.0a0", - "cython>=3.0.0", - "ninja", - "rmm==24.8.*", + "rapids-build-backend>=0.3.0,<0.4.0.dev0", "scikit-build-core[pyproject]>=0.7.0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. -build-backend = "scikit_build_core.build" +build-backend = "rapids_build_backend.build" [project] name = "pylibraft" @@ -35,9 +31,9 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "cuda-python>=11.7.1,<12.0a0", + "cuda-python", "numpy>=1.23,<2.0a0", - "rmm==24.8.*", + "rmm==24.8.*,>=0.0.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ "Intended Audience :: Developers", @@ -117,6 +113,17 @@ provider = "scikit_build_core.metadata.regex" input = "pylibraft/VERSION" regex = "(?P.*)" +[tool.rapids-build-backend] +build-backend = "scikit_build_core.build" +requires = [ + "cmake>=3.26.4", + "cuda-python", + "cython>=3.0.0", + "ninja", + "rmm==24.8.*,>=0.0.0a0", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. +dependencies-file = "../../dependencies.yaml" + [tool.pytest.ini_options] filterwarnings = [ "error", diff --git a/python/raft-ann-bench/pyproject.toml b/python/raft-ann-bench/pyproject.toml index e1f0e18304..226dc41e40 100644 --- a/python/raft-ann-bench/pyproject.toml +++ b/python/raft-ann-bench/pyproject.toml @@ -1,8 +1,9 @@ # Copyright (c) 2023, NVIDIA CORPORATION. [build-system] -build-backend = "setuptools.build_meta" +build-backend = "rapids_build_backend.build" requires = [ + "rapids-build-backend>=0.3.0,<0.4.0.dev0", "setuptools", "wheel", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. @@ -61,3 +62,9 @@ skip = [ [tool.setuptools.dynamic] version = { file = "raft_ann_bench/VERSION" } + +[tool.rapids-build-backend] +build-backend = "setuptools.build_meta" +requires = [] +dependencies-file = "../../dependencies.yaml" +commit-files = ["src/raft_ann_bench/GIT_COMMIT"] diff --git a/python/raft-ann-bench/src/raft_ann_bench/_version.py b/python/raft-ann-bench/src/raft_ann_bench/_version.py index 394acd755d..0fa0ba80bc 100644 --- a/python/raft-ann-bench/src/raft_ann_bench/_version.py +++ b/python/raft-ann-bench/src/raft_ann_bench/_version.py @@ -13,13 +13,22 @@ # limitations under the License. # - import importlib.resources __version__ = ( - importlib.resources.files("raft_ann_bench") + importlib.resources.files(__package__) .joinpath("VERSION") .read_text() .strip() ) -__git_commit__ = "" +try: + __git_commit__ = ( + importlib.resources.files(__package__) + .joinpath("GIT_COMMIT") + .read_text() + .strip() + ) +except FileNotFoundError: + __git_commit__ = "" + +__all__ = ["__version__", "__git_commit__"] diff --git a/python/raft-dask/pyproject.toml b/python/raft-dask/pyproject.toml index 589ff36bc6..f3d5acacac 100644 --- a/python/raft-dask/pyproject.toml +++ b/python/raft-dask/pyproject.toml @@ -14,12 +14,9 @@ [build-system] -build-backend = "scikit_build_core.build" +build-backend = "rapids_build_backend.build" requires = [ - "cmake>=3.26.4", - "cython>=3.0.0", - "libucx==1.15.0", - "ninja", + "rapids-build-backend>=0.3.0,<0.4.0.dev0", "scikit-build-core[pyproject]>=0.7.0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. @@ -34,13 +31,13 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "dask-cuda==24.8.*", + "dask-cuda==24.8.*,>=0.0.0a0", "distributed-ucxx==0.39.*", "joblib>=0.11", "numba>=0.57", "numpy>=1.23,<2.0a0", - "pylibraft==24.8.*", - "rapids-dask-dependency==24.8.*", + "pylibraft==24.8.*,>=0.0.0a0", + "rapids-dask-dependency==24.8.*,>=0.0.0a0", "ucx-py==0.39.*", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ @@ -118,3 +115,13 @@ wheel.packages = ["raft_dask"] provider = "scikit_build_core.metadata.regex" input = "raft_dask/VERSION" regex = "(?P.*)" + +[tool.rapids-build-backend] +build-backend = "scikit_build_core.build" +requires = [ + "cmake>=3.26.4", + "cython>=3.0.0", + "libucx==1.15.0", + "ninja", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. +dependencies-file = "../../dependencies.yaml" diff --git a/python/raft-dask/raft_dask/_version.py b/python/raft-dask/raft_dask/_version.py index 03cddef557..0fa0ba80bc 100644 --- a/python/raft-dask/raft_dask/_version.py +++ b/python/raft-dask/raft_dask/_version.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,13 +13,22 @@ # limitations under the License. # - import importlib.resources __version__ = ( - importlib.resources.files("raft_dask") + importlib.resources.files(__package__) .joinpath("VERSION") .read_text() .strip() ) -__git_commit__ = "" +try: + __git_commit__ = ( + importlib.resources.files(__package__) + .joinpath("GIT_COMMIT") + .read_text() + .strip() + ) +except FileNotFoundError: + __git_commit__ = "" + +__all__ = ["__version__", "__git_commit__"]