Skip to content

Commit 8132a9d

Browse files
authored
Default to uv if available for azpysdk (#44273)
* use uv * classify uv * format * allow local uv? and bug fix
1 parent e5632ae commit 8132a9d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from __future__ import annotations
99

1010
import argparse
11-
import sys
11+
import shutil
1212
import os
1313
from typing import Sequence, Optional
1414

@@ -117,6 +117,11 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
117117
parser.print_help()
118118
return 1
119119

120+
# default to uv if available
121+
uv_path = shutil.which("uv")
122+
if uv_path:
123+
os.environ["TOX_PIP_IMPL"] = "uv"
124+
120125
try:
121126
result = args.func(args)
122127
return int(result or 0)

eng/tools/azure-sdk-tools/ci_tools/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def get_pip_list_output(python_executable: Optional[str] = None):
592592
if stdout and (stderr is None):
593593
# this should be compatible with py27 https://docs.python.org/2.7/library/stdtypes.html#str.decode
594594
for line in stdout.decode("utf-8").split(os.linesep)[2:]:
595-
if line:
595+
if line and "==" in line:
596596
package, version = re.split("==", line)
597597
collected_output[package] = version
598598
else:

0 commit comments

Comments
 (0)