Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run some scripts on Windows with uv tool run #8888

Open
depau opened this issue Nov 7, 2024 · 3 comments
Open

Can't run some scripts on Windows with uv tool run #8888

depau opened this issue Nov 7, 2024 · 3 comments
Labels
bug Something isn't working windows Specific to the Windows platform

Comments

@depau
Copy link

depau commented Nov 7, 2024

uv version: uv 0.4.30 (61ed2a236 2024-11-04)

awslocal on Windows doesn't seem to work properly with uv tool run --from awscli-local awslocal

The executable `awslocal` was not found.
warning: An executable named `awslocal` is not provided by package `awscli-local`.
The following executables are provided by `awscli-local`:
- awslocal
- awslocal.bat
Consider using `uv tool run --from awscli-local <EXECUTABLE_NAME>` instead.

The awslocal file is actually a script:

#!python.exe

"""
Thin wrapper around the "aws" command line interface (CLI) for use
with LocalStack.
...

while for other tools it looks like a .exe is installed, which seems to work with uv.

This is probably caused by the fact that they provide the entry scripts as a path to file, not as module:function.

Using the provided .bat file does work, but it requires providing a different executable name based on the current OS and it looks like python detaches from the terminal when run from a batch script.

I'm not sure whether this is a problem with awslocal or uv. I thought I'd report it here first since this usage of setuptools seems legit.

@charliermarsh
Copy link
Member

Thanks! Makes sense to report it here. We'll take a look.

@charliermarsh charliermarsh added bug Something isn't working windows Specific to the Windows platform labels Nov 9, 2024
@samypr100
Copy link
Collaborator

samypr100 commented Nov 9, 2024

I think this is expected/known to fail due to their use of legacy scripts rather than console_scripts.

Related:

@zanieb
Copy link
Member

zanieb commented Nov 11, 2024

I think we should probably special case them if it's feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Specific to the Windows platform
Projects
None yet
Development

No branches or pull requests

4 participants