Make use of struct.calcsize rather than sys.maxint which is dropped in Python

3.0.
This commit is contained in:
Anthony Tuininga 2008-10-04 03:29:40 +00:00
parent 83371127bc
commit ad280fecc5
1 changed files with 2 additions and 3 deletions

View File

@ -8,8 +8,6 @@ Unix platforms
"""
import sys
import distutils.command
try:
import distutils.command.bdist_msi
@ -24,6 +22,7 @@ import distutils.command.build
import distutils.dist
import distutils.util
import os
import struct
import sys
from distutils.errors import DistutilsSetupError
@ -161,7 +160,7 @@ else:
if not includeDirs:
raise DistutilsSetupError("cannot locate Oracle include files")
libPath = os.path.join(oracleHome, "lib")
if sys.maxint == 2 ** 31 - 1:
if struct.calcsize("i") == 4:
alternatePath = os.path.join(oracleHome, "lib32")
else:
alternatePath = os.path.join(oracleHome, "lib64")