Skip to content

d2-bin: find the binary in any install layout (0.9.0.post1) - #17

Merged
h0rv merged 1 commit into
mainfrom
fix-d2-bin-lookup
Oct 23, 2026
Merged

h0rv merged 1 commit into
mainfrom
fix-d2-bin-lookup

Conversation

@h0rv

@h0rv h0rv commented Oct 23, 2026

Copy link
Copy Markdown
Owner

uv run --with 'd2-python[bin]' script.py failed with "d2 not found". In that mode, uv installs packages into a separate environment layered on top of the running Python. find_d2_bin() looked only in the running Python's script folders, so it missed the binary.

find_d2_bin() now reads the list of files that the d2-bin wheel installed, from the package metadata, and returns the binary's path. This works in a normal venv, with uv run --with, with uvx, and with pip install --target.

The wheel version becomes 0.9.0.post1. The binary inside is still the official D2 v0.9.0. The bin extra (d2-bin==0.9.*) already includes the post release.

Checked locally: with a built macOS wheel, the binary is found in a uv run --with overlay, a normal venv, and uvx. There is a new test, and ruff and ty are clean.

To publish after merging, push the tag d2-bin-v0.9.0.post1.

🤖 Generated with Claude Code

find_d2_bin looked only in the running Python's script folders, so it
missed the binary in overlay environments such as uv run --with. It now
reads the d2-bin distribution's file list, which works for any install
layout. The wheel version becomes 0.9.0.post1; the binary is still D2
v0.9.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@h0rv
h0rv merged commit b478d39 into main Oct 23, 2026
9 checks passed
@h0rv
h0rv deleted the fix-d2-bin-lookup branch October 23, 2026 15:36
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