from datetime import datetime
from pkg_resources import get_distribution, DistributionNotFound


__author__ = (
    "Haibao Tang",
    "Vivek Krishnakumar",
    "Xingtan Zhang",
    "Won Cheol Yim",
)
__copyright__ = f"Copyright (c) 2010-{datetime.now().year}, Haibao Tang"
__email__ = "tanghaibao@gmail.com"
__license__ = "BSD"
__status__ = "Development"


try:
    VERSION = get_distribution(__name__).version
except DistributionNotFound:  # pragma: no cover
    try:
        from .version import version as VERSION  # noqa
    except ImportError as exc:  # pragma: no cover
        raise ImportError(
            "Failed to find (autogenerated) version.py. "
            "This might be because you are installing from GitHub's tarballs, "
            "use the PyPI ones."
        ) from exc
__version__ = VERSION
