Skip to content

Commit 9ae0785

Browse files
authored
chore(python): use python 3.10 for docs build (#1989)
* chore(python): fix docs build * upgrade python 3.9; add python 3.10 * remove python 3.9; use python 3.10 for docs build * address review feedback * clarify comment
1 parent 0142f35 commit 9ae0785

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

synthtool/gcp/templates/python_library/.kokoro/docker/docs/Dockerfile

+11-8
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"]

synthtool/gcp/templates/python_library/noxfile.py.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def cover(session):
355355
session.run("coverage", "erase")
356356

357357

358-
@nox.session(python="3.9")
358+
@nox.session(python="3.10")
359359
def docs(session):
360360
"""Build the docs for this library."""
361361

0 commit comments

Comments
 (0)