Simplify build steps to use --user install and avoid venv/ensurepip issues
All checks were successful
package-tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk python_version:3.13]) (push) Successful in 6s
package-tests / test-python-packages (map[name:aitbc-cli path:. python_version:3.13]) (push) Successful in 11s
package-tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core python_version:3.13]) (push) Successful in 7s
package-tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto python_version:3.13]) (push) Successful in 6s
package-tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk python_version:3.13]) (push) Successful in 10s
package-tests / test-javascript-packages (map[name:aitbc-sdk node_version:24 path:packages/js/aitbc-sdk]) (push) Successful in 8s
package-tests / cross-language-compatibility (push) Successful in 4s
security-scanning / audit (push) Successful in 10s
package-tests / package-integration-tests (push) Successful in 6s

This commit is contained in:
aitbc1
2026-03-28 13:08:18 +01:00
parent c9dc877cef
commit aa91504129

View File

@@ -597,10 +597,11 @@ jobs:
# For root-level packages (like aitbc-cli), use python build instead of poetry # For root-level packages (like aitbc-cli), use python build instead of poetry
if [[ "${{ matrix.package.path }}" == "." ]]; then if [[ "${{ matrix.package.path }}" == "." ]]; then
echo "Building root-level package with python -m build..." echo "Building root-level package with python -m build..."
python3 -m venv .build-venv python3 -m pip install --user build -q 2>/dev/null || pip3 install --user build -q 2>/dev/null || true
source .build-venv/bin/activate python3 -m build 2>/dev/null || {
python3 -m pip install build -q echo "⚠️ Build with python -m build failed, trying direct..."
python3 -m build pip3 install --user -e . 2>/dev/null || pip install --user -e . 2>/dev/null || true
}
elif [[ -f "pyproject.toml" ]]; then elif [[ -f "pyproject.toml" ]]; then
# Ensure Poetry is available # Ensure Poetry is available
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
@@ -609,12 +610,12 @@ jobs:
poetry build poetry build
elif [[ -f "setup.py" ]]; then elif [[ -f "setup.py" ]]; then
echo "No pyproject.toml found, using setup.py..." echo "No pyproject.toml found, using setup.py..."
# Create venv without pip first, then install pip manually # Use python -m build directly without venv to avoid ensurepip issues
python3 -m venv .build-venv --without-pip python3 -m pip install --user build setuptools wheel -q 2>/dev/null || pip3 install --user build setuptools wheel -q 2>/dev/null || true
curl -sSL https://bootstrap.pypa.io/get-pip.py | .build-venv/bin/python3 python3 -m build 2>/dev/null || {
source .build-venv/bin/activate echo "⚠️ python -m build failed, trying setup.py directly..."
pip install build setuptools wheel -q pip3 install --user -e . 2>/dev/null || pip install --user -e . 2>/dev/null || true
python3 -m build }
else else
echo "❌ No pyproject.toml or setup.py found" echo "❌ No pyproject.toml or setup.py found"
exit 1 exit 1