Added a more complete pre build check to setup.py

This commit is contained in:
bjmb
2017-06-12 16:12:00 -04:00
parent f60bdc38c4
commit 32a057c47e
2 changed files with 8 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ Bug Fixes
* is_idempotent flag is not propagated from PreparedStatement to BoundStatement (PYTHON-736)
* Fix asyncore hang on exit (PYTHON-767)
* Driver takes several minutes to remove a bad host from session (PYTHON-762)
* Installation doesn't always fall back to no cython in Windows (PYTHON-763)
Other
-----

View File

@@ -348,6 +348,13 @@ def pre_build_check():
compiler = new_compiler(compiler=be.compiler)
customize_compiler(compiler)
try:
# We must be able to initialize the compiler if it has that method
if hasattr(compiler, "initialize"):
compiler.initialize()
except:
return False
executables = []
if compiler.compiler_type in ('unix', 'cygwin'):
executables = [compiler.executables[exe][0] for exe in ('compiler_so', 'linker_so')]