Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions .github/workflows/create_archive_and_notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ http_archive(
name = "rules_python",
sha256 = "${SHA}",
strip_prefix = "${PREFIX}",
url = "https://github.com/bazelbuild/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
url = "https://github.com/bazel-contrib/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")
Expand All @@ -90,7 +90,7 @@ http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "${SHA}",
strip_prefix = "${PREFIX}/gazelle",
url = "https://github.com/bazelbuild/rules_python/releases/download/${TAG}/rules_python-${TAG}.tar.gz",
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,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# This special value tells pypi that the user identity is supplied within the token
TWINE_USERNAME: __token__
# Note, the PYPI_API_TOKEN is for the rules-python pypi user, added by @rickylev on
# https://github.com/bazelbuild/rules_python/settings/secrets/actions
# https://github.com/bazel-contrib/rules_python/settings/secrets/actions
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: bazel run --stamp --embed_label=${{ github.ref_name }} //python/runfiles:wheel.publish
- name: Release
Expand Down
4 changes: 2 additions & 2 deletions BZLMOD_SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In general `bzlmod` has more features than `WORKSPACE` and users are encouraged

## Configuration

The releases page will give you the latest version number, and a basic example. The release page is located [here](/bazelbuild/rules_python/releases).
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).

## What is bzlmod?

Expand Down Expand Up @@ -53,7 +53,7 @@ better supported.
the toolchains rules_python registers**.

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

