Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion eng/pipelines/templates/steps/install-rex-validation-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@ steps:
- pwsh: |
Write-Host "python -m pip install -r eng/scripts/docs/py2docfx_requirements.txt"
python -m pip install -r eng/scripts/docs/py2docfx_requirements.txt
# After install py2docfx,

# Patch py2docfx to add --no-build-isolation to pip download commands.
# When py2docfx downloads sdists with --no-binary=:all:, pip enters build isolation
# and spawns nested subprocesses that inherit --extra-index-url. These nested
# subprocesses hit the Azure DevOps feed without auth, causing 401 errors that
# result in EOFError when pip tries to prompt for credentials in a non-interactive
# environment. Adding --no-build-isolation makes pip reuse the already-installed
# setuptools and wheel from the outer environment, avoiding the auth cascade.
$pipUtilsPath = python -c "import py2docfx.convert_prepare.pip_utils as m; print(m.__file__)"
Write-Host "Patching py2docfx pip_utils.py at: $pipUtilsPath"
$content = Get-Content -Raw $pipUtilsPath
$original = ' download_param.append("--no-binary=:all:")'
$patched = $original + "`n" + ' download_param.append("--no-build-isolation")'
if ($content.Contains($original)) {
$content = $content.Replace($original, $patched)
Set-Content -Path $pipUtilsPath -Value $content -NoNewline
Write-Host "Successfully patched py2docfx to add --no-build-isolation"
} else {
Write-Host "##vso[task.logissue type=warning]Could not find expected pattern in pip_utils.py to patch. py2docfx may have been updated."
}

Write-Host "Testing the install. Running python -m py2docfx -h to display the help"
python -m py2docfx -h
displayName: Install py2docfx for package validation
2 changes: 2 additions & 0 deletions eng/scripts/docs/py2docfx_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
py2docfx==0.1.24
setuptools==77.0.3
wheel==0.45.1
Loading