@@ -87,41 +87,22 @@ ${PYEXE} -m pip install -r requirements.txt || error
8787
8888echo " ***** Get and Install Runtime"
8989
90-
9190# Set RUNE_RUNTIME_DIR to the local repository root for an editable install.
92- # Example: RUNE_RUNTIME_DIR="[PATH_TO_RUNE]/rune-python-runtime/FINOS/rune-python-runtime"
93- # If RUNE_RUNTIME_DIR is not specified or the directory does not exist, it will pull from the GitHub repo.
94- # TODO: remove this line when finished
95- RUNE_RUNTIME_DIR=" /Users/dls/projects/rune/rune-python-runtime/FINOS/rune-python-runtime"
91+ # Example: export RUNE_RUNTIME_DIR="[PATH_TO_RUNE]/rune-python-runtime/FINOS/rune-python-runtime"
92+ # If RUNE_RUNTIME_DIR is not specified or the directory does not exist, it will install from GitHub.
93+ # Set RUNE_RUNTIME_REF to control which branch/tag/commit is used (default: main).
94+ # Example: export RUNE_RUNTIME_REF="feature/function_support"
95+ # RUNE_RUNTIME_DIR="/Users/dls/projects/rune/rune-python-runtime/FINOS/rune-python-runtime"
96+ RUNE_RUNTIME_REF=" feature/function_support"
9697
9798if [ -n " $RUNE_RUNTIME_DIR " ] && [ -d " $RUNE_RUNTIME_DIR " ]; then
9899 echo " Installing runtime as editable from: $RUNE_RUNTIME_DIR "
99100 ${PYEXE} -m pip install -e " $RUNE_RUNTIME_DIR " || error
100101else
101- # --- Remote Repository Logic ---
102- echo " RUNE_RUNTIME_DIR not specified or not found. Pulling from GitHub repo..."
103- RUNTIMEURL=" https://api.github.com/repos/finos/rune-python-runtime/releases/latest"
104-
105- release_data=$( curl -s $RUNTIMEURL )
106- download_url=$( echo " $release_data " | grep ' "browser_download_url":' | head -n 1 | sed -E ' s/.*"([^"]+)".*/\1/' )
107-
108- if [ -z " $download_url " ] || [ " $download_url " == " null" ]; then
109- echo " Error: Could not determine download URL for the latest runtime release."
110- error
111- fi
112-
113- echo " Downloading latest runtime from: $download_url "
114- if command -v wget & > /dev/null; then
115- wget -q " $download_url "
116- elif command -v curl & > /dev/null; then
117- curl -sLO " $download_url "
118- else
119- echo " Neither wget nor curl is installed."
120- error
121- fi
122-
123- ${PYEXE} -m pip install rune_runtime* -py3-* .whl --force-reinstall || error
124- rm rune_runtime* -py3-* .whl
102+ RUNE_RUNTIME_REF=" ${RUNE_RUNTIME_REF:- main} "
103+ echo " Installing runtime from GitHub ref: $RUNE_RUNTIME_REF "
104+ ${PYEXE} -m pip install \
105+ " git+https://github.com/finos/rune-python-runtime.git@${RUNE_RUNTIME_REF} " || error
125106fi
126107
127108deactivate
0 commit comments