[Python-checkins] bpo-37238: Enable building for Windows using Visual Studio 2019 (GH-13988)

Miss Islington (bot) webhook-mailer at python.org
Tue Jun 11 18:35:59 EDT 2019


https://github.com/python/cpython/commit/36926df8341827fb2a5323f559daab8e34d33ed8
commit: 36926df8341827fb2a5323f559daab8e34d33ed8
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-06-11T15:35:55-07:00
summary:

bpo-37238: Enable building for Windows using Visual Studio 2019 (GH-13988)

(cherry picked from commit 04856c2193eb72d72c46b57fa08095235d732a73)

Co-authored-by: Paul Monson <paulmon at users.noreply.github.com>

files:
M PCbuild/python.props
M PCbuild/pythoncore.vcxproj

diff --git a/PCbuild/python.props b/PCbuild/python.props
index 11638fe348c8..e6642fc4818a 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -10,6 +10,7 @@
 
     We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.
     -->
+    <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '16.0' or '$(VisualStudioVersion)' == '16.0')">v142</BasePlatformToolset>
     <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '15.0' or '$(VisualStudioVersion)' == '15.0')">v141</BasePlatformToolset>
     <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</BasePlatformToolset>
     <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</BasePlatformToolset>
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index 89625da944e1..09a63c04eab8 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -511,7 +511,7 @@
       </ClCompile>
     </ItemGroup>
   </Target>
-  <Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140' and $(PlatformToolset) != 'v141'">
+  <Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140' and $(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142'">
     <Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
   </Target>
   <Target Name="_WarnAboutZlib" BeforeTargets="PrepareForBuild" Condition="!$(IncludeExternals)">



More information about the Python-checkins mailing list