summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-11-28 14:08:21 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-11-28 14:08:21 -0500
commitba186b0a9526a9e1b6c720fa00024d2946004712 (patch)
treeb30d77180be8557ab66cc1a2664a9745562351bc
parentb4faffd44bab7b03b189c7923d37af80c1538de7 (diff)
downloadpython-setuptools-bitbucket-ba186b0a9526a9e1b6c720fa00024d2946004712.tar.gz
Rename method as _version_from_metadata.
-rw-r--r--pkg_resources/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 631c8547..7c3e18b4 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -2500,22 +2500,22 @@ class Distribution(object):
dist_path = os.path.join(location, basename)
basename, ext = os.path.splitext(basename)
if ext.lower() in _distributionImpl:
- # .dist-info gets much metadata differently
+ cls = _distributionImpl[ext.lower()]
+
match = EGG_NAME(basename)
if match:
project_name, version, py_version, platform = match.group(
'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(
location, metadata, project_name=project_name, version=version,
py_version=py_version, platform=platform, **kw
)
@staticmethod
- def _version_from_egg_info(dist_path):
+ def _version_from_metadata(dist_path):
pass
@property
@@ -2815,7 +2815,7 @@ class Distribution(object):
class EggInfoDistribution(Distribution):
@staticmethod
- def _version_from_egg_info(dist_path):
+ def _version_from_metadata(dist_path):
"""
Packages installed by distutils (e.g. numpy or scipy),
which uses an old safe_version, and so