Skip to content

Commit 8cc1efd

Browse files
chore: change Python env setup to allow execution of CICD
1 parent cf9decd commit 8cc1efd

1 file changed

Lines changed: 10 additions & 29 deletions

File tree

python-test/env-setup/setup_python_env.sh

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -87,41 +87,22 @@ ${PYEXE} -m pip install -r requirements.txt || error
8787

8888
echo "***** 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

9798
if [ -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
100101
else
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
125106
fi
126107

127108
deactivate

0 commit comments

Comments
 (0)