virtualenv_dir = os.environ.get('VIRTUAL_ENV')
if virtualenv_dir:
if (
- (sys.version_info[0] == 2)
- and os.path.exists(
- os.path.join(virtualenv_dir, 'lib', 'python2.7'))
- ) or (
- not os.path.exists(
- os.path.join(virtualenv_dir, 'lib', 'python2.7'))
+ os.path.exists(
+ os.path.join(
+ virtualenv_dir, 'lib',
+ 'python%d.%d' % (sys.version_info[0], sys.version_info[1])
+ )
+ )
):
for activate_this in [
os.path.join(virtualenv_dir, 'bin', 'activate_this.py'),