summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-03-28 17:07:06 +0000
committerPJ Eby <distutils-sig@python.org>2006-03-28 17:07:06 +0000
commit0f338a10d98329388cf53e9c6df82bd17ff99d42 (patch)
tree921a6ef65bf487c9b875449494929f293285c6ab
parentbbaeb0caa86dfc47871f28a21141bbc77ebf36d2 (diff)
downloadpython-setuptools-git-0f338a10d98329388cf53e9c6df82bd17ff99d42.tar.gz
Eliminate spurious warnings due to case-insensitive file systems
--HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4043403
-rw-r--r--pkg_resources.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index a221a086..468dbe3d 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -2053,7 +2053,7 @@ class Distribution(object):
return # ignore the inevitable setuptools self-conflicts :(
nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt'))
-
+ loc = normalize_path(self.location)
for modname in self._get_metadata('top_level.txt'):
if (modname not in sys.modules or modname in nsp
or modname in _namespace_packages
@@ -2061,7 +2061,7 @@ class Distribution(object):
continue
fn = getattr(sys.modules[modname], '__file__', None)
- if fn and fn.startswith(self.location):
+ if fn and normalize_path(fn).startswith(loc):
continue
issue_warning(
"Module %s was already imported from %s, but %s is being added"