Skip to content

Commit 9f6e317

Browse files
authored
feat(rattler): port conda build recipe to rattler build (rapidsai#121)
Port all condabuild recipes over to use `rattler-build` instead. Contributes to rapidsai/build-planning#47 Contributes to rapidsai/build-planning#84 - To satisfy `rattler-build`, this changes all the licenses in the `pyproject.toml` files to the SPDX-compliant `Apache-2.0` instead of `Apache 2.0` Authors: - Gil Forsyth (https://github.com/gforsyth) Approvers: - James Lamb (https://github.com/jameslamb) URL: rapidsai#121
1 parent a624dfb commit 9f6e317

File tree

5 files changed

+67
-63
lines changed

5 files changed

+67
-63
lines changed

ci/build_python.sh

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,32 @@
33

44
set -euo pipefail
55

6-
rapids-configure-conda-channels
7-
86
source rapids-date-string
97

108
rapids-print-env
119

12-
rapids-generate-version > ./VERSION
13-
14-
rapids-logger "Begin py build"
15-
16-
# TODO: Remove `--no-test` flags once importing on a CPU
17-
# node works correctly
18-
1910
# NOTE: nothing in nx-cugraph is CUDA-specific, but it is built on each CUDA
2011
# platform to ensure it is included in each set of artifacts, since test
2112
# scripts only install from one set of artifacts based on the CUDA version used
2213
# for the test run.
23-
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry build \
24-
--no-test \
25-
conda/recipes/nx-cugraph
14+
#
15+
rapids-generate-version > ./VERSION
16+
17+
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION)
18+
export RAPIDS_PACKAGE_VERSION
19+
20+
# populates `RATTLER_CHANNELS` array and `RATTLER_ARGS` array
21+
source rapids-rattler-channel-string
22+
23+
rapids-logger "Building nx-cugraph"
24+
25+
# TODO: Remove `--test skip` flag once importing on a CPU works
26+
# --no-build-id allows for caching with `sccache`
27+
# more info is available at
28+
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
29+
rattler-build build --recipe conda/recipes/nx-cugraph \
30+
--test skip \
31+
"${RATTLER_ARGS[@]}" \
32+
"${RATTLER_CHANNELS[@]}"
2633

2734
rapids-upload-conda-to-s3 python

conda/recipes/nx-cugraph/build.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

conda/recipes/nx-cugraph/meta.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
# Copyright (c) 2025, NVIDIA CORPORATION.
3+
schema_version: 1
4+
5+
context:
6+
version: ${{ env.get("RAPIDS_PACKAGE_VERSION") }}
7+
minor_version: ${{ (version | split("."))[:2] | join(".") }}
8+
date_string: '${{ env.get("RAPIDS_DATE_STRING") }}'
9+
py_version: ${{ env.get("RAPIDS_PY_VERSION") }}
10+
py_buildstring: ${{ py_version | version_to_buildstring }}
11+
head_rev: ${{ git.head_rev(".")[:8] }}
12+
13+
package:
14+
name: nx-cugraph
15+
version: ${{ version }}
16+
17+
source:
18+
path: ../../..
19+
20+
build:
21+
string: py${{ py_buildstring }}_${{ date_string }}_${{ head_rev }}
22+
script:
23+
content: |
24+
./build.sh nx-cugraph
25+
26+
requirements:
27+
host:
28+
- pip
29+
- python =${{ py_version }}
30+
- rapids-build-backend >=0.3.0,<0.4.0.dev0
31+
- setuptools
32+
run:
33+
- cupy >=12.0.0
34+
- networkx >=3.2
35+
- pylibcugraph =${{ minor_version }}
36+
- python
37+
38+
tests:
39+
- python:
40+
imports:
41+
- nx_cugraph
42+
pip_check: false
43+
44+
about:
45+
homepage: ${{ load_from_file("pyproject.toml").project.urls.Homepage }}
46+
license: ${{ load_from_file("pyproject.toml").project.license.text }}
47+
summary: ${{ load_from_file("pyproject.toml").project.description }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ readme = { file = "README.md", content-type = "text/markdown" }
1717
authors = [
1818
{ name = "NVIDIA Corporation" },
1919
]
20-
license = { text = "Apache 2.0" }
20+
license = { text = "Apache-2.0" }
2121
requires-python = ">=3.10"
2222
classifiers = [
2323
"Development Status :: 4 - Beta",

0 commit comments

Comments
 (0)