Skip to content

Commit b869d6a

Browse files
committed
Add --deps-only to install_requirements.sh
This is helpful when installing testing prebuilt executorch pip packages.
1 parent 4615d5a commit b869d6a

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

install_requirements.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ fi
2727

2828
# Parse options.
2929
EXECUTORCH_BUILD_PYBIND=OFF
30+
INSTALL_EXECUTORCH=1
3031
CMAKE_ARGS=""
3132

3233
for arg in "$@"; do
3334
case $arg in
35+
--deps-only)
36+
INSTALL_EXECUTORCH=0
37+
;;
3438
--pybind)
3539
EXECUTORCH_BUILD_PYBIND=ON
3640
;;
@@ -102,7 +106,10 @@ $PIP_EXECUTABLE install --extra-index-url "${TORCH_URL}" \
102106
#
103107
# Install executorch pip package. This also makes `flatc` available on the path.
104108
#
105-
106-
EXECUTORCH_BUILD_PYBIND="${EXECUTORCH_BUILD_PYBIND}" \
107-
CMAKE_ARGS="${CMAKE_ARGS}" \
108-
$PIP_EXECUTABLE install . --no-build-isolation -v
109+
if (( INSTALL_EXECUTORCH )); then
110+
EXECUTORCH_BUILD_PYBIND="${EXECUTORCH_BUILD_PYBIND}" \
111+
CMAKE_ARGS="${CMAKE_ARGS}" \
112+
$PIP_EXECUTABLE install . --no-build-isolation -v
113+
else
114+
echo "Not installing executorch because --deps-only is set"
115+
fi

0 commit comments

Comments
 (0)