<commit_before># -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)

import copy
import os

from ..util import import_
from ._base import _NativeCodeBase, _NativeSysBase, _compile_kwargs

_config, get_include = import_('pycvodes', '_config', 'get_include')


class NativeCvodeCode(_NativeCodeBase):
    wrapper_name = '_cvode_wrapper'

    namespace = {
        'p_includes': ['"odesys_anyode_iterative.hpp"'],
        'p_support_recoverable_error': True,
        'p_jacobian_set_to_zero_by_solver': True
    }
    _support_roots = True

    def __init__(self, *args, **kwargs):
        self.compile_kwargs = copy.deepcopy(_compile_kwargs)
        self.compile_kwargs['include_dirs'].append(get_include())
        self.compile_kwargs['libraries'].extend(_config.env['SUNDIALS_LIBS'].split(','))
        self.compile_kwargs['libraries'].extend(os.environ.get(<commit_msg>Add PYCVODES_NO_KLU/*_NO_LAPACK macros to cvode native code compilation<commit_after># -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)

import copy
import os

from ..util import import_
from ._base import _NativeCodeBase, _NativeSysBase, _compile_kwargs

_config, get_include = import_('pycvodes', '_config', 'get_include')


class NativeCvodeCode(_NativeCodeBase):
    wrapper_name = '_cvode_wrapper'

    namespace = {
        'p_includes': ['"odesys_anyode_iterative.hpp"'],
        'p_support_recoverable_error': True,
        'p_jacobian_set_to_zero_by_solver': True
    }
    _support_roots = True

    def __init__(self, *args, **kwargs):
        self.compile_kwargs = copy.deepcopy(_compile_kwargs)
        self.compile_kwargs['define_macros'] = [ ('PYCVODES_NO_KLU', _config.env.get('NO_KLU', '0')),
                                                 ('PYCVODES_NO_LAPACK', _config.env.get('NO_LAPACK', '0')),
                                                 ('ANYODE_NO_LAPACK', _config.env.get('NO_LAPACK', '0')) ]
        self.compile_kwargs['include_dirs'].append(get_include())
        self.compile_kwargs['libraries'].extend(_config.env['SUNDIALS_LIBS'].split(','))
        self.compile_kwargs['libraries'].extend(os.environ.get(
{'fraction_non_alphanumeric': 0.12779552715654952, 'fraction_numerical': 0.0022820629849383844, 'mean_word_length': 3.775599128540305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3274172', 'n_tokens_mistral': 721, 'n_tokens_neox': 702, 'n_words': 116}