222.1. python3-tkinter-3.14.8
Python's binding to Tk, the _tkinter module and the tkinter package, with turtle and the IDLE editor (X11 under Xwayland)
3.14.8-1 · PSF-2.0 · 0.7 SBU · 6.5 MiB, 415 files · 42_graphics, 158 of 189 · ports/core/python/python3-tkinter
Homepage: https://docs.python.org/3/library/tkinter.html
Python’s binding to Tk: the _tkinter extension module and the tkinter package, with the parts of the standard library that need them, turtle and its demonstrations in turtledemo, and IDLE, Python’s own editor and shell, as idlelib and the idle3 command. Tk draws through X11, so these windows open under Xwayland.
The python3 port is built in 30_foundation, before tk exists, and deletes all of this from its own package. This port configures the same CPython tarball once Tk is installed and builds only Modules/_tkinter and the idle launcher, then copies the pure-Python parts from the source’s Lib. Both recipes carry group = python3, so the version checker offers them as one bump.
Depends on: python3, tcl, tk, pkgconf, libX11.
Required by (2): bcnc, linuxcnc.
Sources: python3-3.14.8.tar.xz (23.0 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install python3-tkinter'
build.sh:
./configure \
--prefix=/usr \
--enable-shared \
--with-system-expat \
--with-system-libmpdec \
--with-ensurepip=no \
--disable-test-modules \
OPT="-O3 -Wall"
_ext=$(python3 -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))')
make "Modules/_tkinter$_ext" "build/scripts-$_version/idle$_version"
_lib=/usr/lib/python$_version
install -Dm755 "Modules/_tkinter$_ext" "$PKG$_lib/lib-dynload/_tkinter$_ext"
install -d "$PKG$_lib"
cp -r Lib/tkinter Lib/turtledemo Lib/idlelib Lib/turtle.py "$PKG$_lib/"
rm -rf "$PKG$_lib/idlelib/idle_test" "$PKG$_lib"/{tkinter,turtledemo,idlelib}/__pycache__
python3 -m compileall -q -o 0 -o 1 -o 2 -s "$PKG" -p / \
"$PKG$_lib"/{tkinter,turtledemo,idlelib,turtle.py}
install -Dm755 "build/scripts-$_version/idle$_version" "$PKG/usr/bin/idle$_version"
ln -s "idle$_version" "$PKG/usr/bin/idle3"
Programs: idle3, idle3.14.
Directories: /usr/lib/python3.14/idlelib, /usr/lib/python3.14/tkinter, /usr/lib/python3.14/turtledemo, /usr/share/licenses/python3-tkinter.
idle3.14 is made by CPython’s own make rule from Tools/scripts/idle3, which writes /usr/bin/python3.14 into its #! line; idle3 is a link to it, as make install would make. idlelib/idle_test, IDLE’s test suite, is not installed, as the python3 port’s --disable-test-modules leaves out every other test package.