Skip to content

Commit c4c66ff

Browse files
author
Paul Nasrat
committed
Merge pull request #156 from pnasrat/issue-155-fix-py24
Fix issue #155 py24 support
2 parents 7795967 + 7f39d2a commit c4c66ff

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

virtualenv.py

+11-10
Original file line numberDiff line numberDiff line change
@@ -487,16 +487,17 @@ def _install_req(py_executable, unzip=False, distribute=False,
487487
sys.path = sys.path[1:]
488488

489489
try:
490-
# check if the global Python has distribute installed or plain
491-
# setuptools
492-
import pkg_resources
493-
if not hasattr(pkg_resources, '_distribute'):
494-
location = os.path.dirname(pkg_resources.__file__)
495-
logger.notify("A globally installed setuptools was found (in %s)" % location)
496-
logger.notify("Use the --no-site-packages option to use distribute in "
497-
"the virtualenv.")
498-
except ImportError:
499-
pass
490+
try:
491+
# check if the global Python has distribute installed or plain
492+
# setuptools
493+
import pkg_resources
494+
if not hasattr(pkg_resources, '_distribute'):
495+
location = os.path.dirname(pkg_resources.__file__)
496+
logger.notify("A globally installed setuptools was found (in %s)" % location)
497+
logger.notify("Use the --no-site-packages option to use distribute in "
498+
"the virtualenv.")
499+
except ImportError:
500+
pass
500501
finally:
501502
sys.path = _prev_sys_path
502503

0 commit comments

Comments
 (0)