From c8d91ca594412fdc9f34750588d185fd91fdbe3c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 6 May 2024 13:36:38 -0700 Subject: [PATCH] fix conda deps, try to fix readthedocs builds --- .readthedocs.yml | 3 +++ ci/build_docs_pre_install.sh | 23 +++++++++++++++++++++++ conda/recipes/ucx-py/meta.yaml | 3 ++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 ci/build_docs_pre_install.sh diff --git a/.readthedocs.yml b/.readthedocs.yml index 937f721d..3f466e74 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,6 +4,9 @@ build: os: "ubuntu-22.04" tools: python: "mambaforge-22.9" + jobs: + pre_install: + - bash ci/build_docs_pre_install.sh python: install: diff --git a/ci/build_docs_pre_install.sh b/ci/build_docs_pre_install.sh new file mode 100755 index 00000000..83f1187b --- /dev/null +++ b/ci/build_docs_pre_install.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright (c) 2024 NVIDIA CORPORATION. +# +# [description] +# +# ucx-py's docs builds require installing the library. +# +# It does that by running 'pip install .' from the root of the repo. This script +# is used to modify readthedocs' local checkout of this project's source code prior +# to that 'pip install' being run. +# +# For more, see https://docs.readthedocs.io/en/stable/build-customization.html +# +# NOTE: This can go away if/when this project is cut over to rapids-build-backend. +# See https://github.com/rapidsai/build-planning/issues/31 +# + +set -euo pipefail + +# just remove libucx dependency from pyproject.toml... it's not necessary for docs builds, +# and it's unsuffixed (e.g. no `-cu12`) in source control +cat ./pyproject.toml | grep -v '"libucx' > pyproject.bak +mv ./pyproject.bak ./pyproject.toml diff --git a/conda/recipes/ucx-py/meta.yaml b/conda/recipes/ucx-py/meta.yaml index f7350457..2ce70958 100644 --- a/conda/recipes/ucx-py/meta.yaml +++ b/conda/recipes/ucx-py/meta.yaml @@ -30,7 +30,8 @@ requirements: - python - pip - ucx - {% for r in data.get("build-system", {}).get("requires", []) %} + # 'libucx' wheel dependency is unnecessary... the 'ucx' conda-forge package is used here instead + {% for r in data.get("build-system", {}).get("requires", []) if not r.startswith("libucx") %} - {{ r }} {% endfor %} run: