parameters: (target, source, env, for_signature)
return_statement: return target_name
docstring: Get the basename for a library (so for libxyz.so, return xyz)
      :param target:
      :param source:
      :param env:
      :param for_signature:
      :return:
docstring_summary: Get the basename for a library (so for libxyz.so, return xyz)
      :param target:
      :param source:
      :param env:
      :param for_signature:
      :return:
docstring_tokens: Get the basename for a library ( so for libxyz . so return xyz ) : param target : : param source : : param env : : param for_signature : : return :
function: def _get_shlib_stem(target, source, env, for_signature):
      """
      Get the basename for a library (so for libxyz.so, return xyz)
      :param target:
      :param source:
      :param env:
      :param for_signature:
      :return:
      """
      verbose = False
  
      target_name = str(target.name)
      shlibprefix = env.subst("$SHLIBPREFIX")
      shlibsuffix = env.subst("$_SHLIBSUFFIX")
  
      if verbose and not for_signature:
          print(
              "_get_shlib_stem: target_name:%s shlibprefix:%s shlibsuffix:%s"
              % (target_name, shlibprefix, shlibsuffix)
          )
  
      if target_name.startswith(shlibprefix):
          target_name = target_name[len(shlibprefix) :]
  
      if target_name.endswith(shlibsuffix):
          target_name = target_name[: -len(shlibsuffix)]
  
      if verbose and not for_signature:
          print("_get_shlib_stem: target_name:%s AFTER" % (target_name,))
  
      return target_name
function_tokens: def _get_shlib_stem ( target , source , env , for_signature ) : verbose = False target_name = str ( target . name ) shlibprefix = env . subst ( "$SHLIBPREFIX" ) shlibsuffix = env . subst ( "$_SHLIBSUFFIX" ) if verbose and not for_signature : print ( "_get_shlib_stem: target_name:%s shlibprefix:%s shlibsuffix:%s" % ( target_name , shlibprefix , shlibsuffix ) ) if target_name . startswith ( shlibprefix ) : target_name = target_name [ len ( shlibprefix ) : ] if target_name . endswith ( shlibsuffix ) : target_name = target_name [ : - len ( shlibsuffix ) ] if verbose and not for_signature : print ( "_get_shlib_stem: target_name:%s AFTER" % ( target_name , ) ) return target_name