parameters: (self, dir_name)
return_statement: return dir_name
docstring: Replace any leading sys.prefix of a directory name with sysroot.
docstring_summary: Replace any leading sys.prefix of a directory name with sysroot.
docstring_tokens: Replace any leading sys . prefix of a directory name with sysroot .
function: def _apply_sysroot(self, dir_name):
          """ Replace any leading sys.prefix of a directory name with sysroot.
          """
  
          if dir_name.startswith(sys.prefix):
              dir_name = self.sysroot + dir_name[len(sys.prefix):]
  
          return dir_name
function_tokens: def _apply_sysroot ( self , dir_name ) : if dir_name . startswith ( sys . prefix ) : dir_name = self . sysroot + dir_name [ len ( sys . prefix ) : ] return dir_name