Skip to content

Commit

Permalink
fix the warning logic about global setuptools
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
ianb committed Nov 3, 2009
1 parent 04a86a4 commit 8c8626c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions virtualenv.py
Expand Up @@ -265,11 +265,12 @@ def _install_req(py_executable, unzip=False, distribute=False):
# setuptools
import pkg_resources
if not hasattr(pkg_resources, '_distribute'):
raise ImportError
location = os.path.dirname(pkg_resources.__file__)
logger.notify("A globally installed setuptools was found (in %s)" % location)
logger.notify("Use the --no-site-packages option to use distribute in "
"the virtualenv.")
except ImportError:
logger.notify("A globally installed setuptools was found. "
"Use the --no-site-packages option to use distribute in "
"the virtualenv.")
pass

search_dirs = ['.', os.path.dirname(__file__), join(os.path.dirname(__file__), 'virtualenv_support')]
if os.path.splitext(os.path.dirname(__file__))[0] != 'virtualenv':
Expand Down

0 comments on commit 8c8626c

Please sign in to comment.