def split_provision(value):
 global _provision_rx
 if (_provision_rx is None):
  _provision_rx = re.compile('([a-zA-Z_]\\w*(?:\\.[a-zA-Z_]\\w*)*)(?:\\s*\\(\\s*([^)\\s]+)\\s*\\))?$', re.ASCII)
 value = value.strip()
 m = _provision_rx.match(value)
 if (not m):
  raise ValueError(('illegal provides specification: %r' % value))
 ver = (m.group(2) or None)
 if ver:
  ver = distutils.version.StrictVersion(ver)
 return (m.group(1), ver)

def split_provision ( value ) : global _provision_rx if ( _provision_rx is None ) : _provision_rx = re . compile ( '([a-zA-Z_]\\w*(?:\\.[a-zA-Z_]\\w*)*)(?:\\s*\\(\\s*([^)\\s]+)\\s*\\))?$' , re . ASCII ) value = value . strip ( ) m = _provision_rx . match ( value ) if ( not m ) : raise ValueError ( ( 'illegal provides specification: %r' % value ) ) ver = ( m . group ( 2 ) or None ) if ver : ver = distutils . version . StrictVersion ( ver ) return ( m . group ( 1 ) , ver )
return the name and optional version number of a provision .