# Path: tt/distutils.py
# def get_extra_fflags():
#     fflags = []
#     fcompiler = customized_fcompiler()
#     if fcompiler.compiler_type in ('g95', 'gnu', 'gnu95'):
#         if fcompiler.get_version() >= '11':
#             fflags.append('-fallow-argument-mismatch')
#     return fflags


from numpy.distutils.misc_util import Configuration
from os.path import join
from tt.distutils import get_extra_fflags
    'tt_f90.f90',
    'tt_f90.pyf',
]

TTCORE_SRC = [
    'matrix_util.f90',
    'core.f90',
]


def configuration(parent_package='', top_path=None):
    ttcore_src = [join(TTFORT_DIR, x) for x in TTCORE_SRC]
    ttcore_src.append('core.pyf')
    
    config = Configuration('core', parent_package, top_path)
    config.add_extension(
        'tt_f90',
        sources=TT_SRC,
        depends=[
            'mytt',
            'print_lib',
        ],
        libraries=[
            'mytt',
            'print_lib'
        ],
    )
    config.add_extension(
        'core_f90',
        sources=ttcore_src,

# Path: tt/distutils.py
# def get_extra_fflags():
#     fflags = []
#     fcompiler = customized_fcompiler()
#     if fcompiler.compiler_type in ('g95', 'gnu', 'gnu95'):
#         if fcompiler.get_version() >= '11':
#             fflags.append('-fallow-argument-mismatch')
#     return fflags


# Path: tt/core/setup.py
from numpy.distutils.misc_util import Configuration
from os.path import join
from tt.distutils import get_extra_fflags

    'tt_f90.f90',
    'tt_f90.pyf',
]

TTCORE_SRC = [
    'matrix_util.f90',
    'core.f90',
]


def configuration(parent_package='', top_path=None):
    ttcore_src = [join(TTFORT_DIR, x) for x in TTCORE_SRC]
    ttcore_src.append('core.pyf')
    
    config = Configuration('core', parent_package, top_path)
    config.add_extension(
        'tt_f90',
        sources=TT_SRC,
        depends=[
            'mytt',
            'print_lib',
        ],
        libraries=[
            'mytt',
            'print_lib'
        ],
    )
    config.add_extension(
        'core_f90',
        sources=ttcore_src,

        extra_f90_compile_args=get_extra_fflags(),