Skip to content
Open
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
181 changes: 0 additions & 181 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,6 @@ buildifier:
- "..."
test_flags:
- "--test_tag_filters=-integration-test"
.common_workspace_flags_min_bazel: &common_workspace_flags_min_bazel
build_flags:
- "--experimental_repository_cache_hardlinks=false"
- "--noenable_bzlmod"
- "--build_tag_filters=-integration-test"
test_flags:
- "--noenable_bzlmod"
- "--test_tag_filters=-integration-test"
.common_workspace_flags: &common_workspace_flags
skip_in_bazel_downstream_pipeline: "Bazel 9 doesn't support workspace"
test_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
- "--test_tag_filters=-integration-test"
build_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
- "--build_tag_filters=-integration-test"
bazel: 7.x
# NOTE: The Mac and Windows bazelinbazel jobs override parts of this config.
.common_bazelinbazel_config: &common_bazelinbazel_config
build_flags:
Expand Down Expand Up @@ -154,21 +135,6 @@ tasks:
name: "Gazelle: BCR, Bazel {bazel}"
platform: macos_arm64

gazelle_extension_min:
<<: *common_workspace_flags_min_bazel
<<: *minimum_supported_version
name: "Gazelle: workspace, minimum supported Bazel version"
platform: ubuntu2204
build_targets: ["//..."]
test_targets: ["//..."]
working_directory: gazelle
gazelle_extension_workspace:
<<: *common_workspace_flags
name: "Gazelle: workspace"
platform: ubuntu2204
build_targets: ["//..."]
test_targets: ["//..."]
working_directory: gazelle
gazelle_extension:
name: "Gazelle: default settings"
platform: ubuntu2204
Expand Down Expand Up @@ -197,13 +163,6 @@ tasks:
test_targets:
- "//..."

ubuntu_min_workspace:
<<: *minimum_supported_version
<<: *reusable_config
<<: *common_workspace_flags_min_bazel
name: "Default: Ubuntu, workspace, minimum Bazel"
platform: ubuntu2204

ubuntu_min_bzlmod:
<<: *minimum_supported_version
<<: *reusable_config
Expand Down Expand Up @@ -239,41 +198,6 @@ tasks:
test_flags:
- "--keep_going"
- "--test_tag_filters=-integration-test"
ubuntu_workspace:
<<: *reusable_config
<<: *common_workspace_flags
name: "Default: Ubuntu, workspace"
platform: ubuntu2204
mac_workspace:
<<: *reusable_config
<<: *common_workspace_flags
name: "Default: Mac, workspace"
platform: macos_arm64
windows_workspace:
<<: *reusable_config
<<: *common_workspace_flags
name: "Default: Windows, workspace"
platform: windows
# Most of tests/integration are failing on Windows w/workspace. Skip them
# for now until we can look into it.
build_targets:
- "--"
- "..."
# As a regression test for #225, check that wheel targets still build when
# their package path is qualified with the repo name.
- "@rules_python//examples/wheel/..."
build_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
- "--keep_going"
- "--build_tag_filters=-integration-test"
test_targets:
- "--"
- "..."
test_flags:
- "--noenable_bzlmod"
- "--enable_workspace"
- "--test_tag_filters=-integration-test"

debian:
<<: *reusable_config
Expand Down Expand Up @@ -323,38 +247,6 @@ tasks:
- "--test_tag_filters=-integration-test,-acceptance-test"
- "--extra_toolchains=@buildkite_config//config:cc-toolchain"

integration_test_build_file_generation_ubuntu_minimum_supported_workspace:
<<: *minimum_supported_version
<<: *reusable_build_test_all
<<: *common_workspace_flags_min_bazel
name: "examples/build_file_generation: Ubuntu, workspace, minimum Bazel"
working_directory: examples/build_file_generation
platform: ubuntu2204
integration_test_build_file_generation_ubuntu_workspace:
<<: *reusable_build_test_all
<<: *common_workspace_flags
name: "examples/build_file_generation: Ubuntu, workspace"
working_directory: examples/build_file_generation
platform: ubuntu2204
integration_test_build_file_generation_debian_workspace:
<<: *reusable_build_test_all
<<: *common_workspace_flags
name: "examples/build_file_generation: Debian, workspace"
working_directory: examples/build_file_generation
platform: debian11
integration_test_build_file_generation_macos_workspace:
<<: *reusable_build_test_all
<<: *common_workspace_flags
name: "examples/build_file_generation: macOS, workspace"
working_directory: examples/build_file_generation
platform: macos_arm64
integration_test_build_file_generation_windows_workspace:
<<: *reusable_build_test_all
<<: *common_workspace_flags
name: "examples/build_file_generation: Windows, workspace"
working_directory: examples/build_file_generation
platform: windows

