From e74fe18ebb625224e0bd8f6885c3e65ac3bb29fa Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 3 Sep 2015 23:43:37 -0500 Subject: Allow PCbuild\rt.bat to accept unlimited arguments for regrtest. This makes it possible to pass more than 4 tests by name through Tools\buildbot\test.bat --- Misc/NEWS | 6 ++++++ PCbuild/rt.bat | 4 +++- Tools/buildbot/test.bat | 26 +++++++++++++++----------- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index 4ac70d5..5120b60 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -56,6 +56,12 @@ Documentation - Issue #22812: Fix unittest discovery examples. Patch from Pam McA'Nulty. +Tests +----- + +- PCbuild\rt.bat now accepts an unlimited number of arguments to pass along + to regrtest.py. Previously there was a limit of 9. + What's New in Python 3.5.0 release candidate 3? =============================================== diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat index 039c810..2d93b80 100644 --- a/PCbuild/rt.bat +++ b/PCbuild/rt.bat @@ -32,15 +32,17 @@ set prefix=%pcbuild%win32\ set suffix= set qmode= set dashO= +set regrtestargs= :CheckOpts if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts +if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts set exe=%prefix%python%suffix%.exe -set cmd="%exe%" %dashO% -Wd -E -bb "%pcbuild%..\lib\test\regrtest.py" %1 %2 %3 %4 %5 %6 %7 %8 %9 +set cmd="%exe%" %dashO% -Wd -E -bb "%pcbuild%..\lib\test\regrtest.py" %regrtestargs% if defined qmode goto Qmode echo Deleting .pyc/.pyo files ... diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat index 154dfa5..d1f5f52 100644 --- a/Tools/buildbot/test.bat +++ b/Tools/buildbot/test.bat @@ -1,15 +1,19 @@ -@rem Used by the buildbot "test" step. -@setlocal +@echo off +rem Used by the buildbot "test" step. +setlocal -@set here=%~dp0 -@set rt_opts=-q -d +set here=%~dp0 +set rt_opts=-q -d +set regrtest_args= :CheckOpts -@if '%1'=='-x64' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts -@if '%1'=='-d' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts -@if '%1'=='-O' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts -@if '%1'=='-q' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts -@if '%1'=='+d' (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts -@if '%1'=='+q' (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts +if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts +if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts +if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts +if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts +if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts +if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts +if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts -call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9 +echo on +call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW -n --timeout=3600 %regrtest_args% -- cgit v0.12 From b27f3c3e20991c7a97826e886bb43439e9276c34 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 3 Sep 2015 23:43:54 -0500 Subject: Issue #24986: Allow building Python without external libraries on Windows This modifies the behavior of the '-e' flag to PCbuild\build.bat: when '-e' is not supplied, no attempt will be made to build extension modules that require external libraries, even if the external libraries are present. Also adds '--no-' flags to PCbuild\build.bat, where '' is one of 'ssl', 'tkinter', or 'bsddb', to allow skipping just those modules (if '-e' is given). --- Misc/NEWS | 6 ++++++ PCbuild/build.bat | 24 ++++++++++++++++++++++-- PCbuild/pcbuild.proj | 14 ++++++++++---- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index 5120b60..99eca9e 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -62,6 +62,12 @@ Tests - PCbuild\rt.bat now accepts an unlimited number of arguments to pass along to regrtest.py. Previously there was a limit of 9. +Build +----- + +- Issue #24986: It is now possible to build Python on Windows without errors + when external libraries are not available. + What's New in Python 3.5.0 release candidate 3? =============================================== diff --git a/PCbuild/build.bat b/PCbuild/build.bat index 6ca628b..30f209f 100644 --- a/PCbuild/build.bat +++ b/PCbuild/build.bat @@ -18,12 +18,19 @@ echo. -V Display version information for the current build echo. -r Target Rebuild instead of Build echo. -d Set the configuration to Debug echo. -e Build external libraries fetched by get_externals.bat +echo. Extension modules that depend on external libraries will not attempt +echo. to build if this flag is not present echo. -m Enable parallel build (enabled by default) echo. -M Disable parallel build echo. -v Increased output messages echo. -k Attempt to kill any running Pythons before building (usually done echo. automatically by the pythoncore project) echo. +echo.Available flags to avoid building certain modules. +echo.These flags have no effect if '-e' is not given: +echo. --no-ssl Do not attempt to build _ssl +echo. --no-tkinter Do not attempt to build Tkinter +echo. echo.Available arguments: echo. -c Release ^| Debug ^| PGInstrument ^| PGUpdate echo. Set the configuration (default: Release) @@ -51,12 +58,21 @@ if "%~1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts if "%~1"=="-r" (set target=Rebuild) & shift & goto CheckOpts if "%~1"=="-t" (set target=%2) & shift & shift & goto CheckOpts if "%~1"=="-d" (set conf=Debug) & shift & goto CheckOpts -if "%~1"=="-e" call "%dir%get_externals.bat" & shift & goto CheckOpts if "%~1"=="-m" (set parallel=/m) & shift & goto CheckOpts if "%~1"=="-M" (set parallel=) & shift & goto CheckOpts if "%~1"=="-v" (set verbose=/v:n) & shift & goto CheckOpts if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts if "%~1"=="-V" shift & goto Version +rem These use the actual property names used by MSBuild. We could just let +rem them in through the environment, but we specify them on the command line +rem anyway for visibility so set defaults after this +if "%~1"=="-e" (set IncludeExternals=true) & call "%dir%get_externals.bat" & shift & goto CheckOpts +if "%~1"=="--no-ssl" (set IncludeSSL=false) & shift & goto CheckOpts +if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts + +if "%IncludeExternals%"=="" set IncludeExternals=false +if "%IncludeSSL%"=="" set IncludeSSL=true +if "%IncludeTkinter%"=="" set IncludeTkinter=true if "%platf%"=="x64" (set vs_platf=x86_amd64) @@ -71,7 +87,11 @@ rem Call on MSBuild to do the work, echo the command. rem Passing %1-9 is not the preferred option, but argument parsing in rem batch is, shall we say, "lackluster" echo on -msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose% /p:Configuration=%conf% /p:Platform=%platf% %1 %2 %3 %4 %5 %6 %7 %8 %9 +msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^ + /p:Configuration=%conf% /p:Platform=%platf%^ + /p:IncludeExternals=%IncludeExternals%^ + /p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^ + %1 %2 %3 %4 %5 %6 %7 %8 %9 @goto :eof diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj index 813831e..36621c9 100644 --- a/PCbuild/pcbuild.proj +++ b/PCbuild/pcbuild.proj @@ -5,8 +5,10 @@ Win32 Release true + true true true + true @@ -25,7 +27,7 @@ @@ -40,10 +42,14 @@ - + + + - - + + + + -- cgit v0.12