修改部署脚本

This commit is contained in:
Tian jianyong 2024-12-20 19:51:58 +08:00
parent 34bef02d2e
commit 0ef2235a66
2 changed files with 4 additions and 9 deletions

View File

@ -60,18 +60,13 @@ fi
# Install wheel files in correct order
log_info "Installing Python packages..."
cd "${PROJECT_ROOT}/python"
for pkg in MarkupSafe-2.0.1*.whl Jinja2-3.0.1*.whl \
click-8.0.1*.whl itsdangerous-2.0.1*.whl \
Werkzeug-2.0.1*.whl Flask-2.0.1*.whl; do
for pkg in *.whl; do
if [ ! -f "$pkg" ]; then
log_error "Required package not found: $pkg"
exit 1
fi
log_info "Installing $pkg..."
pip3 install --no-index --no-deps "$pkg" || {
log_error "Failed to install $pkg"
exit 1
}
pip3 install --no-index "$pkg"
done
# Verify Python packages

View File

@ -66,7 +66,8 @@ log_info "Enabling GCC 11..."
source /opt/rh/devtoolset-11/enable
# Download Python3 and dependencies
repotrack python3 python3-pip python3-devel
log_info "Downloading Python3 and dependencies..."
repotrack python3 python3-pip python3-devel python3-flask python3-werkzeug python3-jinja2
# Build the project
log_info "Building project..."
@ -127,7 +128,6 @@ cd "${DEPLOY_DIR}/python"
# 下载所有依赖包及其依赖
pip3 download \
--no-deps \
flask==2.0.1 werkzeug==2.0.1 click==8.0.1 \
itsdangerous==2.0.1 Jinja2==3.0.1 MarkupSafe==2.0.1