Skip to content

Commit eb61469

Browse files
committed
Build python3.dll & python3t.dll separately, with fixed names
1 parent e25d7ff commit eb61469

14 files changed

Lines changed: 39 additions & 26 deletions

PCbuild/_remote_debugging.vcxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,14 @@
121121
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
122122
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
123123
</ProjectReference>
124-
<ProjectReference Include="python3dll.vcxproj">
124+
<ProjectReference Include="python3dll.vcxproj" Condition="$(DisableGil) != 'true'">
125125
<Project>{885d4898-d08d-4091-9c40-c700cfe3fc5a}</Project>
126126
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
127127
</ProjectReference>
128+
<ProjectReference Include="python3tdll.vcxproj">
129+
<Project>{947BB5F5-6025-4A4F-8182-1B175469F8D2}</Project>
130+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
131+
</ProjectReference>
128132
</ItemGroup>
129133
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
130134
<ImportGroup Label="ExtensionTargets">

PCbuild/_testcapi.vcxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,14 @@
142142
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
143143
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
144144
</ProjectReference>
145-
<ProjectReference Include="python3dll.vcxproj">
145+
<ProjectReference Include="python3dll.vcxproj" Condition="$(DisableGil) != 'true'">
146146
<Project>{885d4898-d08d-4091-9c40-c700cfe3fc5a}</Project>
147147
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
148148
</ProjectReference>
149+
<ProjectReference Include="python3tdll.vcxproj">
150+
<Project>{947BB5F5-6025-4A4F-8182-1B175469F8D2}</Project>
151+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
152+
</ProjectReference>
149153
</ItemGroup>
150154
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
151155
<ImportGroup Label="ExtensionTargets">

PCbuild/_testlimitedcapi.vcxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,14 @@
125125
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
126126
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
127127
</ProjectReference>
128-
<ProjectReference Include="python3dll.vcxproj">
128+
<ProjectReference Include="python3dll.vcxproj" Condition="$(DisableGil) != 'true'">
129129
<Project>{885d4898-d08d-4091-9c40-c700cfe3fc5a}</Project>
130130
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
131131
</ProjectReference>
132+
<ProjectReference Include="python3tdll.vcxproj">
133+
<Project>{947BB5F5-6025-4A4F-8182-1B175469F8D2}</Project>
134+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
135+
</ProjectReference>
132136
</ItemGroup>
133137
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
134138
<ImportGroup Label="ExtensionTargets">

PCbuild/pcbuild.proj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
<BuildInParallel>false</BuildInParallel>
6161
</Projects>
6262
<!-- python3.dll -->
63-
<Projects Include="python3dll.vcxproj" />
64-
<!-- abi3t-compat\python3t.dll -->
65-
<Projects Include="abi3t-compat.vcxproj" />
63+
<Projects Include="python3dll.vcxproj" Condition="$(DisableGil) != 'true'" />
64+
<!-- python3t.dll -->
65+
<Projects Include="python3tdll.vcxproj" />
6666
<!-- py[w].exe -->
6767
<Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />
6868
<!-- pyshellext.dll -->

PCbuild/pcbuild.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multip
105105
EndProject
106106
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
107107
EndProject
108-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abi3t-compat", "abi3t-compat.vcxproj", "{947BB5F5-6025-4A4F-8182-1B175469F8D2}"
108+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3tdll", "python3tdll.vcxproj", "{947BB5F5-6025-4A4F-8182-1B175469F8D2}"
109109
EndProject
110110
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xxlimited", "xxlimited.vcxproj", "{F749B822-B489-4CA5-A3AD-CE078F5F338A}"
111111
EndProject

