You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 35d86e4
Browse filesBrowse the repository at this point in the historyBrowse files
🐛 fix(run): discover entry points for inferred names (#1996)
`pipx run git+file:///tmp/src1` fails on the default uv backend with `An
executable named 'rat-demo' is not provided by package 'rat-demo'`,
while `pipx run --backend pip` on the same URL runs it, as
[#1994](#1994) reports. The same
guess breaks `pipx run pip_search` from
[#1189](#1189), where pipx normalizes
the typed name to `pip-search` and the installed script keeps its
underscore. Both failures start in pipx. It passes `uv tool run` a
script name the package never declared, and uv reports the name it could
not find. 🔍
pipx now passes `uv tool run` a script name only when the user typed
one. The three specs it has to infer from (a VCS URL, a local project
path, or a name it normalizes) go through the venv path, where pipx
installs the package first and reads the entry points it declares. A
lone script runs under its own name, `[pipx.run]` entry points work
again, and a package shipping several scripts gets pipx's own error
listing them. uv still creates and populates that venv, so the run gives
up uv's tool cache. Two more bugs sat behind that fallback and go away
with it: pipx rebuilt the cached venv on every run, because the cache
check looked for a script named after the package, and on Windows the
inferred name grew a second `.exe`, the original complaint in #1189. ✨
`pipx run black` and `pipx run ruff==0.5.0` still exec `uv tool run`
unchanged. The runs that move to the venv path pay a first-run install
in exchange for working at all, and `pipx run --spec <spec> <script>`
keeps them on uv's cache. Focus review on the routing predicate in
`run()`; it decides which spec shapes lose the uvx fast path.
0 commit comments