astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
26.29k stars 765 forks source link

`uvx gimme-aws-creds` fails on Windows #6661

Open knowsuchagency opened 2 months ago

knowsuchagency commented 2 months ago

uvx seems to correctly identify the gimme-aws-creds executable but cannot invoke it.

This is with version 0.3.4, specifically on Windows

PS C:\Users\FOO> uvx gimme-aws-creds
Installed 45 packages in 2.42s
The executable `gimme-aws-creds` was not found.
warning: An executable named `gimme-aws-creds` is not provided by package `gimme-aws-creds`.
The following executables are provided by `gimme-aws-creds`:
- gimme-aws-creds
- gimme-aws-creds-autocomplete.sh
- gimme-aws-creds.cmd
zanieb commented 2 months ago

Interesting, thanks for the report! Seems like a classic weird Windows thing.

samypr100 commented 2 months ago

Hmmm, they don't define console_scripts entrypoints, just a script section which points to other scripts.

samypr100 commented 2 months ago

From https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#scripts

Although setup() supports a scripts keyword for pointing to pre-made scripts to install, the recommended approach to achieve cross-platform compatibility is to use Creating executable scripts entry points

Seems like using scripts doesn't work well from a cross-platform perspective, especially on Windows.

zanieb commented 2 months ago

Ah interesting. Thanks for the context. Does this work with pipx?

knowsuchagency commented 2 months ago

It works on Mac, but not Windows. That's actually true for both pipx and uvx