From 61a0e7109e42e844dcda2637fa3bbf5d1f897938 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sun, 17 Jul 2005 19:54:38 +0000 Subject: 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 --- setuptools/package_index.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'setuptools/package_index.py') 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 ): -- cgit v1.2.1