Phillip J. Eby wrote:
Note that eggs are primarily intended to be an *execution* format, not an installation tool or packaging system. So really the metadata is intended for programs to read and use, not for humans. Applications that need plugins often have some kind of configuration or deployment file that specifies how the accompanying code is to be used by the application, and that's what the metadata directory is for.
I hope I'm not treading on old ground here, but why not use the eggs format as a packaging system as well as an execution format?
PEP 262 mentions that a package database should be able to answer the following questions:
* Is distribution X on a system? * What version of distribution X is installed? * Where can the new version of distribution X be found? (This can be defined as either "a home page where the user can go and find a download link", or "a place where a program can find the newest version?" Both should probably be supported.) * What files did distribution X put on my system? * What distribution did the file x/y/z.py come from? * Has anyone modified x/y/z.py locally? * What other distributions does this software need? * What Python modules does this distribution provide?
A directory of .egg files could serve as a database to provide answers to all these questions. You wouldn't need to install the eggs, just have them all on the PYTHONPATH. The questions about file x/y/z.py become irrelevant if x/y/z can't be modified.
As far as I understand it in order to turn eggs into a really useful packaging system too, all you would need to do is write an install program to download eggs automatically (from the required dependency URLs listed or a central server) into a particular directory and have them automatically added to PYTHONPATH. Eggs would be easy to uninstall.. just delete them. Different egg versions have different names so you could install multiple versions of the same package. The installer could then run the test suite if one existed and autogenerate documentation to a specified location. Surely it would be quite easy to use eggs as a basis for something similar to ruby gems but without the necessity of actually extracting the files.
Is there any reason why eggs aren't being thought of in this way? Is there any drawback in extending the scope to use them as a packaging system too?