try again setup codex
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 10s

This commit is contained in:
2026-03-06 22:37:10 +01:00
parent 47127234a4
commit f96315918e
2 changed files with 23 additions and 1 deletions

View File

@@ -81,8 +81,29 @@ else
echo "==> nDPI library already installed"
fi
patch_ndpi_python_metadata() {
local py_dir="$1"
local patched=0
if [ -f "$py_dir/pyproject.toml" ] && grep -q "PACK_ON" "$py_dir/pyproject.toml"; then
sed -i 's/PACK_ON/"0.0.0"/g' "$py_dir/pyproject.toml"
patched=1
fi
if [ -f "$py_dir/setup.cfg" ] && grep -q "PACK_ON" "$py_dir/setup.cfg"; then
sed -i 's/PACK_ON/0.0.0/g' "$py_dir/setup.cfg"
patched=1
fi
if [ -f "$py_dir/setup.py" ] && grep -q "PACK_ON" "$py_dir/setup.py"; then
sed -i "s/PACK_ON/'0.0.0'/g" "$py_dir/setup.py"
patched=1
fi
if [ "$patched" -eq 1 ]; then
echo "==> Applied PACK_ON metadata workaround for nDPI python bindings"
fi
}
if [ -d "/tmp/nDPI/python" ]; then
echo "==> Install nDPI Python bindings"
patch_ndpi_python_metadata "/tmp/nDPI/python"
# nDPI bindings currently fail with newer build backends on some hosts
# (e.g. metadata parsing errors such as "cannot parse PACK_ON").
pip install "setuptools<81" "packaging<25" wheel
@@ -250,6 +271,7 @@ npm run build
cd $BACKEND_DIR
source venv/bin/activate
if [ -d "/tmp/nDPI/python" ]; then
patch_ndpi_python_metadata "/tmp/nDPI/python"
pip install "setuptools<81" "packaging<25" wheel
if ! pip install --no-build-isolation /tmp/nDPI/python; then
echo "WARNING: nDPI Python bindings install failed during runner build"