def _get_package_info(module, package, env=None):
 if env:
  opt_dirs = [('%s/bin' % env)]
 else:
  opt_dirs = []
 python_bin = module.get_bin_path('python', False, opt_dirs)
 if (python_bin is None):
  formatted_dep = None
 else:
  (rc, out, err) = module.run_command([python_bin, '-c', _SPECIAL_PACKAGE_CHECKERS[package]])
  if rc:
   formatted_dep = None
  else:
   formatted_dep = ('%s==%s' % (package, out.strip()))
 return formatted_dep

def _get_package_info ( module , package , env = None ) : if env : opt_dirs = [ ( '%s/bin' % env ) ] else : opt_dirs = [ ] python_bin = module . get_bin_path ( 'python' , False , opt_dirs ) if ( python_bin is None ) : formatted_dep = None else : ( rc , out , err ) = module . run_command ( [ python_bin , '-c' , _SPECIAL_PACKAGE_CHECKERS [ package ] ] ) if rc : formatted_dep = None else : formatted_dep = ( '%s==%s' % ( package , out . strip ( ) ) ) return formatted_dep
return package info .