diff options
author | PJ Eby <distutils-sig@python.org> | 2005-07-17 19:54:38 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-07-17 19:54:38 +0000 |
commit | 61a0e7109e42e844dcda2637fa3bbf5d1f897938 (patch) | |
tree | 0a155b14856bbb41c70d7fae6b0528ebcc6cf7ca /setuptools/package_index.py | |
parent | 63d507adccf8207a40e2b22a8c11f79efb83f56a (diff) | |
download | external_python_setuptools-61a0e7109e42e844dcda2637fa3bbf5d1f897938.tar.gz external_python_setuptools-61a0e7109e42e844dcda2637fa3bbf5d1f897938.tar.bz2 external_python_setuptools-61a0e7109e42e844dcda2637fa3bbf5d1f897938.zip |
The ``path`` attribute of ``Distribution`` objects is now ``location``,
because it isn't necessarily a filesystem path (and hasn't been for some
time now). ``Distribution`` objects now have an ``as_requirement()``
method that returns a ``Requirement`` for the distribution's project name
and version.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041134
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index f553c2da..4c2d7616 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -52,10 +52,8 @@ def distros_for_filename(url_or_path, basename, metadata=None): if basename.endswith('.egg.zip'): basename = basename[:-4] # strip the .zip - if basename.endswith('.egg'): - dist = Distribution.from_filename(basename, metadata) - dist.path = url_or_path - return [dist] # only one, unambiguous interpretation + if basename.endswith('.egg'): # only one, unambiguous interpretation + return [Distribution.from_location(url_or_path, basename, metadata)] if basename.endswith('.exe'): win_base, py_ver = parse_bdist_wininst(basename) @@ -80,6 +78,8 @@ def distros_for_filename(url_or_path, basename, metadata=None): + + def interpret_distro_name(url_or_path, basename, metadata, py_version=None, distro_type=SOURCE_DIST, platform=None ): |