Skip to content

Commit 1ae6b29

Browse files
committed
Add _getcompiler project on Windows
1 parent 61ddc42 commit 1ae6b29

9 files changed

Lines changed: 207 additions & 17 deletions

File tree

‎Makefile.pre.in‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,8 @@ Modules/getbuildinfo.h: $(srcdir)/Tools/build/generate_getbuildinfo.py Programs/
18721872
`LC_ALL=C $(GITVERSION)` \
18731873
`LC_ALL=C $(GITTAG)` \
18741874
`LC_ALL=C $(GITBRANCH)` \
1875-
"`Programs/_getcompiler`"
1875+
"`Programs/_getcompiler`" \
1876+
use_pyconfig
18761877

18771878
Modules/getbuildinfo.o: $(srcdir)/Modules/getbuildinfo.c Modules/getbuildinfo.h
18781879
# Add local Modules/ include directory to get Modules/getbuildinfo.h

‎PCbuild/_getcompiler.vcxproj‎

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|ARM64">
9+
<Configuration>Debug</Configuration>
10+
<Platform>ARM64</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|Win32">
13+
<Configuration>Debug</Configuration>
14+
<Platform>Win32</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Debug|x64">
17+
<Configuration>Debug</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
<ProjectConfiguration Include="PGInstrument|ARM">
21+
<Configuration>PGInstrument</Configuration>
22+
<Platform>ARM</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="PGInstrument|ARM64">
25+
<Configuration>PGInstrument</Configuration>
26+
<Platform>ARM64</Platform>
27+
</ProjectConfiguration>
28+
<ProjectConfiguration Include="PGInstrument|Win32">
29+
<Configuration>PGInstrument</Configuration>
30+
<Platform>Win32</Platform>
31+
</ProjectConfiguration>
32+
<ProjectConfiguration Include="PGInstrument|x64">
33+
<Configuration>PGInstrument</Configuration>
34+
<Platform>x64</Platform>
35+
</ProjectConfiguration>
36+
<ProjectConfiguration Include="PGUpdate|ARM">
37+
<Configuration>PGUpdate</Configuration>
38+
<Platform>ARM</Platform>
39+
</ProjectConfiguration>
40+
<ProjectConfiguration Include="PGUpdate|ARM64">
41+
<Configuration>PGUpdate</Configuration>
42+
<Platform>ARM64</Platform>
43+
</ProjectConfiguration>
44+
<ProjectConfiguration Include="PGUpdate|Win32">
45+
<Configuration>PGUpdate</Configuration>
46+
<Platform>Win32</Platform>
47+
</ProjectConfiguration>
48+
<ProjectConfiguration Include="PGUpdate|x64">
49+
<Configuration>PGUpdate</Configuration>
50+
<Platform>x64</Platform>
51+
</ProjectConfiguration>
52+
<ProjectConfiguration Include="Release|ARM">
53+
<Configuration>Release</Configuration>
54+
<Platform>ARM</Platform>
55+
</ProjectConfiguration>
56+
<ProjectConfiguration Include="Release|ARM64">
57+
<Configuration>Release</Configuration>
58+
<Platform>ARM64</Platform>
59+
</ProjectConfiguration>
60+
<ProjectConfiguration Include="Release|Win32">
61+
<Configuration>Release</Configuration>
62+
<Platform>Win32</Platform>
63+
</ProjectConfiguration>
64+
<ProjectConfiguration Include="Release|x64">
65+
<Configuration>Release</Configuration>
66+
<Platform>x64</Platform>
67+
</ProjectConfiguration>
68+
</ItemGroup>
69+
<PropertyGroup Label="Globals">
70+
<ProjectGuid>{E762E8EE-5316-4D66-9529-7074F3B6E74A}</ProjectGuid>
71+
<RootNamespace>_getcompiler</RootNamespace>
72+
<SupportPGO>false</SupportPGO>
73+
</PropertyGroup>
74+
<Import Project="python.props" />
75+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
76+
<PropertyGroup Label="Configuration">
77+
<TargetName>_getcompiler</TargetName>
78+
<ConfigurationType>Application</ConfigurationType>
79+
<CharacterSet>MultiByte</CharacterSet>
80+
</PropertyGroup>
81+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
82+
<ImportGroup Label="ExtensionSettings">
83+
</ImportGroup>
84+
<PropertyGroup>
85+
<MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
86+
</PropertyGroup>
87+
<ImportGroup Label="PropertySheets">
88+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
89+
<Import Project="pyproject.props" />
90+
</ImportGroup>
91+
<PropertyGroup Label="UserMacros">
92+
<ExeName>$(PyExeName).exe</ExeName>
93+
</PropertyGroup>
94+
<ItemDefinitionGroup>
95+
<ClCompile>
96+
<PreprocessorDefinitions>EXENAME=L"$(ExeName)";_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
97+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
98+
</ClCompile>
99+
<ResourceCompile>
100+
<PreprocessorDefinitions>PY_ICON;%(PreprocessorDefinitions)</PreprocessorDefinitions>
101+
</ResourceCompile>
102+
<Link>
103+
<AdditionalDependencies>pathcch.lib;%(AdditionalDependencies)</AdditionalDependencies>
104+
<SubSystem>Console</SubSystem>
105+
</Link>
106+
</ItemDefinitionGroup>
107+
<ItemGroup>
108+
<ClCompile Include="..\Programs\_getcompiler.c" />
109+
</ItemGroup>
110+
<ItemGroup>
111+
<ResourceCompile Include="..\PC\python_exe.rc" />
112+
</ItemGroup>
113+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
114+
<ImportGroup Label="ExtensionTargets">
115+
</ImportGroup>
116+
</Project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Resource Files">
5+
<UniqueIdentifier>{8f3ab79e-3cba-4e6d-82b2-559ce946de58}</UniqueIdentifier>
6+
</Filter>
7+
<Filter Include="Source Files">
8+
<UniqueIdentifier>{4a2423af-e5d1-4c88-b308-d71b768977df}</UniqueIdentifier>
9+
</Filter>
10+
</ItemGroup>
11+
<ItemGroup>
12+
<ResourceCompile Include="..\PC\python_exe.rc">
13+
<Filter>Resource Files</Filter>
14+
</ResourceCompile>
15+
</ItemGroup>
16+
<ItemGroup>
17+
<ClCompile Include="..\Programs\_getcompiler.c">
18+
<Filter>Source Files</Filter>
19+
</ClCompile>
20+
</ItemGroup>
21+
</Project>

