@classmethod
def from_file(cls, name='pyproject.toml'):
    """
        Read Configuration from pyproject.toml (or similar).
        Raises exceptions when file is not found or toml is
        not installed or the file has invalid format or does
        not contain the [tool.setuptools_scm] section.
        """
    with open(name) as strm:
        defn = __import__('toml').load(strm)
    section = defn.get('tool', {})['setuptools_scm']
    return cls(**section)
