Windows + mac dbg fix
This commit is contained in:
parent
1f24b2ad8a
commit
5b034e6a4f
14
setup.py
14
setup.py
|
|
@ -113,7 +113,7 @@ if EXTRA_ENV_COMPILE_ARGS is None:
|
|||
else:
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64'
|
||||
elif 'win32' in sys.platform:
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -D_PYTHON_MSVC'
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -D_PYTHON_MSVC -std=c++11'
|
||||
elif "linux" in sys.platform:
|
||||
EXTRA_ENV_COMPILE_ARGS += ' -std=c++11 -fvisibility=hidden -fno-wrapv'
|
||||
elif "darwin" in sys.platform:
|
||||
|
|
@ -194,11 +194,15 @@ def cython_extensions_and_necessity():
|
|||
cython_module_files = [os.path.join(PYTHON_STEM,
|
||||
name.replace('.', '/') + '.pyx')
|
||||
for name in CYTHON_EXTENSION_MODULE_NAMES]
|
||||
config = os.environ['CONFIG']
|
||||
if config is None:
|
||||
config = 'opt'
|
||||
prefix = 'libs/' + config + '/'
|
||||
if "darwin" in sys.platform:
|
||||
extra_objects = ['libs/opt/libares.a',
|
||||
'libs/opt/libboringssl.a',
|
||||
'libs/opt/libgpr.a',
|
||||
'libs/opt/libgrpc.a']
|
||||
extra_objects = [prefix + 'libares.a',
|
||||
prefix + 'libboringssl.a',
|
||||
prefix + 'libgpr.a',
|
||||
prefix + 'libgrpc.a']
|
||||
core_c_files = []
|
||||
else:
|
||||
core_c_files = list(CORE_C_FILES)
|
||||
|
|
|
|||
|
|
@ -267,9 +267,12 @@ class BuildExt(build_ext.build_ext):
|
|||
|
||||
def build_extensions(self):
|
||||
if "darwin" in sys.platform:
|
||||
config = os.environ['CONFIG']
|
||||
if config is None:
|
||||
config = 'opt'
|
||||
target_path = os.path.abspath(
|
||||
os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||
'..', '..', '..', 'libs', 'opt'))
|
||||
'..', '..', '..', 'libs', config))
|
||||
targets = [os.path.join(target_path, 'libboringssl.a'),
|
||||
os.path.join(target_path, 'libares.a'),
|
||||
os.path.join(target_path, 'libgpr.a'),
|
||||
|
|
|
|||
Loading…
Reference in New Issue