fix: pip install all modules (no -e), remove PYTHONPATH from start.sh
This commit is contained in:
parent
dd8a1c3d3e
commit
62662f0477
9
build.sh
9
build.sh
@ -97,11 +97,17 @@ green " OK"
|
||||
blue "[4/10] 安装模块..."
|
||||
MODULES=(apppublic sqlor ahserver appbase rbac
|
||||
pcpool pcc storage_mgr image_mgr)
|
||||
|
||||
_pip_failed=0
|
||||
for m in "${MODULES[@]}"; do
|
||||
mp="${PKGDIR}/${m}"
|
||||
[ -f "${mp}/setup.py" ] || [ -f "${mp}/setup.cfg" ] || [ -f "${mp}/pyproject.toml" ] || continue
|
||||
"${PIP}" install -e "${mp}" -q 2>&1 | tail -1
|
||||
echo " pip install ${m}..."
|
||||
"${PIP}" install "${mp}" -q 2>&1 && echo " OK" || { red " FAILED: ${m}"; _pip_failed=1; }
|
||||
done
|
||||
if [ $_pip_failed -eq 1 ]; then
|
||||
red " Some modules failed to install"
|
||||
fi
|
||||
green " OK"
|
||||
|
||||
# ============================================================
|
||||
@ -229,7 +235,6 @@ cat > "${CDIR}/start.sh" <<SHEOF
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
cd "${CDIR}"
|
||||
export PYTHONPATH="${PKGDIR}/ahserver:${PKGDIR}/apppublic:${PKGDIR}/sqlor:${PKGDIR}/appbase:${PKGDIR}/rbac:${PKGDIR}/bricks_for_python:\$PYTHONPATH"
|
||||
exec "${VENV}/bin/python" "${CDIR}/app/pccs.py"
|
||||
SHEOF
|
||||
chmod +x "${CDIR}/start.sh"
|
||||
|
||||
@ -38,8 +38,7 @@
|
||||
"indexes": ["index.ui", "index.html"],
|
||||
"statics": [
|
||||
["/bricks/", "/d/pccs/wwwroot/bricks/"],
|
||||
["/imgs/", "/d/pccs/wwwroot/imgs/"],
|
||||
["/", "/d/pccs/wwwroot/"]
|
||||
["/imgs/", "/d/pccs/wwwroot/imgs/"]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user