def configure():
global _DOWNLOADS_DIR<EOL>global _CURRENT_RELEASE<EOL>_CURRENT_RELEASE = None<EOL>_DOWNLOADS_DIR = environ.get("<STR_LIT>")<EOL>if not _DOWNLOADS_DIR:<EOL><INDENT>metadata = get_downloads_metadata()<EOL>_CURRENT_RELEASE = environ.get("<STR_LIT>")<EOL>if not _CURRENT_RELEASE:<EOL><INDENT>_CURRENT_RELEASE = metadata['<STR_LIT>']<EOL><DEDENT>current_release_compatability = (<EOL>metadata["<STR_LIT>"][_CURRENT_RELEASE]["<STR_LIT>"])<EOL>current_compatability = metadata["<STR_LIT>"]<EOL>if current_release_compatability != current_compatability:<EOL><INDENT>logging.warn(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>" % (<EOL>_CURRENT_RELEASE,<EOL>current_release_compatability,<EOL>current_compatability))<EOL><DEDENT>data_dir = environ.get("<STR_LIT>")<EOL>if not data_dir:<EOL><INDENT>data_dir = user_data_dir("<STR_LIT>", version="<STR_LIT:4>")<EOL><DEDENT>_DOWNLOADS_DIR = join(data_dir, _CURRENT_RELEASE)<EOL><DEDENT>logging.debug("<STR_LIT>" % _DOWNLOADS_DIR)<EOL>
Setup various global variables based on environment variables.