--
http://www.ironpythoninaction.com
On 14 Jul 2009, at 01:12, "Sridhar Ratnakumar"
Here are my comments regarding PEP 376 with respect to PyPM (the Python package manager being developd at ActiveState)
Multiple versions: I understand that the PEP does not support installation (thus uninstallation) of multiple versions of the same package. Should this be explicitly mentioned in the PEP -- as `get_distribution` API accepts only `name` argument, and not a `version` argument?
get_distribution(name) -> Distribution or None. Scans all elements in sys.path and looks for all directories ending with .egg-info. Returns a Distribution corresponding to the .egg-info directory that contains a PKG-INFO that matches name for the name metadata. Notice that there should be at most one result. The first result founded is returned. If the directory is not found, returns None.
Some packages have package names with mixed case. Example: ConfigObj .. as registered in setup.py. However, other packages such as turbogears specifies "configobj" (lowercase) in their install_requires.
Is `get_distribution(name)` supposed to handle mixed cases? Will it match both 'ConfigObj' and 'configobj'?
An abomination for which I am truly sorry - however to be precise I'm pretty sure the setup.py specifies configobj and it is only registered on PyPI with mixed case (which I don't believe I can change). Michael
get_installed_files(local=False) -> iterator of (path, md5, size)
Will this also return the directories /created/ during the installation? For example, will it also contain the entry "docutils" .. along with "docutils/__init__.py"?
If not, how is the installer (pip, pypm, etc..) supposed to know which directories to remove (docutils/) and which directories not to remove (site-packages/, bin/, etc..)?
The new version of PEP 345 (XXX work in progress) extends the Metadata standard and fullfills the requirements described in PEP 262, like the REQUIRES section.
Can you tell more about this?
I see that PEP 262 allows both distributions names ('docutils') and modules/packages ('roman.py') in the 'Requires:' section. Is this how the new PEP is going to adhere to? Or, is it going to adhere to PEP 345's way of allowing *only* modules/packages?
In practice, I noticed that packages usually specify distribution names in their 'Requires:' file (or install_requires.txt in the case of setuptools). Hence, PyPM *assumes* the install requirements to be distribution name. But then .. most distributions have the same name as their primary module/package.
Ok, so PEP 345 also specifies the 'Provides:' header. Does easy_install/pip make use 'Provides:' at all when resolving dependencies? For example, does 'pip install sphinx' go look for all distributions that 'provides' the 'docutils' provision.. or does it simply get the distribution named 'docutils'?
-srid _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.u...