What happened to _tkinter.so?

A

akineko

Hello Python developers,

I have noticed something curious while I was investigating a problem
with the PyInstaller.

In my environment, the PyInstaller couldn't find TCL/TK installation
path even I have it.
I found the PyInstaller uses output from ldd <dynamic link libary> to
find the a path to TCL/TK libraries.
But no dynamic libraries under my Python 5 lib-dynload directoty
contain a path to TCL/TK libraries.

When I posted this problem to the PyInstaller newsgroup, a guy
responded that he didn't have such problem.
After several exchanges, what we found was his lib-dynload directory
contains _tkinter.so (even he has the same Python2.5.2) while my lib-
dynload directory doesn't have it.

He installed the Python using package tool (no fresh compile) while I
installed my Python from src (clean compile).

I recompiled Python 2.4 and confirmed that Python 2.4 creates
_tkinter.so.
After browsing the Makefile under Python 2.5, I had an impression that
Python 2.5 no longer uses _tkinter.so.

Am I correct?
If that is the case, I need to warn the PyInstaller developers that
the scheme to find TCL/TK path is no longer valid.

Any comments will be highly appreciated.

Thank you for your attention.
Aki Niimura
 
A

akineko

Hello,

I spent time today to investigate this.
If you install Python with Tkinter from source, _tkinter is built into
the Python executable and _tkinter.so is not generated *unless*
"shared" option is specified.

I found this by running python with '-v' option:
% python -v
........
import _tkinter # builtin <<<---

In the Module/Setup file:
# Uncommenting the following line tells makesetup that all following
# modules are to be built as shared libraries (see above for more
# detail; also note that *static* reverses this effect):

#*shared*

I tried to uncomment the line and I got successfully _tkinter.so under
python2.5/lib-dynload directory.

This may be an issue for PyInstaller as it relys on _tkinter.so to
find the path to TCL/TK.
However, many Linux distribution includes _tkinter.so as many people
complained about missing _tkinter.so.
So, this is not really an issue unless you install Python by yourself.

Aki-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top