Skip to content

Commit

Permalink
Use script rather than environment variable to modify package names (#…
Browse files Browse the repository at this point in the history
…1212)

The package name defined in setup.py needs to be modified for wheels to reflect the CUDA version that the wheel was built for. Currently that modification is done via an environment variable that is pulled in setup.py code. This changeset replaces that approach with a direct modification using a script (similar to what is done for versions in #1190) to facilitate moving towards static project metadata specification via pyproject.toml.

This PR depends on rapidsai/shared-workflows#45.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Sevag H (https://github.com/sevagh)
  - Ashwin Srinath (https://github.com/shwina)

URL: #1212
  • Loading branch information
vyasr authored Feb 17, 2023
1 parent 0cdd0ba commit 0fd9626
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
package-name: rmm
package-dir: python
skbuild-configure-options: "-DRMM_BUILD_WHEELS=ON"
uses-versioneer: false
uses-setup-env-vars: false
wheel-publish:
needs: wheel-build
secrets: inherit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
package-dir: python
package-name: rmm
skbuild-configure-options: "-DRMM_BUILD_WHEELS=ON"
uses-versioneer: false
uses-setup-env-vars: false
wheel-tests:
needs: wheel-build
secrets: inherit
Expand Down
3 changes: 3 additions & 0 deletions ci/release/apply_wheel_modifications.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Usage: bash apply_wheel_modifications.sh <new_version>

VERSION=${1}
CUDA_SUFFIX=${2}

sed -i "s/__version__ = .*/__version__ = \"${VERSION}\"/g" python/rmm/__init__.py
sed -i "s/version=.*,/version=\"${VERSION}\",/g" python/setup.py

sed -i "s/name=\"rmm\",/name=\"rmm${CUDA_SUFFIX}\",/g" python/setup.py
4 changes: 1 addition & 3 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Copyright (c) 2019-2022, NVIDIA CORPORATION.

import os

from setuptools import find_packages
from skbuild import setup

setup(
name="rmm" + os.getenv("RAPIDS_PY_WHEEL_CUDA_SUFFIX", default=""),
name="rmm",
version="23.04.00",
description="rmm - RAPIDS Memory Manager",
url="https://github.com/rapidsai/rmm",
Expand Down

0 comments on commit 0fd9626

Please sign in to comment.