Skip to content

Commit ba72801

Browse files
scbeddVenkataAnilKumar
authored andcommitted
fix verifytypes. [tool.uv.sources] relpaths aren't part of the checked out source from main, AND we're not padding the python executable so it's not installing to the proper venv. (#46382)
1 parent f1f18d7 commit ba72801

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

eng/tools/azure-sdk-tools/azpysdk/verifytypes.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ def install_from_main(self, setup_path: str, python_executable: Optional[str] =
176176

177177
command = get_pip_command(python_executable) + ["install", ".", "--force-reinstall"]
178178

179+
# When using uv, add --no-sources to ignore [tool.uv.sources] relative paths
180+
# that can't resolve in a sparse checkout, and --python to target the correct venv.
181+
if command[0] == "uv":
182+
command += ["--no-sources"]
183+
if python_executable:
184+
command += ["--python", python_executable]
185+
179186
subprocess.check_call(command, stdout=subprocess.DEVNULL)
180187
finally:
181188
os.chdir(cwd) # allow temp dir to be deleted

0 commit comments

Comments
 (0)