Skip to content

Commit 32a057c

Browse files
author
bjmb
committed
Added a more complete pre build check to setup.py
1 parent f60bdc3 commit 32a057c

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Bug Fixes
1010
* is_idempotent flag is not propagated from PreparedStatement to BoundStatement (PYTHON-736)
1111
* Fix asyncore hang on exit (PYTHON-767)
1212
* Driver takes several minutes to remove a bad host from session (PYTHON-762)
13+
* Installation doesn't always fall back to no cython in Windows (PYTHON-763)
1314

1415
Other
1516
-----

setup.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,13 @@ def pre_build_check():
348348
compiler = new_compiler(compiler=be.compiler)
349349
customize_compiler(compiler)
350350

351+
try:
352+
# We must be able to initialize the compiler if it has that method
353+
if hasattr(compiler, "initialize"):
354+
compiler.initialize()
355+
except:
356+
return False
357+
351358
executables = []
352359
if compiler.compiler_type in ('unix', 'cygwin'):
353360
executables = [compiler.executables[exe][0] for exe in ('compiler_so', 'linker_so')]

0 commit comments

Comments
 (0)