Skip to content

Commit cc50039

Browse files
committed
Merge branch 'tk9_for_python314' of github.com:culler/cpython into tk9_for_python314
2 parents 2ef001b + cf9b947 commit cc50039

File tree

8 files changed

+25
-212
lines changed

8 files changed

+25
-212
lines changed

Lib/test/test_tkinter/test_widgets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
add_configure_tests,
1313
AbstractWidgetTest,
1414
StandardOptionsTests,
15-
IntegerSizeTests, PixelSizeTests)
15+
IntegerSizeTests,
16+
PixelSizeTests)
1617

1718
requires('gui')
1819

Lib/test/test_tkinter/widget_tests.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,7 @@ def test_configure_font(self):
358358
'-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*')
359359
is_ttk = widget.__class__.__module__ == 'tkinter.ttk'
360360
if not is_ttk:
361-
if tk_version < (9,0):
362-
errmsg = 'font "" doesn\'t exist'
363-
else:
364-
errmsg = 'font "" does not exist'
361+
errmsg = 'font "" does ?n[o\']t exist'
365362
self.checkInvalidParam(widget, 'font', '', errmsg=errmsg)
366363

367364
def test_configure_foreground(self):

Lib/test/test_ttk/test_widgets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from test.test_ttk_textonly import MockTclObj
88
from test.test_tkinter.support import (
9+
910
AbstractTkTest, requires_tk, tk_version, get_tk_patchlevel,
1011
simulate_mouse_click, AbstractDefaultRootTest)
1112
from test.test_tkinter.widget_tests import (add_configure_tests,

PCbuild/_tkinter.vcxproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
<ItemDefinitionGroup>
9595
<ClCompile>
9696
<AdditionalIncludeDirectories>$(tcltkDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
97+
<PreprocessorDefinitions Condition="$(TclMajorVersion) == '9'">TCL_WITH_EXTERNAL_TOMMATH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
9798
<PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
9899
<PreprocessorDefinitions Condition="'$(BuildForRelease)' != 'true'">Py_TCLTK_DIR="$(tcltkDir.TrimEnd('\').Replace('\', '\\'))";%(PreprocessorDefinitions)</PreprocessorDefinitions>
99100
</ClCompile>
@@ -112,6 +113,7 @@
112113
<_TclTkDLL Include="$(tcltkdir)\bin\$(tclDllName)" />
113114
<_TclTkDLL Include="$(tcltkdir)\bin\$(tkDllName)" />
114115
<_TclTkDLL Include="$(tcltkdir)\bin\$(tclZlibDllName)" />
116+
<_TclTkDLL Include="$(tcltkdir)\bin\libtommath.dll" Condition="$(TclMajorVersion) == '9'"/>
115117
</ItemGroup>
116118
<ItemGroup>
117119
<ProjectReference Include="pythoncore.vcxproj">
@@ -134,4 +136,4 @@
134136
<Target Name="_CleanTCL_LIBRARY" BeforeTargets="Clean">
135137
<Delete Files="$(OutDir)TCL_LIBRARY.env" />
136138
</Target>
137-
</Project>
139+
</Project>

PCbuild/_tkinter_tk9.vcxproj

Lines changed: 0 additions & 138 deletions
This file was deleted.

PCbuild/build.bat

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ echo. -t Build ^| Rebuild ^| Clean ^| CleanAll
5555
echo. Set the target manually
5656
echo. --pgo-job The job to use for PGO training; implies --pgo
5757
echo. (default: "-m test --pgo")
58+
echo.
59+
echo.Use the TclVersion environment variable to build _tkinter with a specific
60+
echo.version of Tcl and Tk. For example, after building Tcl and Tk 9.0.0.0
61+
echo.and installing them in ../externals/tcltk-9.0.0.0, run the commands:
62+
echo. set TclVersion=9.0.0.0
63+
echo. build.bat
5864
exit /b 127
5965

6066
:Run
@@ -196,4 +202,4 @@ rem Display the current build version information
196202
call "%dir%find_msbuild.bat" %MSBUILD%
197203
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
198204
%MSBUILD% "%dir%pythoncore.vcxproj" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9
199-
if ERRORLEVEL 1 exit /b 3
205+
if ERRORLEVEL 1 exit /b 3

PCbuild/tcltk.props

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,20 @@
1717
<tcltkDir Condition="$(tcltkDir) == ''">$(ExternalsDir)tcltk-$(TclVersion)\$(ArchName)\</tcltkDir>
1818
<tclWin32Exe Condition="$(Platform) == 'Win32'">$(tcltkDir)\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe</tclWin32Exe>
1919
<tclWin32Exe Condition="$(Platform) != 'Win32'">$(tcltkDir)\..\win32\bin\tclsh$(TclMajorVersion)$(TclMinorVersion)t.exe</tclWin32Exe>
20+
<tclExternalTommath Condition="$(TclMajorVersion) == '9'">TCL_WITH_EXTERNAL_TOMMATH;</tclExternalTommath>
2021

2122
<!--<TclDebugExt Condition="'$(Configuration)' == 'Debug'">g</TclDebugExt>-->
22-
<tclDLLName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).dll</tclDLLName>
23-
<tclLibName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib</tclLibName>
24-
<tclShExeName>tclsh$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).exe</tclShExeName>
25-
<tkDLLName>tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).dll</tkDLLName>
26-
<tkLibName>tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib</tkLibName>
23+
<tcltkSuffix Condition="'$(TclMajorVersion)' == '8'">t</tcltkSuffix>
24+
<tkPrefix Condition="'$(TclMajorVersion)' == '9'">tcl9</tkPrefix>
25+
<tclDLLName >tcl$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix)$(TclDebugExt).dll</tclDLLName>
26+
<tclLibName>tcl$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix)$(TclDebugExt).lib</tclLibName>
27+
<tclShExeName>tclsh$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix)$(TclDebugExt).exe</tclShExeName>
28+
<tkDLLName>$(tkPrefix)tk$(TkMajorVersion)$(TkMinorVersion)$(tcltkSuffix)$(TclDebugExt).dll</tkDLLName>
29+
<tkLibName>$(tkPrefix)tk$(TclMajorVersion)$(TclMinorVersion)$(tcltkSuffix)$(TclDebugExt).lib</tkLibName>
2730
<tclZlibDLLName>zlib1.dll</tclZlibDLLName>
28-
<tcltkLib>$(tcltkDir)lib\tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib;$(tcltkDir)lib\tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib</tcltkLib>
31+
<tommathDLLName Condition="'$(TclMajorVersion)' == '9'">$(tcltkDir)bin\libtommath.dll</tommathDLLName>
32+
<tommathLibName Condition="'$(TclMajorVersion)' == '9'">$(tcltkDir)lib\tommath.lib</tommathLibName>
33+
<tcltkLib>$(tcltkDir)lib\$(TclLibName);$(tcltkDir)lib\$(TkLibName);$(tommathLibName)</tcltkLib>
2934
<TclMachine>IX86</TclMachine>
3035
<TclMachine Condition="'$(Platform)' == 'x64'">AMD64</TclMachine>
3136
<TclMachine Condition="'$(Platform)' == 'ARM64'">ARM64</TclMachine>

PCbuild/tcltk9.props

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)