Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, **kwargs):
self.compile_kwargs = copy.deepcopy(_compile_kwargs)
self.compile_kwargs['define'] = ['PYCVODES_NO_KLU={}'.format("0" if config.get('KLU', True) else "1"),
'PYCVODES_NO_LAPACK={}'.format("0" if config.get('LAPACK', True) else "1"),
'ANYODE_NO_LAPACK={}'.format("0" if config.get('LAPACK', True) else "1")]
self.compile_kwargs['include_dirs'].append(get_include())
self.compile_kwargs['libraries'].extend(_libs.get_libs().split(','))
self.compile_kwargs['libraries'].extend([l for l in os.environ.get(
'PYODESYS_LAPACK', "lapack,blas" if config["LAPACK"] else "").split(",") if l != ""])
self.compile_kwargs['flags'] = [f for f in os.environ.get("PYODESYS_CVODE_FLAGS", "").split() if f]
self.compile_kwargs['ldflags'] = [f for f in os.environ.get("PYODESYS_CVODE_LDFLAGS", "").split() if f]
super(NativeCvodeCode, self).__init__(*args, **kwargs)