uv
uv copied to clipboard
Support dotted function paths for script entrypoints
Summary
Some projects define an script entrypoint with a path separated by ..
For example in Invoke...
entry_points={
"console_scripts": [
"invoke = invoke.main:program.run",
"inv = invoke.main:program.run",
]
},
Before this change uv tried to import 'program.run' but
this is not valid, and only up to the first dot should be
imported (as pip does).
Resolves: #1573
Test Plan
- Added a unit test in script.rs to validate that the import_name is set correctly when the function path is dotted.
- Ran the unit tests (
cargo test)