v5.2.0
- Add
is_compliable()
function to check Cython implementation is available for the user environment.
def is_compilable():
try:
# 1. Try to compile csrc/sentence_splitter.cpp
extra_compile_args, extra_link_args = get_extra_compile_args()
compiler = new_compiler()
customize_compiler(compiler)
compiler.compile(['csrc/sentence_splitter.cpp'], extra_postargs=extra_compile_args)
return True
except:
# 2. Cannot compile csrc/sentence_splitter.cpp
return False