Setuptools, __init__ and __main__

Rob Gaddi rgaddi at technologyhighland.invalid
Fri Feb 6 16:17:34 EST 2015


So I'm trying to wrap my head around packaging issues, and according to 
some quick Google searches I'm not the only one.

I'm developing applications of various size for internal deployment.  
When I'm actually getting the whole thing written, I've got my 
initialization stub in __main__.py, because it's an application rather 
than a library.  But then when I migrated over to setuptools I had to 
switch it to __init__.py and change around all my import statements to 
compensate.  Then I can reference it as an entry point.

This feels silly.  I'm sure I could go stumbling around until I come up 
with an elegant solution, but does anyone already have one?

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.



More information about the Python-list mailing list