# -*- coding: utf-8 -*-
"""Functionality to check for the availability and version of dependencies."""

from __future__ import print_function
import re


# Dictionary that contains version tuples per module name.
#
# A version tuple consists of:
# (version_attribute_name, minimum_version, maximum_version)
#
# Where version_attribute_name is either a name of an attribute,
# property or method.
PYTHON_DEPENDENCIES = {
    u'artifacts': (u'__version__', u'20150409', None),
    # The bencode module does not appear to have version information.
    u'bencode': (u'', u'', None),
    u'binplist': (u'__version__', u'0.1.4', None),
    u'construct': (u'__version__', u'2.5.2', u'2.5.3'),
    u'Crypto': (u'__version__', u'2.6.0', None),
    u'dateutil': (u'__version__', u'1.5', None),
    u'dfdatetime': (u'__version__', u'20160319', None),
    u'dfvfs': (u'__version__', u'20160803', None),
    u'dfwinreg': (u'__version__', u'20160320', None),
    u'dpkt': (u'__version__', u'1.8', None),
    # TODO: determine the version of Efilter.
    u'efilter': (u'', u'1.5', None),
    u'hachoir_core': (u'__version__', u'1.3.3', None),
    u'hachoir_metadata': (u'__version__', u'1.3.3', None),
    u'hachoir_parser': (u'__version__', u'1.3.4', None),
    u'IPython': (u'__version__', u'1.2.1', None),
    u'pefile': (u'__version__', u'1.2.10-139', None),
    u'psutil': (u'__version__', u'1.2.1', None),
    u'pybde': (u'get_version()', u'20140531', None),
    u'pyesedb': (u'get_version()', u'20150409', None),
    u'pyevt': (u'get_version()', u'20120410', None),
    u'pyevtx': (u'get_version()', u'20141112', None),
    u'pyewf': (u'get_version()', u'20131210', None),
    u'pyfsntfs': (u'get_version()', u'20151130', None),
    u'pyfvde': (u'get_version()', u'20160719', None),
    u'pyfwnt': (u'get_version()', u'20160418', None),
    u'pyfwsi': (u'get_version()', u'20150606', None),
    u'pylnk': (u'get_version()', u'20150830', None),
    u'pymsiecf': (u'get_version()', u'20150314', None),
    u'pyolecf': (u'get_version()', u'20151223', None),
    u'pyparsing': (u'__version__', u'2.0.3', None),