-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop using versioneer to manage versions (#1301)
This PR replaces usage of versioneer with hard-coded version numbers in setup.py and init.py. Since raft needs to manage versions across a wide range of file types (CMake, C++, Sphinx and doxygen docs, etc), versioneer cannot be relied on as a single source of truth and therefore does not allow us to single-source our versioning to the Git repo as is intended. Additionally, since the primary means of installing raft is via conda packages (or now, pip packages), information from the package manager tends to be far more informative than the version strings for troubleshooting and debugging purposes. Conversely, the nonstandard version strings that it produces tend to be problematic for other tools, which at best will ignore such versions but at worst will simply fail. This PR also replaces usage of an environment variable to set the package name for wheels in setup.py, instead moving the renaming logic into the same sed script used to update package versions. This change makes setup.py essentially static, paving the way for migration to pyproject.toml. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Corey J. Nolet (https://github.com/cjnolet) - Ben Frederickson (https://github.com/benfred) URL: #1301
- Loading branch information
Showing
18 changed files
with
55 additions
and
5,065 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
# | ||
# Usage: bash apply_wheel_modifications.sh <new_version> <cuda_suffix> | ||
|
||
VERSION=${1} | ||
CUDA_SUFFIX=${2} | ||
|
||
# __init__.py versions | ||
sed -i "s/__version__ = .*/__version__ = \"${VERSION}\"/g" python/pylibraft/pylibraft/__init__.py | ||
sed -i "s/__version__ = .*/__version__ = \"${VERSION}\"/g" python/raft-dask/raft_dask/__init__.py | ||
|
||
# setup.py versions | ||
sed -i "s/version=.*,/version=\"${VERSION}\",/g" python/pylibraft/pylibraft/__init__.py | ||
sed -i "s/version=.*,/version=\"${VERSION}\",/g" python/raft-dask/raft_dask/__init__.py | ||
|
||
# pylibraft setup.py cuda suffixes | ||
sed -i "s/name=\"pylibraft\"/name=\"pylibraft${CUDA_SUFFIX}\"/g" python/pylibraft/setup.py | ||
sed -i "s/rmm/rmm${CUDA_SUFFIX}/g" python/pylibraft/setup.py | ||
|
||
# raft-dask setup.py cuda suffixes | ||
sed -i "s/name=\"raft-dask\"/name=\"raft-dask${CUDA_SUFFIX}\"/g" python/raft-dask/setup.py | ||
sed -i "s/ucx-py/ucx-py${CUDA_SUFFIX}/g" python/raft-dask/setup.py | ||
sed -i "s/pylibraft/pylibraft${CUDA_SUFFIX}/g" python/raft-dask/setup.py | ||
|
||
# Dependency versions in pyproject.toml | ||
sed -i "s/rmm/rmm${CUDA_SUFFIX}/g" python/pylibraft/pyproject.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.