Looking in my /usr/local/lib/python…/dist-package directory, I have .egg directories and .egg files.
Why does the installer choose to extra packages to the .egg directory, yet leave other files with .egg extensions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the package contains only pure-Python code, it can stay as just an egg file. The Python interpreter can load the Python modules directly from the egg. If the package contains modules written in C or other data, then egg needs to be extracted so the C modules and/or data can be accessed. That’s the default behavior of packages, I believe. Newer versions of Python might be able to load C modules from egg files; I’m not sure about that part.
The creator of the package can also specifically instruct the installer to unzip the package, by passing
zip_safe = Falsetosetup()in theirsetup.py.Finally, the person doing the installing can tell
easy_installexplicitly to unpack eggs by passing it the-Zoption or by settingzip_ok = Falsein thepydistutils.cfg.