blob: 4c3f5b3a12416847c4415c6402085633405796d5 [file] [log] [blame]
# For bazel-in-bazel testing
# Trick bazel into treating BUILD files under examples/* as being regular files
# This lets us glob() up all the files inside the examples to make them inputs to tests
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
# To update the file, execute
import %workspace%/.bazelrc.deleted_packages
# Symlinks are used extensively because of runfiles, venvs, and other reasons.
# Supporting otherwise is very complex with little benefit.
startup --windows_enable_symlinks
test --test_output=errors
# Do NOT implicitly create empty __init__.py files in the runfiles tree.
# By default, these are created in every directory containing Python source code
# or shared libraries, and every parent directory of those directories,
# excluding the repo root directory. With this flag set, we are responsible for
# creating (possibly empty) __init__.py files and adding them to the srcs of
# Python targets as required.
build --incompatible_default_to_explicit_init_py
build --//python/config_settings:incompatible_default_to_explicit_init_py=True
# Ensure ongoing compatibility with this flag.
common --incompatible_disallow_struct_provider_syntax
# Makes Bazel 7 act more like Bazel 8
common --incompatible_use_plus_in_repo_names
# Needed to make Windows with a py_binary in data deps work. The Bazel launcher
# is used, which falls back to finding python.exe on PATH to bootstrap.
# See https://github.com/bazel-contrib/rules_python/issues/3655
common --incompatible_strict_action_env=false
# Windows makes use of runfiles for some rules
build --enable_runfiles
# Make Bazel 7 use bzlmod by default
common --enable_bzlmod
# Local disk cache greatly speeds up builds if the regular cache is lost
common --disk_cache=~/.cache/bazel/bazel-disk-cache
# Additional config to use for readthedocs builds.
# See .readthedocs.yml for additional flags that can only be determined from
# the runtime environment.
build:rtd --stamp
# Some bzl files contain repos only available under bzlmod
build:rtd --enable_bzlmod
common --incompatible_python_disallow_native_rules
common --incompatible_no_implicit_file_export
build --lockfile_mode=update