[Distutils] executable egg & top-level __main__.py

Dimitri Maziuk dmaziuk at bmrb.wisc.edu
Fri Jun 19 16:51:43 CEST 2015

On 2015-06-18 21:15, Daniel Holth wrote:

... Eggs are a plugin or package format and are not designed
> to be directly runnable.

Well, google seems to disagree, but ok.

> If you find it helpful to create your executable more manually, you
> could unzip the egg and __main__.py into a directory and then zip
> everything back up.

So, since this is all done by a python script, is there a hook in 
setuptools/setup.py where I can open the egg zipfile and do stuff to it 
as teh last step of bdist_egg? Or maybe I'll see if I can trick it with 
file_finders instead...

In this case I'm shipping the script for remote execution, I can 
configure the workflow engine to ship both egg and scriptfile. It would 
be a touch more convenient to roll the script inside the egg and ship 
just one file, but not worth the effort. However, I think runnable egg 
can be handy for dealing with python's version of dll hell.


More information about the Distutils-SIG mailing list