# Path: compilertools/_config_build.py
# class ConfigBuild:
#     """Build configuration"""
# 
#     #: Disable compilertools's optimization while building
#     disabled = False
# 
#     #: Compiles optimized for current machine only (If not compile for a cluster of
#     #: possibles machines)
#     #: True or False for manually set value; 'autodetect' for automatically set value to
#     #: True if build from PIP
#     current_machine = "autodetect"
# 
#     #: Enabled suffixes in files matrix definition.
#     #: If this set is not empty, includes only suffixes specified inside it.
#     #: This does not affect current machine builds.
#     suffixes_includes = set()
# 
#     #: Disabled suffixes in files matrix definition.
#     #: If 'suffixes_includes' is empty, completes this set to not build files for a
#     #: specific architecture.
#     #: This does not affect current machine builds.
#     suffixes_excludes = {
#         "sse",
#         "ssse3",
#         "sse4_1",
#         "sse4_2",
#         "intel_atom",
#         "intel",
#         "amd",
#     }
# 
#     #: Enables compilers options
#     option = {
#         # Enables Fast floating point math
#         "fast_fpmath": False
#     }
# 
#     #: Specific API are auto-enabled when compiling and linking if following
#     #: preprocessors are detected in source files
#     api = {
#         # openMP
#         "openmp": {"c": "#pragma omp ", "fortran": ("!$omp ", "c$omp ", "*$omp ")},
#         # OpenACC
#         "openacc": {"c": "#pragma acc ", "fortran": ("!$acc ", "c$acc ", "*$acc ")},
#         # Intel Cilk Plus
#         "cilkplus": {"c": "#pragma simd ", "fortran": "!dir$ simd "},
#     }
# 
#     #: Sources files extensions for code analysis
#     extensions = {
#         #: C/C++ sources files extensions
#         "c": (".c", ".cpp", ".cxx", ".cc", ".c++", ".cp"),
#         #: Fortran sources files extensions
#         "fortran": (".f", ".for", ".f90", ".f95", ".f03", ".f08", ".f15"),
#     }
# 
# Path: compilertools/_core.py
# def get_compile_args(
#     compiler=None, arch=None, current_machine=False, current_compiler=False
# ):
# def suffix_from_args(args, extension="", return_empty_suffixes=False):
# def log_exception():


from functools import wraps as _wraps
from distutils.command.build_ext import build_ext as _build_ext
from compilertools._config_build import ConfigBuild
from compilertools._core import (
    suffix_from_args,
    get_compile_args,
    get_compiler,
    log_exception as _log_exception,
)
        from distutils.sysconfig import get_config_var
        from distutils.util import get_platform
        from os import getcwd
        from os.path import basename
        from distutils.ccompiler import get_default_compiler
        from os.path import join
    from compilertools._src_files import _use_api_pragma
    from copy import deepcopy
                from os.path import join

    parent_extension = None

    @_wraps(str.split)
    def split(self, *args, **kwargs):
        """Split String, but keep "parent_extension" attribute.

        See str.split for more information."""
        splitted = str.split(self, *args, **kwargs)
        for i, string in enumerate(splitted):
            splitted[i] = _String(string)
            splitted[i].parent_extension = self.parent_extension
        return splitted


def _update_extension(self, ext):
    """Updates build_ext extensions for add new args and suffixes based on the current
    extension.

    Parameters
    ----------
    self : build_ext instance
        Patched build_ext.
    ext : Extension instance
        Extension from build_ext.extensions.

    Returns
    -------
    list of Extension
        Patched build_ext.extensions."""

# Path: compilertools/_config_build.py
# class ConfigBuild:
#     """Build configuration"""
# 
#     #: Disable compilertools's optimization while building
#     disabled = False
# 
#     #: Compiles optimized for current machine only (If not compile for a cluster of
#     #: possibles machines)
#     #: True or False for manually set value; 'autodetect' for automatically set value to
#     #: True if build from PIP
#     current_machine = "autodetect"
# 
#     #: Enabled suffixes in files matrix definition.
#     #: If this set is not empty, includes only suffixes specified inside it.
#     #: This does not affect current machine builds.
#     suffixes_includes = set()
# 
#     #: Disabled suffixes in files matrix definition.
#     #: If 'suffixes_includes' is empty, completes this set to not build files for a
#     #: specific architecture.
#     #: This does not affect current machine builds.
#     suffixes_excludes = {
#         "sse",
#         "ssse3",
#         "sse4_1",
#         "sse4_2",
#         "intel_atom",
#         "intel",
#         "amd",
#     }
# 
#     #: Enables compilers options
#     option = {
#         # Enables Fast floating point math
#         "fast_fpmath": False
#     }
# 
#     #: Specific API are auto-enabled when compiling and linking if following
#     #: preprocessors are detected in source files
#     api = {
#         # openMP
#         "openmp": {"c": "#pragma omp ", "fortran": ("!$omp ", "c$omp ", "*$omp ")},
#         # OpenACC
#         "openacc": {"c": "#pragma acc ", "fortran": ("!$acc ", "c$acc ", "*$acc ")},
#         # Intel Cilk Plus
#         "cilkplus": {"c": "#pragma simd ", "fortran": "!dir$ simd "},
#     }
# 
#     #: Sources files extensions for code analysis
#     extensions = {
#         #: C/C++ sources files extensions
#         "c": (".c", ".cpp", ".cxx", ".cc", ".c++", ".cp"),
#         #: Fortran sources files extensions
#         "fortran": (".f", ".for", ".f90", ".f95", ".f03", ".f08", ".f15"),
#     }
# 
# Path: compilertools/_core.py
# def get_compile_args(
#     compiler=None, arch=None, current_machine=False, current_compiler=False
# ):
# def suffix_from_args(args, extension="", return_empty_suffixes=False):
# def log_exception():


# Path: compilertools/build.py
from functools import wraps as _wraps
from distutils.command.build_ext import build_ext as _build_ext
from compilertools._config_build import ConfigBuild
from compilertools._core import (
    suffix_from_args,
    get_compile_args,
    get_compiler,
    log_exception as _log_exception,
)
        from distutils.sysconfig import get_config_var
        from distutils.util import get_platform
        from os import getcwd
        from os.path import basename
        from distutils.ccompiler import get_default_compiler
        from os.path import join
    from compilertools._src_files import _use_api_pragma
    from copy import deepcopy
                from os.path import join


    parent_extension = None

    @_wraps(str.split)
    def split(self, *args, **kwargs):
        """Split String, but keep "parent_extension" attribute.

        See str.split for more information."""
        splitted = str.split(self, *args, **kwargs)
        for i, string in enumerate(splitted):
            splitted[i] = _String(string)
            splitted[i].parent_extension = self.parent_extension
        return splitted


def _update_extension(self, ext):
    """Updates build_ext extensions for add new args and suffixes based on the current
    extension.

    Parameters
    ----------
    self : build_ext instance
        Patched build_ext.
    ext : Extension instance
        Extension from build_ext.extensions.

    Returns
    -------
    list of Extension
        Patched build_ext.extensions."""

    if ConfigBuild.disabled: