xref: /aosp_15_r20/external/bazelbuild-rules_python/.bazelrc (revision 60517a1edbc8ecf509223e9af94a7adec7d736b8)
1# For bazel-in-bazel testing
2# Trick bazel into treating BUILD files under examples/* as being regular files
3# This lets us glob() up all the files inside the examples to make them inputs to tests
4# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
5# To update these lines, execute
6# `bazel run @rules_bazel_integration_test//tools:update_deleted_packages`
7build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
8query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
9
10test --test_output=errors
11
12# Do NOT implicitly create empty __init__.py files in the runfiles tree.
13# By default, these are created in every directory containing Python source code
14# or shared libraries, and every parent directory of those directories,
15# excluding the repo root directory. With this flag set, we are responsible for
16# creating (possibly empty) __init__.py files and adding them to the srcs of
17# Python targets as required.
18build --incompatible_default_to_explicit_init_py
19
20# Ensure ongoing compatibility with this flag.
21common --incompatible_disallow_struct_provider_syntax
22
23# Windows makes use of runfiles for some rules
24build --enable_runfiles
25
26# Make Bazel 6 use bzlmod by default
27common --enable_bzlmod
28
29# Additional config to use for readthedocs builds.
30# See .readthedocs.yml for additional flags that can only be determined from
31# the runtime environment.
32build:rtd --stamp
33# Some bzl files contain repos only available under bzlmod
34build:rtd --enable_bzlmod
35
36build --lockfile_mode=update
37