<s> import pkg_resources <EOL> TASK_VENDOR = "<STR_LIT>" <EOL> TASK_PRODUCT = "<STR_LIT>" <EOL> TASK_PACKAGE = None <EOL> try : <EOL> from pbr import version as pbr_version <EOL> _version_info = pbr_version . VersionInfo ( '<STR_LIT>' ) <EOL> version_string = _version_info . version_string <EOL> except ImportError : <EOL> _version_info = pkg_resources . get_distribution ( '<STR_LIT>' ) <EOL> version_string = lambda : _version_info . version <EOL> def version_string_with_package ( ) : <EOL> if TASK_PACKAGE is None : <EOL> return version_string ( ) <EOL> else : <EOL> return "<STR_LIT>" % ( version_string ( ) , TASK_PACKAGE ) </s>
