◐ Shell
clean mode source ↗

gh-103839: Allow building Tkinter against Tcl 8.7 without external libtommath by chrstphrchvz · Pull Request #103842 · python/cpython

Assume tommath.h is available somewhere
if Tcl was built with external libtommath.

@chrstphrchvz

Although checking for TCL_WITH_EXTERNAL_TOMMATH before defining TCL_NO_TOMMATH_H seems correct to me, I now notice some inadequacies in how Tkinter is gathering Tcl build flags and/or how Tcl is reporting them. By default, Tkinter tries to use pkg-config to obtain Cflags from …/lib/pkgconfig/tcl.pc. But Tcl only records the -DTCL_WITH_EXTERNAL_TOMMATH flag in the TCL_DEFS line of tclConfig.sh (which is where Tcl/Tk software conventionally would check); most of the information in tclConfig.sh is not present in tcl.pc. I will likely ask Tcl if this can be improved.

ned-deily

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a step toward future full support of Tk 8.7, this seems harmless enough. I don't think it should be backported until and unless we decide to backport full 8.7 support with subsequent PRs.

carljm added a commit to gsallam/cpython_with_perfmap_apii that referenced this pull request

May 20, 2023

This was referenced

Sep 11, 2025