Expand Down
202 changes: 101 additions & 101 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ the [GitHub `gh` tool](https://github.com/cli/cli)
(More advanced users may prefer the GitHub UI and raw `git` commands).

```shell
gh repo fork bazelbuild/rules_python --clone --remote
gh repo fork bazel-contrib/rules_python --clone --remote
```

Next, make sure you have a new enough version of Python installed that supports the
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ other minor changes bump the patch digit.
To find if there were any features added or incompatible changes made, review
[CHANGELOG.md](CHANGELOG.md) and the commit history. This can be done using
github by going to the url:
`https://github.com/bazelbuild/rules_python/compare/<VERSION>...main`.
`https://github.com/bazel-contrib/rules_python/compare/<VERSION>...main`.

## Patch release with cherry picks

Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ local_repository(
# which we need to fetch in order to compile it.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

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

pip_parse(
Expand Down
2 changes: 1 addition & 1 deletion docs/api/rules_python/python/config_settings/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Determines if relative symlinks are created using `declare_symlink()` at build
time.

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

Values:
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
# Insert after the main extension
extensions.insert(1, "readthedocs_ext.external_version_warning")
readthedocs_vcs_url = (
"http://github.com/bazelbuild/rules_python/pull/{}".format(
"http://github.com/bazel-contrib/rules_python/pull/{}".format(
os.environ.get("READTHEDOCS_VERSION", "")
)
)
Expand Down Expand Up @@ -133,7 +133,7 @@

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

# --- MyST configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/extending.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Extending the core rules is most useful when you want all or most of the
behavior of a core rule.
:::

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

## Creating custom rules
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ your MODULE.bazel file:

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

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

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

http_archive(
name = "rules_python",
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
strip_prefix = "rules_python-0.36.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
url = "https://github.com/bazel-contrib/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")
Expand Down
4 changes: 2 additions & 2 deletions docs/pypi-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ In some cases you may not want to generate the requirements.bzl file as a reposi
while Bazel is fetching dependencies. For example, if you produce a reusable Bazel module
such as a ruleset, you may want to include the requirements.bzl file rather than make your users
install the WORKSPACE setup to generate it.
See https://github.com/bazelbuild/rules_python/issues/608
See https://github.com/bazel-contrib/rules_python/issues/608

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

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

### Entry points

Expand Down
8 changes: 4 additions & 4 deletions docs/toolchains.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ transition period when some of the code is still defined in `WORKSPACE`.

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

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

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


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

SHA="84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841"

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

load("@rules_python//python:repositories.bzl", "py_repositories")
Expand Down Expand Up @@ -324,7 +324,7 @@ pip_parse(
```

After registration, your Python targets will use the toolchain's interpreter during execution, but a system-installed interpreter
is still used to 'bootstrap' Python targets (see https://github.com/bazelbuild/rules_python/issues/691).
is still used to 'bootstrap' Python targets (see https://github.com/bazel-contrib/rules_python/issues/691).
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).

## Autodetecting toolchain
Expand Down
4 changes: 2 additions & 2 deletions examples/build_file_generation/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ gazelle_dependencies()
# DON'T COPY_PASTE THIS.
# Our example uses `local_repository` to point to the HEAD version of rules_python.
# Users should instead use the installation instructions from the release they use.
# See https://github.com/bazelbuild/rules_python/releases
# See https://github.com/bazel-contrib/rules_python/releases
local_repository(
name = "rules_python",
path = "../..",
Expand Down Expand Up @@ -128,7 +128,7 @@ install_deps()
# which we need to fetch in order to compile it.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

# See: https://github.com/bazelbuild/rules_python/blob/main/gazelle/README.md
# See: https://github.com/bazel-contrib/rules_python/blob/main/gazelle/README.md
# This rule loads and compiles various go dependencies that running gazelle
# for python requirements.
_py_gazelle_deps()
2 changes: 1 addition & 1 deletion examples/bzlmod/py_proto_library/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ py_test(
],
)

# Regression test for https://github.com/bazelbuild/rules_python/issues/2515
# Regression test for https://github.com/bazel-contrib/rules_python/issues/2515
#
# This test fails before protobuf 30.0 release
# when ran with --legacy_external_runfiles=False (default in Bazel 8.0.0).
Expand Down
4 changes: 2 additions & 2 deletions examples/bzlmod_build_file_generation/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module(
# The following stanza defines the dependency rules_python.
# For typical setups you set the version.
# See the releases page for available versions.
# https://github.com/bazelbuild/rules_python/releases
# https://github.com/bazel-contrib/rules_python/releases
bazel_dep(name = "rules_python", version = "0.0.0")

# The following loads rules_python from the file system.
Expand All @@ -25,7 +25,7 @@ local_path_override(
# 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/bazelbuild/rules_python/releases
# https://github.com/bazel-contrib/rules_python/releases
bazel_dep(name = "rules_python_gazelle_plugin", version = "0.0.0")

# The following starlark loads the gazelle plugin from the file system.
Expand Down
2 changes: 1 addition & 1 deletion examples/pip_parse_vendored/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pip_parse vendored

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

The requirements now form a triple:
Expand Down
2 changes: 1 addition & 1 deletion gazelle/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@bazel_gazelle//:def.bzl", "gazelle")

# Gazelle configuration options.
# See https://github.com/bazelbuild/bazel-gazelle#running-gazelle-with-bazel
# gazelle:prefix github.com/bazelbuild/rules_python/gazelle
# gazelle:prefix github.com/bazel-contrib/rules_python/gazelle
# gazelle:exclude bazel-out
gazelle(
name = "gazelle",
Expand Down
8 changes: 4 additions & 4 deletions gazelle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ without using bzlmod as your dependency manager.

## Example

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

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


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

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

Expand Down Expand Up @@ -450,7 +450,7 @@ py_library(
)
```

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

#### Directive: `python_generation_mode_per_package_require_test_entry_point`:
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:
Expand Down Expand Up @@ -553,7 +553,7 @@ target, building will result in an error saying:
```

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

The annotation can be added multiple times, and all values are combined
and de-duplicated.
Expand Down
2 changes: 1 addition & 1 deletion gazelle/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/bazelbuild/rules_python/gazelle
module github.com/bazel-contrib/rules_python/gazelle

go 1.19

Expand Down
2 changes: 1 addition & 1 deletion gazelle/manifest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports_files([
go_library(
name = "manifest",
srcs = ["manifest.go"],
importpath = "github.com/bazelbuild/rules_python/gazelle/manifest",
importpath = "github.com/bazel-contrib/rules_python/gazelle/manifest",
visibility = ["//visibility:public"],
deps = [
"@com_github_emirpasic_gods//sets/treeset",
Expand Down
2 changes: 1 addition & 1 deletion gazelle/manifest/generate/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("//manifest:defs.bzl", "sources_hash")
go_library(
name = "generate_lib",
srcs = ["generate.go"],
importpath = "github.com/bazelbuild/rules_python/gazelle/manifest/generate",
importpath = "github.com/bazel-contrib/rules_python/gazelle/manifest/generate",
visibility = ["//visibility:public"],
deps = ["//manifest"],
)
Expand Down
2 changes: 1 addition & 1 deletion gazelle/manifest/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"os"
"strings"

"github.com/bazelbuild/rules_python/gazelle/manifest"
"github.com/bazel-contrib/rules_python/gazelle/manifest"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion gazelle/manifest/hasher/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "hasher_lib",
srcs = ["main.go"],
importpath = "github.com/bazelbuild/rules_python/gazelle/manifest/hasher",
importpath = "github.com/bazel-contrib/rules_python/gazelle/manifest/hasher",
visibility = ["//visibility:private"],
)

Expand Down
2 changes: 1 addition & 1 deletion gazelle/manifest/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"testing"

"github.com/bazelbuild/rules_python/gazelle/manifest"
"github.com/bazel-contrib/rules_python/gazelle/manifest"
)

var modulesMapping = manifest.ModulesMapping{
Expand Down
2 changes: 1 addition & 1 deletion gazelle/manifest/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"

"github.com/bazelbuild/rules_go/go/runfiles"
"github.com/bazelbuild/rules_python/gazelle/manifest"
"github.com/bazel-contrib/rules_python/gazelle/manifest"
)

func TestGazelleManifestIsUpdated(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion gazelle/python/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ go_library(
# See following for more info:
# https://github.com/bazelbuild/bazel-gazelle/issues/1513
embedsrcs = ["stdlib_list.txt"], # keep # TODO: use user-defined version?
importpath = "github.com/bazelbuild/rules_python/gazelle/python",
importpath = "github.com/bazel-contrib/rules_python/gazelle/python",
visibility = ["//visibility:public"],
deps = [
"//manifest",
Expand Down
4 changes: 2 additions & 2 deletions gazelle/python/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"github.com/bazelbuild/bazel-gazelle/rule"
"github.com/bmatcuk/doublestar/v4"

"github.com/bazelbuild/rules_python/gazelle/manifest"
"github.com/bazelbuild/rules_python/gazelle/pythonconfig"
"github.com/bazel-contrib/rules_python/gazelle/manifest"
"github.com/bazel-contrib/rules_python/gazelle/pythonconfig"
)

// Configurer satisfies the config.Configurer interface. It's the
Expand Down
2 changes: 1 addition & 1 deletion gazelle/python/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/emirpasic/gods/sets/treeset"
godsutils "github.com/emirpasic/gods/utils"

"github.com/bazelbuild/rules_python/gazelle/pythonconfig"
"github.com/bazel-contrib/rules_python/gazelle/pythonconfig"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion gazelle/python/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/emirpasic/gods/sets/treeset"
godsutils "github.com/emirpasic/gods/utils"

"github.com/bazelbuild/rules_python/gazelle/pythonconfig"
"github.com/bazel-contrib/rules_python/gazelle/pythonconfig"
)

const languageName = "py"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ correctly:
they interact with sub-packages.


[gh-1682]: https://github.com/bazelbuild/rules_python/issues/1682
[gh-1682]: https://github.com/bazel-contrib/rules_python/issues/1682
Loading