Skip to content

Commit c75c2ff

Browse files
committed
Remove Tix (#723)
1 parent e81abb6 commit c75c2ff

File tree

9 files changed

+18
-101
lines changed

9 files changed

+18
-101
lines changed

cpython-unix/Makefile

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,6 @@ $(OUTDIR)/sqlite-$(SQLITE_VERSION)-$(PACKAGE_SUFFIX).tar: $(PYTHON_DEP_DEPENDS)
195195
$(OUTDIR)/tcl-$(TCL_VERSION)-$(PACKAGE_SUFFIX).tar: $(PYTHON_DEP_DEPENDS) $(HERE)/build-tcl.sh
196196
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) tcl
197197

198-
TIX_DEPENDS = \
199-
$(HERE)/build-tix.sh \
200-
$(OUTDIR)/tcl-$(TCL_VERSION)-$(PACKAGE_SUFFIX).tar \
201-
$(OUTDIR)/tk-$(TK_VERSION)-$(PACKAGE_SUFFIX).tar \
202-
$(if $(NEED_LIBX11),$(OUTDIR)/libX11-$(LIBX11_VERSION)-$(PACKAGE_SUFFIX).tar) \
203-
$(NULL)
204-
205-
$(OUTDIR)/tix-$(TIX_VERSION)-$(PACKAGE_SUFFIX).tar: $(TIX_DEPENDS)
206-
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) tix
207-
208198
TK_DEPENDS = \
209199
$(HOST_PYTHON_DEPENDS) \
210200
$(HERE)/build-tk.sh \
@@ -271,7 +261,6 @@ PYTHON_DEPENDS_$(1) := \
271261
$$(if $$(NEED_SQLITE),$$(OUTDIR)/sqlite-$$(SQLITE_VERSION)-$$(PACKAGE_SUFFIX).tar) \
272262
$$(if $$(NEED_TCL),$$(OUTDIR)/tcl-$$(TCL_VERSION)-$$(PACKAGE_SUFFIX).tar) \
273263
$$(if $$(NEED_TK),$$(OUTDIR)/tk-$$(TK_VERSION)-$$(PACKAGE_SUFFIX).tar) \
274-
$$(if $$(NEED_TIX),$$(OUTDIR)/tix-$$(TIX_VERSION)-$$(PACKAGE_SUFFIX).tar) \
275264
$$(if $$(NEED_UUID),$$(OUTDIR)/uuid-$$(UUID_VERSION)-$$(PACKAGE_SUFFIX).tar) \
276265
$$(if $$(NEED_XZ),$$(OUTDIR)/xz-$$(XZ_VERSION)-$$(PACKAGE_SUFFIX).tar) \
277266
$$(if $$(NEED_ZLIB),$$(OUTDIR)/zlib-$$(ZLIB_VERSION)-$$(PACKAGE_SUFFIX).tar) \

cpython-unix/build-cpython.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,15 +1244,14 @@ fi
12441244
rm -f ${ROOT}/out/python/build/lib/{libdb-6.0,libxcb-*,libX11-xcb}.a
12451245

12461246
if [ -d "${TOOLS_PATH}/deps/lib/tcl8" ]; then
1247-
# Copy tcl/tk/tix resources needed by tkinter.
1247+
# Copy tcl/tk resources needed by tkinter.
12481248
mkdir ${ROOT}/out/python/install/lib/tcl
12491249
# Keep this list in sync with tcl_library_paths.
12501250
for source in ${TOOLS_PATH}/deps/lib/{itcl4.2.4,tcl8,tcl8.6,thread2.8.9,tk8.6}; do
12511251
cp -av $source ${ROOT}/out/python/install/lib/
12521252
done
12531253

12541254
if [[ "${PYBUILD_PLATFORM}" != macos* ]]; then
1255-
cp -av ${TOOLS_PATH}/deps/lib/Tix8.4.3 ${ROOT}/out/python/install/lib/
12561255
cp -av ${TOOLS_PATH}/deps/lib/lib*.so ${ROOT}/out/python/install/lib/
12571256
fi
12581257
fi

cpython-unix/build-main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def main():
182182
# because we can get some speedup from parallel operations. But we also don't
183183
# share a make job server with each build. So if we didn't limit the
184184
# parallelism we could easily oversaturate the CPU. Higher levels of
185-
# parallelism don't result in meaningful build speedups because tk/tix has
185+
# parallelism don't result in meaningful build speedups because tk has
186186
# a long, serial dependency chain that can't be built in parallel.
187187
parallelism = min(1 if args.serial else 4, multiprocessing.cpu_count())
188188

