Skip to content

Commit ea64e59

Browse files
gcf-owl-bot[bot]Linchinparthea
authored
chore(python): use python 3.10 for docs build (#793)
* chore(python): use python 3.10 for docs build Source-Link: googleapis/synthtool@9ae0785 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:52210e0e0559f5ea8c52be148b33504022e1faef4e95fbe4b32d68022af2fa7e * use python 3.10 for docs build --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Lingqing Gan <[email protected]> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 41f431f commit ea64e59

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:99ab465187b4891e878ee4f9977b4a6aeeb0ceadf404870c416c50e06500eb42
17-
# created: 2024-07-08T16:17:14.833595692Z
16+
digest: sha256:52210e0e0559f5ea8c52be148b33504022e1faef4e95fbe4b32d68022af2fa7e
17+
# created: 2024-07-08T19:25:35.862283192Z

.kokoro/docker/docs/Dockerfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ RUN apt-get update \
4040
libssl-dev \
4141
libsqlite3-dev \
4242
portaudio19-dev \
43-
python3-distutils \
4443
redis-server \
4544
software-properties-common \
4645
ssh \
@@ -60,18 +59,22 @@ RUN apt-get update \
6059
&& rm -rf /var/lib/apt/lists/* \
6160
&& rm -f /var/cache/apt/archives/*.deb
6261

63-
###################### Install python 3.9.13
6462

65-
# Download python 3.9.13
66-
RUN wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
63+
###################### Install python 3.10.14 for docs/docfx session
64+
65+
# Download python 3.10.14
66+
RUN wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz
6767

6868
# Extract files
69-
RUN tar -xvf Python-3.9.13.tgz
69+
RUN tar -xvf Python-3.10.14.tgz
7070

71-
# Install python 3.9.13
72-
RUN ./Python-3.9.13/configure --enable-optimizations
71+
# Install python 3.10.14
72+
RUN ./Python-3.10.14/configure --enable-optimizations
7373
RUN make altinstall
7474

75+
RUN python3.10 -m venv /venv
76+
ENV PATH /venv/bin:$PATH
77+
7578
###################### Install pip
7679
RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
7780
&& python3 /tmp/get-pip.py \
@@ -84,4 +87,4 @@ RUN python3 -m pip
8487
COPY requirements.txt /requirements.txt
8588
RUN python3 -m pip install --require-hashes -r requirements.txt
8689

87-
CMD ["python3.8"]
90+
CMD ["python3.10"]

noxfile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@
7878

7979
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
8080

81+
# Error if a python version is missing
82+
nox.options.error_on_missing_interpreters = True
83+
8184

8285
def _calculate_duration(func):
8386
"""This decorator prints the execution time for the decorated function."""
@@ -420,7 +423,7 @@ def cover(session):
420423
session.run("coverage", "erase")
421424

422425

423-
@nox.session(python="3.9")
426+
@nox.session(python="3.10")
424427
@_calculate_duration
425428
def docs(session):
426429
"""Build the docs for this library."""

0 commit comments

Comments
 (0)