-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add support for Windows legacy scripts via uv run #11888
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
Merged
Merged
Conversation
This file contains hidden or 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
2d691cb to
eba35f7
Compare
|
Nice, thanks. |
b1d3c8b to
aa5a434
Compare
1b942c9 to
5fae98a
Compare
zanieb
approved these changes
Mar 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
|
We should probably add some docs to this in the |
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Mar 10, 2025
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.6.4` -> `0.6.5` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>astral-sh/uv (astral-sh/uv)</summary> ### [`v0.6.5`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#065) [Compare Source](astral-sh/uv@0.6.4...0.6.5) ##### Enhancements - Allow `--constraints` and `--overrides` in `uvx` ([#​10207](astral-sh/uv#10207)) - Allow overrides in `satisfies` check for `uv tool run` ([#​11994](astral-sh/uv#11994)) - Allow users to set `package = true` on `tool.uv.sources` ([#​12014](astral-sh/uv#12014)) - Add support for Windows legacy scripts via `uv run` ([#​11888](astral-sh/uv#11888)) - Return error when running uvx with a `.py` script ([#​11623](astral-sh/uv#11623)) - Warn user on use of `uvx run` ([#​11992](astral-sh/uv#11992)) ##### Configuration - Add `NO_BUILD` and `NO_BUILD_PACKAGE` environment variables ([#​11968](astral-sh/uv#11968)) ##### Performance - Allow overrides in all satisfies checks ([#​11995](astral-sh/uv#11995)) - Respect markers on constraints when validating current environment ([#​11976](astral-sh/uv#11976)) ##### Bug fixes - Compare major-minor specifiers when filtering interpreters ([#​11952](astral-sh/uv#11952)) - Fix system site packages detection default ([#​11956](astral-sh/uv#11956)) - Invalidate lockfile when empty dependency groups are added or removed ([#​12010](astral-sh/uv#12010)) - Remove prepended sys.path ([#​11954](astral-sh/uv#11954)) - Fix PyPy Python version label ([#​11965](astral-sh/uv#11965)) - Fix error message suggesting `--user` instead of `--username` ([#​11947](astral-sh/uv#11947)) ##### Preview - Move the uv build backend into a separate, minimal `uv_build` package ([#​11446](astral-sh/uv#11446)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODguMyIsInVwZGF0ZWRJblZlciI6IjM5LjE4OC4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
|
I confirm the issue has been fixed in uv 0.6.5, see: Nuitka/Nuitka#3173 (comment) |
zanieb
pushed a commit
that referenced
this pull request
Mar 11, 2025
## Summary Follow up to #11888 with added support for uv tool run. Changes * Added functionality for running windows scripts in previous PR was moved from run.rs to uv_shell::runnable. * EXE was added as a supported type, this simplified integration across both uv run and uvx while retaining a backwards compatible behavior and properly prioritizing .exe over others. Name was adjusted to runnable as a result to better represent intent. ## Test Plan New tests added. ## Documentation Added new documentation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Closes #9151
This adds support for running .ps1, .cmd, .bat legacy scripts typically provided by setuptools legacy script files.
Note, .bat and .cmd scripts were somewhat supported previously by Command when the extension was explicit but documentation says such behavior should not be relied upon.
In addition, when no extension is provided and a legacy script exists, it will try to infer the appropriate extension on Windows and use the right runtime with preference for .ps1. Only powershell.exe and cmd.exe are supported right now.
Test Plan
Added tests. Tested with nuitka locally via uv run.
Note uvx support will be added in a follow up.