mirror of
https://github.com/smittix/intercept.git
synced 2026-05-24 08:44:48 -07:00
Fix flask-compress not installing into venv
The core pip install was suppressing errors with 2>/dev/null, and the verification check was finding packages in ~/.local/site-packages instead of the venv. When run with sudo, ~/.local isn't visible, causing the flask-compress warning. - Remove --quiet and stderr suppression from core package install - Use python -s flag in verification to ignore user site-packages - Update health check to also verify flask-compress and flask-wtf Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
11
setup.sh
11
setup.sh
@@ -530,11 +530,12 @@ install_python_deps() {
|
|||||||
progress "Installing Python dependencies"
|
progress "Installing Python dependencies"
|
||||||
|
|
||||||
info "Installing core packages..."
|
info "Installing core packages..."
|
||||||
$PIP install --quiet "flask>=3.0.0" "flask-wtf>=1.2.0" "flask-compress>=1.15" \
|
$PIP install "flask>=3.0.0" "flask-wtf>=1.2.0" "flask-compress>=1.15" \
|
||||||
"flask-limiter>=2.5.4" "requests>=2.28.0" \
|
"flask-limiter>=2.5.4" "requests>=2.28.0" \
|
||||||
"Werkzeug>=3.1.5" "pyserial>=3.5" 2>/dev/null || true
|
"Werkzeug>=3.1.5" "pyserial>=3.5" || true
|
||||||
|
|
||||||
$PY -c "import flask; import requests; from flask_limiter import Limiter; import flask_compress; import flask_wtf" 2>/dev/null || {
|
# Verify core packages are importable from the venv (not user site-packages)
|
||||||
|
$PY -s -c "import flask; import requests; from flask_limiter import Limiter; import flask_compress; import flask_wtf" 2>/dev/null || {
|
||||||
fail "Critical Python packages (flask, requests, flask-limiter, flask-compress, flask-wtf) not installed"
|
fail "Critical Python packages (flask, requests, flask-limiter, flask-compress, flask-wtf) not installed"
|
||||||
echo "Try: venv/bin/pip install flask requests flask-limiter flask-compress flask-wtf"
|
echo "Try: venv/bin/pip install flask requests flask-limiter flask-compress flask-wtf"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -2013,8 +2014,8 @@ do_health_check() {
|
|||||||
ok "Python venv exists"
|
ok "Python venv exists"
|
||||||
((pass++)) || true
|
((pass++)) || true
|
||||||
|
|
||||||
if venv/bin/python -c "import flask; import requests" 2>/dev/null; then
|
if venv/bin/python -s -c "import flask; import requests; import flask_compress; import flask_wtf" 2>/dev/null; then
|
||||||
ok "Critical Python packages (flask, requests) — OK"
|
ok "Critical Python packages (flask, requests, flask-compress, flask-wtf) — OK"
|
||||||
((pass++)) || true
|
((pass++)) || true
|
||||||
else
|
else
|
||||||
fail "Critical Python packages missing in venv"
|
fail "Critical Python packages missing in venv"
|
||||||
|
|||||||
Reference in New Issue
Block a user