diff options
-rw-r--r-- | setup.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -21,8 +21,14 @@ import sys | |||
21 | import platform | 21 | import platform |
22 | from setuptools import setup | 22 | from setuptools import setup |
23 | from setuptools import find_packages | 23 | from setuptools import find_packages |
24 | from ctypes.util import find_library | 24 | |
25 | from ctypes.util import _findLib_ldconfig as find_library_ldconfig | 25 | try: |
26 | # This is probably Linux | ||
27 | from ctypes.util import _findLib_ldconfig as find_library | ||
28 | except ImportError: | ||
29 | # This is something else (maybe Mac OS X?) | ||
30 | from ctypes.util import find_library | ||
31 | |||
26 | from subprocess import Popen, PIPE | 32 | from subprocess import Popen, PIPE |
27 | from copy import deepcopy | 33 | from copy import deepcopy |
28 | 34 | ||
@@ -136,7 +142,7 @@ class OracleLibCheck(BaseLibCheck): | |||
136 | return False | 142 | return False |
137 | 143 | ||
138 | def _set_oracle_home(self): | 144 | def _set_oracle_home(self): |
139 | path = find_library_ldconfig(self.LIB) | 145 | path = find_library(self.LIB) |
140 | os.environ['ORACLE_HOME'] = os.path.dirname(path) | 146 | os.environ['ORACLE_HOME'] = os.path.dirname(path) |
141 | 147 | ||
142 | 148 | ||