At 12:17 PM 1/30/2009 +0100, Tarek Ziadé wrote:
this code is still incomplete, I am waiting for PJE feedback to add
the support for zip files that contains
several .egg folders or zip files. But the current version is able to
find a package and its metadata.

What feedback are you waiting for? I thought I already pointed you to the file format details page, and the code in pkg_resources.

FWIW, I think the uninstall manifest should be done as a file within an .egg-info directory, as it's the shortest route to setuptools/distutils compatibility in this area. Distutils' install_egg_info would just make a directory with PKG-INFO and the manifest, and easy_install would record the manifest.

At that point, easy_install would also be able (in principle) to stop:

1. using .pth files,
2. moving eggs to the front of PYTHONPATH, and
3. patching site.py

...which would probably make a lot of people happier.

(It could stop doing these things because it could just extract active versions directly to their target directories, and move inactive versions to .egg files or directories.)

I'm not saying the change will be *easy*, and uninstall will still have to be careful about namespace packages (you'd need to scan all the manifests in the target directory to see who else is using those files), but the raw material would be there to get the job done.

The manifest should contain size/date/checksum information, and should use /-separated paths, and make them relative paths based on the sys.path directory, for any file that is a child of the sys.path directory. (i.e., if installed to site-packages, then any file in that package that is under site-packages should be listed relative to site-packages.) In this way, moving an entire directory (e.g., moving one of your PYTHONPATH directories) will not break the manifest.

The /-separation part is also important: I've seen environments where the same libraries are in use on a network with Linux, Mac, *and* Windows machines - /-separation is the only way such an install manifest would be readable across all 3.

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to