Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding uninstall option to build.sh #1075

Merged
merged 5 commits into from
Dec 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<to
docs - build the documentation
tests - build the tests
bench - build the benchmarks
uninstall - uninstall any files from a previous installation
robertmaynard marked this conversation as resolved.
Show resolved Hide resolved

and <flag> is:
-v - verbose build mode
Expand Down Expand Up @@ -288,8 +289,29 @@ if hasArg clean; then
fi
if hasArg uninstall; then
UNINSTALL=1

# If clean or uninstall targets given, run them prior to any other steps
if [[ "$INSTALL_PREFIX" != "" ]]; then
cjnolet marked this conversation as resolved.
Show resolved Hide resolved
rm -rf ${INSTALL_PREFIX}/include/raft
rm -rf ${INSTALL_PREFIX}/include/raft_runtime
rm -f ${INSTALL_PREFIX}/lib/libraft_distance.so
rm -f ${INSTALL_PREFIX}/lib/libraft_nn.so
rm -rf ${INSTALL_PREFIX}/lib/cmake/raft
fi
# This may be redundant given the above, but can also be used in case
# there are other installed files outside of the locations above.
if [ -e ${LIBRAFT_BUILD_DIR}/install_manifest.txt ]; then
xargs rm -f < ${LIBRAFT_BUILD_DIR}/install_manifest.txt > /dev/null 2>&1
cjnolet marked this conversation as resolved.
Show resolved Hide resolved
fi
# uninstall raft-dask and pylibraft installed from a prior "setup.py install"
# FIXME: if multiple versions of these packages are installed, this only
# removes the latest one and leaves the others installed. build.sh uninstall
# can be run multiple times to remove all of them, but that is not obvious.
pip uninstall -y raft-dask pylibraft
cjnolet marked this conversation as resolved.
Show resolved Hide resolved
fi



if [[ ${CMAKE_TARGET} == "" ]]; then
CMAKE_TARGET="all"
fi
Expand Down