Let me try to show you with a buildout.
First, download the file at gist.github.com/1140588 and save it in a new directory as buildout.cfg.
Then go into this directory and run:
$ python bootstrap.py
At this point, you'll have an 'eggs' directory with some files in it and a 'bin/mkrelease'. This will look a bit like this:
if __name__ == '__main__':
This is a wrapper script that mangles sys.path with the "working set" of eggs, inserting those eggs directly on sys.path, before executing the main function. If you look at the items it adds to the path, they are directories with Python packages and modules and an EGG-INFO directory with egg metadata.
Note that in some cases (e.g. eggs/jarn.mkrelease-3.1-py2.6.egg/jarn/__init__.py) these will use setuptools/distribute namespace packages (with some boilerplate in init.py). Assuming setuptools is on sys.path, it should deal with these as sys.path is searched when modules are imported.
Another approach to get some test eggs would be to use virtualenv. For example:
$ virtualenv eggtest
$ cd eggtest
$ bin/easy_install jarn.mkrelease
At this point, we have in lib/python2.6/site-packages an easy-install.pth that looks like this:
import sys; sys.__plen = len(sys.path)
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
These .egg files are the same as the ones found in the eggs/ directory in the buildout. In this case, we rely on the scanning of .pth files in site-packages to tell Python to add the *.egg directories to sys.path, but the end result is the same.
Now, I tried to use a .codeintel/config like this:
Unfortunately, this didn't work (e.g. I couldn't get import completion from the jarn namespace except when actually in a module inside jarn.mkrelease).
Ultimately, what I'd like to do is to write a buildout recipe that spits out such a file when buildout is run. However, the above doesn't work. I saw some explicit code referencing .egg files and skipping them, but even commenting this out, it didn't work. I tried to understand how the path loading works in the codeintel package, but I failed.