Skip to content

Commit 3f84e1f

Browse files
committed
Remove symlink and patch the setup script dynamically to avoid warnings
1 parent 23af61f commit 3f84e1f

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/test_geos_integration.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,18 @@ jobs:
124124
echo "=== Test 1: Direct setupPythonEnvironment.bash execution ==="
125125
mkdir -p bin_direct
126126
127-
# Create symlinks in /usr/bin so the setup script can find them
128-
echo "=== Creating symlinks for setup script compatibility ==="
129-
ln -sf /usr/local/bin/preprocess_xml /usr/bin/preprocess_xml
130-
ln -sf /usr/local/bin/format_xml /usr/bin/format_xml
127+
# The setup script searches /usr/bin but pip installs to /usr/local/bin
128+
# We need to patch the setup script to also search /usr/local/bin
129+
echo "=== Patching setupPythonEnvironment.bash to search /usr/local/bin ==="
131130
132-
# Also create any other missing scripts that might be needed
133-
for script in convert_abaqus run_geos_ats setup_ats_environment geos_ats_log_check geos_ats_restart_check geos_ats_curve_check geos_ats_process_tests_fails mesh-doctor; do
134-
if [ -f "/usr/local/bin/$script" ]; then
135-
ln -sf "/usr/local/bin/$script" "/usr/bin/$script"
136-
echo "Created symlink for $script"
137-
fi
138-
done
131+
# Create a temporary modified version of the setup script
132+
TEMP_SETUP_SCRIPT="/tmp/setupPythonEnvironment_patched.bash"
133+
cp "$SETUP_PYTHON_ENVIRONMENT_SCRIPT" "$TEMP_SETUP_SCRIPT"
139134
140-
bash "$SETUP_PYTHON_ENVIRONMENT_SCRIPT" \
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"
137+
138+
bash "$TEMP_SETUP_SCRIPT" \
141139
-p $(which python3) \
142140
-b "$(pwd)/bin_direct" \
143141
--python-pkg-branch "$CURRENT_GEOSPYTHONPACKAGES_BRANCH_NAME" \

0 commit comments

Comments
 (0)