# 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 distutils.util import get_platform
from numpy.distutils.misc_util import Configuration, get_info
from numpy.distutils.core import setup
from os.path import join
from tt.distutils import get_extra_fflags
import sys
    'python_conv.f90',
    'tt_linalg.f90',
    'ttlocsolve.f90',
    'ttnodeop.f90',
    'ttamen.f90',
]

PRINT_DIR = 'tt-fort/print'
PRINT_SRC = [
    'putstrmodule.F90',
    'dispmodule.f90',
]


def configuration(parent_package='', top_path=None):
    plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3])
    inc_dir = ['build/temp%s' % plat_specifier]

    config = Configuration('tt', parent_package, top_path)
    config.add_include_dirs(inc_dir)
    config.set_options(
        ignore_setup_xxx_py=True,
        assume_default_configuration=True,
        delegate_options_to_subpackages=True,
        quiet=False,
    )

    config.add_library('print_lib', sources=[join(PRINT_DIR, x) for x in PRINT_SRC])
    config.add_library(name='mytt',
                       sources=[join(TTFORT_DIR, x) for x in TTFORT_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/setup.py
from distutils.util import get_platform
from numpy.distutils.misc_util import Configuration, get_info
from numpy.distutils.core import setup
from os.path import join
from tt.distutils import get_extra_fflags
import sys

    'python_conv.f90',
    'tt_linalg.f90',
    'ttlocsolve.f90',
    'ttnodeop.f90',
    'ttamen.f90',
]

PRINT_DIR = 'tt-fort/print'
PRINT_SRC = [
    'putstrmodule.F90',
    'dispmodule.f90',
]


def configuration(parent_package='', top_path=None):
    plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3])
    inc_dir = ['build/temp%s' % plat_specifier]

    config = Configuration('tt', parent_package, top_path)
    config.add_include_dirs(inc_dir)
    config.set_options(
        ignore_setup_xxx_py=True,
        assume_default_configuration=True,
        delegate_options_to_subpackages=True,
        quiet=False,
    )

    config.add_library('print_lib', sources=[join(PRINT_DIR, x) for x in PRINT_SRC])
    config.add_library(name='mytt',
                       sources=[join(TTFORT_DIR, x) for x in TTFORT_SRC],

                       extra_f90_compile_args=get_extra_fflags())