Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid compiling Python when building documentation #2263

Closed
wants to merge 2 commits into from

Conversation

humitos
Copy link

@humitos humitos commented Jul 6, 2023

Each time the documentation is built, the Python version is compiled, which takes several minutes.

I recommend you to avoid compiling that particular PATCH Python version and stick with the 3.9 provided by Read the Docs (that's already compiled).

The current Python 3.9 version exposed by Read the Docs is 3.9.17

This will make your builds fast and reduce the CPU usage on Read the Docs as well.

Each time the documentation is built, the Python version is compiled, which takes several minutes.

I recommend you to avoid compiling that particular PATCH Python version and stick with the 3.9 provided by Read the Docs (that's already compiled).

The current Python 3.9 version exposed by Read the Docs is `3.9.17`

This will make your builds fast and reduce the CPU usage on Read the Docs as well.
@sobolevn
Copy link
Member

sobolevn commented Jul 6, 2023

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

It must match the version we have in pyproject.toml

@humitos humitos requested a review from sobolevn July 6, 2023 12:34
@@ -17,9 +17,6 @@ build:
jobs:
# See https://github.com/readthedocs/readthedocs.org/issues/4912
pre_create_environment:
# Select Python version (keep in sync with other versions):
Copy link
Member

Choose a reason for hiding this comment

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

Please, don't remove these lines. Because soon it will be updated and RTD will start to fail.

@sobolevn
Copy link
Member

Closing, since this is now outdated.

@sobolevn sobolevn closed this Jun 11, 2024
@humitos
Copy link
Author

humitos commented Jun 11, 2024

Note that you still have this problem. You are compiling Python 3.11.9 now, and it takes 205 seconds.

@sobolevn
Copy link
Member

I don't think that there's any other way :(
But, I need the exact same patch release. It can be done via: docker (unsupported), pre-existing image (unsupported), asdf / pyenv / etc. But, it will compile CPython from source.

@humitos
Copy link
Author

humitos commented Jun 11, 2024

I need the exact same patch release.

Why do you need the exact same patch release of Python? The minor version should be more than enough to build the documentation. Patch versions usually fixes small bugs that should not affect your use case.

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.

None yet

2 participants