fix PyYAML version

This commit is contained in:
bilulib
2025-07-21 15:07:38 +02:00
parent 0f5571901f
commit 65211e7173

View File

@ -61,12 +61,13 @@ $STD mv "${EXTRACTED_DIR}/frontend" /opt/${APPLICATION}/
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
$STD uv venv /opt/${APPLICATION}/venv $STD uv venv /opt/${APPLICATION}/venv
# Install a compatible version of PyYAML first # Install compatible PyYAML first, then exclude it from requirements
$STD uv pip install --python /opt/${APPLICATION}/venv/bin/python "PyYAML>=6.0" $STD uv pip install --python /opt/${APPLICATION}/venv/bin/python "PyYAML>=6.0"
# Create a temporary requirements file excluding the incompatible PyYAML version # Create modified requirements file
temp_req_file=$(mktemp) temp_req_file=$(mktemp)
grep -v "^PyYAML" /opt/${APPLICATION}/backend/requirements.txt >"$temp_req_file" grep -v "^PyYAML" /opt/${APPLICATION}/backend/requirements.txt >"$temp_req_file"
echo "PyYAML>=6.0" >>"$temp_req_file"
$STD uv pip install --python /opt/${APPLICATION}/venv/bin/python -r "$temp_req_file" $STD uv pip install --python /opt/${APPLICATION}/venv/bin/python -r "$temp_req_file"
$STD uv pip install --python /opt/${APPLICATION}/venv/bin/python gunicorn $STD uv pip install --python /opt/${APPLICATION}/venv/bin/python gunicorn