Skip to content

Commit ebba5b0

Browse files
committed
downloads: update tcl/tk to 8.6.12 / remove tix on macOS
As part of the upgrade, tix stopped compiling on macOS due to compiler errors. What the root cause is I'm not sure. It is probably possible to work around. However, as part of investigating this I noticed that the official Python macOS pkg installers don't ship the tix tcl files. And the `tkinter.tix` module has been deprecated since Python 3.6. So I think it is acceptable to drop support for tix on macOS.
1 parent cc9da9c commit ebba5b0

File tree

8 files changed

+50
-28
lines changed

8 files changed

+50
-28
lines changed

cpython-unix/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ PYTHON_DEPENDS := \
256256
$(if $(NEED_PATCHELF),$(OUTDIR)/patchelf-$(PATCHELF_VERSION)-$(PACKAGE_SUFFIX).tar) \
257257
$(if $(NEED_READLINE),$(OUTDIR)/readline-$(READLINE_VERSION)-$(PACKAGE_SUFFIX).tar) \
258258
$(if $(NEED_SQLITE),$(OUTDIR)/sqlite-$(SQLITE_VERSION)-$(PACKAGE_SUFFIX).tar) \
259+
$(if $(NEED_TCL),$(OUTDIR)/tcl-$(TCL_VERSION)-$(PACKAGE_SUFFIX).tar) \
260+
$(if $(NEED_TK),$(OUTDIR)/tk-$(TK_VERSION)-$(PACKAGE_SUFFIX).tar) \
259261
$(if $(NEED_TIX),$(OUTDIR)/tix-$(TIX_VERSION)-$(PACKAGE_SUFFIX).tar) \
260262
$(if $(NEED_UUID),$(OUTDIR)/uuid-$(UUID_VERSION)-$(PACKAGE_SUFFIX).tar) \
261263
$(if $(NEED_XZ),$(OUTDIR)/xz-$(XZ_VERSION)-$(PACKAGE_SUFFIX).tar) \

cpython-unix/build-cpython.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,9 +1141,13 @@ if [ -d "${TOOLS_PATH}/deps/lib/tcl8" ]; then
11411141
# Copy tcl/tk/tix resources needed by tkinter.
11421142
mkdir ${ROOT}/out/python/install/lib/tcl
11431143
# Keep this list in sync with tcl_library_paths.
1144-
for source in ${TOOLS_PATH}/deps/lib/{tcl8,tcl8.6,thread2.8.5,Tix8.4.3,tk8.6}; do
1144+
for source in ${TOOLS_PATH}/deps/lib/{itcl4.2.2,tcl8,tcl8.6,thread2.8.7,tk8.6}; do
11451145
cp -av $source ${ROOT}/out/python/install/lib/
11461146
done
1147+
1148+
if [ "${PYBUILD_PLATFORM}" != "macos" ]; then
1149+
cp -av ${TOOLS_PATH}/deps/lib/Tix8.4.3 ${ROOT}/out/python/install/lib/
1150+
fi
11471151
fi
11481152

11491153
# config.c defines _PyImport_Inittab and extern references to modules, which

cpython-unix/build-tcl.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ patch -p1 << 'EOF'
1717
diff --git a/unix/Makefile.in b/unix/Makefile.in
1818
--- a/unix/Makefile.in
1919
+++ b/unix/Makefile.in
20-
@@ -1724,7 +1724,7 @@ configure-packages:
21-
$$i/configure --with-tcl=../.. \
22-
--with-tclinclude=$(GENERIC_DIR) \
23-
$(PKG_CFG_ARGS) --libdir=$(PACKAGE_DIR) \
24-
- --enable-shared --enable-threads; ) || exit $$?; \
25-
+ --enable-shared=no --enable-threads; ) || exit $$?; \
26-
fi; \
20+
@@ -1813,7 +1813,7 @@ configure-packages:
21+
$$i/configure --with-tcl=../.. \
22+
--with-tclinclude=$(GENERIC_DIR) \
23+
$(PKG_CFG_ARGS) --libdir=$(PACKAGE_DIR) \
24+
- --enable-shared --enable-threads; ) || exit $$?; \
25+
+ --enable-shared=no --enable-threads; ) || exit $$?; \
26+
fi; \
27+
fi; \
2728
fi; \
28-
fi; \
2929
EOF
3030

3131
# Remove packages we don't care about and can pull in unwanted symbols.
@@ -47,4 +47,4 @@ make -j ${NUM_CPUS} install DESTDIR=${ROOT}/out
4747
make -j ${NUM_CPUS} install-private-headers DESTDIR=${ROOT}/out
4848

4949
# For some reason libtcl*.a have weird permissions. Fix that.
50-
chmod 644 ${ROOT}/out/tools/deps/lib/libtcl*.a
50+
chmod 644 ${ROOT}/out/tools/deps/lib/libtcl*.a

cpython-unix/build-tk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export PKG_CONFIG_PATH=${TOOLS_PATH}/deps/share/pkgconfig:${TOOLS_PATH}/deps/lib
1212

1313
tar -xf tk${TK_VERSION}-src.tar.gz
1414

