setup.py
def get_version():
    """Extract package __version__"""
    with open(VERSION_FILE, encoding='utf-8') as fp:
        content = fp.read()
    match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', content, re.M)
    if match:
        return match.group(1)
    raise RuntimeError("Could not extract package __version__")
def get_version():
    """Extract package __version__"""
    with open(VERSION_FILE, encoding='utf-8') as fp:
        content = fp.read()
    match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', content, re.M)
    if match:
        return match.group(1)
    raise RuntimeError("Could not extract package __version__")
def get_version ( ) : with open ( VERSION_FILE , encoding = 'utf-8' ) as fp : content = fp . read ( ) match = re . search ( r'^__version__ = [\'"]([^\'"]*)[\'"]' , content , re . M ) if match : return match . group ( 1 ) raise RuntimeError ( "Could not extract package __version__" )
Extract package __version__
Extract package __version__