integration_test_bzlmod_ubuntu_vendor:
<<: *reusable_build_test_all
name: "examples/bzlmod: bazel vendor"
Expand All @@ -365,42 +257,6 @@ tasks:
- "bazel build --vendor_dir=./vendor //..."
- "rm -rf ./vendor"

integration_test_multi_python_versions_ubuntu_workspace:
<<: *reusable_build_test_all
<<: *common_workspace_flags
<<: *coverage_targets_example_multi_python
name: "examples/multi_python_versions: Ubuntu, workspace"
working_directory: examples/multi_python_versions
platform: ubuntu2204
integration_test_multi_python_versions_debian_workspace:
<<: *reusable_build_test_all
<<: *common_workspace_flags
<<: *coverage_targets_example_multi_python
name: "examples/multi_python_versions: Debian, workspace"
working_directory: examples/multi_python_versions
platform: debian11
integration_test_multi_python_versions_macos_workspace:
<<: *reusable_build_test_all
<<: *common_workspace_flags
<<: *coverage_targets_example_multi_python
name: "examples/multi_python_versions: MacOS, workspace"
working_directory: examples/multi_python_versions
platform: macos_arm64
integration_test_multi_python_versions_windows_workspace:
<<: *reusable_build_test_all
<<: *common_workspace_flags
# coverage is not supported on Windows
name: "examples/multi_python_versions: Windows, workspace"
working_directory: examples/multi_python_versions
platform: windows

integration_test_pip_parse_ubuntu_min_workspace:
<<: *minimum_supported_version
<<: *common_workspace_flags_min_bazel
<<: *reusable_build_test_all
name: "examples/pip_parse: Ubuntu, workspace, minimum supported Bazel version"
working_directory: examples/pip_parse
platform: ubuntu2204
integration_test_pip_parse_ubuntu_min_bzlmod:
<<: *minimum_supported_version
<<: *reusable_build_test_all
Expand Down Expand Up @@ -429,34 +285,6 @@ tasks:
working_directory: examples/pip_parse
platform: windows

integration_test_pip_parse_vendored_ubuntu_min_workspace:
<<: *minimum_supported_version
<<: *common_workspace_flags_min_bazel
<<: *reusable_build_test_all
name: "examples/pip_parse_vendored: Ubuntu, workspace, minimum Bazel"
working_directory: examples/pip_parse_vendored
platform: ubuntu2204
integration_test_pip_parse_vendored_ubuntu:
<<: *reusable_build_test_all
<<: *common_workspace_flags
name: "examples/pip_parse_vendored: Ubuntu"
working_directory: examples/pip_parse_vendored
platform: ubuntu2204
integration_test_pip_parse_vendored_debian:
<<: *reusable_build_test_all
<<: *common_workspace_flags
name: "examples/pip_parse_vendored: Debian"
working_directory: examples/pip_parse_vendored
platform: debian11
integration_test_pip_parse_vendored_macos:
<<: *reusable_build_test_all
<<: *common_workspace_flags
name: "examples/pip_parse_vendored: MacOS"
working_directory: examples/pip_parse_vendored
platform: macos_arm64
# We don't run pip_parse_vendored under Windows as the file checked in is
# generated from a repository rule containing OS-specific rendered paths.

integration_test_bazelinbazel_ubuntu:
<<: *common_bazelinbazel_config
name: "tests/integration bazel-in-bazel: Ubuntu"
Expand Down Expand Up @@ -557,15 +385,6 @@ tasks:
- "bazel run //:os_specific_requirements.update"
- "git diff --exit-code"

