

def _get_version():
    'Extract version from package.'
    with open('hdfs/__init__.py') as reader:
        match = re.search('^__version__\\s*=\\s*[\\\'"]([^\\\'"]*)[\\\'"]', reader.read(), re.MULTILINE)
        if match:
            return match.group(1)
        else:
            raise RuntimeError('Unable to extract version.')

dataset/ETHPy150Open mtth/hdfs/setup.py _get_version/original