

def versions_from_file(filename):
    try:
        with open(filename) as f:
            contents = f.read()
    except EnvironmentError:
        raise NotThisMethod('unable to read _version.py')
    mo = re.search("version_json = '''\\n(.*)'''  # END VERSION_JSON", contents, (re.M | re.S))
    if (not mo):
        raise NotThisMethod('no version_json in _version.py')
    return json.loads(mo.group(1))

dataset/ETHPy150Open Anaconda-Platform/chalmers/versioneer.py versions_from_file/original