aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2010-04-05 22:59:48 +0200
committerTarek Ziade <tarek@ziade.org>2010-04-05 22:59:48 +0200
commit4da7cdd3ea61af90e56e0cbe63811b8ef13cd484 (patch)
treebd46086184ee75acd0be4a3e28a48fccd566d06c
parentc8f35c14f32aa8c074530413600386bf0bd8b55e (diff)
downloadexternal_python_setuptools-4da7cdd3ea61af90e56e0cbe63811b8ef13cd484.tar.gz
external_python_setuptools-4da7cdd3ea61af90e56e0cbe63811b8ef13cd484.tar.bz2
external_python_setuptools-4da7cdd3ea61af90e56e0cbe63811b8ef13cd484.zip
Removed spurious UserWarnings. Fixes #134
--HG-- branch : distribute extra : rebase_source : be9d958a083e556228597d044267d7e15a826649
-rw-r--r--CHANGES.txt1
-rw-r--r--pkg_resources.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 86ed0521..8907fa22 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@ CHANGES
* Issue 133: Added --no-find-links to easy_install
* Added easy_install --user
* Issue 100: Fixed develop --user not taking '.' in PYTHONPATH into account
+* Issue 134: removed spurious UserWarnings. Patch by VanLindberg
------
0.6.10
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"