Skip to content

Commit 4eb8a48

Browse files
Internal change
PiperOrigin-RevId: 922850859
1 parent 76b61ae commit 4eb8a48

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

release/kokoro/release_linux.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33

44
build_file: "cel-python/release/kokoro/release_linux.sh"
55
timeout_mins: 120
6+
7+
container_properties {
8+
docker_image: "us-central1-docker.pkg.dev/kokoro-container-bakery/kokoro/ubuntu/ubuntu2204/full:current"
9+
docker_sibling_containers: true
10+
}

release/kokoro/release_linux.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
#!/bin/bash
22
set -e
33

4+
5+
# Avoid virtualenv/pip trying to download/upgrade tools from PyPI on host
6+
export VIRTUALENV_NO_DOWNLOAD=1
7+
export PIP_DISABLE_PIP_VERSION_CHECK=1
8+
9+
# Pass these environment variables to the cibuildwheel Docker container
10+
export CIBW_ENVIRONMENT="VIRTUALENV_NO_DOWNLOAD=1 PIP_DISABLE_PIP_VERSION_CHECK=1"
11+
export CIBW_DEPENDENCY_VERSIONS="latest"
12+
413
# If running locally (not on Kokoro), authenticate with gcloud.
514
if [ -z "${KOKORO_BUILD_ID}" ]; then
615
if ! gcloud auth application-default print-access-token --quiet > /dev/null; then
716
gcloud auth application-default login
817
fi
918
fi
1019

11-
pip install -U keyring keyrings.google-artifactregistry-auth twine cibuildwheel
20+
pip install --no-cache-dir -U keyring keyrings.google-artifactregistry-auth twine cibuildwheel
1221

1322
REPO_DIR=$(mktemp -d)
1423
echo "Created temporary directory: ${REPO_DIR}"
@@ -52,16 +61,24 @@ cp -r "${SRC_DIR}"/{*,.*} . 2>/dev/null || true
5261
cp -r "${SRC_DIR}"/release/* . 2>/dev/null || true
5362
rm -rf cel_expr_python/*_test.py
5463

64+
echo "Downloading bazelisk on host..."
65+
curl -LO https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64
66+
chmod +x bazelisk-linux-amd64
67+
5568
# Check if pyproject.toml exists before running sed
5669
if [ -f pyproject.toml ]; then
5770
sed -i "" "s/\$VERSION/${VERSION}/g" pyproject.toml || sed -i "s/\$VERSION/${VERSION}/g" pyproject.toml
5871
fi
5972

73+
export CIBW_CONTAINER_ENGINE_EXTRA_ARGS="--network=host"
74+
6075
echo "Running cibuildwheel: ${CIBWHEEL_BIN}"
6176
# Default CIBWHEEL_BIN if not set
6277
if [ -z "${CIBWHEEL_BIN}" ]; then
6378
CIBWHEEL_BIN="python3 -m cibuildwheel"
6479
fi
80+
81+
# Run cibuildwheel synchronously
6582
${CIBWHEEL_BIN} --platform linux --output-dir dist
6683

6784
if [ "${DRY_RUN}" = "true" ]; then

release/pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ where = ["."]
3838
exclude = ["codelab*", "conformance*", "custom_ext*", "release*", "testing*", "wheelhouse*"]
3939

4040
[tool.cibuildwheel]
41-
build = "cp311-* cp312-* cp313-* cp314-*"
41+
build = "cp311-*"
42+
#build = "cp311-* cp312-* cp313-* cp314-*"
4243
skip = "*musllinux* *win32*"
4344
test-command = "python {project}/cel_basic_test.py"
4445
build-verbosity = 1
4546

4647
[tool.cibuildwheel.linux]
47-
before-all = "echo 'Installing bazelisk'; curl -LO https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64 && chmod +x bazelisk-linux-amd64 && mv bazelisk-linux-amd64 /usr/local/bin/bazel"
48+
manylinux-x86_64-image = "manylinux_2_28"
49+
before-all = "git config --global http.sslVerify false && echo 'Installing bazelisk' && cp {project}/bazelisk-linux-amd64 /usr/local/bin/bazel"
4850

4951
[tool.cibuildwheel.macos]
5052
before-all = "echo 'Installing bazelisk'; brew install bazelisk"

0 commit comments

Comments
 (0)