Repository navigation
d2-bin: find the binary in any install layout (0.9.0.post1) - #17
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
uv run --with 'd2-python[bin]' script.pyfailed 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, withuv run --with, withuvx, and withpip install --target.The wheel version becomes
0.9.0.post1. The binary inside is still the official D2 v0.9.0. Thebinextra (d2-bin==0.9.*) already includes the post release.Checked locally: with a built macOS wheel, the binary is found in a
uv run --withoverlay, a normal venv, anduvx. 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