docstr: Replaces references to libraries with full paths to their static
  versions if the static version is to be found on the library path.
docstr_tok: ["Replaces","references","to","libraries","with","full","paths","to","their","static","versions","if","the","static","version","is","to","be","found","on","the","library","path","."]
code: def replace_static_libraries(self, only=None, exclusions=None):
      """Replaces references to libraries with full paths to their static
      versions if the static version is to be found on the library path.
      """
      if exclusions is None:
          exclusions = []
  
      for library_name in set(self.libraries) - set(exclusions):
          if only is not None and library_name not in only:
              continue
  
          static_lib = find_static_library(
              library_name, self.library_dirs
          )
          if static_lib:
              print(
                  f"Found {library_name} as static library in {static_lib}."
              )
              self.libraries.remove(library_name)
              self.extra_objects.append(static_lib)
          else:
              print(
                  f"Warning: could not find static library of {library_name}."
              )
  
imports: import os
  import platform
  import sys
  from setuptools import find_packages, setup, Command, Extension
  import glob
  import shlex
  import shutil
  import subprocess
  import sysconfig
  from contextlib import contextmanager
  from pathlib import Path
  from select import select
  from shutil import which
  from time import sleep
  from typing import List, Iterable, Iterator, Optional, Tuple, TypeVar, Union
label_desc: Use image node_id 12 for calling the BuildConfiguration obj's underlying member method code with example usage: obj.replace_static_libraries(only, exclusions) without return types