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

Add --script support to uv export for PEP 723 scripts #10160

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Dec 25, 2024

Summary

You can now run uv export --script main.py to show the dependency tree for a given script. If a lockfile doesn't exist, it will create one.

Closes #8609.

Closes #9657.

@charliermarsh charliermarsh changed the base branch from main to charlie/script-tree December 25, 2024 19:18
@charliermarsh charliermarsh added enhancement New feature or improvement to existing functionality no-build Disable building binaries in CI no-test Disable CI tests for a pull request labels Dec 25, 2024
@charliermarsh charliermarsh marked this pull request as draft December 25, 2024 19:18
@charliermarsh charliermarsh force-pushed the charlie/script-export branch 2 times, most recently from 177bd99 to 0de6b8e Compare December 25, 2024 19:24
@charliermarsh charliermarsh removed no-build Disable building binaries in CI no-test Disable CI tests for a pull request labels Dec 25, 2024
@charliermarsh charliermarsh marked this pull request as ready for review December 25, 2024 22:20
@charliermarsh charliermarsh requested a review from zanieb December 26, 2024 20:02
@zanieb
Copy link
Member

zanieb commented Jan 8, 2025

If a lockfile doesn't exist, it will create one.

And it will stick around? I might find that surprising, since it alters future invocations.

@charliermarsh
Copy link
Member Author

Yeah, it will stick around.

@zanieb
Copy link
Member

zanieb commented Jan 8, 2025

Could we avoid that? Did you have a motivation for that behavior other than simplicity?

@charliermarsh
Copy link
Member Author

I think we can avoid it if you prefer, yeah.

@charliermarsh
Copy link
Member Author

(It seems like a reasonable change to me.)

@zanieb
Copy link
Member

zanieb commented Jan 8, 2025

I do prefer for now. Thanks!

@charliermarsh
Copy link
Member Author

@zanieb -- I made the same change for uv tree -- we don't persist the lockfile unless it already existed.

Base automatically changed from charlie/script-tree to main January 8, 2025 21:32
@charliermarsh charliermarsh force-pushed the charlie/script-export branch from c185b09 to a3dea95 Compare January 8, 2025 21:39
@charliermarsh charliermarsh enabled auto-merge (squash) January 8, 2025 21:39
@charliermarsh charliermarsh merged commit 18b53c5 into main Jan 8, 2025
64 checks passed
@charliermarsh charliermarsh deleted the charlie/script-export branch January 8, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
2 participants