-
-
Notifications
You must be signed in to change notification settings - Fork 211
Description
This is loosely analogous to #723, but less pressing to me because these modules are part of Tcl's standard distribution and not causing any trouble with the build.
The following code works on some other distributions of Python (e.g., macOS system Python), but not currently in python-build-standalone (tested on Linux, haven't tested on macOS or Windows):
>>> import tkinter
>>> t = tkinter.Tk(useTk=False)
>>> t.eval('package require Itcl')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
_tkinter.TclError: can't find package Itcl
>>> t.eval('package require Thread')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
_tkinter.TclError: can't find package Thread
(useTk=False
is optional, it avoids the need for $DISPLAY
.)
I cannot tell if this matters to anyone. I found one StackOverflow question, downvoted, where someone tried to use it but didn't have the right syntax. The correct syntax is in a comment, and the answer tells them not to do that. Sourcegraph returns no hits for "package require Itcl" file:\.py$
nor "package require Thread" file:\.py$
(but plenty for file:\.tcl$
).
The reason it's broken currently is that we are shipping some .a files that are not particularly useful at runtime, and I think we'd need to actually link those files in like we do with libtcl.a and libtk.a. #676 gets rid of these .a files and presumably switches these to being .so files, which is more useful in that they can be loaded at runtime, but those files aren't currently being included in the distribution. I think we could include them if anyone actually needs this without any trouble, but I'd like to have a concrete request for it, and a test case to make sure it's not accidentally broken and useless again. The .a files are a little over half a meg total, so if nobody's using them it is purely bloat.
I'm going to leave this open for a bit for comment if anyone wants to say "Hey, I'm using that!" or "Hey, I want to use that!" but I intend to clean out the remainder of the support files that aren't useful without the actual .so file.