[Python-Dev] Internal documentation for egg formats now available (original) (raw)

M.-A. Lemburg mal at egenix.com
Fri Apr 28 18:43:00 CEST 2006


M.-A. Lemburg wrote:

No, I'm talking about a format which has the same if not more benefits as what you're trying to achieve with the .egg file approach, but without all the magic and hacks.

It's not like this wouldn't be possible to achieve. That may or may not be true. Perhaps if you had participated in the original call to the distutils-sig for developing such a format (back in December 2004), perhaps the design would've been more to your liking. Oh wait... you did: http://mail.python.org/pipermail/distutils-sig/2004-December/004351.html Indeed. And I suggested that you reconsider the idea to use ZIP files for installation (rather than just distribution): http://mail.python.org/pipermail/distutils-sig/2004-December/004349.html And if you replace 'syspathtools.use()' in that email, with 'pkgresources.require()', then it describes *exactly how setuptools works with .egg directories today*. Interesting that you used that idea, because back then you didn't reply to the email. Looks like I deserve some credit ;-) If you've already implemented this (which I wasn't aware of, since when I played with setuptools it kept installing .egg ZIP files), then why don't you make .egg directories the standard installation scheme, instead of insisting on having .egg ZIP files in site-packages/ ? I've now played with it again and found that for some packages (e.g. kid and Paste) it installs these as .egg directories (horray!). For other packages such as elementtree which are not available as egg files, it still creates egg files (by first downloading the source package, then creating an egg file and installing that). It also uses the egg files for quite a few packages that are distributed as egg files. So far, I've not found a pattern to this.

I wonder why you don't always create .egg directories.

I've now found this section in the documentation which seems to have the reason:

http://peak.telecommunity.com/DevCenter/EasyInstall#compressed-installation

Apart from the statement "because Python processes zipfile entries on sys.path much faster than it does directories." being wrong, it looks like all you'd have to do, is make --always-unzip the default.

Another nit which seems to have been introduced in 0.6a11: you now prepend egg directory entries to other sys.path entries, instead of appending them.

What's the reason for that ?

Egg directory should really be treated just like any other site-package package and not be allowed to override stdlib modules and packages without explicit user action by e.g. adjusting PYTHONPATH.

-- Marc-Andre Lemburg eGenix.com

Professional Python Services directly from the Source (#1, Apr 28 2006)

Python/Zope Consulting and Support ... http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/


::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the Python-Dev mailing list