-
-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Docs makefile/RTD: Use uv if installed #120711
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome @hugovk. This pattern would be worth sharing more broadly with the science community.
🚢
Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @hugovk, I could not cleanly backport this to
|
(cherry picked from commit bc37ac7) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
GH-120922 is a backport of this pull request to the 3.13 branch. |
GH-120923 is a backport of this pull request to the 3.12 branch. |
(cherry picked from commit bc37ac7) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Like python/devguide#1320 and python/peps#3791.
Using uv to install dependencies is quicker than pip.
Locally, running
make -C Doc clean-venv; time make -C Doc venv
with no cache goes from 8.9s -> 2.4s:make -C Doc venv 4.81s user 1.52s system 71% cpu 8.896 total
make -C Doc venv 0.91s user 1.00s system 81% cpu 2.345 total
And with a warm cache goes from 5.03s -> 0.08s:
make -C Doc venv 3.47s user 0.82s system 85% cpu 5.033 total
make -C Doc venv 0.02s user 0.07s system 109% cpu 0.080 total
On Read the Docs, it adds 2 seconds to install uv, and then cuts the docs build time from 199s -> 190s, about 7s reduction in all.
RTD+uv docs: https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv
📚 Documentation preview 📚: https://cpython-previews--120711.org.readthedocs.build/