Skip to content

Commit

Permalink
Fixes options for --pydevelop to remove unneeded CWD path ("."), re…
Browse files Browse the repository at this point in the history
…stores use of `setup.py` temporarily for develop builds (#3747)

This PR adds the following:
* Removes the now unnecessary "." path used in the install options when `--pydevelop` is used, which resulted in an error when called.
* Temporarily adds a call to `setup.py bdist_ext --inplace` only when `--pydevelop` is used to workaround a [bug in scikit-build](scikit-build/scikit-build#981) when `setuptools>=64` is installed.

Authors:
  - Rick Ratzel (https://github.com/rlratzel)

Approvers:
  - Brad Rees (https://github.com/BradReesWork)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #3747
  • Loading branch information
rlratzel authored Jul 28, 2023
1 parent 9a60e51 commit f2b4912
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ if hasArg --cmake_default_generator; then
CMAKE_GENERATOR_OPTION=""
fi
if hasArg --pydevelop; then
PYTHON_ARGS_FOR_INSTALL="-m pip install --no-build-isolation --no-deps -e ."
PYTHON_ARGS_FOR_INSTALL="-m pip install --no-build-isolation --no-deps -e"
fi

# Append `-DFIND_RAFT_CPP=ON` to EXTRA_CMAKE_ARGS unless a user specified the option.
Expand Down Expand Up @@ -302,6 +302,22 @@ if buildAll || hasArg pylibcugraph; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/pylibcugraph
else
# FIXME: skbuild with setuptools>=64 has a bug when called from a "pip
# install -e" command, resulting in a broken editable wheel. Continue
# to use "setup.py bdist_ext --inplace" for a develop build until
# https://github.com/scikit-build/scikit-build/issues/981 is closed.
if hasArg --pydevelop; then
cd ${REPODIR}/python/pylibcugraph
python setup.py build_ext \
--inplace \
-- \
-DFIND_CUGRAPH_CPP=ON \
-DUSE_CUGRAPH_OPS=${BUILD_WITH_CUGRAPHOPS} \
-Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} \
-- \
-j${PARALLEL_LEVEL:-1}
cd -
fi
SKBUILD_CONFIGURE_OPTIONS="${SKBUILD_EXTRA_CMAKE_ARGS} -DUSE_CUGRAPH_OPS=${BUILD_WITH_CUGRAPHOPS}" \
SKBUILD_BUILD_OPTIONS="-j${PARALLEL_LEVEL}" \
python ${PYTHON_ARGS_FOR_INSTALL} ${REPODIR}/python/pylibcugraph
Expand All @@ -313,6 +329,22 @@ if buildAll || hasArg cugraph; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/cugraph
else
# FIXME: skbuild with setuptools>=64 has a bug when called from a "pip
# install -e" command, resulting in a broken editable wheel. Continue
# to use "setup.py bdist_ext --inplace" for a develop build until
# https://github.com/scikit-build/scikit-build/issues/981 is closed.
if hasArg --pydevelop; then
cd ${REPODIR}/python/cugraph
python setup.py build_ext \
--inplace \
-- \
-DFIND_CUGRAPH_CPP=ON \
-DUSE_CUGRAPH_OPS=${BUILD_WITH_CUGRAPHOPS} \
-Dcugraph_ROOT=${LIBCUGRAPH_BUILD_DIR} \
-- \
-j${PARALLEL_LEVEL:-1}
cd -
fi
SKBUILD_CONFIGURE_OPTIONS="${SKBUILD_EXTRA_CMAKE_ARGS} -DUSE_CUGRAPH_OPS=${BUILD_WITH_CUGRAPHOPS}" \
SKBUILD_BUILD_OPTIONS="-j${PARALLEL_LEVEL}" \
python ${PYTHON_ARGS_FOR_INSTALL} ${REPODIR}/python/cugraph
Expand Down

0 comments on commit f2b4912

Please sign in to comment.