15-
pushd tk${TK_VERSION}/unix
15+
pushd tk*/unix
1616

1717
CFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC"
1818
LDFLAGS="${EXTRA_TARGET_LDFLAGS}"

cpython-unix/build.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,13 +916,16 @@ def build_cpython(
916916

917917
python_info["tcl_library_path"] = "install/lib"
918918
python_info["tcl_library_paths"] = [
919+
"itcl4.2.2",
919920
"tcl8",
920921
"tcl8.6",
921-
"thread2.8.5",
922-
"Tix8.4.3",
922+
"thread2.8.7",
923923
"tk8.6",
924924
]
925925

926+
if "-apple" not in target_triple:
927+
python_info["tcl_library_paths"].append("Tix8.4.3")
928+
926929
if "-apple" in target_triple:
927930
python_info["apple_sdk_platform"] = env["APPLE_SDK_PLATFORM"]
928931
python_info["apple_sdk_version"] = env["APPLE_SDK_VERSION"]

cpython-unix/targets.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ aarch64-apple-darwin:
8888
- sqlite
8989
- tcl
9090
- tk
91-
- tix
9291
- uuid
9392
- xz
9493
- zlib
@@ -489,7 +488,6 @@ x86_64-apple-darwin:
489488
- sqlite
490489
- tcl
491490
- tk
492-
- tix
493491
- uuid
494492
- xz
495493
- zlib

docs/quirks.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,21 @@ run time, the ``TCL_LIBRARY`` environment variable is set from within
143143
the process before the Python interpreter is initialized. This ensures the
144144
``.tcl`` files from the Python distribution are used.
145145

146+
.. _quirk_macos_no_tix:
147+
148+
No tix on macOS
149+
===============
150+
151+
macOS distributions do not contain tix tcl support files. This means that
152+
``tkinter.tix`` module functionality will likely break at run-time. The
153+
module will import fine. But attempting to instantiate a ``tkinter.tix.Tk``
154+
instance or otherwise attempt to run tix tcl files will result in a run-time
155+
error.
156+
157+
``tkinter.tix`` has been deprecated since Python 3.6 and the official Python
158+
macOS installers do not ship the tix support files. So this project behaves
159+
similarly to the official CPython distributions.
160+
146161
.. _quirk_windows_no_pip:
147162

148163
No ``pip.exe`` on Windows

pythonbuild/downloads.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,10 @@
308308
"version": "5.28.1.1",
309309
},
310310
"tcl": {
311-
"url": "https://prdownloads.sourceforge.net/tcl/tcl8.6.10-src.tar.gz",
312-
"size": 10144235,
313-
"sha256": "5196dbf6638e3df8d5c87b5815c8c2b758496eb6f0e41446596c9a4e638d87ed",
314-
"version": "8.6.10",
311+
"url": "https://prdownloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz",
312+
"size": 10353486,
313+
"sha256": "26c995dd0f167e48b11961d891ee555f680c175f7173ff8cb829f4ebcde4c1a6",
314+
"version": "8.6.12",
315315
"library_names": ["tcl8.6"],
316316
"licenses": ["TCL"],
317317
"license_file": "LICENSE.tcl.txt",
@@ -325,20 +325,20 @@
325325
"license_file": "LICENSE.tix.txt",
326326
},
327327
"tk": {
328-
"url": "https://prdownloads.sourceforge.net/tcl/tk8.6.10-src.tar.gz",
329-
"size": 4444764,
330-
"sha256": "63df418a859d0a463347f95ded5cd88a3dd3aaa1ceecaeee362194bc30f3e386",
331-
"version": "8.6.10",
328+
"url": "https://prdownloads.sourceforge.net/tcl/tk8.6.12-src.tar.gz",
329+
"size": 4515393,
330+
"sha256": "12395c1f3fcb6bed2938689f797ea3cdf41ed5cb6c4766eec8ac949560310630",
331+
"version": "8.6.12",
332332
"library_names": ["tk8.6"],
333333
"licenses": ["TCL"],
334334
"license_file": "LICENSE.tcl.txt",
335335
},
336336
"tk-windows-bin": {
337-
"url": "https://github.com/python/cpython-bin-deps/archive/86027ce3edda1284ae4bf6c2c580288366af4052.tar.gz",
338-
"size": 7162470,
339-
"sha256": "34400f7b76a13389a475fc1a4d6e33d5ca21dda6f6ff11b04759865814bdf3d2",
340-
"version": "6.6.9",
341-
"git_commit": "86027ce3edda1284ae4bf6c2c580288366af4052",
337+
"url": "https://github.com/python/cpython-bin-deps/archive/e3c3e9a2856124aa32b608632a52742d479eb7a9.tar.gz",
338+
"size": 6787654,
339+
"sha256": "01ad9c663659224e075d487cbc33ea2fed7a225593965b79bed92ca7f79b676f",
340+
"version": "8.6.12",
341+
"git_commit": "e3c3e9a2856124aa32b608632a52742d479eb7a9",
342342
},
343343
"uuid": {
344344
"url": "https://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz",

0 commit comments

Comments
 (0)