Skip to content

Commit 04ffc2a

Browse files
committed
Try to find scripts
1 parent 3f84e1f commit 04ffc2a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/test_geos_integration.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,18 @@ jobs:
124124
echo "=== Test 1: Direct setupPythonEnvironment.bash execution ==="
125125
mkdir -p bin_direct
126126
127-
# The setup script searches /usr/bin but pip installs to /usr/local/bin
127+
# The setup script searches specific paths but pip installs to /usr/local/bin
128128
# We need to patch the setup script to also search /usr/local/bin
129129
echo "=== Patching setupPythonEnvironment.bash to search /usr/local/bin ==="
130130
131131
# Create a temporary modified version of the setup script
132132
TEMP_SETUP_SCRIPT="/tmp/setupPythonEnvironment_patched.bash"
133133
cp "$SETUP_PYTHON_ENVIRONMENT_SCRIPT" "$TEMP_SETUP_SCRIPT"
134134
135-
# Add /usr/local/bin to the search paths (after /usr/bin but before ~/.local/bin)
136-
sed -i 's|for ff in /usr/bin/\$f |for ff in /usr/bin/\$f /usr/local/bin/\$f |g' "$TEMP_SETUP_SCRIPT"
135+
# Add /usr/local/bin to the MOD_SEARCH_PATH array right after the python bin directory
136+
# The original line looks like: declare -a MOD_SEARCH_PATH=("$(dirname $PYTHON_TARGET)"
137+
# We insert /usr/local/bin as the second entry
138+
sed -i '/^declare -a MOD_SEARCH_PATH=.*PYTHON_TARGET)"/a\ "/usr/local/bin"' "$TEMP_SETUP_SCRIPT"
137139
138140
bash "$TEMP_SETUP_SCRIPT" \
139141
-p $(which python3) \

0 commit comments

Comments
 (0)