integration_compile_pip_requirements_test_from_external_repo_ubuntu_min_workspace:
<<: *minimum_supported_version
<<: *common_workspace_flags_min_bazel
name: "compile_pip_requirements_test_from_external_repo: Ubuntu, workspace, minimum Bazel"
working_directory: tests/integration/compile_pip_requirements_test_from_external_repo
platform: ubuntu2204
shell_commands:
# Assert that @compile_pip_requirements//:requirements_test does the right thing.
- "bazel test @compile_pip_requirements//..."
integration_compile_pip_requirements_test_from_external_repo_ubuntu_min_bzlmod:
<<: *minimum_supported_version
name: "compile_pip_requirements_test_from_external_repo: Ubuntu, bzlmod, minimum Bazel"
Expand Down
3 changes: 0 additions & 3 deletions .bazelrc.deleted_packages
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Generated via './tools/update_deleted_packages.sh'
common --deleted_packages=examples/build_file_generation
common --deleted_packages=examples/build_file_generation/random_number_generator
common --deleted_packages=examples/bzlmod
common --deleted_packages=examples/bzlmod/entry_points
common --deleted_packages=examples/bzlmod/entry_points/tests
Expand All @@ -16,7 +14,6 @@ common --deleted_packages=examples/multi_python_versions/libs/my_lib
common --deleted_packages=examples/multi_python_versions/requirements
common --deleted_packages=examples/multi_python_versions/tests
common --deleted_packages=examples/pip_parse
common --deleted_packages=examples/pip_parse_vendored
common --deleted_packages=gazelle
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation/other_module/other_module/pkg
Expand Down
43 changes: 3 additions & 40 deletions .github/workflows/create_archive_and_notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ $(dirname $0)/check_version_markers.sh
PREFIX="rules_python-${TAG}"
ARCHIVE="rules_python-$TAG.tar.gz"
git archive --format=tar "--prefix=${PREFIX}/" "$TAG" | gzip > "$ARCHIVE"
SHA=$(shasum -a 256 "$ARCHIVE" | awk '{print $1}')

cat > release_notes.txt << EOF

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

For the user-facing changelog see [here](https://rules-python.readthedocs.io/en/latest/changelog.html#v${TAG//./-})

## Using Bzlmod
## Using

Add to your \`MODULE.bazel\` file:

Expand All @@ -65,43 +64,7 @@ pip.parse(
use_repo(pip, "pypi")
\`\`\`

## Using WORKSPACE
For \`WORKSPACE\` users, please use rules_python through \`bzlmod\` by loading the rest of your
dependencies through the \`WORKSPACE.bzlmod\` file.

Paste this snippet into your \`WORKSPACE\` file:

\`\`\`starlark
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_python",
sha256 = "${SHA}",
strip_prefix = "${PREFIX}",
url = "https://github.com/bazel-contrib/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()
\`\`\`

### Gazelle plugin

Paste this snippet into your \`WORKSPACE\` file:

\`\`\`starlark
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "${SHA}",
strip_prefix = "${PREFIX}/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
)

# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.

load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()
\`\`\`
EOF
5 changes: 0 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,6 @@ instructed to.

`bazel query --output=build` can be used to inspect target definitions.

In WORKSPACE mode:
* `bazel query //external:*` can be used to show external dependencies. Adding
`--output=build` shows the definition, including version.

For bzlmod mode:
* `bazel mod graph` shows dependencies and their version.
* `bazel mod explain` shows detailed information about a module.
* `bazel mode show_repo` shows detailed information about a repository.
Expand Down
2 changes: 0 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ filegroup(
srcs = [
"BUILD.bazel",
"MODULE.bazel",
"WORKSPACE",
"WORKSPACE.bzlmod",
"internal_dev_deps.bzl",
"internal_dev_setup.bzl",
"version.bzl",
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ END_UNRELEASED_TEMPLATE
### Removed
* (coverage) Support for python 3.8 has been dropped from the bundled
`coverage.py` wheel set, since coverage.py 7.6.2 dropped it.
* (workspace) Users loading `rules_python` through `WORKSPACE` will have
to migrate to loading it through `MODULE.bazel`. The previous release is
the last release that supports `WORKSPACE`.

{#v0-0-0-changed}
### Changed
Expand Down
Loading
Loading