summaryrefslogtreecommitdiff
path: root/virtualenv.py
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-07-16 18:33:40 +0200
committerJannis Leidel <jannis@leidel.info>2011-07-16 18:33:40 +0200
commit12f7b05fc4f46f7d7018b40e2f31615e385e3bc0 (patch)
tree18c58525f1ccb03c1a67425030cc5c5c11fae2a9 /virtualenv.py
parentf8038141962aa66116e5e37d250320579c7354a8 (diff)
parente0cf4e7cd7a8aa421f994c156dea7cb355ce2e84 (diff)
downloadvirtualenv-1.6.3.tar.gz
Merge branch 'hotfix/1.6.3'1.6.3
Diffstat (limited to 'virtualenv.py')
-rw-r--r--virtualenv.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/virtualenv.py b/virtualenv.py
index 1a6ea41..331c5c5 100644
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -4,7 +4,7 @@
# If you change the version here, change it in setup.py
# and docs/conf.py as well.
-virtualenv_version = "1.6.2"
+virtualenv_version = "1.6.3"
import base64
import sys
@@ -13,7 +13,6 @@ import optparse
import re
import shutil
import logging
-import sysconfig
import tempfile
import zlib
import errno
@@ -1273,11 +1272,15 @@ def fix_local_scheme(home_dir):
Platforms that use the "posix_local" install scheme (like Ubuntu with
Python 2.7) need to be given an additional "local" location, sigh.
"""
- if sysconfig._get_default_scheme() == 'posix_local':
- local_path = os.path.join(home_dir, 'local')
- if not os.path.exists(local_path):
- os.symlink(os.path.abspath(home_dir), local_path)
-
+ try:
+ import sysconfig
+ except ImportError:
+ pass
+ else:
+ if sysconfig._get_default_scheme() == 'posix_local':
+ local_path = os.path.join(home_dir, 'local')
+ if not os.path.exists(local_path):
+ os.symlink(os.path.abspath(home_dir), local_path)
def fix_lib64(lib_dir):
"""