Skip to content

Commit

Permalink
Fix build.sh clean command (#5730)
Browse files Browse the repository at this point in the history
The `build.sh clean` command is currently non-functional as it uses the previously removed `setup.py` file. This PR also extends the `clean` command to remove some other artifacts (`.benchmarks`, `.pytest_cache` dirs and `cpp/Doxyfile`.).

Authors:
  - Simon Adorf (https://github.com/csadorf)
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #5730
  • Loading branch information
csadorf authored Apr 12, 2024
1 parent d14d7e9 commit 8fa078b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ HELP="$0 [<target> ...] [<flag> ...]
CUML_EXTRA_CMAKE_ARGS - Extra arguments to pass directly to cmake. Values listed in environment
variable will override existing arguments. Example:
CUML_EXTRA_CMAKE_ARGS=\"-DBUILD_CUML_C_LIBRARY=OFF\" ./build.sh
CUML_EXTRA_PYTHON_ARGS - Extra argument to pass directly to python setup.py
CUML_EXTRA_PYTHON_ARGS - Extra arguments to pass directly to pip install
"
LIBCUML_BUILD_DIR=${LIBCUML_BUILD_DIR:=${REPODIR}/cpp/build}
CUML_BUILD_DIR=${REPODIR}/python/build
Expand Down Expand Up @@ -223,9 +223,14 @@ if (( ${CLEAN} == 1 )); then
fi
done

cd ${REPODIR}/python
python setup.py clean --all
cd ${REPODIR}
# Clean up python artifacts
find ${REPODIR}/python/ | grep -E "(__pycache__|\.pyc|\.pyo|\.so|\_skbuild)$" | xargs rm -rf

# Remove Doxyfile
rm -rf ${REPODIR}/cpp/Doxyfile

# Remove .benchmark dirs and .pytest_cache
find ${REPODIR}/ | grep -E "(\.pytest_cache|\.benchmarks)$" | xargs rm -rf
fi


Expand Down

0 comments on commit 8fa078b

Please sign in to comment.