Skip to content

chore(python): use python 3.10 for docs build#1989

Merged
parthea merged 5 commits intomasterfrom
fix-docs-build-dockerfile
Jul 8, 2024
Merged

chore(python): use python 3.10 for docs build#1989
parthea merged 5 commits intomasterfrom
fix-docs-build-dockerfile

Conversation

@parthea
Copy link
Copy Markdown
Contributor

@parthea parthea commented Jul 8, 2024

This PR fixes the issue E: Package 'python3-distutils' has no installation candidate which can be seen in this build log from PR googleapis/python-pubsub#1220.

This PR also updates the default python version to be 3.10 for the docs session to match what we use for docfx.

@nox.session(python="3.9")
def docs(session):

@nox.session(python="3.10")
def docfx(session):

I tested that this build successfully by running docker build -t test_docs . in the directory synthtool/gcp/templates/python_library/.kokoro/docker/docs/

I then ran the following nox sessions docs and docfx.

Note: The both the docs and docfx session now require Python 3.10.

docker run --rm -it --entrypoint /bin/bash test_docs

Then in the docker image, run the following commands

git clone https://github.com/googleapis/python-pubsub.git
cd python-pubsub
nox -s docs
nox -s docfx

@parthea parthea requested a review from a team as a code owner July 8, 2024 17:50

# Use python 3.9 by default
###################### Use python 3.9 by default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm this line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 667ffd1

@parthea parthea changed the title chore(python): fix docs build chore(python): use python 3.10 for docs build Jul 8, 2024
@parthea parthea merged commit 9ae0785 into master Jul 8, 2024
@parthea parthea deleted the fix-docs-build-dockerfile branch July 8, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants