diff options
Diffstat (limited to 'pkg_resources.py')
-rw-r--r-- | pkg_resources.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index f31789e9..6d96f5c2 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2332,7 +2332,8 @@ class Distribution(object): if modname in ('pkg_resources', 'setuptools', 'site'): continue fn = getattr(sys.modules[modname], '__file__', None) - if fn and normalize_path(fn).startswith(loc): + if fn and (normalize_path(fn).startswith(loc) or + fn.startswith(self.location)): continue issue_warning( "Module %s was already imported from %s, but %s is being added" |