Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,41 +329,41 @@ tasks:
<<: *minimum_supported_version
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "examples/bzlmod_build_file_generation: Ubuntu, minimum Bazel"
working_directory: examples/bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu, minimum Bazel"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: ubuntu2204
bazel: 7.x
integration_test_bzlmod_generation_build_files_ubuntu:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "examples/bzlmod_build_file_generation: Ubuntu"
working_directory: examples/bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: ubuntu2204
integration_test_bzlmod_generation_build_files_ubuntu_run:
<<: *reusable_build_test_all
name: "examples/bzlmod_build_file_generation: Ubuntu, Gazelle and pip"
working_directory: examples/bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu, Gazelle and pip"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: ubuntu2204
shell_commands:
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
integration_test_bzlmod_build_file_generation_debian:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "examples/bzlmod_build_file_generation: Debian"
working_directory: examples/bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Debian"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: debian11
integration_test_bzlmod_build_file_generation_macos:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "examples/bzlmod_build_file_generation: MacOS"
working_directory: examples/bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: MacOS"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: macos
integration_test_bzlmod_build_file_generation_windows:
<<: *reusable_build_test_all
# coverage is not supported on Windows
name: "examples/bzlmod_build_file_generation: Windows"
working_directory: examples/bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Windows"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: windows

integration_test_multi_python_versions_ubuntu_workspace:
Expand Down
4 changes: 4 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ examples/pip_parse_vendored/bazel-pip_parse_vendored
examples/pip_repository_annotations/bazel-pip_repository_annotations
examples/py_proto_library/bazel-py_proto_library
gazelle/bazel-gazelle
gazelle/examples/bzlmod_build_file_generation/bazel-bin
gazelle/examples/bzlmod_build_file_generation/bazel-bzlmod_build_file_generation
gazelle/examples/bzlmod_build_file_generation/bazel-out
gazelle/examples/bzlmod_build_file_generation/bazel-testlog
tests/integration/compile_pip_requirements/bazel-compile_pip_requirements
tests/integration/ignore_root_user_error/bazel-ignore_root_user_error
tests/integration/local_toolchains/bazel-local_toolchains
Expand Down
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ query --deleted_packages=examples/build_file_generation,examples/build_file_gene

test --test_output=errors

common --deleted_packages=gazelle/examples/bzlmod_build_file_generation
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation/runfiles

# 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,
Expand Down
4 changes: 3 additions & 1 deletion .bcr/gazelle/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

bcr_test_module:
module_path: "../examples/bzlmod_build_file_generation"
module_path: "examples/bzlmod_build_file_generation"
matrix:
platform: ["debian11", "macos", "ubuntu2004", "windows"]
# last_rc is to get latest 8.x release. Replace with 8.x when available.
Expand All @@ -23,6 +23,8 @@ bcr_test_module:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
shell_commands:
- "echo 'common --override_module=rules_python=' >> .bazelrc"
build_targets:
- "//..."
- ":modules_map"
Expand Down

This file was deleted.

8 changes: 8 additions & 0 deletions gazelle/.bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bazel-bin
bazel-gazelle
bazel-out
bazel-testlogs
examples/bzlmod_build_file_generation/bazel-bin
examples/bzlmod_build_file_generation/bazel-bzlmod_build_file_generation
examples/bzlmod_build_file_generation/bazel-out
examples/bzlmod_build_file_generation/bazel-testlog
3 changes: 3 additions & 0 deletions gazelle/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
common --deleted_packages=examples/bzlmod_build_file_generation
common --deleted_packages=examples/bzlmod_build_file_generation/runfiles

test --test_output=errors

# Do NOT implicitly create empty __init__.py files in the runfiles tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,28 @@ module(
# For typical setups you set the version.
# See the releases page for available versions.
# https://github.com/bazel-contrib/rules_python/releases
bazel_dep(name = "rules_python", version = "0.0.0")
bazel_dep(name = "rules_python", version = "1.0.0")

# NOTE: This override is removed for BCR presubmits and the version
# specified by bazel_dep() is used instead.
# The following loads rules_python from the file system.
# For usual setups you should remove this local_path_override block.
local_path_override(
module_name = "rules_python",
path = "../..",
path = "../../..",
)

# The following stanza defines the dependency rules_python_gazelle_plugin.
# For typical setups you set the version.
# See the releases page for available versions.
# https://github.com/bazel-contrib/rules_python/releases
bazel_dep(name = "rules_python_gazelle_plugin", version = "0.0.0")
bazel_dep(name = "rules_python_gazelle_plugin", version = "1.5.0")

# The following starlark loads the gazelle plugin from the file system.
# For usual setups you should remove this local_path_override block.
local_path_override(
module_name = "rules_python_gazelle_plugin",
path = "../../gazelle",
path = "../..",
)

# The following stanza defines the dependency for gazelle
Expand Down Expand Up @@ -84,7 +86,7 @@ use_repo(pip, "pip")

# This project includes a different module that is on the local file system.
# Add the module to this parent project.
bazel_dep(name = "other_module", version = "", repo_name = "our_other_module")
bazel_dep(name = "other_module", version = "0.0.0", repo_name = "our_other_module")
local_path_override(
module_name = "other_module",
path = "other_module",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(
name = "other_module",
)

# Version doesn't matter because the root module overrides it,
# but Bazel requires it exist in the registry.
bazel_dep(name = "rules_python", version = "1.0.0")