summaryrefslogtreecommitdiffstats
path: root/Lib/venv
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2014-06-03 15:47:51 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2014-06-03 15:47:51 (GMT)
commitb9b965f6dd5be211a9ce047ac00070e51bc9b7a8 (patch)
tree1c507386213f24168a078005ca441feea40316d2 /Lib/venv
parent2f78b84c473787664940a97c49f4c64c20a03c48 (diff)
downloadcpython-b9b965f6dd5be211a9ce047ac00070e51bc9b7a8.zip
cpython-b9b965f6dd5be211a9ce047ac00070e51bc9b7a8.tar.gz
cpython-b9b965f6dd5be211a9ce047ac00070e51bc9b7a8.tar.bz2
Issue #21643: Updated test and fixed logic bug in lib64 symlink creation.
Diffstat (limited to 'Lib/venv')
-rw-r--r--Lib/venv/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index 252bffb..c258b1c 100644
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -30,7 +30,6 @@ optional arguments:
import logging
import os
import shutil
-import struct
import subprocess
import sys
import types
@@ -140,11 +139,12 @@ class EnvBuilder:
create_if_needed(path)
create_if_needed(libpath)
# Issue 21197: create lib64 as a symlink to lib on 64-bit non-OS X POSIX
- if ((struct.calcsize('P') == 8) and (os.name == 'posix') and
+ if ((sys.maxsize > 2**32) and (os.name == 'posix') and
(sys.platform != 'darwin')):
p = os.path.join(env_dir, 'lib')
link_path = os.path.join(env_dir, 'lib64')
- os.symlink(p, link_path)
+ if not os.path.exists(link_path): # Issue #21643
+ os.symlink(p, link_path)
context.bin_path = binpath = os.path.join(env_dir, binname)
context.bin_name = binname
context.env_exe = os.path.join(binpath, exename)