PCbuild/pyproject.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
<_PlatformPreprocessorDefinition>_WIN32;</_PlatformPreprocessorDefinition>
5050
<_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64'">_WIN64;</_PlatformPreprocessorDefinition>
5151
<_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64' and $(PlatformToolset) != 'ClangCL'">_M_X64;$(_PlatformPreprocessorDefinition)</_PlatformPreprocessorDefinition>
52-
<_Py3NamePreprocessorDefinition>PY3_DLLNAME=L"$(Py3DllName)$(PyDebugExt)";</_Py3NamePreprocessorDefinition>
53-
<_Abi3tCompatDllNamePreprocessorDefinition Condition="$(DisableGil) != 'true'">ABI3T_COMPAT_DLLNAME=L"$(PyAbi3tCompatDllDir)\\$(PyAbi3tCompatDllName)$(PyDebugExt)";</_Abi3tCompatDllNamePreprocessorDefinition>
52+
<_Py3NamePreprocessorDefinition>PY3_DLLNAME=L"python3$(PyDebugExt)";</_Py3NamePreprocessorDefinition>
53+
<_Abi3tCompatDllNamePreprocessorDefinition Condition="$(DisableGil) != 'true'">ABI3T_COMPAT_DLLNAME=L"abi3t-compat\\python3t$(PyDebugExt)";</_Abi3tCompatDllNamePreprocessorDefinition>
5454
<_FreeThreadedPreprocessorDefinition Condition="$(DisableGil) == 'true'">Py_GIL_DISABLED=1;</_FreeThreadedPreprocessorDefinition>
5555
<_PymallocHugepagesPreprocessorDefinition Condition="$(UsePymallocHugepages) == 'true'">PYMALLOC_USE_HUGEPAGES=1;</_PymallocHugepagesPreprocessorDefinition>
5656
</PropertyGroup>

PCbuild/python.props

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,6 @@
241241
<!-- The name of the resulting pythonXY.dll (without the extension) -->
242242
<PyDllName Condition="$(DisableGil) == 'true'">python$(MajorVersionNumber)$(MinorVersionNumber)t$(PyDebugExt)</PyDllName>
243243
<PyDllName Condition="$(PyDllName) == ''">python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName>
244-
<!-- The name of the resulting pythonX.dll (without the extension) -->
245-
<Py3DllName Condition="$(DisableGil) == 'true'">python3t</Py3DllName>
246-
<Py3DllName Condition="$(Py3DllName) == ''">python3</Py3DllName>
247-
<!-- The directory & name (without extension) of abi3t-compat\pythonXt.dll -->
248-
<PyAbi3tCompatDllDir>abi3t-compat</PyAbi3tCompatDllDir>
249-
<PyAbi3tCompatDllName>python3t</PyAbi3tCompatDllName>
250244

251245
<!-- The version and platform tag to include in .pyd filenames -->
252246
<PydTag Condition="$(ArchName) == 'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag>

PCbuild/python3dll.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<Import Project="python.props" />
7676
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
7777
<PropertyGroup Label="Configuration">
78-
<TargetName>$(Py3DllName)</TargetName>
78+
<TargetName>python3</TargetName>
7979
<ConfigurationType>DynamicLibrary</ConfigurationType>
8080
</PropertyGroup>
8181
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -91,7 +91,7 @@
9191
</PropertyGroup>
9292
<ItemDefinitionGroup>
9393
<ClCompile>
94-
<PreprocessorDefinitions>PYTHON_DLL_NAME="$(PyDllName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
94+
<PreprocessorDefinitions>PYTHON_DLL_NAME="python3$(PyDebugExt)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
9595
<BufferSecurityCheck>false</BufferSecurityCheck>
9696
</ClCompile>
9797
<Link>
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@
6868
</ItemGroup>
6969
<PropertyGroup Label="Globals">
7070
<ProjectGuid>{947BB5F5-6025-4A4F-8182-1B175469F8D2}</ProjectGuid>
71-
<RootNamespace>abi3t-compat</RootNamespace>
71+
<RootNamespace>python3tdll</RootNamespace>
7272
<Keyword>Win32Proj</Keyword>
7373
<SupportPGO>false</SupportPGO>
7474
</PropertyGroup>
7575
<Import Project="python.props" />
7676
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
7777
<PropertyGroup Label="Configuration">
78-
<TargetName>$(PyAbi3tCompatDllName)</TargetName>
78+
<TargetName>python3t</TargetName>
7979
<ConfigurationType>DynamicLibrary</ConfigurationType>
8080
</PropertyGroup>
8181
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -89,12 +89,9 @@
8989
<PropertyGroup>
9090
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
9191
</PropertyGroup>
92-
<PropertyGroup>
93-
<OutDir>$(BuildPath)$(PyAbi3tCompatDllDir)\</OutDir>
94-
</PropertyGroup>
9592
<ItemDefinitionGroup>
9693
<ClCompile>
97-
<PreprocessorDefinitions>PYTHON_DLL_NAME="$(PyDllName)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
94+
<PreprocessorDefinitions>PYTHON_DLL_NAME="python3t$(PyDebugExt)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
9895
<BufferSecurityCheck>false</BufferSecurityCheck>
9996
</ClCompile>
10097
<Link>

0 commit comments

Comments
 (0)