From 65e36acaef6d5e418631e14ad706981374a4fa0e Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Mon, 27 Jul 2026 19:50:03 -0700 Subject: [PATCH] Ensure that build-test uses pypi --- eng/pipelines/templates/steps/build-test.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/eng/pipelines/templates/steps/build-test.yml b/eng/pipelines/templates/steps/build-test.yml index 6597389cd56d..38ba775af042 100644 --- a/eng/pipelines/templates/steps/build-test.yml +++ b/eng/pipelines/templates/steps/build-test.yml @@ -21,16 +21,11 @@ parameters: # Please use `$(TargetingString)` to refer to the python packages glob string. This variable is set from resolve-package-targeting.yml. steps: - - template: /eng/pipelines/templates/steps/use-python-version.yml - parameters: - versionSpec: '${{ parameters.PythonVersion }}' - - # Authenticate to Azure Artifacts feed immediately after checkout to prevent 401 errors - # Public feeds have upstream sources enabled and require authentication for passthrough to pypi.org - - template: /eng/pipelines/templates/steps/auth-dev-feed.yml - parameters: - DevFeedName: ${{ parameters.DevFeedName }} - EnableTwineAuth: false + - task: UsePythonVersion@0 + displayName: "Use Python ${{ parameters.PythonVersion }}" + inputs: + versionSpec: ${{ parameters.PythonVersion }} + allowUnstable: true - template: /eng/pipelines/templates/steps/use-venv.yml @@ -74,6 +69,8 @@ steps: ScriptType: InlineScript Inline: >- $env:AZPYSDK_PIP_IMPL="uv"; + $env:PIP_INDEX_URL="https://pypi.org/simple/"; + $env:UV_DEFAULT_INDEX="https://pypi.org/simple/"; $account = (Get-AzContext).Account; $env:AZURESUBSCRIPTION_CLIENT_ID = $account.Id; $env:AZURESUBSCRIPTION_TENANT_ID = $account.Tenants; @@ -101,6 +98,8 @@ steps: - ${{ else }}: - pwsh: | $env:AZPYSDK_PIP_IMPL="uv" + $env:PIP_INDEX_URL="https://pypi.org/simple/" + $env:UV_DEFAULT_INDEX="https://pypi.org/simple/" Write-Host (Get-Command python).Source if ($env:TESTMARKARGUMENT) {