parameters: (
      build_env,  # type: BuildEnvironment
      setup_py_path,  # type: str
      source_dir,  # type: str
      isolated,  # type: bool
      details,  # type: str
  )
return_statement: return _find_egg_info(egg_info_dir)
docstring: Generate metadata using setup.py-based defacto mechanisms.
  
      Returns the generated metadata directory.
docstring_summary: Generate metadata using setup.py-based defacto mechanisms.
docstring_tokens: Generate metadata using setup . py - based defacto mechanisms .
function: def generate_metadata(
      build_env,  # type: BuildEnvironment
      setup_py_path,  # type: str
      source_dir,  # type: str
      isolated,  # type: bool
      details,  # type: str
  ):
      # type: (...) -> str
      """Generate metadata using setup.py-based defacto mechanisms.
  
      Returns the generated metadata directory.
      """
      logger.debug(
          'Running setup.py (path:%s) egg_info for package %s',
          setup_py_path, details,
      )
  
      egg_info_dir = TempDirectory(
          kind="pip-egg-info", globally_managed=True
      ).path
  
      args = make_setuptools_egg_info_args(
          setup_py_path,
          egg_info_dir=egg_info_dir,
          no_user_config=isolated,
      )
  
      with build_env:
          call_subprocess(
              args,
              cwd=source_dir,
              command_desc='python setup.py egg_info',
          )
  
      # Return the .egg-info directory.
      return _find_egg_info(egg_info_dir)
function_tokens: def generate_metadata ( build_env , # type: BuildEnvironment setup_py_path , # type: str source_dir , # type: str isolated , # type: bool details , # type: str ) : # type: (...) -> str logger . debug ( 'Running setup.py (path:%s) egg_info for package %s' , setup_py_path , details , ) egg_info_dir = TempDirectory ( kind = "pip-egg-info" , globally_managed = True ) . path args = make_setuptools_egg_info_args ( setup_py_path , egg_info_dir = egg_info_dir , no_user_config = isolated , ) with build_env : call_subprocess ( args , cwd = source_dir , command_desc = 'python setup.py egg_info' , ) # Return the .egg-info directory. return _find_egg_info ( egg_info_dir )