[Patches] [ python-Patches-409044 ] Update tcl/tk/tix versions

noreply@sourceforge.net noreply@sourceforge.net
Mon, 19 Mar 2001 10:43:31 -0800


Patches item #409044, was updated on 2001-03-15 22:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=409044&group_id=5470

Category: Tkinter
Group: None
Status: Open
Priority: 5
Submitted By: Internet Discovery (idiscovery)
Assigned to: Nobody/Anonymous (nobody)
Summary: Update tcl/tk/tix versions

Initial Comment:
A small patch to Modules/Setup.dist to
update the Tix version to the current tix8.1.8.2
library.

Also, it may be important when adding Tcl extensions
like Tix to define -L/usr/local/lib *before*
any possible libraries like -ltix8.1.8.2. Linux
will silently pick up other installed versions of
the -l libraries defpending on the ld.so settings.

The attached context diff is against 2.1b1, but it
should apply to any 2.x version.



----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-03-19 10:43

Message:
Logged In: YES 
user_id=21627

For 1), I'd say this is historic garbage (I added some of it
myself), so don't be afraid to rip it out. tkappinit.c
predates the times that Tcl could do dynamic loading. Also,
there is no need to operate the same way for all packages;
just fix Tix for now.

For 2), there are more problems when freezing: In Python
2.1, setup.py will build _tkinter as a dynamic module, and
you can't freeze them, anyway. So anybody who wants to
freeze would need a build where _tkinter is listed in
Modules/Setup. Furthermore, you typically need Tix SAM
libraries, or else the binary won't be stand-alone. Then you
need static versions of libtcl.a, not shared ones. Anybody
who wants to freeze with Tix needs a fair amount of local
configuration, so supporting freeze is more complicated.

For 3), if Tix does not appear in the C files at all, it can
be removed from the .dsp file as well.

For setup.py: You still can use Setup if you want to.

The problem I see with static linkage that _tkinter then
depends on Tix, so to install Python, you'll need to install
Tix first; if you build Python not to depend on Tix, you
can't use it even when it gets installed. Since most people
use binary distributions, they get more out of dynamic
loading  than they'd get from static linking.

----------------------------------------------------------------------

Comment By: Internet Discovery (idiscovery)
Date: 2001-03-18 14:36

Message:
Logged In: YES 
user_id=33229

I would love to load Tix using package require, because that would
be a "good thing", but there are some details:

1) _tkinter.c is written to declare static packages. I just followed
that route for consistency. Perhaps there is no need, and _tkinter.c
should be just rewritten and recommented to advise using packages.
2) I don't think [package require] will work with Freeze.py - it must
be loaded static, and hence the current setup works with Freeze.
3) i think the current Windows .dsp files also imply static linking.

My feeling is that we need to move the whole Tcl/Tk/Tix setup
towards stubs first, then [package require], but there are a lot of platforms
and combinations that need testing. And I really think we should discuss this 
in the newsgroup to get Cameron Laird and Jeff Hobbes involved.

I also have *extremely grave reservations* about setup.py. I think
I understand what it's trying to do, but I think its probably a bad approach:

1) The algoritm for finding libraries differs from the OS, which differs
from OS to OS. This is even for static linking (see my original comment on
-L), and 100 times worse for dynamic.
2) It hides what used to be user controlled (edit Setup) under magic.
3) The "right way" would be to have configure --with-tk ... and then
have setup.py pick up info out of config.status.
4) I don't see where setup.py edits _tkinter.dsp for cross platform
consitency.
5) I don't see where setup.py ties in with ActiveState's new approach.

These are all cans of worms, so my thought was: put Tix in as
static, and get the documentation in, for the next bug fix release.
Then raise the whole issue of stubs->package require->frozen
in the newsgroup, and get the issue properly explored.

Don't hesitate to send me email as well idiscovery@users.sourceforge.net

Mike.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-03-18 02:58

Message:
Logged In: YES 
user_id=21627

I believe Tix integration should not rely on static linkage
anymore. Instead, you should do

  self.tk.eval("package require Tix") 

and rely on Tix being loaded as a dynamic Tk extension. If
you agree, I'd rather encourage ripping out the Tix
"support" in setup.py, Setup, and all other locations.

Are you using a wrapper module Tix.py? If so, *that* would
be a good addition, and it would also be the place where
dynamic loading of Tix is attempted.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=409044&group_id=5470