# Path: coq_version.py
# def group_coq_args(args, coqc_help, topname=None, is_coq_makefile=False):
#     bindings, unrecognized_bindings = group_coq_args_split_recognized(args, coqc_help, topname=topname, is_coq_makefile=is_coq_makefile)
#     return bindings + [tuple([v]) for v in unrecognized_bindings]
# 
# Path: custom_arguments.py
# DEFAULT_LOG = make_logger([(DEFAULT_VERBOSITY, sys.stderr)])


import os
from coq_version import group_coq_args
from custom_arguments import DEFAULT_LOG
from __future__ import print_function

__all__ = ["has_dir_binding", "deduplicate_trailing_dir_bindings", "process_maybe_list"]

def topname_of_filename(file_name):
    return os.path.splitext(os.path.basename(file_name))[0].replace('-', '_DASH_')

def has_dir_binding(args, coqc_help, file_name=None):
    kwargs = dict()
    if file_name is not None: kwargs['topname'] = topname_of_filename(file_name)

# Path: coq_version.py
# def group_coq_args(args, coqc_help, topname=None, is_coq_makefile=False):
#     bindings, unrecognized_bindings = group_coq_args_split_recognized(args, coqc_help, topname=topname, is_coq_makefile=is_coq_makefile)
#     return bindings + [tuple([v]) for v in unrecognized_bindings]
# 
# Path: custom_arguments.py
# DEFAULT_LOG = make_logger([(DEFAULT_VERBOSITY, sys.stderr)])


# Path: binding_util.py
import os
from coq_version import group_coq_args
from custom_arguments import DEFAULT_LOG

from __future__ import print_function

__all__ = ["has_dir_binding", "deduplicate_trailing_dir_bindings", "process_maybe_list"]

def topname_of_filename(file_name):
    return os.path.splitext(os.path.basename(file_name))[0].replace('-', '_DASH_')

def has_dir_binding(args, coqc_help, file_name=None):
    kwargs = dict()
    if file_name is not None: kwargs['topname'] = topname_of_filename(file_name)

    bindings = group_coq_args(args, coqc_help, **kwargs)