Skip to content

Commit 35a01cf

Browse files
ludochgae-java-bot
authored andcommitted
Upgrade Python version to 3.12 for Javadoc publishing.
PiperOrigin-RevId: 819781042 Change-Id: Id3a508ca4ef673d5b7520168a53b77985deee440
1 parent 31b4170 commit 35a01cf

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

kokoro/gcp_ubuntu/publish_javadoc.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ setup_docuploader() {
2222
curl -fsSL --retry 10 -o /tmp/jar1.jar https://github.com/googleapis/java-docfx-doclet/releases/download/1.9.0/docfx-doclet-1.9.0-jar-with-dependencies.jar
2323
# Update Python 3 and Maven
2424
sudo apt-get update
25-
sudo apt-get install -y python3 python3-pip python3-venv maven
25+
sudo apt-get install -y software-properties-common
26+
sudo add-apt-repository -y ppa:deadsnakes/ppa
27+
sudo apt-get update
28+
sudo apt-get install -y python3.12 python3.12-venv python3-pip maven
2629
# install docuploader package with upgrade to get latest correct versions.
2730
echo "Trying to install gcp-docuploader."
28-
python3 -m venv env
31+
python3.12 -m venv env
2932
source env/bin/activate
3033
cat > /tmp/requirements.txt << EOF
3134
#
@@ -285,7 +288,7 @@ urllib3==2.5.0 \
285288
--hash=sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc
286289
287290
EOF
288-
python3 -m pip install --require-hashes -r /tmp/requirements.txt
291+
python -m pip install --require-hashes -r /tmp/requirements.txt
289292
}
290293

291294
if [[ -z "${CREDENTIALS}" ]]; then
@@ -327,7 +330,7 @@ cd api
327330
pushd target/docfx-yml
328331

329332
# create metadata for Java11/17/25
330-
python3 -m docuploader create-metadata \
333+
python -m docuploader create-metadata \
331334
--name appengine-java-gen2-bundled-services \
332335
--version 2.0.0 \
333336
--stem /appengine/docs/standard/java-gen2/reference/services/bundled \
@@ -337,7 +340,7 @@ python3 -m docuploader create-metadata \
337340
echo "Done creating metadata."
338341

339342
# upload yml to production bucket
340-
python3 -m docuploader upload . \
343+
python -m docuploader upload . \
341344
--credentials ${CREDENTIALS} \
342345
--staging-bucket ${STAGING_BUCKET_V2} \
343346
--destination-prefix docfx

0 commit comments

Comments
 (0)