File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff 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) \
You can’t perform that action at this time.
0 commit comments