From 969ea3e924bac6a83be45a57d3275e762d86414d Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 31 Jul 2024 17:54:34 -0500 Subject: [PATCH] add setuptools to host requirements for conda packages that need it (#4582) @caryr35 pointed out to me this morning that `cugraph`'s nightly CI is failing. All `conda-python-build` jobs are failing like this, when building `nx-cugraph` > ModuleNotFoundError: No module named 'setuptools' > ... > ValueError: Could not import build backend specified in pyproject.toml's tool.rapids-build-backend table. Make sure you specified the right optional dependency in your build-system.requires entry for rapids-build-backend. ([build link](https://github.com/rapidsai/cugraph/actions/runs/10176436224/job/28166520972)) **suspected root cause:** `nx-cugraph` uses `setuptools.build_meta`, but `setuptools` isn't present in the conda build environment ## Notes for Reviewers ### Why is this targeting `branch-24.08`? Looks like CI is failing there too: https://github.com/rapidsai/cugraph/actions/runs/10183681336/job/28171285190 ### Why is this just breaking now? I suspect that prior to this we were getting `setuptools` because it was a transitive dependency of one of `nx-cugraph`'s other build/host dependencies. ### How could we prevent stuff like this in the future? We could add support for updating conda recipe files in `rapids-dependency-file-generator` (https://github.com/rapidsai/dependency-file-generator/issues/7). `setuptools` was correctly added as a build dependency in `pyproject.toml` files here (automatically, via `dependencies.yaml` + `rapids-dependency-file-generator`), but the conda recipe `meta.yaml` files were missed. Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Alex Barghi (https://github.com/alexbarghi-nv) - Bradley Dice (https://github.com/bdice) - Rick Ratzel (https://github.com/rlratzel) URL: https://github.com/rapidsai/cugraph/pull/4582 --- conda/recipes/cugraph-dgl/meta.yaml | 1 + conda/recipes/cugraph-equivariant/meta.yaml | 1 + conda/recipes/cugraph-pyg/meta.yaml | 2 +- conda/recipes/cugraph-service/meta.yaml | 3 ++- conda/recipes/nx-cugraph/meta.yaml | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/conda/recipes/cugraph-dgl/meta.yaml b/conda/recipes/cugraph-dgl/meta.yaml index 0affe456b73..d1cf6fcd9e9 100644 --- a/conda/recipes/cugraph-dgl/meta.yaml +++ b/conda/recipes/cugraph-dgl/meta.yaml @@ -22,6 +22,7 @@ requirements: host: - python - rapids-build-backend>=0.3.1,<0.4.0.dev0 + - setuptools>=61.0.0 run: - cugraph ={{ version }} - dgl >=1.1.0.cu* diff --git a/conda/recipes/cugraph-equivariant/meta.yaml b/conda/recipes/cugraph-equivariant/meta.yaml index 3b56c1d6b08..9dc9d51fa48 100644 --- a/conda/recipes/cugraph-equivariant/meta.yaml +++ b/conda/recipes/cugraph-equivariant/meta.yaml @@ -22,6 +22,7 @@ requirements: host: - python - rapids-build-backend>=0.3.1,<0.4.0.dev0 + - setuptools>=61.0.0 run: - pylibcugraphops ={{ minor_version }} - python diff --git a/conda/recipes/cugraph-pyg/meta.yaml b/conda/recipes/cugraph-pyg/meta.yaml index 9833a78d88b..2e1788ac0c6 100644 --- a/conda/recipes/cugraph-pyg/meta.yaml +++ b/conda/recipes/cugraph-pyg/meta.yaml @@ -24,8 +24,8 @@ requirements: host: - cython >=3.0.0 - python - - scikit-build-core >=0.7.0 - rapids-build-backend>=0.3.1,<0.4.0.dev0 + - setuptools>=61.0.0 run: - rapids-dask-dependency ={{ minor_version }} - numba >=0.57 diff --git a/conda/recipes/cugraph-service/meta.yaml b/conda/recipes/cugraph-service/meta.yaml index 225f40fe2ec..c1027582c78 100644 --- a/conda/recipes/cugraph-service/meta.yaml +++ b/conda/recipes/cugraph-service/meta.yaml @@ -30,6 +30,7 @@ outputs: - pip - python - rapids-build-backend>=0.3.1,<0.4.0.dev0 + - setuptools>=61.0.0 run: - python - thriftpy2 >=0.4.15,!=0.5.0,!=0.5.1 @@ -51,7 +52,7 @@ outputs: host: - pip - python - - setuptools + - setuptools>=61.0.0 - wheel - rapids-build-backend>=0.3.1,<0.4.0.dev0 run: diff --git a/conda/recipes/nx-cugraph/meta.yaml b/conda/recipes/nx-cugraph/meta.yaml index 3b2d6067f9d..d67287be757 100644 --- a/conda/recipes/nx-cugraph/meta.yaml +++ b/conda/recipes/nx-cugraph/meta.yaml @@ -22,6 +22,7 @@ requirements: host: - python - rapids-build-backend>=0.3.1,<0.4.0.dev0 + - setuptools>=61.0.0 run: - pylibcugraph ={{ version }} - networkx >=3.0