summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Bachmann <kontakt@maxbachmann.de>2023-08-09 22:42:16 (GMT)
committerGitHub <noreply@github.com>2023-08-09 22:42:16 (GMT)
commit1e229e2c3d212accbd5fbe3a46cd42f8252b2868 (patch)
treea5b00d25d103e2930544709333044635429fb527
parent326f0ba1c5dda1d9613dbba11ea2470654b0d9c8 (diff)
downloadcpython-1e229e2c3d212accbd5fbe3a46cd42f8252b2868.zip
cpython-1e229e2c3d212accbd5fbe3a46cd42f8252b2868.tar.gz
cpython-1e229e2c3d212accbd5fbe3a46cd42f8252b2868.tar.bz2
gh-107814: Avoid output from Nuget installation in find_python.bat (GH-107815)
-rw-r--r--Misc/NEWS.d/next/Build/2023-08-09-17-05-33.gh-issue-107814.c0Oapq.rst1
-rw-r--r--PCbuild/find_python.bat8
2 files changed, 7 insertions, 2 deletions
diff --git a/Misc/NEWS.d/next/Build/2023-08-09-17-05-33.gh-issue-107814.c0Oapq.rst b/Misc/NEWS.d/next/Build/2023-08-09-17-05-33.gh-issue-107814.c0Oapq.rst
new file mode 100644
index 0000000..d372335
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2023-08-09-17-05-33.gh-issue-107814.c0Oapq.rst
@@ -0,0 +1 @@
+When calling ``find_python.bat`` with ``-q`` it did not properly silence the output of nuget. That is now fixed.
diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat
index 7af5503..d3f62c9 100644
--- a/PCbuild/find_python.bat
+++ b/PCbuild/find_python.bat
@@ -52,7 +52,7 @@
@if "%_Py_NUGET%"=="" (set _Py_NUGET=%_Py_EXTERNALS_DIR%\nuget.exe)
@if "%_Py_NUGET_URL%"=="" (set _Py_NUGET_URL=https://aka.ms/nugetclidl)
@if NOT exist "%_Py_NUGET%" (
- @echo Downloading nuget...
+ @if not "%_Py_Quiet%"=="1" @echo Downloading nuget...
@rem NB: Must use single quotes around NUGET here, NOT double!
@rem Otherwise, a space in the path would break things
@rem If it fails, retry with any available copy of Python
@@ -63,7 +63,11 @@
)
@if not "%_Py_Quiet%"=="1" @echo Installing Python via nuget...
-@"%_Py_NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
+@if not "%_Py_Quiet%"=="1" (
+ @"%_Py_NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
+) else (
+ @"%_Py_NUGET%" install pythonx86 -Verbosity quiet -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
+)
@rem Quote it here; it's not quoted later because "py -x.y" wouldn't work
@if not errorlevel 1 (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") & (set _Py_Python_Source=found on nuget.org) & goto :found