Make use of struct.calcsize rather than sys.maxint which is dropped in Python
3.0.
This commit is contained in:
parent
83371127bc
commit
ad280fecc5
5
setup.py
5
setup.py
|
@ -8,8 +8,6 @@ Unix platforms
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import distutils.command
|
import distutils.command
|
||||||
try:
|
try:
|
||||||
import distutils.command.bdist_msi
|
import distutils.command.bdist_msi
|
||||||
|
@ -24,6 +22,7 @@ import distutils.command.build
|
||||||
import distutils.dist
|
import distutils.dist
|
||||||
import distutils.util
|
import distutils.util
|
||||||
import os
|
import os
|
||||||
|
import struct
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from distutils.errors import DistutilsSetupError
|
from distutils.errors import DistutilsSetupError
|
||||||
|
@ -161,7 +160,7 @@ else:
|
||||||
if not includeDirs:
|
if not includeDirs:
|
||||||
raise DistutilsSetupError("cannot locate Oracle include files")
|
raise DistutilsSetupError("cannot locate Oracle include files")
|
||||||
libPath = os.path.join(oracleHome, "lib")
|
libPath = os.path.join(oracleHome, "lib")
|
||||||
if sys.maxint == 2 ** 31 - 1:
|
if struct.calcsize("i") == 4:
|
||||||
alternatePath = os.path.join(oracleHome, "lib32")
|
alternatePath = os.path.join(oracleHome, "lib32")
|
||||||
else:
|
else:
|
||||||
alternatePath = os.path.join(oracleHome, "lib64")
|
alternatePath = os.path.join(oracleHome, "lib64")
|
||||||
|
|
Loading…
Reference in New Issue