pkg_name -> project_name

This commit is contained in:
Tarek Ziadé 2009-04-13 20:52:58 +00:00
parent 778c9e46f8
commit ee44df8208
2 changed files with 113 additions and 113 deletions

View File

@ -172,28 +172,28 @@ XXX See if we want to add Python version in the PKG-INFO
New functions in pkgutil
========================
To use the `.egg-info` directory content, we need to add in the standard library a set of
APIs. The best place to put these APIs seems to be `pkgutil`.
To use the `.egg-info` directory content, we need to add in the standard
library a set of APIs. The best place to put these APIs seems to be `pkgutil`.
The new functions added in the package are :
- get_egg_info(pkg_name) -> path or None
- get_egg_info(project_name) -> path or None
Scans all site-packages directories and looks for all `pkg_name.egg-info`
Scans all site-packages directories and looks for all `project_name.egg-info`
directories. Returns the directory path that contains a PKG-INFO that matches
`pkg_name` for the `name` metadata. Notice that there should be at most
one result. If more than one path matches the pkg_name, a DistutilsError
is raised.
`project_name` for the `name` metadata. Notice that there should be at most
one result. The first result founded will be returned.
If the directory is not found, returns None.
- get_metadata(pkg_name) -> DistributionMetadata or None
- get_metadata(project_name) -> DistributionMetadata or None
Uses `get_egg_info` to get the `PKG-INFO` file, and returns a
`DistributionMetadata` instance that contains the metadata.
This will require a small change in `DistributionMetadata` (see #4908).
- get_egg_info_file(pkg_name, filename) -> file object or None
- get_egg_info_file(project_name, filename) -> file object or None
Uses `get_egg_info` and gets any file inside the directory,
pointed by filename.