pier icon indicating copy to clipboard operation
pier copied to clipboard

How to use pier with uv?

Open dhalucario opened this issue 1 year ago • 0 comments

I read online uv can run Python scripts and automatically install dependencies by using the following shebang line: #!/usr/bin/env -S uv run.

So I tried to create a small test script to see if it would work with pier, but it seems to get hang while running. My config looks as follows:

[scripts.fakename]
command = '''
#!/usr/bin/env -S uv run
# /// script
# requires-python = ">=3.11"
# dependencies = [
#     "faker"
# ]
# ///
from faker import Faker

print(Faker().name())
'''

[default]

Running pier --verbose fakename returns the following:

Starting script "fakename"
-------------------------

After that it just hangs, but still responds to CTRL+C. Is there something I am doing wrong or missing?

dhalucario avatar Feb 02 '25 15:02 dhalucario