mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #21643: Updated test and fixed logic bug in lib64 symlink creation.
This commit is contained in:
parent
2f78b84c47
commit
b9b965f6dd
2 changed files with 19 additions and 14 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue