Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5fcd5e64
Commit
5fcd5e64
authored
Sep 06, 2017
by
Steve Dower
Committed by
GitHub
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-31340: Change to building with MSVC v141 (included with Visual Studio 2017) (#3311)
parent
bcaac818
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
86 additions
and
13 deletions
+86
-13
.github/appveyor.yml
.github/appveyor.yml
+2
-0
Doc/make.bat
Doc/make.bat
+24
-0
Lib/distutils/command/bdist_wininst.py
Lib/distutils/command/bdist_wininst.py
+13
-9
Misc/NEWS.d/next/Windows/2017-09-04-13-19-05.bpo-31340.MbkzLi.rst
...S.d/next/Windows/2017-09-04-13-19-05.bpo-31340.MbkzLi.rst
+1
-0
PCbuild/pyproject.props
PCbuild/pyproject.props
+17
-1
PCbuild/python.props
PCbuild/python.props
+2
-0
PCbuild/python.vcxproj
PCbuild/python.vcxproj
+1
-0
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj
+2
-1
Tools/msi/exe/exe.wixproj
Tools/msi/exe/exe.wixproj
+23
-1
Tools/msi/exe/exe_files.wxs
Tools/msi/exe/exe_files.wxs
+1
-1
No files found.
.github/appveyor.yml
View file @
5fcd5e64
...
...
@@ -14,6 +14,8 @@ test_script:
-
cmd
:
PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 --fail-env-changed -j0
environment
:
HOST_PYTHON
:
C:\Python36\python.exe
image
:
-
Visual Studio
2017
# Only trigger AppVeyor if actual code or its configuration changes
only_commits
:
...
...
Doc/make.bat
View file @
5fcd5e64
...
...
@@ -16,8 +16,19 @@ if not defined SPHINXBUILD if defined PYTHON (
set
SPHINXBUILD
=
%PYTHON%
-c
"import sphinx, sys; sys.argv[0] = 'sphinx-build'; sphinx.main()"
)
if
not
defined
BLURB
if
defined
PYTHON
(
%PYTHON%
-c
"import blurb"
>
nul
2
>
nul
if
errorlevel
1
(
echo
Installing
blurb
with
%PYTHON%
%PYTHON%
-m
pip
install
blurb
if
errorlevel
1
exit
/B
)
set
BLURB
=
%PYTHON%
-m
blurb
)
if
not
defined
PYTHON
set
PYTHON
=
py
if
not
defined
SPHINXBUILD
set
SPHINXBUILD
=
sphinx
-build
if
not
defined
BLURB
set
BLURB
=
blurb
if
"
%
1"
NEQ
"htmlhelp"
goto
:skiphhcsearch
if
exist
"
%HTMLHELP%
"
goto
:skiphhcsearch
...
...
@@ -96,6 +107,19 @@ echo.be passed by setting the SPHINXOPTS environment variable.
goto end
:build
if exist ..\Misc\NEWS (
echo.Copying Misc\NEWS to build\NEWS
copy ..\Misc\NEWS build\NEWS > nul
) else if exist ..\Misc\NEWS.D (
if defined BLURB (
echo.Merging Misc/NEWS with
%BLURB%
%BLURB%
merge -f build\NEWS
) else (
echo.No Misc/NEWS file and Blurb is not available.
exit /B 1
)
)
if NOT "
%PAPER%
" == "" (
set SPHINXOPTS=-D latex_elements.papersize=
%PAPER%
%SPHINXOPTS%
)
...
...
Lib/distutils/command/bdist_wininst.py
View file @
5fcd5e64
...
...
@@ -318,26 +318,30 @@ class bdist_wininst(Command):
# string compares seem wrong, but are what sysconfig.py itself uses
if
self
.
target_version
and
self
.
target_version
<
cur_version
:
if
self
.
target_version
<
"2.4"
:
bv
=
6.0
bv
=
'6.0'
elif
self
.
target_version
==
"2.4"
:
bv
=
7.1
bv
=
'7.1'
elif
self
.
target_version
==
"2.5"
:
bv
=
8.0
bv
=
'8.0'
elif
self
.
target_version
<=
"3.2"
:
bv
=
9.0
bv
=
'9.0'
elif
self
.
target_version
<=
"3.4"
:
bv
=
10.0
bv
=
'10.0'
else
:
bv
=
14.0
bv
=
'14.0'
else
:
# for current version - use authoritative check.
try
:
from
msvcrt
import
CRT_ASSEMBLY_VERSION
except
ImportError
:
# cross-building, so assume the latest version
bv
=
14.0
bv
=
'14.0'
else
:
bv
=
float
(
'.'
.
join
(
CRT_ASSEMBLY_VERSION
.
split
(
'.'
,
2
)[:
2
]))
bv
=
'.'
.
join
(
CRT_ASSEMBLY_VERSION
.
split
(
'.'
,
2
)[:
2
])
if
bv
==
'14.11'
:
# v141 and v140 are binary compatible,
# so keep using the 14.0 stub.
bv
=
'14.0'
# wininst-x.y.exe is in the same directory as this file
...
...
@@ -353,7 +357,7 @@ class bdist_wininst(Command):
else
:
sfix
=
''
filename
=
os
.
path
.
join
(
directory
,
"wininst-%
.1f
%s.exe"
%
(
bv
,
sfix
))
filename
=
os
.
path
.
join
(
directory
,
"wininst-%
s
%s.exe"
%
(
bv
,
sfix
))
f
=
open
(
filename
,
"rb"
)
try
:
return
f
.
read
()
...
...
Misc/NEWS.d/next/Windows/2017-09-04-13-19-05.bpo-31340.MbkzLi.rst
0 → 100644
View file @
5fcd5e64
Change to building with MSVC v141 (included with Visual Studio 2017)
PCbuild/pyproject.props
View file @
5fcd5e64
...
...
@@ -147,8 +147,24 @@ foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses
Targets=
"CleanAll"
/>
</Target>
<Target
Name=
"CopyPGCFiles"
BeforeTargets=
"PrepareForBuild"
Condition=
"$(Configuration) == 'PGUpdate'"
>
<ItemGroup>
<_PGCFiles
Include=
"$(OutDir)instrumented\$(TargetName)!*.pgc"
/>
<_PGDFile
Include=
"$(OutDir)instrumented\$(TargetName).pgd"
/>
<_CopyFiles
Include=
"@(_PGCFiles);@(_PGDFile)"
Condition=
"Exists(%(FullPath))"
/>
</ItemGroup>
<Delete
Files=
"@(_CopyFiles->'$(OutDir)%(Filename)%(Extension)')"
/>
<Error
Text=
"PGO run did not succeed (no $(TargetName)!*.pgc files) and there is no data to merge"
Condition=
"$(RequirePGCFiles) == 'true' and @(_PGCFiles) == ''"
/>
<Copy
SourceFiles=
"@(_CopyFiles)"
DestinationFolder=
"$(OutDir)"
UseHardLinksIfPossible=
"true"
OverwriteReadOnlyFiles=
"true"
/>
</Target>
<PropertyGroup>
<SdkBinPath
Condition=
"'$(SdkBinPath)' == '' or !Exists($(SdkBinPath))"
>
$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\x86
</SdkBinPath>
<SdkBinPath
Condition=
"'$(SdkBinPath)' == '' or !Exists($(SdkBinPath))"
>
$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\$(DefaultWindowsSDKVersion)\x86
</SdkBinPath>
<SdkBinPath
Condition=
"!Exists($(SdkBinPath))"
>
$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot10)\bin\x86
</SdkBinPath>
<SdkBinPath
Condition=
"!Exists($(SdkBinPath))"
>
$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot81)\bin\x86
</SdkBinPath>
<SdkBinPath
Condition=
"!Exists($(SdkBinPath))"
>
$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot)\bin\x86
</SdkBinPath>
<SdkBinPath
Condition=
"!Exists($(SdkBinPath))"
>
$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A@InstallationFolder)\Bin\
</SdkBinPath>
...
...
PCbuild/python.props
View file @
5fcd5e64
...
...
@@ -10,6 +10,7 @@
We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.
-->
<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>
<BasePlatformToolset
Condition=
"'$(BasePlatformToolset)' == '' and '$(VCTargetsPath11)' != ''"
>
v110
</BasePlatformToolset>
...
...
@@ -39,6 +40,7 @@
<BuildPath
Condition=
"'$(ArchName)' == 'amd64'"
>
$(BuildPath64)
</BuildPath>
<BuildPath
Condition=
"'$(BuildPath)' == ''"
>
$(PySourcePath)PCBuild\$(ArchName)\
</BuildPath>
<BuildPath
Condition=
"!HasTrailingSlash($(BuildPath))"
>
$(BuildPath)\
</BuildPath>
<BuildPath
Condition=
"$(Configuration) == 'PGInstrument'"
>
$(BuildPath)instrumented\
</BuildPath>
<!-- Directories of external projects. tcltk is handled in tcltk.props -->
<ExternalsDir>
$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals\`))
</ExternalsDir>
...
...
PCbuild/python.vcxproj
View file @
5fcd5e64
...
...
@@ -96,6 +96,7 @@ set PYTHONPATH=$(PySourcePath)Lib
<PropertyGroup>
<_PGOPath
Condition=
"$(Configuration) == 'PGInstrument' and $(Platform) == 'Win32'"
>
@set PATH=%PATH%%3B$(VCInstallDir)bin
</_PGOPath>
<_PGOPath
Condition=
"$(Configuration) == 'PGInstrument' and $(Platform) == 'x64'"
>
@set PATH=%PATH%%3B$(VCInstallDir)bin\amd64
</_PGOPath>
<_PGOPath
Condition=
"$(Configuration) == 'PGInstrument' and $(VC_PGO_RunTime_Dir) != ''"
>
@set PATH=%PATH%%3B$(VC_PGO_RunTime_Dir)
</_PGOPath>
<_Content>
@rem This script invokes the most recently built Python with all arguments
@rem passed through to the interpreter. This file is generated by the
@rem build process and any changes *will* be thrown away by the next
...
...
PCbuild/pythoncore.vcxproj
View file @
5fcd5e64
...
...
@@ -49,6 +49,7 @@
</ImportGroup>
<PropertyGroup>
<KillPython>
true
</KillPython>
<RequirePGCFiles>
true
</RequirePGCFiles>
</PropertyGroup>
<ImportGroup
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
...
...
@@ -429,7 +430,7 @@
</ClCompile>
</ItemGroup>
</Target>
<Target
Name=
"_WarnAboutToolset"
BeforeTargets=
"PrepareForBuild"
Condition=
"$(PlatformToolset) != 'v140'"
>
<Target
Name=
"_WarnAboutToolset"
BeforeTargets=
"PrepareForBuild"
Condition=
"$(PlatformToolset) != 'v140'
and $(PlatformToolset) != 'v141'
"
>
<Warning
Text=
"Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities."
/>
</Target>
</Project>
Tools/msi/exe/exe.wixproj
View file @
5fcd5e64
...
...
@@ -39,6 +39,28 @@
Overwrite=
"true"
Lines=
"@(_LicenseFiles->'%(Content)')"
/>
</Target>
<Target
Name=
"_CopyMiscNews"
AfterTargets=
"PrepareForBuild"
Condition=
"Exists('$(PySourcePath)Misc\NEWS')"
>
<Copy
SourceFiles=
"$(PySourcePath)Misc\NEWS"
DestinationFiles=
"$(BuildPath)NEWS.txt"
/>
</Target>
<Target
Name=
"_MergeMiscNewsWithBlurb"
AfterTargets=
"PrepareForBuild"
Condition=
"$(Blurb) != '' and !Exists('$(PySourcePath)Misc\NEWS')"
>
<Exec
Command=
"$(Blurb) merge -f "$(BuildPath)NEWS.txt""
WorkingDirectory=
"$(PCBuild)"
/>
</Target>
<Target
Name=
"_MergeMiscNewsWithPython"
AfterTargets=
"PrepareForBuild"
Condition=
"$(Blurb) == '' and !Exists('$(PySourcePath)Misc\NEWS')"
>
<ItemGroup>
<HostPython
Include=
"$(ExternalsDir)python*\tools\python.exe"
/>
<HostPython
Include=
"@(HostPython)"
Condition=
"Exists(%(FullPath))"
/>
<HostPython
Include=
"py"
Condition=
"@(HostPython) == ''"
/>
</ItemGroup>
<PropertyGroup>
<HostPython>
@(HostPython)
</HostPython>
<HostPython
Condition=
"$(HostPython.Contains(';'))"
>
$(HostPython.Remove($(HostPython.IndexOf(';'))))
</HostPython>
</PropertyGroup>
<Exec
Command=
""$(HostPython)" -m pip install -U blurb"
WorkingDirectory=
"$(PCBuild)"
/>
<Exec
Command=
""$(HostPython)" -m blurb merge -f "$(BuildPath)NEWS.txt""
WorkingDirectory=
"$(PCBuild)"
/>
</Target>
<Import
Project=
"..\msi.targets"
/>
</Project>
\ No newline at end of file
Tools/msi/exe/exe_files.wxs
View file @
5fcd5e64
...
...
@@ -6,7 +6,7 @@
<File
Name=
"LICENSE.txt"
Source=
"LICENSE"
KeyPath=
"yes"
/>
</Component>
<Component
Id=
"NEWS.txt"
Directory=
"InstallDirectory"
Guid=
"*"
>
<File
Name=
"NEWS.txt"
Source=
"!(bindpath.src)Misc\NEWS"
KeyPath=
"yes"
/>
<File
Name=
"NEWS.txt"
KeyPath=
"yes"
/>
</Component>
</ComponentGroup>
</Fragment>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment