code: def __init__(
      self,
      source_root: str,
      *,
      _env: Mapping[str, str] = os.environ,
      _argv: List[str] = sys.argv,
  ):
      self.source_root = source_root
  
      self.use_cuda_python = _get_env_bool(
          "CUPY_USE_CUDA_PYTHON", False, _env
      )
      self.use_hip = _get_env_bool("CUPY_INSTALL_USE_HIP", False, _env)
      self.include_dirs = _get_env_path("CUPY_INCLUDE_PATH", _env)
      self.library_dirs = _get_env_path("CUPY_LIBRARY_PATH", _env)
  
      cmdopts, _argv[:] = parse_args(_argv)
      self.package_name: str = cmdopts.cupy_package_name
      self.long_description_path: Optional[
          str
      ] = cmdopts.cupy_long_description
      self.wheel_libs: List[str] = cmdopts.cupy_wheel_lib
      self.wheel_includes: List[str] = cmdopts.cupy_wheel_include
      self.wheel_metadata_path: Optional[
          str
      ] = cmdopts.cupy_wheel_metadata
      self.no_rpath: bool = cmdopts.cupy_no_rpath
      self.profile: bool = cmdopts.cupy_profile
      self.linetrace: bool = cmdopts.cupy_coverage
      self.annotate: bool = cmdopts.cupy_coverage
      self.use_stub: bool = cmdopts.cupy_no_cuda
  
      if _get_env_bool("CUPY_INSTALL_NO_RPATH", False, _env):
          self.no_rpath = True
  
      if os.environ.get("READTHEDOCS", None) == "True":
          self.use_stub = True
  
      self.features = cupy_builder.get_features(self)
  
      # Calculate cache key for this build
      print("Generating cache key from header files...")
      include_pattern = os.path.join(
          source_root, "cupy", "_core", "include", "**"
      )
      include_files = [
          f
          for f in sorted(glob.glob(include_pattern, recursive=True))
          if os.path.isfile(f)
      ]
      hasher = hashlib.sha1(usedforsecurity=False)
      for include_file in include_files:
          with open(include_file, "rb") as f:
              hasher.update(include_file.encode())
              hasher.update(f.read())
              hasher.update(b"\x00")
      cache_key = hasher.hexdigest()
      print(
          f"Cache key ({len(include_files)} files "
          f"matching {include_pattern}): {cache_key}"
      )
      self.cupy_cache_key = cache_key
  
file_path: cupy/install/cupy_builder/_context.py
imports: import argparse
  import glob
  import hashlib
  import os
  import sys
  from typing import Any, List, Mapping, Optional, Tuple
  import cupy_builder
label_desc: Use image node_id 1 to create a new Context object  with example: obj = Context(source_root)