Skip to content

Commit 0489190

Browse files
authored
Merge pull request #198 from awslabs/fix/semantic-release-build
fix(ci): add --no-isolation to python -m build to fix semantic release
2 parents ca89e3e + 1359fd3 commit 0489190

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

dev-tools/package/build.sh

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,13 @@ if [ "$QUIET" = false ]; then
2929
fi
3030
rm -rf dist/ build/ -- *.egg-info/
3131

32-
# Install build dependencies if needed
32+
# Verify build dependencies are present (declared in pyproject.toml dev deps)
3333
if [ "$QUIET" = false ]; then
3434
echo "INFO: Checking build dependencies..."
3535
fi
3636
if ! $RUN_TOOL python -c "import build" 2>/dev/null; then
37-
if [ "$QUIET" = false ]; then
38-
echo "INFO: Installing build dependencies..."
39-
fi
40-
if command -v uv >/dev/null 2>&1; then
41-
if [ "$QUIET" = true ]; then
42-
$RUN_TOOL uv add --dev build >/dev/null 2>&1
43-
else
44-
$RUN_TOOL uv add --dev build
45-
fi
46-
else
47-
if [ "$QUIET" = true ]; then
48-
$RUN_TOOL pip install build >/dev/null 2>&1
49-
else
50-
$RUN_TOOL pip install build
51-
fi
52-
fi
37+
echo "ERROR: 'build' package not found. Ensure 'uv sync --all-extras' has been run." >&2
38+
exit 1
5339
fi
5440

5541
# Build package
@@ -61,17 +47,17 @@ if [ "$QUIET" = true ]; then
6147
# Suppress all output in quiet mode
6248
if [ -n "$BUILD_ARGS" ]; then
6349
# shellcheck disable=SC2086
64-
$RUN_TOOL python -m build $BUILD_ARGS >/dev/null 2>&1
50+
$RUN_TOOL python -m build --no-isolation $BUILD_ARGS >/dev/null 2>&1
6551
else
66-
$RUN_TOOL python -m build >/dev/null 2>&1
52+
$RUN_TOOL python -m build --no-isolation >/dev/null 2>&1
6753
fi
6854
else
6955
# Normal output
7056
if [ -n "$BUILD_ARGS" ]; then
7157
# shellcheck disable=SC2086
72-
$RUN_TOOL python -m build $BUILD_ARGS 2>/dev/null
58+
$RUN_TOOL python -m build --no-isolation $BUILD_ARGS 2>/dev/null
7359
else
74-
$RUN_TOOL python -m build 2>/dev/null
60+
$RUN_TOOL python -m build --no-isolation 2>/dev/null
7561
fi
7662
fi
7763

0 commit comments

Comments
 (0)