cpython-unix/build.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -379,48 +379,6 @@ def build_libedit(
379379
build_env.get_tools_archive(dest_archive, "deps")
380380

381381

382-
def build_tix(
383-
settings, client, image, host_platform, target_triple, build_options, dest_archive
384-
):
385-
tcl_archive = download_entry("tcl", DOWNLOADS_PATH)
386-
tk_archive = download_entry("tk", DOWNLOADS_PATH)
387-
tix_archive = download_entry("tix", DOWNLOADS_PATH)
388-
389-
with build_environment(client, image) as build_env:
390-
if settings.get("needs_toolchain"):
391-
build_env.install_toolchain(
392-
BUILD,
393-
host_platform,
394-
target_triple,
395-
binutils=install_binutils(host_platform),
396-
clang=True,
397-
musl="musl" in target_triple,
398-
static="static" in build_options,
399-
)
400-
401-
depends = {"tcl", "tk"}
402-
if not host_platform.startswith("macos_"):
403-
depends |= {"libX11", "xorgproto"}
404-
405-
for p in sorted(depends):
406-
build_env.install_artifact_archive(BUILD, p, target_triple, build_options)
407-
408-
for p in (tcl_archive, tk_archive, tix_archive, SUPPORT / "build-tix.sh"):
409-
build_env.copy_file(p)
410-
411-
env = {
412-
"TOOLCHAIN": "clang-%s" % host_platform,
413-
"TCL_VERSION": DOWNLOADS["tcl"]["version"],
414-
"TIX_VERSION": DOWNLOADS["tix"]["version"],
415-
"TK_VERSION": DOWNLOADS["tk"]["version"],
416-
}
417-
418-
add_target_env(env, host_platform, target_triple, build_env)
419-
420-
build_env.run("build-tix.sh", environment=env)
421-
build_env.get_tools_archive(dest_archive, "deps")
422-
423-
424382
def build_cpython_host(
425383
client,
426384
image,
@@ -946,9 +904,6 @@ def build_cpython(
946904
"tk8.6",
947905
]
948906

949-
if "-apple" not in target_triple:
950-
python_info["tcl_library_paths"].append("Tix8.4.3")
951-
952907
if "-apple" in target_triple:
953908
python_info["apple_sdk_platform"] = env["APPLE_SDK_PLATFORM"]
954909
python_info["apple_sdk_version"] = env["APPLE_SDK_VERSION"]
@@ -1239,17 +1194,6 @@ def main():
12391194
python_host_version=python_host_version,
12401195
)
12411196

1242-
elif action == "tix":
1243-
build_tix(
1244-
settings,
1245-
client,
1246-
get_image(client, ROOT, BUILD, docker_image, host_platform),
1247-
host_platform=host_platform,
1248-
target_triple=target_triple,
1249-
build_options=build_options,
1250-
dest_archive=dest_archive,
1251-
)
1252-
12531197
elif action == "tk":
12541198
extra_archives = {"tcl"}
12551199
if not host_platform.startswith("macos_"):

cpython-unix/extension-modules.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,6 @@ _tkinter:
673673
sources:
674674
- _tkinter.c
675675
- tkappinit.c
676-
# TODO consider adding WITH_TIX, as Modules/Setup seems to recommend it. This also
677-
# initializes tix at init time, which seems desirable.
678676
defines:
679677
- WITH_APPINIT
680678
includes-deps:

cpython-unix/targets.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ aarch64-unknown-linux-gnu:
195195
- sqlite
196196
- tcl
197197
- tk
198-
- tix
199198
- uuid
200199
- xorgproto
201200
- xz
@@ -285,7 +284,6 @@ armv7-unknown-linux-gnueabi:
285284
- sqlite
286285
- tcl
287286
- tk
288-
- tix
289287
- uuid
290288
- xorgproto
291289
- xz
@@ -327,7 +325,6 @@ armv7-unknown-linux-gnueabihf:
327325
- sqlite
328326
- tcl
329327
- tk
330-
- tix
331328
- uuid
332329
- xorgproto
333330
- xz
@@ -369,7 +366,6 @@ mips-unknown-linux-gnu:
369366
- sqlite
370367
- tcl
371368
- tk
372-
- tix
373369
- uuid
374370
- xorgproto
375371
- xz
@@ -411,7 +407,6 @@ mipsel-unknown-linux-gnu:
411407
- sqlite
412408
- tcl
413409
- tk
414-
- tix
415410
- uuid
416411
- xorgproto
417412
- xz
@@ -453,7 +448,6 @@ ppc64le-unknown-linux-gnu:
453448
- sqlite
454449
- tcl
455450
- tk
456-
- tix
457451
- uuid
458452
- xorgproto
459453
- xz
@@ -495,7 +489,6 @@ riscv64-unknown-linux-gnu:
495489
- sqlite
496490
- tcl
497491
- tk
498-
- tix
499492
- uuid
500493
- xorgproto
501494
- xz
@@ -537,7 +530,6 @@ s390x-unknown-linux-gnu:
537530
- sqlite
538531
- tcl
539532
- tk
540-
- tix
541533
- uuid
542534
- xorgproto
543535
- xz
@@ -812,7 +804,6 @@ x86_64-unknown-linux-gnu:
812804
- sqlite
813805
- tcl
814806
- tk
815-
- tix
816807
- uuid
817808
- xorgproto
818809
- xz
@@ -860,7 +851,6 @@ x86_64_v2-unknown-linux-gnu:
860851
- sqlite
861852
- tcl
862853
- tk
863-
- tix
864854
- uuid
865855
- xorgproto
866856
- xz
@@ -908,7 +898,6 @@ x86_64_v3-unknown-linux-gnu:
908898
- sqlite
909899
- tcl
910900
- tk
911-
- tix
912901
- uuid
913902
- xorgproto
914903
- xz
@@ -956,7 +945,6 @@ x86_64_v4-unknown-linux-gnu:
956945
- sqlite
957946
- tcl
958947
- tk
959-
- tix
960948
- uuid
961949
- xorgproto
962950
- xz
@@ -1002,7 +990,6 @@ x86_64-unknown-linux-musl:
1002990
- sqlite
1003991
- tcl
1004992
- tk
1005-
- tix
1006993
- uuid
1007994
- xorgproto
1008995
- xz
@@ -1048,7 +1035,6 @@ x86_64_v2-unknown-linux-musl:
10481035
- sqlite
10491036
- tcl
10501037
- tk
1051-
- tix
10521038
- uuid
10531039
- xorgproto
10541040
- xz
@@ -1094,7 +1080,6 @@ x86_64_v3-unknown-linux-musl:
10941080
- sqlite
10951081
- tcl
10961082
- tk
1097-
- tix
10981083
- uuid
10991084
- xorgproto
11001085
- xz
@@ -1140,7 +1125,6 @@ x86_64_v4-unknown-linux-musl:
11401125
- sqlite
11411126
- tcl
11421127
- tk
1143-
- tix
11441128
- uuid
11451129
- xorgproto
11461130
- xz

docs/distributions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ license_path
388388
tcl_library_path
389389
Relative path to location of tcl library files. The path should be a
390390
directory tree containing tcl files to support the tkinter extension.
391-
This will include a subset of the library files provided by the tcl, tk,
392-
and tix packages.
391+
This will include a subset of the library files provided by the tcl
392+
and tk packages.
393393

394394
This points to the root directory containing tcl resources. Actual
395395
tcl resources are in sub-directories underneath, as identified by

docs/quirks.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,21 @@ ncurses/libedit/readline are loaded.
7171

7272
.. _quirk_macos_no_tix:
7373

74-
No tix on macOS
75-
===============
74+
No tix on UNIX
75+
==============
76+
77+
Tix is an old widget library for Tcl/Tk. Python previously had a wrapper
78+
for it in ``tkinter.tix``, but it was deprecated in Python 3.6 (the
79+
recommendation is to use ``tkinter.ttk``) and removed in Python 3.13.
7680

77-
macOS distributions do not contain tix tcl support files. This means that
78-
``tkinter.tix`` module functionality will likely break at run-time. The
79-
module will import fine. But attempting to instantiate a ``tkinter.tix.Tk``
80-
instance or otherwise attempt to run tix tcl files will result in a run-time
81-
error.
81+
The macOS and Linux distributions from this project do not build and
82+
ship Tix, even for Python versions 3.12 and below.
8283

83-
``tkinter.tix`` has been deprecated since Python 3.6 and the official Python
84-
macOS installers do not ship the tix support files. So this project behaves
85-
similarly to the official CPython distributions.
84+
We had previously attempted to ship Tix support on Linux, but it was
85+
broken and nobody reported an issue about it. The macOS distributions
86+
from this project never shipped support for Tix. The official Python.org
87+
macOS installers and Apple's build of Python do not ship support for
88+
Tix, either, so this project behaves similarly to those distributions.
8689

8790
.. _quirk_windows_no_pip:
8891

docs/status.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ test_spwd
285285
test_startfile
286286
object <module 'os' from '.../install/lib/python3.7/os.py'> has no attribute 'startfile'
287287
test_tix
288-
cannot run without OS X gui process
288+
tix is not built by this project
289289
test_tk
290290
cannot run without OS X gui process
291291
test_ttk_guionly

0 commit comments

Comments
 (0)