docs: def build_flags(library, type_, path):
      """Return separated build flags from pkg-config output"""
  
      pkg_config_path = [path]
      if "PKG_CONFIG_PATH" in os.environ:
          pkg_config_path.append(os.environ['PKG_CONFIG_PATH'])
      if "LIB_DIR" in os.environ:
          pkg_config_path.append(os.environ['LIB_DIR'])
          pkg_config_path.append(os.path.join(os.environ['LIB_DIR'], "pkgconfig"))
  
      options = [
          "--static",
          {
              'I': "--cflags-only-I",
              'L': "--libs-only-L",
              'l': "--libs-only-l"
          }[type_]
      ]
  
      return [
          flag.strip("-{}".format(type_))
          for flag
          in subprocess.check_output(
              ["pkg-config"] + options + [library],
              env=dict(os.environ, PKG_CONFIG_PATH=":".join(pkg_config_path))
          ).decode("UTF-8").split()
      ]