-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uv run
supports python zipapp (#7289)
## Summary `python` supports running a zipfile containing a `__main__.py` file, for example `python ./pre-commit-3.8.0.pyz`. See https://docs.python.org/3/using/cmdline.html#interface-options: > <script> Execute the Python code contained in script, which must be a filesystem path (absolute or relative) referring to either a Python file, a directory containing a __main__.py file, or a zipfile containing a __main__.py file. and https://docs.python.org/3/library/zipapp.html. Similar to #7281, this PR allows `uv run ./pre-commit-3.8.0.pyz` to work. ## Test Plan ```console $ curl -O https://github.com/pre-commit/pre-commit/releases/download/v3.8.0/pre-commit-3.8.0.pyz $ cargo run -- run ./pre-commit-3.8.0.pyz ```
- Loading branch information
Showing
3 changed files
with
75 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters