py2exe copies to much dlls

A

Achim Domma

Hi,

I managed to build a simple com server with py2exe. My script only imports
codecs and re, but the dist folder contains tcl84.dll, tk84.dll and
win32ui.pyd. Can somebody tell me why? And how to prevent this? I don't do
any gui stuff, so where does the dependency comes from?

regards,
Achim
 
P

Peter Hansen

Achim said:
I managed to build a simple com server with py2exe. My script only imports
codecs and re, but the dist folder contains tcl84.dll, tk84.dll and
win32ui.pyd. Can somebody tell me why? And how to prevent this? I don't do
any gui stuff, so where does the dependency comes from?

Can you py2exe the following script and see what you get? If it's
still the same stuff, post the py2exe setup.py script you used and
the command line:

# test script

print 'Hello, world!'

(Yes, that's all... :)

-Peter
 
A

Anand Pillai

py2exe finds module paths by parsing your python source file.
I think it also uses the PYTHONPATH environmenet variable.
So if your PYTHONPATH contains $PYTHON/lib-tk (which it normally
does), py2exe will copy the tcl/tk dlls too into the build
directory, which are needed for tkinter.

Try editing the PYTHONPATH variable and remove the lib-tk
directory from it.

HTH

-Anand
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top