Commit df551652 authored by Jason R. Coombs's avatar Jason R. Coombs

Rename method as _version_from_metadata.

parent ca89b069
...@@ -2500,22 +2500,22 @@ class Distribution(object): ...@@ -2500,22 +2500,22 @@ class Distribution(object):
dist_path = os.path.join(location, basename) dist_path = os.path.join(location, basename)
basename, ext = os.path.splitext(basename) basename, ext = os.path.splitext(basename)
if ext.lower() in _distributionImpl: if ext.lower() in _distributionImpl:
# .dist-info gets much metadata differently cls = _distributionImpl[ext.lower()]
match = EGG_NAME(basename) match = EGG_NAME(basename)
if match: if match:
project_name, version, py_version, platform = match.group( project_name, version, py_version, platform = match.group(
'name', 'ver', 'pyver', 'plat' 'name', 'ver', 'pyver', 'plat'
) )
cls = _distributionImpl[ext.lower()]
version = cls._version_from_egg_info(dist_path) or version version = cls._version_from_metadata(dist_path) or version
return cls( return cls(
location, metadata, project_name=project_name, version=version, location, metadata, project_name=project_name, version=version,
py_version=py_version, platform=platform, **kw py_version=py_version, platform=platform, **kw
) )
@staticmethod @staticmethod
def _version_from_egg_info(dist_path): def _version_from_metadata(dist_path):
pass pass
@property @property
...@@ -2815,7 +2815,7 @@ class Distribution(object): ...@@ -2815,7 +2815,7 @@ class Distribution(object):
class EggInfoDistribution(Distribution): class EggInfoDistribution(Distribution):
@staticmethod @staticmethod
def _version_from_egg_info(dist_path): def _version_from_metadata(dist_path):
""" """
Packages installed by distutils (e.g. numpy or scipy), Packages installed by distutils (e.g. numpy or scipy),
which uses an old safe_version, and so which uses an old safe_version, and so
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment