About
Python Eggs are a python binary distribution format.
A “Python egg” is a logical structure embodying the release of a specific version of a Python project, comprising:
- its code,
- resources
- project metadata including scripts
- and information about the project’s dependencies.
They are:
- cross-platform (for “pure” packages),
- directly importable,
They can be simply downloaded and added to sys.path directly, or they can be placed in a directory on sys.path and then automatically discovered by the egg runtime system.
Articles Related
Format
https://setuptools.readthedocs.io/en/latest/formats.html
There are two basic formats currently implemented for Python eggs:
- .egg format: a directory or zipfile containing the project’s code and resources, along with an EGG-INFO subdirectory that contains the project’s metadata
- .egg-info format: a file or directory placed adjacent to the project’s code and resources, that directly contains the project’s metadata.
egg-info
the project’s metadata (.egg-info) directory
See the command
Example:
egg_info must always appear on the command line before any commands that you want the version changes to apply to.
- Creating a dated “nightly build” snapshot egg:
python setup.py egg_info --tag-date --tag-build=DEV bdist_egg
- Creating a release with no version tags, even if some default tags are specified in setup.cfg:
python setup.py egg_info -RDb "" sdist bdist_egg