def get_version():
    """ Extract the version number from the code. """
    here = os.path.abspath(os.path.dirname(__file__))
    jbxapi_file = os.path.join(here, "jbxapi.py")

    with open(jbxapi_file) as f:
        content = f.read()
        match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", content, re.M)

    if not match:
        raise RuntimeError("Unable to find version string.")
    return match.group(1)
def get_version ( ) : here = os . path . abspath ( os . path . dirname ( __file__ ) ) jbxapi_file = os . path . join ( here , "jbxapi.py" ) with open ( jbxapi_file ) as f : content = f . read ( ) match = re . search ( r"^__version__ = ['\"]([^'\"]*)['\"]" , content , re . M ) if not match : raise RuntimeError ( "Unable to find version string." ) return match . group ( 1 )
Extract the version number from the code.