()
Gets the current version of the package.
Gets the current version of the package.
Gets the current version of the package .
def get_version():
    """ Gets the current version of the package.
    """
    version_py = os.path.join(os.path.dirname(__file__), 'sru/version.py')
    with open(version_py) as fh:
        for line in fh:
            if line.startswith('__version__'):
                return line.split('=')[-1].strip() \
                    .replace('"', '').replace("'", '')
    raise ValueError('Failed to parse version from: {}'.format(version_py))
def get_version ( ) : version_py = os . path . join ( os . path . dirname ( __file__ ) , 'sru/version.py' ) with open ( version_py ) as fh : for line in fh : if line . startswith ( '__version__' ) : return line . split ( '=' ) [ - 1 ] . strip ( ) . replace ( '"' , '' ) . replace ( "'" , '' ) raise ValueError ( 'Failed to parse version from: {}' . format ( version_py ) )