From: Steve Dower Date: Mon, 28 May 2018 19:32:05 +0000 (-0700) Subject: bpo-33614: Ensures module definition files for the stable ABI on Windows are correctl... X-Git-Tag: v3.8.0a1~1747 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e97ba4c690613d734843db218aeedce2f0e5937f;p=python bpo-33614: Ensures module definition files for the stable ABI on Windows are correctly regenerated. (GH-7165) --- diff --git a/Misc/NEWS.d/next/Build/2018-05-28-11-40-22.bpo-33614.28e0sE.rst b/Misc/NEWS.d/next/Build/2018-05-28-11-40-22.bpo-33614.28e0sE.rst new file mode 100644 index 0000000000..9091c282ad --- /dev/null +++ b/Misc/NEWS.d/next/Build/2018-05-28-11-40-22.bpo-33614.28e0sE.rst @@ -0,0 +1,2 @@ +Ensures module definition files for the stable ABI on Windows are correctly +regenerated. diff --git a/PCbuild/find_msbuild.bat b/PCbuild/find_msbuild.bat index 1877906e00..24f5e2fb5d 100644 --- a/PCbuild/find_msbuild.bat +++ b/PCbuild/find_msbuild.bat @@ -47,5 +47,13 @@ @exit /b 1 :found -@echo Using %MSBUILD% (found in the %_Py_MSBuild_Source%) +@pushd %MSBUILD% >nul 2>nul +@if not ERRORLEVEL 1 @( + @if exist msbuild.exe @(set MSBUILD="%CD%\msbuild.exe") else @(set MSBUILD=) + @popd +) + +@if defined MSBUILD @echo Using %MSBUILD% (found in the %_Py_MSBuild_Source%) +@if not defined MSBUILD @echo Failed to find MSBuild @set _Py_MSBuild_Source= +@if not defined MSBUILD @exit /b 1 diff --git a/PCbuild/python3dll.vcxproj b/PCbuild/python3dll.vcxproj index c66c8ef141..0ef7780248 100644 --- a/PCbuild/python3dll.vcxproj +++ b/PCbuild/python3dll.vcxproj @@ -89,14 +89,18 @@ - + <_DefLines Remove="@(_DefLines)" /> <_Lines Remove="@(_Lines)" /> + <_OriginalLines Remove="@(_OriginalLines)" /> + + + <_Pattern1>(=python$(MajorVersionNumber)$(MinorVersionNumber))\. <_Sub1>$1_d. @@ -109,17 +113,23 @@ - + + - + <_DefLines Remove="@(_DefLines)" /> <_Lines Remove="@(_Lines)" /> + <_OriginalLines Remove="@(_OriginalLines)" /> + + + <_Pattern>^[\w.]+=.+?\.([^ ]+).*$ <_Sub>$1 @@ -132,6 +142,8 @@ <_Lines Include="@(_Symbols->'%(Symbol)')" /> - + + \ No newline at end of file