[Distutils] import problem using setuptools (resend without html)

henk-jan at ebbersconsult.nl henk-jan at ebbersconsult.nl
Tue May 15 13:23:27 CEST 2007

I am using setuptools to creat a windows installer (using python 
setup.py bdist --format=wininst).
setuptools creates a 'entry point', so it generates a .exe in the 
Scripts directory (this exe calls start.py)


start.py imports b.py (which has a global that is initialised)
then start.py imports c.py
c.py imports start.py (as far as I know this is not a circular import, 
because I am using only 'import xx', not 'from xx import ..')

when running start.py directly (as 'python start.py') everything goes OK.

My problem is when I run the .exe from the entry point in the Scripts 
when start.py is imported from c.py and start.py on its turn imports 
b.py, b.py is completly initialised again.
This behavious does not happen when start.py is called directly.

what am I doing wrong?

I also noticed that, when creating and installing a windwos instaler, 
the easy-install.pth does not get an entry for my application. Is this 

best regards, Henk-Jan

More information about the Distutils-SIG mailing list