‎PCbuild/pcbuild.sln‎

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio Version 17
3-
VisualStudioVersion = 17.8.34525.116
2+
# Visual Studio Version 18
3+
VisualStudioVersion = 18.10.12224.181 stable
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}"
66
ProjectSection(SolutionItems) = preProject
@@ -33,8 +33,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj",
3333
{78D80A15-BD8C-44E2-B49E-1F05B0A0A687} = {78D80A15-BD8C-44E2-B49E-1F05B0A0A687}
3434
{86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480}
3535
{885D4898-D08D-4091-9C40-C700CFE3FC5A} = {885D4898-D08D-4091-9C40-C700CFE3FC5A}
36-
{947BB5F5-6025-4A4F-8182-1B175469F8D2} = {947BB5F5-6025-4A4F-8182-1B175469F8D2}
3736
{900342D7-516A-4469-B1AD-59A66E49A25F} = {900342D7-516A-4469-B1AD-59A66E49A25F}
37+
{947BB5F5-6025-4A4F-8182-1B175469F8D2} = {947BB5F5-6025-4A4F-8182-1B175469F8D2}
3838
{9E48B300-37D1-11DD-8C41-005056C00008} = {9E48B300-37D1-11DD-8C41-005056C00008}
3939
{9EC7190A-249F-4180-A900-548FDCF3055F} = {9EC7190A-249F-4180-A900-548FDCF3055F}
4040
{A2697BD3-28C1-4AEC-9106-8B748639FD16} = {A2697BD3-28C1-4AEC-9106-8B748639FD16}
@@ -43,6 +43,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj",
4343
{C6E20F84-3247-4AD6-B051-B073268F73BA} = {C6E20F84-3247-4AD6-B051-B073268F73BA}
4444
{CB435430-EBB1-478B-8F4E-C256F6838F55} = {CB435430-EBB1-478B-8F4E-C256F6838F55}
4545
{D06B6426-4762-44CC-8BAD-D79052507F2F} = {D06B6426-4762-44CC-8BAD-D79052507F2F}
46+
{E762E8EE-5316-4D66-9529-7074F3B6E74A} = {E762E8EE-5316-4D66-9529-7074F3B6E74A}
4647
{EB6E69DD-04BF-4543-9B92-49FAABCEAC2E} = {EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}
4748
{ECC7CEAC-A5E5-458E-BB9E-2413CC847881} = {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}
4849
{F749B822-B489-4CA5-A3AD-CE078F5F338A} = {F749B822-B489-4CA5-A3AD-CE078F5F338A}
@@ -161,6 +162,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_zstd", "_zstd.vcxproj", "{
161162
EndProject
162163
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xxlimited_35", "xxlimited_35.vcxproj", "{FB868EA7-F93A-4D9B-BE78-CA4E9BA14FFF}"
163164
EndProject
165+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_getcompiler", "_getcompiler.vcxproj", "{E762E8EE-5316-4D66-9529-7074F3B6E74A}"
166+
EndProject
164167
Global
165168
GlobalSection(SolutionConfigurationPlatforms) = preSolution
166169
Debug|ARM = Debug|ARM
@@ -1746,6 +1749,38 @@ Global
17461749
{FB868EA7-F93A-4D9B-BE78-CA4E9BA14FFF}.Release|Win32.Build.0 = Release|Win32
17471750
{FB868EA7-F93A-4D9B-BE78-CA4E9BA14FFF}.Release|x64.ActiveCfg = Release|x64
17481751
{FB868EA7-F93A-4D9B-BE78-CA4E9BA14FFF}.Release|x64.Build.0 = Release|x64
1752+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Debug|ARM.ActiveCfg = Debug|ARM
1753+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Debug|ARM.Build.0 = Debug|ARM
1754+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Debug|ARM64.ActiveCfg = Debug|ARM64
1755+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Debug|ARM64.Build.0 = Debug|ARM64
1756+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Debug|Win32.ActiveCfg = Debug|Win32
1757+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Debug|Win32.Build.0 = Debug|Win32
1758+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Debug|x64.ActiveCfg = Debug|x64
1759+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Debug|x64.Build.0 = Debug|x64
1760+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM
1761+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGInstrument|ARM.Build.0 = PGInstrument|ARM
1762+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64
1763+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64
1764+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
1765+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
1766+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
1767+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGInstrument|x64.Build.0 = PGInstrument|x64
1768+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM
1769+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGUpdate|ARM.Build.0 = PGUpdate|ARM
1770+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64
1771+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64
1772+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
1773+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
1774+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
1775+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.PGUpdate|x64.Build.0 = PGUpdate|x64
1776+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Release|ARM.ActiveCfg = Release|ARM
1777+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Release|ARM.Build.0 = Release|ARM
1778+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Release|ARM64.ActiveCfg = Release|ARM64
1779+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Release|ARM64.Build.0 = Release|ARM64
1780+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Release|Win32.ActiveCfg = Release|Win32
1781+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Release|Win32.Build.0 = Release|Win32
1782+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Release|x64.ActiveCfg = Release|x64
1783+
{E762E8EE-5316-4D66-9529-7074F3B6E74A}.Release|x64.Build.0 = Release|x64
17491784
EndGlobalSection
17501785
GlobalSection(SolutionProperties) = preSolution
17511786
HideSolutionNode = FALSE

‎PCbuild/python.props‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@
258258
<PyExeName Condition="$(PyExeName) == ''">python</PyExeName>
259259
<PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)$(PyExeName)$(PyDebugExt).exe</PythonExe>
260260
<PyWExeName Condition="$(PyWExeName) == ''">pythonw</PyWExeName>
261+
<GetCompilerExe Condition="'$(GetCompilerExe)' == ''">$(BuildPath)_getcompiler$(PyDebugExt).exe</GetCompilerExe>
261262

