On Wed, Oct 7, 2009 at 9:26 PM, Matt Feifarek <[email protected]> wrote:
> Also, I probably have some terminology wrong: I'm not sure what the meta
> files like MANIFEST.in and ez_setup.py actually are... are they egg files?
> Paster files? Setuptools? I don't know what to properly call them when I
> talk about deleting them.

The complete answer is at peak.telecommunity.com.  A more concise
answer is the PyCon talk Ian gave in 2006.

 http://ianbicking.org/docs/pycon2006/plugins.html
Click on each page to go to the next.  On some pages you may have to
click several times to get it to change.

An egg is a Python package accompanied by its metadata.  An egg can
contain more than one package, but always one metadata.  There are two
file formats for eggs:

site-packages/
    Foo-1.0-*.egg/
        EGG-INFO/
        foo/
            __init__.py
    easy-install.pth

In this case, the Foo directory is the egg.  easy-install.pth contains
a line that adds the Foo directory to sys.path.  The package directory
can be zipped and it will behave exactly the same, as long as the zip
file ends in *.egg instead of *.zip.

The other format is the one pip uses:

site-packages/
    foo/
    Foo-1.0-*.egg-info/

In this case, the egg spans two sibling directories.  It's impossible
to tell just by looking at site-packages which packages belong to the
egg.  You'd have to introspect the metadata to find out that.  But
this format is arguably simpler.  If you tell pip to zip a package, it
produces the zip format above (I think).  If you tell pip to unzip a
package, it reconstructs this multi-directory format.

Zipped eggs can be uploaded to PyPI.  Easy_install can install them;
pip can't.  Pip can only install from source tarballs.  Zipped eggs
were seen as an advance in distribution technique, but that seems less
true now because eggs often don't include the documentation and
examples necessary to learn how to use the package.  The source
tarball is just as easy to distribute, so why not stick with that?
But zipped eggs have an advantage if the package contains C
extensions: eggs are precompiled, which is important on Windows where
users don't usually have compilers or know how to use them.

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to