# HG changeset patch # User Gregory Szorc # Date 1658280760 25200 # Node ID e4e33b779fa2782153de615d01e4a88324aae735 # Parent c809a77dfa1c2d460778af87a12cc0f3e6a19a37 automation: set PATH when building on Windows Sometime in the 6.2 release cycle the Windows building automation broke. Building the wheel and even PyOxidizer based installers now fails with: ``` Exception: PowerShell execution failed: error: subprocess-exited-with-error Getting requirements to build wheel did not run successfully. exit code: 1 [1 lines of output] Unable to find a working hg binary to extract the version from the repository tags [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ``` I have a hunch this is a regression from upgrading pip in 1c00777702da, but I haven't verified this. It may not be, as PyOxidizer has its own bundled Python/pip. So maybe it is something in `setup.py`. diff -r c809a77dfa1c -r e4e33b779fa2 contrib/automation/hgautomation/windows.py --- a/contrib/automation/hgautomation/windows.py Sun Jul 17 15:37:34 2022 -0700 +++ b/contrib/automation/hgautomation/windows.py Tue Jul 19 18:32:40 2022 -0700 @@ -45,6 +45,7 @@ '''.lstrip() BUILD_INNO_PYTHON3 = r''' +$Env:PATH = "C:\hgdev\venv-bootstrap\Scripts;$Env:PATH" $Env:RUSTUP_HOME = "C:\hgdev\rustup" $Env:CARGO_HOME = "C:\hgdev\cargo" Set-Location C:\hgdev\src @@ -56,6 +57,7 @@ BUILD_WHEEL = r''' +$Env:PATH = "C:\hgdev\venv-bootstrap\Scripts;$Env:PATH" Set-Location C:\hgdev\src C:\hgdev\python{python_version}-{arch}\python.exe -m pip wheel --wheel-dir dist . if ($LASTEXITCODE -ne 0) {{ @@ -64,6 +66,7 @@ ''' BUILD_WIX_PYTHON3 = r''' +$Env:PATH = "C:\hgdev\venv-bootstrap\Scripts;$Env:PATH" $Env:RUSTUP_HOME = "C:\hgdev\rustup" $Env:CARGO_HOME = "C:\hgdev\cargo" Set-Location C:\hgdev\src