class_docstr: Set up package for development
class_docstr_tok: ["Set","up","package","for","development"]
code: def finalize_options(self):
      ei = self.get_finalized_command("egg_info")
      if ei.broken_egg_info:
          template = "Please rename %r to %r before using 'develop'"
          args = ei.egg_info, ei.broken_egg_info
          raise DistutilsError(template % args)
      self.args = [ei.egg_name]
  
      easy_install.finalize_options(self)
      self.expand_basedirs()
      self.expand_dirs()
      # pick up setup-dir .egg files only: no .egg-info
      self.package_index.scan(glob.glob("*.egg"))
  
      egg_link_fn = ei.egg_name + ".egg-link"
      self.egg_link = os.path.join(self.install_dir, egg_link_fn)
      self.egg_base = ei.egg_base
      if self.egg_path is None:
          self.egg_path = os.path.abspath(ei.egg_base)
  
      target = pkg_resources.normalize_path(self.egg_base)
      egg_path = pkg_resources.normalize_path(
          os.path.join(self.install_dir, self.egg_path)
      )
      if egg_path != target:
          raise DistutilsOptionError(
              "--egg-path must be a relative path from the install"
              " directory to " + target
          )
  
      # Make a distribution for the package's source
      self.dist = pkg_resources.Distribution(
          target,
          pkg_resources.PathMetadata(
              target, os.path.abspath(ei.egg_info)
          ),
          project_name=ei.egg_name,
      )
  
      self.setup_path = self._resolve_setup_path(
          self.egg_base,
          self.install_dir,
          self.egg_path,
      )
  
imports: from distutils.util import convert_path
  from distutils import log
  from distutils.errors import DistutilsError, DistutilsOptionError
  import os
  import glob
  import io
  from setuptools.extern import six
  import pkg_resources
  from setuptools.command.easy_install import easy_install
  from setuptools import namespaces
  import setuptools
label_desc: Use image node_id 3 for calling the develop obj's underlying member method code with example usage: obj.finalize_options() without return types