Skip to content

Add python module entrypoint#116

Open
hannibal-lee wants to merge 1 commit into
Andyyyy64:mainfrom
hannibal-lee:add-python-module-entrypoint
Open

Add python module entrypoint#116
hannibal-lee wants to merge 1 commit into
Andyyyy64:mainfrom
hannibal-lee:add-python-module-entrypoint

Conversation

@hannibal-lee

Copy link
Copy Markdown

What

Adds a python -m whichllm module entrypoint and documents it as a fallback command for environments where the generated uvx launcher fails before whichllm starts.

Why

On older macOS versions, uvx whichllm@latest can fail before invoking whichllm because the generated launcher depends on realpath, which may not be available:

realpath: command not found
/Users/.../python: No such file or directory

This PR does not change the existing whichllm console script. It adds a portable fallback:

uvx --from whichllm python -m whichllm

## Testing

- [ ] Tests pass (pytest)
- [x] New tests added
- [ ] Tested on real hardware (if hardware-related)

Verified locally with:

PYTHONPATH=/Users/hannibal/whichllm/src /Users/hannibal/.cache/uv/archive-v0/b_ZZfBOyPpAdyWVq/bin/python -m whichllm --version

Output:

0.5.10

Full uv run pytest was blocked locally by network/TLS download failures while installing dependencies.

## Notes

This is a workaround for old launcher environments, not a replacement for fixing launcher generation in uv itself.

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