Skip to content

Enable sphinx-pyrepl-web :project: for autodoc REPL wheels#32

Merged
chrizzFTD merged 2 commits into
developfrom
cursor/sphinx-pyrepl-project-wheel-28f5
Jul 7, 2026
Merged

Enable sphinx-pyrepl-web :project: for autodoc REPL wheels#32
chrizzFTD merged 2 commits into
developfrom
cursor/sphinx-pyrepl-project-wheel-28f5

Conversation

@chrizzFTD

@chrizzFTD chrizzFTD commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Adopts the :project: sentinel from sphinx-pyrepl-web 0.4.0 so autodoc doctest REPLs on API pages install the in-tree naming wheel at doc-build time, rather than replaying without a package or pulling from PyPI.

Changes

  • docs/source/conf.py
    • pyrepl_autodoc_packages = ":project:" — extension builds/reuses naming-*.whl under _static/wheels/
    • html_static_path = ["_static"] — serves bootstrap scripts and built wheels
  • setup.cfg
    • sphinx-pyrepl-web>=0.4.0 (PyPI)
  • .gitignore
    • Ignore generated wheels and local docs/_build/ output

What this enables

API reference pages (Name, File, Pipe, PipeFile) emit REPLs with:

packages="_static/wheels/naming-0.7.1-py3-none-any.whl"

RTD and local builds document the branch under test without bespoke pip wheel scripts or RTD pre_build hooks.

Out of scope

  • Overview.rst manual .. py-repl:: blocks still use :packages: naming (PyPI). Consolidating or switching those is a follow-up.
  • No CI changes — REPL behavior is validated manually in the browser.
  • Doctest hygiene (e.g. PosixPath vs WindowsPath) — separate follow-up.

Verified

  • pip install -e ".[docs]" resolves sphinx-pyrepl-web 0.4.0 from PyPI
  • sphinx -b html docs/source docs/_build succeeds
  • Wheel created at docs/source/_static/wheels/naming-0.7.1-py3-none-any.whl
  • API pages include packages="_static/wheels/naming-0.7.1-py3-none-any.whl"

Manual verification

pip install -e ".[docs]"
python -m sphinx -b html docs/source docs/_build
python -m http.server --directory docs/_build

Open API pages and confirm REPLs load and replay doctests interactively.

Open in Web Open in Cursor 

Wire pyrepl_autodoc_packages = ':project:' so autodoc doctest REPLs
install the in-tree naming wheel at doc-build time instead of relying
on PyPI. Enable html_static_path for bootstrap scripts and built wheels.

Pin sphinx-pyrepl-web to the unreleased auto-project-wheel branch
(0.4.0) until the :project: sentinel is on PyPI. Ignore generated
wheel and local HTML build output.

Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Replace unreleased git branch pin now that :project: sentinel
shipped in sphinx-pyrepl-web 0.4.0 (PR #25).

Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
@chrizzFTD chrizzFTD marked this pull request as ready for review July 7, 2026 13:14
@chrizzFTD chrizzFTD merged commit 317bcee into develop Jul 7, 2026
4 checks passed
@chrizzFTD chrizzFTD deleted the cursor/sphinx-pyrepl-project-wheel-28f5 branch July 7, 2026 13:16
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.

2 participants