<commit_before># -*- Python -*-
"""Repository rule for system library autoconfiguration.

`syslibs_configure` depends on the following environment variables:

  * `TF_SYSTEM_LIBS`: list of third party dependencies that should use
    the system version instead
"""

_TF_SYSTEM_LIBS = "TF_SYSTEM_LIBS"

VALID_LIBS = [
    "absl_py",
    "astor_archive",
    "boringssl",
    "com_github_googleapis_googleapis",
    "com_github_googlecloudplatform_google_cloud_cpp",
    "com_google_protobuf",
    "com_google_protobuf_cc",
    "com_googlesource_code_re2",
    "curl",
    "cython",
    "double_conversion",
    "flatbuffers",
    "gast_archive",
    "gif_archive",
    "grpc",
    "hwloc",
    "icu",
    "jpeg",
    "jsoncpp_git",
    "keras_applications_archive",
    "lmdb",
    "nasm",
    "nsync",
    "org_sqlite",
    "pcre",
    "png_archive",
    "protobuf_archive",
    "six_archive",
    "snappy",
    "swig",
    "termcolor_archive",
    "wrapt",
    "zlib_archive",
]

def auto_configure_fail(msg):
    """Output failure message when syslibs configuration fails."""
    red = "\033[0;31m"
    no_color = "\033[0m"
    fail("\n%sSystem Library Configuration Error:%s %s\n" % (red, no_color, msg))

def _is_windows(repository_ctx):
    """Returns true if the host operating system is windows."""
    os_name = repository_ctx.os.name.lower()
    if os_name.find("windows") != -1:
        return True
    return False

def _enable_syslibs(repository_ctx):
    s = repository_ctx.os.environ.get(_TF_SYSTEM_LIBS, "").strip()
    if not _is_windows(repository_ctx) and s != None and s != "":<commit_msg>systemlibs: Add pasta to enabled syslibs<commit_after># -*- Python -*-
"""Repository rule for system library autoconfiguration.

`syslibs_configure` depends on the following environment variables:

  * `TF_SYSTEM_LIBS`: list of third party dependencies that should use
    the system version instead
"""

_TF_SYSTEM_LIBS = "TF_SYSTEM_LIBS"

VALID_LIBS = [
    "absl_py",
    "astor_archive",
    "boringssl",
    "com_github_googleapis_googleapis",
    "com_github_googlecloudplatform_google_cloud_cpp",
    "com_google_protobuf",
    "com_google_protobuf_cc",
    "com_googlesource_code_re2",
    "curl",
    "cython",
    "double_conversion",
    "flatbuffers",
    "gast_archive",
    "gif_archive",
    "grpc",
    "hwloc",
    "icu",
    "jpeg",
    "jsoncpp_git",
    "keras_applications_archive",
    "lmdb",
    "nasm",
    "nsync",
    "org_sqlite",
    "pasta",
    "pcre",
    "png_archive",
    "protobuf_archive",
    "six_archive",
    "snappy",
    "swig",
    "termcolor_archive",
    "wrapt",
    "zlib_archive",
]

def auto_configure_fail(msg):
    """Output failure message when syslibs configuration fails."""
    red = "\033[0;31m"
    no_color = "\033[0m"
    fail("\n%sSystem Library Configuration Error:%s %s\n" % (red, no_color, msg))

def _is_windows(repository_ctx):
    """Returns true if the host operating system is windows."""
    os_name = repository_ctx.os.name.lower()
    if os_name.find("windows") != -1:
        return True
    return False

def _enable_syslibs(repository_ctx):
    s = repository_ctx.os.environ.get(_TF_SYSTEM_LIBS, "").strip()
    if not _is_windows(repository_ctx) and s != None and s != "":
{'fraction_non_alphanumeric': 0.13267813267813267, 'fraction_numerical': 0.007371007371007371, 'mean_word_length': 3.6198581560283687, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6806098', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1112, 'n_words': 242}