summaryrefslogtreecommitdiff
path: root/pkg_resources.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2007-09-04 03:54:22 +0000
committerPJ Eby <distutils-sig@python.org>2007-09-04 03:54:22 +0000
commit9dcf16a56114f901c33cab7ac8057c98411ab85e (patch)
treeeb13366e5f9338a932cd4a8bc6662a52a0f446a0 /pkg_resources.py
parent996980750968d02c921bcfd33562969e97573ed9 (diff)
downloadpython-setuptools-git-9dcf16a56114f901c33cab7ac8057c98411ab85e.tar.gz
Fix package precedence problem where single-version eggs installed in
``site-packages`` would take precedence over ``.egg`` files (or directories) installed in ``site-packages``. (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4057944
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 6396f08b..78c96094 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -2230,7 +2230,8 @@ class Distribution(object):
for p, item in enumerate(npath):
if item==nloc:
break
- elif item==bdir:
+ elif item==bdir and self.precedence==EGG_DIST:
+ # if it's an .egg, give it precedence over its directory
path.insert(p, loc)
npath.insert(p, nloc)
break
@@ -2252,7 +2253,6 @@ class Distribution(object):
-
def check_version_conflict(self):
if self.key=='setuptools':
return # ignore the inevitable setuptools self-conflicts :(