class_docstr: Do normal script install, plus any egg_info wrapper scripts
class_docstr_tok: ["Do","normal","script","install",",","plus","any","egg_info","wrapper","scripts"]
docstr: Write an executable file to the scripts directory
docstr_tok: ["Write","an","executable","file","to","the","scripts","directory"]
code: def write_script(self, script_name, contents, mode="t", *ignored):
      """Write an executable file to the scripts directory"""
      from setuptools.command.easy_install import chmod, current_umask
  
      log.info(
          "Installing %s script to %s", script_name, self.install_dir
      )
      target = os.path.join(self.install_dir, script_name)
      self.outfiles.append(target)
  
      mask = current_umask()
      if not self.dry_run:
          ensure_directory(target)
          f = open(target, "w" + mode)
          f.write(contents)
          f.close()
          chmod(target, 0o777 - mask)
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/command/install_scripts.py
imports: from distutils import log
  import distutils.command.install_scripts
  import os
  import sys
  from .._path import ensure_directory
label_desc: Use image node_id 4 for calling the install_scripts obj's underlying member method code with example usage: obj.write_script(script_name, contents, mode) without return types