Skip to content

Commit 5235e5e

Browse files
committed
isolate packages in venv
1 parent 2f3fac3 commit 5235e5e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cloudbuild.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,18 @@ steps:
2727
- |
2828
set -e
2929
apt-get update -qq
30-
apt-get install -y python3 python3-pip python-is-python3 curl
30+
apt-get install -y python3 python3-venv curl
3131
3232
# Install Node.js 20
3333
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
3434
apt-get install -y nodejs
3535
36+
# Create a venv so pip install/upgrade works cleanly on Ubuntu 24.04.
37+
python3 -m venv /workspace/venv
38+
source /workspace/venv/bin/activate
39+
3640
# Generate chapters, run tests (installs Python/Node deps, starts server)
37-
# PIP_BREAK_SYSTEM_PACKAGES=1 is required on Ubuntu 24.04 (PEP 668) since
38-
# we're intentionally installing into the system Python in a throwaway container.
39-
PIP_BREAK_SYSTEM_PACKAGES=1 ./tools/scripts/run_and_test_website.sh
41+
./tools/scripts/run_and_test_website.sh
4042
4143
# Enable Ubuntu universe repository (required for fonts and pdftk)
4244
apt-get install -y software-properties-common

0 commit comments

Comments
 (0)