parameters: (path)
return_statement: return 0
docstring: Call the codesign executable on the signable object at path.
docstring_summary: Call the codesign executable on the signable object at path.
docstring_tokens: Call the codesign executable on the signable object at path .
function: def codesign(path):
  	'''Call the codesign executable on the signable object at path.'''
  
  	certname = 'Developer ID Application: %s' % options.developer_id
  	OU = certificate_subject_OU(certname)
  
  	if hasattr(path, 'isalpha'):
  		path = (path,)
  	for p in path:
  		identifier = lookup_file_identifier(p)
  		reqs = None
  		with open(os.path.join(options.source_dir, 'macx/scripts/codesign-requirements.tmpl'), 'r') as f:
  			tmplReqs = f.read()
  			reqs = string.Template(tmplReqs).substitute({
  				'identifier': identifier,
  				'subject_OU': OU,
  			})
  		p = Popen(('codesign', '--keychain', options.keychain, '-vvvv', '-i', identifier, '-r='+reqs, '-s', certname, p))
  		retval = p.wait()
  		if retval != 0:
  			return retval
  	return 0
function_tokens: def codesign ( path ) : certname = 'Developer ID Application: %s' % options . developer_id OU = certificate_subject_OU ( certname ) if hasattr ( path , 'isalpha' ) : path = ( path , ) for p in path : identifier = lookup_file_identifier ( p ) reqs = None with open ( os . path . join ( options . source_dir , 'macx/scripts/codesign-requirements.tmpl' ) , 'r' ) as f : tmplReqs = f . read ( ) reqs = string . Template ( tmplReqs ) . substitute ( { 'identifier' : identifier , 'subject_OU' : OU , } ) p = Popen ( ( 'codesign' , '--keychain' , options . keychain , '-vvvv' , '-i' , identifier , '-r=' + reqs , '-s' , certname , p ) ) retval = p . wait ( ) if retval != 0 : return retval return 0