astral-sh / uv

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

Support `uv export --script` #8609

Open charliermarsh opened 1 month ago

charliermarsh commented 1 month ago

You should be able to point to a PEP 723 script to get a requirements.txt of the resolved dependencies.

manzt commented 1 month ago

This would be awesome (especially for the jupyter notebook stuff around uv I'm tinkering with).

I made an attempt at a PR, but got a bit stuck. It seems like workspaces are pretty connected with uv export right now and wasn't sure of the right way to push forward (i.e., create a virtual workspace or special case scripts). Maybe some of the code is useful.

malikrohail commented 1 month ago

can i work on this? (pull req)

zanieb commented 1 month ago

@malikrohail feel free, but note @manzt has some work in progress and said it didn't seem trivial.

manzt commented 1 month ago

Probably won't have time to touch for a bit so go right ahead! Thought I'd share WIP in case any of the code is helpful.

malikrohail commented 1 month ago

yes that would be helpful and fasten things up, pls share ur progress

zanieb commented 1 month ago

(their progress is linked above)

malikrohail commented 1 month ago

sounds good, will work on it later today.