Skip to content

Commit

Permalink
Fix issue #155 py24 support
Browse files Browse the repository at this point in the history
  • Loading branch information
pnasrat authored and jezdez committed Jul 21, 2011
1 parent 12f7b05 commit 1300a9d
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,16 +487,17 @@ def _install_req(py_executable, unzip=False, distribute=False,
sys.path = sys.path[1:]

try:
# check if the global Python has distribute installed or plain
# setuptools
import pkg_resources
if not hasattr(pkg_resources, '_distribute'):
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:
pass
try:
# check if the global Python has distribute installed or plain
# setuptools
import pkg_resources
if not hasattr(pkg_resources, '_distribute'):
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:
pass
finally:
sys.path = _prev_sys_path

Expand Down

0 comments on commit 1300a9d

Please sign in to comment.