mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-01 12:24:15 +00:00
fix: Handle dotted package names in script path resolution (#15300)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary Fix WindowsRunnable::from_script_path to correctly append extensions instead of replacing them when resolving executable paths. This resolves https://github.com/astral-sh/uv/issues/15165#issue-3304086689. - Add add_extension_to_path helper that appends extensions properly - Update extension resolution to use the new helper - Add tests ## Test Plan Added unit tests for the new and existing functionality that the change touches. Tested manually locally on Windows. <!-- How was it tested? --> --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
parent
191c9175fe
commit
9346b4d0f6
8 changed files with 230 additions and 2 deletions
6
scripts/packages/package.name.with.dots/README.md
Normal file
6
scripts/packages/package.name.with.dots/README.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# package.name.with.dots
|
||||
|
||||
Test package for verifying Windows executable handling with dotted package names.
|
||||
|
||||
This package is used to test the fix for the uvx Windows executable bug where package names
|
||||
containing dots were incorrectly handled when adding Windows executable extensions.
|
||||
11
scripts/packages/package.name.with.dots/pyproject.toml
Normal file
11
scripts/packages/package.name.with.dots/pyproject.toml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[project]
|
||||
name = "package.name.with.dots"
|
||||
version = "0.1.0"
|
||||
requires-python = ">=3.8"
|
||||
|
||||
[tool.uv.build-backend.data]
|
||||
scripts = "scripts"
|
||||
|
||||
[build-system]
|
||||
requires = ["uv_build>=0.8.0,<0.9"]
|
||||
build-backend = "uv_build"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Write-Host "package.name.with.dots version 0.1.0"
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
"""Test package for verifying Windows executable handling with dotted package names."""
|
||||
|
||||
__version__ = "0.1.0"
|
||||
Loading…
Add table
Add a link
Reference in a new issue