[Distutils] Proposal: egg -> bdist_wininst converter

Phillip J. Eby pje at telecommunity.com
Thu Apr 10 16:31:53 CEST 2008


At 09:10 AM 4/10/2008 +0100, Paul Moore wrote:
>For me, on Windows, the biggest negative aspect of eggs is when people
>provide binary installations (ones with compiled C extensions) in eggs
>only. I prefer bdist_wininst/bdist_msi installers, and with compiled
>code, I can't always build from source (complex library dependencies,
>etc).
>
>So, given that an egg already has everything that is needed at
>runtime, how easy would it be to create a tool which converted an egg
>into a bdist_wininst installer? With that, I could happily forget
>about eggs.

http://mail.python.org/pipermail/python-dev/2008-March/077959.html

Basically what you need to do is rewrite the zipfile index such that 
everything is prefixed with PURELIB/ or PLATLIB/, except for the 
EGG-INFO directory which must be renamed to match the original egg's 
filename, plus '-info' -- i.e., foo-1.2-py2.3-win32.egg should have 
its EGG-INFO renamed to PURELIB/foo-1.2-py2.3-win32.egg-info or 
PLATLIB/foo-1.2-py2.3-win32.egg-info.

Once the egg is reformatted in this way, it's a perfectly valid 
zipfile that the existing bdist_wininst code could be reused to turn 
into an .exe.



More information about the Distutils-SIG mailing list