Skip to content

Commit 4fb4ea3

Browse files
committed
Pin sphinx-gp-llms to the fork that fixes the .md twin links
sphinx-gp-llms links a `.md` twin beside every generated page, including genindex and py-modindex, which have no twin. That is four dead links in every assembled libtmux.org build, and the last four the site had. The fix is on the private fork's fix/md-twin-link-on-generated-pages. Upstream gp-sphinx is public and takes no push from here, so the fork is where it lives until a release carries it. Three things this needed, none obvious: - Only sphinx-gp-llms is redirected, not the gp-sphinx meta-package. Pinning the whole thing makes uv resolve its siblings from the fork too, and they are published on PyPI at a version the fork does not carry. - It has to be declared as a direct dependency. It arrives transitively through gp-sphinx, and [tool.uv.sources] only redirects direct ones. - gp-sphinx==0.1.0a37 pins sphinx-gp-llms==0.1.0a37 while the fork carries 0.1.0a38 — the fix plus its own bump — so the constraint is overridden. That is narrower than rewriting the fork's version to match a release it is ahead of. Pinned in this worktree only. docs-site is what libtmux.org's assembly reads; PyPI is what everyone else gets and this does not change it. Verified by deleting .venv and re-syncing: 0.1.0a38 from git, fix present. The previous state was a hand-patched site-packages that any uv sync would have silently reverted. Assembled site: 1872 pages, 403476 links checked, 0 broken.
1 parent 1adeece commit 4fb4ea3

2 files changed

Lines changed: 39 additions & 6 deletions

File tree

pyproject.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ Changes = "https://github.com/tmux-python/libtmux/blob/master/CHANGES"
5353
dev = [
5454
# Docs (via gp-sphinx)
5555
"gp-sphinx==0.1.0a37",
56+
# Declared directly so [tool.uv.sources] can redirect it; it would
57+
# otherwise arrive transitively through gp-sphinx, where a source override
58+
# does not reach.
59+
"sphinx-gp-llms",
5660
"sphinx-autodoc-api-style==0.1.0a37",
5761
"sphinx-autodoc-pytest-fixtures==0.1.0a37",
5862
"sphinx-autobuild",
@@ -76,6 +80,7 @@ dev = [
7680

7781
docs = [
7882
"gp-sphinx==0.1.0a37",
83+
"sphinx-gp-llms",
7984
"sphinx-autodoc-api-style==0.1.0a37",
8085
"sphinx-autodoc-pytest-fixtures==0.1.0a37",
8186
"sphinx-autobuild",
@@ -288,3 +293,28 @@ testpaths = [
288293
markers = [
289294
"integration: sphinx integration tests (require full sphinx build)",
290295
]
296+
297+
[tool.uv.sources]
298+
# sphinx-gp-llms from the private fork, for the one fix libtmux.org needs.
299+
#
300+
# sphinx-gp-llms links a `.md` twin beside every page, including `genindex`
301+
# and `py-modindex`, which have no twin — four dead links in the assembled
302+
# site with nothing upstream to point at yet. The fix is on
303+
# `fix/md-twin-link-on-generated-pages`; upstream is public and takes no
304+
# push from here, so it lives on the private fork until a release carries it.
305+
#
306+
# Only this one sub-package is redirected, not the `gp-sphinx` meta-package:
307+
# pinning the whole thing makes uv resolve its siblings from the fork too, and
308+
# they are published on PyPI at a pinned version the fork does not carry.
309+
#
310+
# Pinned in this worktree only. `docs-site` is what libtmux.org's assembly
311+
# reads; the published package on PyPI is what everyone else gets, and this
312+
# does not change that.
313+
sphinx-gp-llms = { git = "ssh://git@github.com/tony/gp-sphinx.git", branch = "fix/md-twin-link-on-generated-pages", subdirectory = "packages/sphinx-gp-llms" }
314+
315+
[tool.uv]
316+
# `gp-sphinx==0.1.0a37` pins `sphinx-gp-llms==0.1.0a37`, and the fork carries
317+
# 0.1.0a38 — the fix plus its own version bump. Overriding the constraint is
318+
# narrower than rewriting the fork's version to match a release it is ahead
319+
# of, and it is the only pin standing between this build and four dead links.
320+
override-dependencies = ["sphinx-gp-llms"]

uv.lock

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)