diff options
author | Steve Dower <steve.dower@microsoft.com> | 2015-10-31 19:17:11 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2015-10-31 19:17:11 (GMT) |
commit | 940f6a8f11b5ef0f9fa85b0be4b95608efebb2e8 (patch) | |
tree | a75f4cc54fd92dac49b0e9a127d956f7f4e41a3b /PCbuild | |
parent | f97edf1aa630d507a69885e5a3e9ff8edbe3ea02 (diff) | |
download | cpython-940f6a8f11b5ef0f9fa85b0be4b95608efebb2e8.zip cpython-940f6a8f11b5ef0f9fa85b0be4b95608efebb2e8.tar.gz cpython-940f6a8f11b5ef0f9fa85b0be4b95608efebb2e8.tar.bz2 |
Improves handling of test markers for building Python without intefering with actual installs.
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/build.bat | 3 | ||||
-rw-r--r-- | PCbuild/pyproject.props | 4 | ||||
-rw-r--r-- | PCbuild/python.props | 16 |
3 files changed, 17 insertions, 6 deletions
diff --git a/PCbuild/build.bat b/PCbuild/build.bat index 2c41fb2..cfbc4a2 100644 --- a/PCbuild/build.bat +++ b/PCbuild/build.bat @@ -38,6 +38,7 @@ echo. -p x64 ^| Win32 echo. Set the platform (default: Win32)
echo. -t Build ^| Rebuild ^| Clean ^| CleanAll
echo. Set the target manually
+echo. --test-marker Enable the test marker within the build.
exit /b 127
:Run
@@ -62,6 +63,7 @@ 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"=="--test-marker" (set UseTestMarker=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
@@ -93,6 +95,7 @@ msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^ /p:Configuration=%conf% /p:Platform=%platf%^
/p:IncludeExternals=%IncludeExternals%^
/p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^
+ /p:UseTestMarker=%UseTestMarker%^
%1 %2 %3 %4 %5 %6 %7 %8 %9
@goto :eof
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index a2c44f3..25cdfcc 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -128,8 +128,8 @@ foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses </UsingTask> <Target Name="KillPython" BeforeTargets="PrepareForBuild" Condition="'$(KillPython)' == 'true'"> - <Message Text="Killing any running python.exe instances..." Importance="high" /> - <KillPython FileName="$(OutDir)python$(PyDebugExt).exe" /> + <Message Text="Killing any running python$(PyDebugExt)$(PyTestExt).exe instances..." Importance="high" /> + <KillPython FileName="$(OutDir)python$(PyDebugExt)$(PyTestExt).exe" /> </Target> <!-- diff --git a/PCbuild/python.props b/PCbuild/python.props index 25d6d92..862f041 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -41,6 +41,12 @@ <!-- Suffix for all binaries when building for debug --> <PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) == 'Debug'">_d</PyDebugExt> + <!-- Suffix for versions/keys when building with test markers --> + <PyTestExt Condition="$(UseTestMarker) == 'true'">-test</PyTestExt> + + <!-- Suffix for versions/keys when building for particular platforms --> + <PyArchExt Condition="'$(ArchName)' == 'win32'">-32</PyArchExt> + <!-- Full path of the resulting python.exe binary --> <PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)python$(PyDebugExt).exe</PythonExe> </PropertyGroup> @@ -129,17 +135,17 @@ $([msbuild]::Multiply($(MicroVersionNumber), 1000)) )) ))</Field3Value> + <Field3Value Condition="$(UseTestMarker) == 'true'">$([msbuild]::Add($(Field3Value), 9000))</Field3Value> <!-- The name of the resulting pythonXY.dll (without the extension) --> <PyDllName>python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName> <!-- The version and platform tag to include in .pyd filenames --> - <PydTag Condition="$(Platform) == 'Win32' or $(Platform) == 'x86'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag> - <PydTag Condition="$(Platform) == 'x64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag> + <PydTag Condition="$(ArchName) == 'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag> + <PydTag Condition="$(ArchName) == 'amd64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag> <!-- The version number for sys.winver --> - <SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)</SysWinVer> - <SysWinVer Condition="$(Platform) == 'Win32' or $(Platform) == 'x86'">$(SysWinVer)-32</SysWinVer> + <SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)$(PyArchExt)$(PyTestExt)</SysWinVer> </PropertyGroup> <!-- Displays the calculated version info --> @@ -148,5 +154,7 @@ <Message Importance="high" Text="PythonVersion: $(PythonVersion)" /> <Message Importance="high" Text="PythonVersionHex: 0x$([System.UInt32]::Parse($(PythonVersionHex)).ToString(`X08`))" /> <Message Importance="high" Text="Field3Value: $(Field3Value)" /> + <Message Importance="high" Text="SysWinVer: $(SysWinVer)" /> + <Message Importance="high" Text="PyDllName: $(PyDllName)" /> </Target> </Project> |