diff options
author | Steve Dower <steve.dower@python.org> | 2024-01-17 21:52:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-17 21:52:23 (GMT) |
commit | f56d132deb9fff861439ed56ed7414d22e4e4bb9 (patch) | |
tree | 69e70221cd40f134de9abf1292f228ec7d5c9c11 /PCbuild/python.props | |
parent | 78fcde039a33d8463e34356d5462fecee0f2831a (diff) | |
download | cpython-f56d132deb9fff861439ed56ed7414d22e4e4bb9.zip cpython-f56d132deb9fff861439ed56ed7414d22e4e4bb9.tar.gz cpython-f56d132deb9fff861439ed56ed7414d22e4e4bb9.tar.bz2 |
gh-112984 Update Windows build and installer for free-threaded builds (GH-113129)
Diffstat (limited to 'PCbuild/python.props')
-rw-r--r-- | PCbuild/python.props | 70 |
1 files changed, 50 insertions, 20 deletions
diff --git a/PCbuild/python.props b/PCbuild/python.props index 3b7a887..e879608 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -31,11 +31,11 @@ <ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'ARM'">arm32</ArchName> <ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'ARM64'">arm64</ArchName> <ArchName Condition="'$(ArchName)' == ''">win32</ArchName> - + <!-- Root directory of the repository --> <PySourcePath Condition="'$(PySourcePath)' == ''">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\))</PySourcePath> <PySourcePath Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath> - + <!-- Directory where build outputs are put --> <BuildPath32 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\win32\</BuildPath32> <BuildPath32 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\win32\</BuildPath32> @@ -52,7 +52,7 @@ <BuildPath Condition="'$(BuildPath)' == ''">$(PySourcePath)PCbuild\$(ArchName)\</BuildPath> <BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath> <BuildPath Condition="$(Configuration) == 'PGInstrument'">$(BuildPath)instrumented\</BuildPath> - + <!-- VPATH definition (escaped) --> <PyVPath Condition="$(Configuration) != 'PGInstrument'">..\\..</PyVPath> <PyVPath Condition="$(Configuration) == 'PGInstrument'">..\\..\\..</PyVPath> @@ -84,22 +84,19 @@ <PropertyGroup> <!-- 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> <PyArchExt Condition="'$(ArchName)' == 'arm32'">-arm32</PyArchExt> <PyArchExt Condition="'$(ArchName)' == 'arm64'">-arm64</PyArchExt> - - <!-- Full path of the resulting python.exe binary --> - <PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)python$(PyDebugExt).exe</PythonExe> <!-- Include Tkinter by default --> <IncludeTkinter Condition="'$(IncludeTkinter)' == ''">true</IncludeTkinter> </PropertyGroup> - + <PropertyGroup Condition="'$(Platform)'=='ARM'" Label="ArmConfiguration"> <WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport> </PropertyGroup> @@ -141,7 +138,7 @@ <PropertyGroup Condition="'$(OverrideVersion)' == ''"> <!-- Read version information from Include\patchlevel.h. The following properties are set: - + MajorVersionNumber - the '3' in '3.5.2a1' MinorVersionNumber - the '5' in '3.5.2a1' MicroVersionNumber - the '2' in '3.5.2a1' @@ -167,22 +164,22 @@ <ReleaseLevelName Condition="$(_ReleaseLevel) == 'BETA'">b$(ReleaseSerial)</ReleaseLevelName> <ReleaseLevelName Condition="$(_ReleaseLevel) == 'GAMMA'">rc$(ReleaseSerial)</ReleaseLevelName> </PropertyGroup> - + <PropertyGroup Condition="'$(OverrideVersion)' != ''"> <!-- Override the version number when building by specifying OverrideVersion. For example: - + PCbuild\build.bat "/p:OverrideVersion=3.5.2a1" - + Use the -V option to check your version is valid: - + PCbuild\build.bat -V "/p:OverrideVersion=3.5.2a1" PythonVersionNumber: 3.5.2 PythonVersion: 3.5.2a1 PythonVersionHex: 0x030502A1 Field3Value: 2101 - + Note that this only affects the version numbers embedded in resources and installers, but not sys.version. --> @@ -223,22 +220,55 @@ )) ))</Field3Value> <Field3Value Condition="$(UseTestMarker) == 'true'">$([msbuild]::Add($(Field3Value), 9000))</Field3Value> - + + <!-- Name and full path of the resulting python.exe binary --> + <PyExeName Condition="$(DisableGil) == 'true'">python$(MajorVersionNumber).$(MinorVersionNumber)t</PyExeName> + <PyExeName Condition="$(PyExeName) == ''">python</PyExeName> + <PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)$(PyExeName)$(PyDebugExt).exe</PythonExe> + <PyWExeName Condition="$(DisableGil) == 'true'">pythonw$(MajorVersionNumber).$(MinorVersionNumber)t</PyWExeName> + <PyWExeName Condition="$(PyWExeName) == ''">pythonw</PyWExeName> + <!-- The name of the resulting pythonXY.dll (without the extension) --> - <PyDllName>python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName> + <PyDllName Condition="$(DisableGil) == 'true'">python$(MajorVersionNumber)$(MinorVersionNumber)t$(PyDebugExt)</PyDllName> + <PyDllName Condition="$(PyDllName) == ''">python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName> <!-- The name of the resulting pythonX.dll (without the extension) --> - <Py3DllName>python3$(PyDebugExt)</Py3DllName> + <Py3DllName Condition="$(DisableGil) == 'true'">python3t</Py3DllName> + <Py3DllName Condition="$(Py3DllName) == ''">python3</Py3DllName> <!-- The version and platform tag to include in .pyd filenames --> <PydTag Condition="$(ArchName) == 'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag> <PydTag Condition="$(ArchName) == 'arm32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_arm32</PydTag> <PydTag Condition="$(ArchName) == 'arm64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_arm64</PydTag> <PydTag Condition="$(ArchName) == 'amd64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag> - + <!-- The version number for sys.winver --> <SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)$(PyArchExt)$(PyTestExt)</SysWinVer> + + <!-- The version and platform tag to include in .pyd filenames for freethreaded builds --> + <FreethreadedPydTag Condition="$(ArchName) == 'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)t-win32</FreethreadedPydTag> + <FreethreadedPydTag Condition="$(ArchName) == 'arm32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)t-win_arm32</FreethreadedPydTag> + <FreethreadedPydTag Condition="$(ArchName) == 'arm64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)t-win_arm64</FreethreadedPydTag> + <FreethreadedPydTag Condition="$(ArchName) == 'amd64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)t-win_amd64</FreethreadedPydTag> + + <!-- The version number for sys.winver for freethreaded builds --> + <FreethreadedSysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)t$(PyArchExt)$(PyTestExt)</FreethreadedSysWinVer> + </PropertyGroup> + + <PropertyGroup Condition="$(DisableGil) != 'true'"> + <!-- The extension to use for standard library PYDs --> + <PyStdlibPydExt>.pyd</PyStdlibPydExt> </PropertyGroup> - + + <PropertyGroup Condition="$(DisableGil) == 'true'"> + <PydTag>$(FreethreadedPydTag)</PydTag> + + <!-- The extension to use for standard library PYDs --> + <PyStdlibPydExt>$(PydTag).pyd</PyStdlibPydExt> + + <!-- The version number for sys.winver --> + <SysWinVer>$(FreethreadedSysWinVer)</SysWinVer> + </PropertyGroup> + <!-- Displays the calculated version info --> <Target Name="ShowVersionInfo"> <Message Importance="high" Text="PythonVersionNumber: $(PythonVersionNumber)" /> |