Skip to content

chore: switch docs build to PyPI sphinx-pyrunblock instead of git+https - #221

Open
petercorke wants to merge 1 commit into
masterfrom
chore/sphinx-pyrunblock-pypi
Open

petercorke wants to merge 1 commit into
masterfrom
chore/sphinx-pyrunblock-pypi

Conversation

@petercorke

Copy link
Copy Markdown
Collaborator

Summary

sphinx-pyrunblock is Peter's own package (a hard fork of the original WhyNotHugo/sphinx-autorun, published properly to PyPI under this name). Today's CI installs it via pip install git+https://github.com/petercorke/sphinx-autorun.git -- an old, pre-rename URL that still works only because GitHub redirects renamed repos. This switches to installing the plain PyPI wheel instead.

  • Bumps pyproject.toml's docs extra from "sphinx-autorun" to "sphinx-pyrunblock" (the old entry was misleading in isolation -- without the workflow's follow-up git install, it would resolve to the unrelated upstream PyPI package of the same name, not Peter's fork).
  • Drops the now-redundant pip install git+... line from sphinx.yml, since pip install .[dev,docs] already installs the right package.
  • Updates conf.py's extensions list from sphinx_autorun to sphinx_pyrunblock to match.

No functional change

Both the old git URL and the new PyPI package resolve to the identical sphinx-pyrunblock==1.1.0 release today -- confirmed with a fresh, uncached pip install git+... and comparing installed package metadata. This is purely a speed/hygiene change.

Why

The PyPI install is consistently 2-4x faster in a clean venv (no git clone/VCS metadata resolution):

Method Run 1 Run 2
git+https://...sphinx-autorun.git 20.5s 10.6s
sphinx-pyrunblock (PyPI) 5.4s 7.1s

That's ~9-15s saved on every docs-build CI run (every push to master plus every PR).

Test plan

sphinx-pyrunblock is Peter's own package (published to PyPI, hard fork
of the original WhyNotHugo/sphinx-autorun), reachable at the same
content today via git+https://github.com/petercorke/sphinx-autorun.git
(an old, pre-rename URL that still redirects). Installing the PyPI
wheel directly is ~2-4x faster in CI (no git clone/VCS resolution) and
makes pyproject.toml's declared dependency honest -- previously
"sphinx-autorun" there would, in isolation, resolve to the unrelated
upstream PyPI package of that name rather than Peter's fork.

No functional change: both paths resolve to the same sphinx-pyrunblock
1.1.0 release. Verified with a real sphinx-build against a clean venv.
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.

1 participant