262263
<!-- The name of the resulting pythonXY.dll (without the extension) -->
263264
<PyDllName Condition="$(DisableGil) == 'true'">python$(MajorVersionNumber)$(MinorVersionNumber)t$(PyDebugExt)</PyDllName>

‎PCbuild/pythoncore.vcxproj‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,10 @@
731731
</ImportGroup>
732732
<Target Name="_TriggerRegen" BeforeTargets="PrepareForBuild" DependsOnTargets="Regen" />
733733

734-
<Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild">
734+
<Target Name="_GetBuildInfoHeader"
735+
Inputs="" Outputs="Modules\getbuildinfo.h"
736+
DependsOnTargets="FindPythonForBuild"
737+
BeforeTargets="PrepareForBuild">
735738
<PropertyGroup>
736739
<GIT Condition="$(GIT) == ''">git</GIT>
737740
<_GIT>$(GIT)</_GIT>
@@ -742,18 +745,22 @@
742745
<Exec Command="$(_GIT) name-rev --name-only HEAD &gt; &quot;$(IntDir)gitbranch.txt&quot;" ContinueOnError="true" />
743746
<Exec Command="$(_GIT) rev-parse --short HEAD &gt; &quot;$(IntDir)gitversion.txt&quot;" ContinueOnError="true" />
744747
<Exec Command="$(_GIT) describe --all --always --dirty &gt; &quot;$(IntDir)gittag.txt&quot;" ContinueOnError="true" />
748+
<Exec Command='"$(GetCompilerExe)" &gt; &quot;$(IntDir)compiler.txt&quot;' ContinueOnError="true" />
745749
<PropertyGroup>
746750
<GitBranch Condition="Exists('$(IntDir)gitbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitbranch.txt').Trim())</GitBranch>
747751
<GitVersion Condition="Exists('$(IntDir)gitversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitversion.txt').Trim())</GitVersion>
748752
<GitTag Condition="Exists('$(IntDir)gittag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gittag.txt').Trim())</GitTag>
753+
<Compiler Condition="Exists('$(IntDir)compiler.txt')">$([System.IO.File]::ReadAllText('$(IntDir)compiler.txt').Trim())</Compiler>
754+
755+
<GilEnabled Condition="$(DisableGil) == 'true'">0</GilEnabled>
756+
<GilEnabled Condition="$(DisableGil) != 'true'">1</GilEnabled>
749757
</PropertyGroup>
750-
<Message Text="Building $(GitTag):$(GitVersion) $(GitBranch)" Importance="high" />
751-
<ItemGroup>
752-
<ClCompile Condition="%(Filename) == 'getbuildinfo'">
753-
<PreprocessorDefinitions>GITVERSION="$(GitVersion)";GITTAG="$(GitTag)";GITBRANCH="$(GitBranch)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
754-
</ClCompile>
755-
</ItemGroup>
758+
759+
<Message Text="Run generate_getbuildinfo.py" Importance="high" />
760+
<Exec Command='$(PythonForBuild) Tools/build/generate_getbuildinfo.py Modules\getbuildinfo.h win32 $(GitVersion) $(GitTag) $(GitBranch) "$(Compiler)" $(GilEnabled)'
761+
WorkingDirectory="$(PySourcePath)" />
756762
</Target>
763+
757764
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v143' and $(PlatformToolset) != 'v145'">
758765
<Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
759766
</Target>

