Skip to content

Commit 14b559b

Browse files
authored
chore: replace bazelbuild with bazel-contrib (#2688)
This was done using `grep | xargs sed`. BCR presubmits require that the list of repositories match where downloads come from Along the way, also update the URL homepages to bazel-contrib and change the email to my personal instead of work email.
1 parent e6f79dc commit 14b559b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+186
-185
lines changed

.bcr/gazelle/metadata.template.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"homepage": "https://github.com/bazelbuild/rules_python",
2+
"homepage": "https://github.com/bazel-contrib/rules_python",
33
"maintainers": [
44
{
55
"name": "Richard Levasseur",
6-
"email": "rlevasseur@google.com",
6+
"email": "richardlev@gmail.com",
77
"github": "rickeylev"
88
},
99
{
@@ -13,7 +13,8 @@
1313
}
1414
],
1515
"repository": [
16-
"github:bazelbuild/rules_python"
16+
"github:bazelbuild/rules_python",
17+
"github:bazel-contrib/rules_python"
1718
],
1819
"versions": [],
1920
"yanked_versions": {}

.bcr/metadata.template.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"homepage": "https://github.com/bazelbuild/rules_python",
2+
"homepage": "https://github.com/bazel-contrib/rules_python",
33
"maintainers": [
44
{
55
"name": "Richard Levasseur",
6-
"email": "rlevasseur@google.com",
6+
"email": "richardlev@gmail.com",
77
"github": "rickeylev"
88
},
99
{

.github/workflows/create_archive_and_notes.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ http_archive(
7272
name = "rules_python",
7373
sha256 = "${SHA}",
7474
strip_prefix = "${PREFIX}",
75-
url = "https://github.com/bazelbuild/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
75+
url = "https://github.com/bazel-contrib/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
7676
)
7777
7878
load("@rules_python//python:repositories.bzl", "py_repositories")
@@ -90,7 +90,7 @@ http_archive(
9090
name = "rules_python_gazelle_plugin",
9191
sha256 = "${SHA}",
9292
strip_prefix = "${PREFIX}/gazelle",
93-
url = "https://github.com/bazelbuild/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
93+
url = "https://github.com/bazel-contrib/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
9494
)
9595
9696
# To compile the rules_python gazelle extension from source,

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
# This special value tells pypi that the user identity is supplied within the token
3434
TWINE_USERNAME: __token__
3535
# Note, the PYPI_API_TOKEN is for the rules-python pypi user, added by @rickylev on
36-
# https://github.com/bazelbuild/rules_python/settings/secrets/actions
36+
# https://github.com/bazel-contrib/rules_python/settings/secrets/actions
3737
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
3838
run: bazel run --stamp --embed_label=${{ github.ref_name }} //python/runfiles:wheel.publish
3939
- name: Release

BZLMOD_SUPPORT.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ In general `bzlmod` has more features than `WORKSPACE` and users are encouraged
1111

1212
## Configuration
1313

14-
The releases page will give you the latest version number, and a basic example. The release page is located [here](/bazelbuild/rules_python/releases).
14+
The releases page will give you the latest version number, and a basic example. The release page is located [here](/bazel-contrib/rules_python/releases).
1515

1616
## What is bzlmod?
1717

@@ -53,7 +53,7 @@ better supported.
5353
the toolchains rules_python registers**.
5454

5555
NOTE: Regardless of your toolchain, due to
56-
[#691](https://github.com/bazelbuild/rules_python/issues/691), `rules_python`
56+
[#691](https://github.com/bazel-contrib/rules_python/issues/691), `rules_python`
5757
still relies on a local Python being available to bootstrap the program before
5858
handing over execution to the toolchain Python.
5959

CHANGELOG.md

+101-101
Large diffs are not rendered by default.

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ the [GitHub `gh` tool](https://github.com/cli/cli)
3030
(More advanced users may prefer the GitHub UI and raw `git` commands).
3131

3232
```shell
33-
gh repo fork bazelbuild/rules_python --clone --remote
33+
gh repo fork bazel-contrib/rules_python --clone --remote
3434
```
3535

3636
Next, make sure you have a new enough version of Python installed that supports the

RELEASING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ other minor changes bump the patch digit.
3232
To find if there were any features added or incompatible changes made, review
3333
[CHANGELOG.md](CHANGELOG.md) and the commit history. This can be done using
3434
github by going to the url:
35-
`https://github.com/bazelbuild/rules_python/compare/<VERSION>...main`.
35+
`https://github.com/bazel-contrib/rules_python/compare/<VERSION>...main`.
3636

3737
## Patch release with cherry picks
3838

WORKSPACE

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ local_repository(
107107
# which we need to fetch in order to compile it.
108108
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
109109

110-
# See: https://github.com/bazelbuild/rules_python/blob/main/gazelle/README.md
110+
# See: https://github.com/bazel-contrib/rules_python/blob/main/gazelle/README.md
111111
# This rule loads and compiles various go dependencies that running gazelle
112112
# for python requirements.
113113
_py_gazelle_deps()
@@ -118,7 +118,7 @@ interpreter = "@python_3_11_9_host//:python"
118118
#####################
119119
# Install twine for our own runfiles wheel publishing.
120120
# Eventually we might want to install twine automatically for users too, see:
121-
# https://github.com/bazelbuild/rules_python/issues/1016.
121+
# https://github.com/bazel-contrib/rules_python/issues/1016.
122122
load("@rules_python//python:pip.bzl", "pip_parse")
123123

124124
pip_parse(

docs/api/rules_python/python/config_settings/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Determines if relative symlinks are created using `declare_symlink()` at build
266266
time.
267267

268268
This is only intended to work around
269-
[#2489](https://github.com/bazelbuild/rules_python/issues/2489), where some
269+
[#2489](https://github.com/bazel-contrib/rules_python/issues/2489), where some
270270
packaging rules don't support `declare_symlink()` artifacts.
271271

272272
Values:

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
# Insert after the main extension
105105
extensions.insert(1, "readthedocs_ext.external_version_warning")
106106
readthedocs_vcs_url = (
107-
"http://github.com/bazelbuild/rules_python/pull/{}".format(
107+
"http://github.com/bazel-contrib/rules_python/pull/{}".format(
108108
os.environ.get("READTHEDOCS_VERSION", "")
109109
)
110110
)
@@ -133,7 +133,7 @@
133133

134134
# --- Extlinks configuration
135135
extlinks = {
136-
"gh-path": (f"https://github.com/bazelbuild/rules_python/tree/main/%s", "%s"),
136+
"gh-path": (f"https://github.com/bazel-contrib/rules_python/tree/main/%s", "%s"),
137137
}
138138

139139
# --- MyST configuration

docs/extending.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Extending the core rules is most useful when you want all or most of the
2323
behavior of a core rule.
2424
:::
2525

26-
Follow or comment on https://github.com/bazelbuild/rules_python/issues/1647
26+
Follow or comment on https://github.com/bazel-contrib/rules_python/issues/1647
2727
for the development of APIs to support custom derived rules.
2828

2929
## Creating custom rules

docs/getting-started.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ your MODULE.bazel file:
1818

1919
```starlark
2020
# Update the version "0.0.0" to the release found here:
21-
# https://github.com/bazelbuild/rules_python/releases.
21+
# https://github.com/bazel-contrib/rules_python/releases.
2222
bazel_dep(name = "rules_python", version = "0.0.0")
2323

2424
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
@@ -39,13 +39,13 @@ using Bzlmod. Here is a simplified setup to download the prebuilt runtimes.
3939
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4040

4141
# Update the snippet based on the latest release below
42-
# https://github.com/bazelbuild/rules_python/releases
42+
# https://github.com/bazel-contrib/rules_python/releases
4343

4444
http_archive(
4545
name = "rules_python",
4646
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
4747
strip_prefix = "rules_python-0.36.0",
48-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
48+
url = "https://github.com/bazel-contrib/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
4949
)
5050

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

docs/pypi-dependencies.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ In some cases you may not want to generate the requirements.bzl file as a reposi
7171
while Bazel is fetching dependencies. For example, if you produce a reusable Bazel module
7272
such as a ruleset, you may want to include the requirements.bzl file rather than make your users
7373
install the WORKSPACE setup to generate it.
74-
See https://github.com/bazelbuild/rules_python/issues/608
74+
See https://github.com/bazel-contrib/rules_python/issues/608
7575

7676
This is the same workflow as Gazelle, which creates `go_repository` rules with
7777
[`update-repos`](https://github.com/bazelbuild/bazel-gazelle#update-repos)
@@ -180,7 +180,7 @@ buildozer command:
180180
buildozer 'substitute deps @old//([^/]+) @new//${1}' //...:*
181181
```
182182

183-
[requirements-drawbacks]: https://github.com/bazelbuild/rules_python/issues/414
183+
[requirements-drawbacks]: https://github.com/bazel-contrib/rules_python/issues/414
184184

185185
### Entry points
186186

docs/toolchains.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ transition period when some of the code is still defined in `WORKSPACE`.
273273

274274
To import rules_python in your project, you first need to add it to your
275275
`WORKSPACE` file, using the snippet provided in the
276-
[release you choose](https://github.com/bazelbuild/rules_python/releases)
276+
[release you choose](https://github.com/bazel-contrib/rules_python/releases)
277277

278278
To depend on a particular unreleased version, you can do the following:
279279

@@ -282,7 +282,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
282282

283283

284284
# Update the SHA and VERSION to the lastest version available here:
285-
# https://github.com/bazelbuild/rules_python/releases.
285+
# https://github.com/bazel-contrib/rules_python/releases.
286286

287287
SHA="84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841"
288288

@@ -292,7 +292,7 @@ http_archive(
292292
name = "rules_python",
293293
sha256 = SHA,
294294
strip_prefix = "rules_python-{}".format(VERSION),
295-
url = "https://github.com/bazelbuild/rules_python/releases/download/{}/rules_python-{}.tar.gz".format(VERSION,VERSION),
295+
url = "https://github.com/bazel-contrib/rules_python/releases/download/{}/rules_python-{}.tar.gz".format(VERSION,VERSION),
296296
)
297297

298298
load("@rules_python//python:repositories.bzl", "py_repositories")
@@ -324,7 +324,7 @@ pip_parse(
324324
```
325325

326326
After registration, your Python targets will use the toolchain's interpreter during execution, but a system-installed interpreter
327-
is still used to 'bootstrap' Python targets (see https://github.com/bazelbuild/rules_python/issues/691).
327+
is still used to 'bootstrap' Python targets (see https://github.com/bazel-contrib/rules_python/issues/691).
328328
You may also find some quirks while using this toolchain. Please refer to [python-build-standalone documentation's _Quirks_ section](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html).
329329

330330
## Autodetecting toolchain

examples/build_file_generation/WORKSPACE

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ gazelle_dependencies()
5959
# DON'T COPY_PASTE THIS.
6060
# Our example uses `local_repository` to point to the HEAD version of rules_python.
6161
# Users should instead use the installation instructions from the release they use.
62-
# See https://github.com/bazelbuild/rules_python/releases
62+
# See https://github.com/bazel-contrib/rules_python/releases
6363
local_repository(
6464
name = "rules_python",
6565
path = "../..",
@@ -128,7 +128,7 @@ install_deps()
128128
# which we need to fetch in order to compile it.
129129
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
130130

131-
# See: https://github.com/bazelbuild/rules_python/blob/main/gazelle/README.md
131+
# See: https://github.com/bazel-contrib/rules_python/blob/main/gazelle/README.md
132132
# This rule loads and compiles various go dependencies that running gazelle
133133
# for python requirements.
134134
_py_gazelle_deps()

examples/bzlmod/py_proto_library/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ py_test(
1818
],
1919
)
2020

21-
# Regression test for https://github.com/bazelbuild/rules_python/issues/2515
21+
# Regression test for https://github.com/bazel-contrib/rules_python/issues/2515
2222
#
2323
# This test fails before protobuf 30.0 release
2424
# when ran with --legacy_external_runfiles=False (default in Bazel 8.0.0).

examples/bzlmod_build_file_generation/MODULE.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module(
1212
# The following stanza defines the dependency rules_python.
1313
# For typical setups you set the version.
1414
# See the releases page for available versions.
15-
# https://github.com/bazelbuild/rules_python/releases
15+
# https://github.com/bazel-contrib/rules_python/releases
1616
bazel_dep(name = "rules_python", version = "0.0.0")
1717

1818
# The following loads rules_python from the file system.
@@ -25,7 +25,7 @@ local_path_override(
2525
# The following stanza defines the dependency rules_python_gazelle_plugin.
2626
# For typical setups you set the version.
2727
# See the releases page for available versions.
28-
# https://github.com/bazelbuild/rules_python/releases
28+
# https://github.com/bazel-contrib/rules_python/releases
2929
bazel_dep(name = "rules_python_gazelle_plugin", version = "0.0.0")
3030

3131
# The following starlark loads the gazelle plugin from the file system.

examples/pip_parse_vendored/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pip_parse vendored
22

33
This example is like pip_parse, however we avoid loading from the generated file.
4-
See https://github.com/bazelbuild/rules_python/issues/608
4+
See https://github.com/bazel-contrib/rules_python/issues/608
55
and https://blog.aspect.dev/avoid-eager-fetches.
66

77
The requirements now form a triple:

gazelle/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("@bazel_gazelle//:def.bzl", "gazelle")
22

33
# Gazelle configuration options.
44
# See https://github.com/bazelbuild/bazel-gazelle#running-gazelle-with-bazel
5-
# gazelle:prefix github.com/bazelbuild/rules_python/gazelle
5+
# gazelle:prefix github.com/bazel-contrib/rules_python/gazelle
66
# gazelle:exclude bazel-out
77
gazelle(
88
name = "gazelle",

gazelle/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ without using bzlmod as your dependency manager.
1717

1818
## Example
1919

20-
We have an example of using Gazelle with Python located [here](https://github.com/bazelbuild/rules_python/tree/main/examples/bzlmod).
20+
We have an example of using Gazelle with Python located [here](https://github.com/bazel-contrib/rules_python/tree/main/examples/bzlmod).
2121
A fully-working example without using bzlmod is in [`examples/build_file_generation`](../examples/build_file_generation).
2222

2323
The following documentation covers using bzlmod.
@@ -29,7 +29,7 @@ Get the current version of Gazelle from there releases here: https://github.com
2929

3030

3131
See the installation `MODULE.bazel` snippet on the Releases page:
32-
https://github.com/bazelbuild/rules_python/releases in order to configure rules_python.
32+
https://github.com/bazel-contrib/rules_python/releases in order to configure rules_python.
3333

3434
You will also need to add the `bazel_dep` for configuration for `rules_python_gazelle_plugin`.
3535

@@ -450,7 +450,7 @@ py_library(
450450
)
451451
```
452452

453-
[issue-1826]: https://github.com/bazelbuild/rules_python/issues/1826
453+
[issue-1826]: https://github.com/bazel-contrib/rules_python/issues/1826
454454

455455
#### Directive: `python_generation_mode_per_package_require_test_entry_point`:
456456
When `# gazelle:python_generation_mode package`, whether a file called `__test__.py` or a target called `__test__`, a.k.a., entry point, is required to generate one test target per package. If this is set to true but no entry point is found, Gazelle will fall back to file mode and generate one test target per file. Setting this directive to false forces Gazelle to generate one test target per package even without entry point. However, this means the `main` attribute of the `py_test` will not be set and the target will not be runnable unless either:
@@ -553,7 +553,7 @@ target, building will result in an error saying:
553553
```
554554

555555
Adding non-Python targets to the generated target is a feature request being
556-
tracked in [Issue #1865](https://github.com/bazelbuild/rules_python/issues/1865).
556+
tracked in [Issue #1865](https://github.com/bazel-contrib/rules_python/issues/1865).
557557

558558
The annotation can be added multiple times, and all values are combined
559559
and de-duplicated.

gazelle/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/bazelbuild/rules_python/gazelle
1+
module github.com/bazel-contrib/rules_python/gazelle
22

33
go 1.19
44

gazelle/manifest/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports_files([
88
go_library(
99
name = "manifest",
1010
srcs = ["manifest.go"],
11-
importpath = "github.com/bazelbuild/rules_python/gazelle/manifest",
11+
importpath = "github.com/bazel-contrib/rules_python/gazelle/manifest",
1212
visibility = ["//visibility:public"],
1313
deps = [
1414
"@com_github_emirpasic_gods//sets/treeset",

gazelle/manifest/generate/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ load("//manifest:defs.bzl", "sources_hash")
44
go_library(
55
name = "generate_lib",
66
srcs = ["generate.go"],
7-
importpath = "github.com/bazelbuild/rules_python/gazelle/manifest/generate",
7+
importpath = "github.com/bazel-contrib/rules_python/gazelle/manifest/generate",
88
visibility = ["//visibility:public"],
99
deps = ["//manifest"],
1010
)

gazelle/manifest/generate/generate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"os"
2929
"strings"
3030

31-
"github.com/bazelbuild/rules_python/gazelle/manifest"
31+
"github.com/bazel-contrib/rules_python/gazelle/manifest"
3232
)
3333

3434
func main() {

gazelle/manifest/hasher/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
33
go_library(
44
name = "hasher_lib",
55
srcs = ["main.go"],
6-
importpath = "github.com/bazelbuild/rules_python/gazelle/manifest/hasher",
6+
importpath = "github.com/bazel-contrib/rules_python/gazelle/manifest/hasher",
77
visibility = ["//visibility:private"],
88
)
99

gazelle/manifest/manifest_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"strings"
2323
"testing"
2424

25-
"github.com/bazelbuild/rules_python/gazelle/manifest"
25+
"github.com/bazel-contrib/rules_python/gazelle/manifest"
2626
)
2727

2828
var modulesMapping = manifest.ModulesMapping{

gazelle/manifest/test/test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"testing"
2828

2929
"github.com/bazelbuild/rules_go/go/runfiles"
30-
"github.com/bazelbuild/rules_python/gazelle/manifest"
30+
"github.com/bazel-contrib/rules_python/gazelle/manifest"
3131
)
3232

3333
func TestGazelleManifestIsUpdated(t *testing.T) {

gazelle/python/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ go_library(
2626
# See following for more info:
2727
# https://github.com/bazelbuild/bazel-gazelle/issues/1513
2828
embedsrcs = ["stdlib_list.txt"], # keep # TODO: use user-defined version?
29-
importpath = "github.com/bazelbuild/rules_python/gazelle/python",
29+
importpath = "github.com/bazel-contrib/rules_python/gazelle/python",
3030
visibility = ["//visibility:public"],
3131
deps = [
3232
"//manifest",

0 commit comments

Comments
 (0)