Open konstin opened 3 months ago
I think build
implements this special entrypoint thing for pipx
exactly: https://github.com/pypa/build/blob/46337d95bcb6be84eb2b0416cff5bf51ba70d9c5/pyproject.toml#L84
Workaround:
uv tool run --with build --from build python -m build
One may also want to use uv
in the build
: (the command is pretty long!)
uv tool run --with build[uv] --from build python -m build --installer uv
Declaring custom entry points would be nice to support those projects didn't expose any entry point names and only allows to use them as module i.e python -m <mod>
.
I think this could be allowed in cli (which is support multiple use):
# make `cmd` available which runs `mod.__main__`
$ uvx --from pkg --with-script "cmd='mod.__main__'" cmd
Also, for build
it turns to:
$ uvx --from build --with-script "build='build.__main__:entrypoint'" build
You can already run uvx --from build pyproject-build
And in the next version, we'll surface that this executable is available, which seems good...
The package
build
doesn't install an entrypoint, you are supposed to call it aspythom -m build
instead.pipx run build .
whileuv tool run build .
fails. We should support whatever workaround pipx is using, too.