‎PCbuild/readme.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ pythonw
143143
_testembed
144144
_testembed.exe, a small program that embeds Python for testing
145145
purposes, used by test_capi.py
146+
_getcompiler
147+
_getcompiler.exe, a small program that writes the compiler name and version
148+
to stdout. Used to build Modules\getbuildinfo.h.
146149

147150
These are miscellaneous sub-projects that don't really fit the other
148151
categories:

‎Programs/_getcompiler.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Do not link to python3x.lib
2+
#define Py_NO_LINK_LIB
3+
14
#include "Python.h"
25
#include <stdio.h> // printf()
36

‎Tools/build/generate_getbuildinfo.py‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,9 @@ def get_date_time():
6060

6161

6262
def main():
63-
if len(sys.argv) != 7:
63+
if len(sys.argv) != 8:
6464
print(f"usage: {SCRIPT_NAME} "
65-
"OUTPUT PLATFORM GITVERSION GITTAG GITBRANCH COMPILER")
66-
print(sys.argv)
67-
print(len(sys.argv))
65+
"OUTPUT PLATFORM GITVERSION GITTAG GITBRANCH COMPILER GIL_ENABLED")
6866
sys.exit(1)
6967

7068
OUTPUT = sys.argv[1]
@@ -73,6 +71,7 @@ def main():
7371
GITTAG = sys.argv[4]
7472
GITBRANCH = sys.argv[5]
7573
COMPILER = sys.argv[6]
74+
GIL_ENABLED = sys.argv[7]
7675

7776
if not PLATFORM:
7877
PLATFORM = "unknown"
@@ -93,10 +92,14 @@ def main():
9392

9493
DATE, TIME = get_date_time()
9594
PY_VERSION = get_py_version()
96-
Py_GIL_DISABLED = get_gil_disable()
95+
if GIL_ENABLED == 'use_pyconfig':
96+
Py_GIL_DISABLED = get_gil_disable()
97+
GIL_ENABLED = not Py_GIL_DISABLED
98+
else:
99+
GIL_ENABLED = int(GIL_ENABLED)
97100
BUILDINFO = f"{gitid}{sep}{revision}, {DATE:.20s}, {TIME:.9s}"
98101

99-
if Py_GIL_DISABLED:
102+
if not GIL_ENABLED:
100103
GET_VERSION = f"{PY_VERSION} free-threading build ({BUILDINFO}) {COMPILER}"
101104
else:
102105
GET_VERSION = f"{PY_VERSION} ({BUILDINFO}) {COMPILER}"

0 commit comments

Comments
 (0)