Skip to content

Commit

Permalink
chore: rename the dev-only setup files to more clearly self-describe …
Browse files Browse the repository at this point in the history
…what they are (#2436)

The names `internal_deps` and `internal_setup` are a bit confusing and
ambiguous: are they
for setting up something internal so that rules_python works, or
something else?

Clarify by putting `dev` in their names. This helps match the naming
used for bzlmod
(python/private/internal_dev_deps.bzl).
  • Loading branch information
rickeylev authored Nov 22, 2024
1 parent 2abca35 commit 4ee7e25
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ filegroup(
"MODULE.bazel",
"WORKSPACE",
"WORKSPACE.bzlmod",
"internal_deps.bzl",
"internal_setup.bzl",
"internal_dev_deps.bzl",
"internal_dev_setup.bzl",
"version.bzl",
"//python:distribution",
"//tools:distribution",
Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ workspace(name = "rules_python")
# Everything below this line is used only for developing rules_python. Users
# should not copy it to their WORKSPACE.

load("//:internal_deps.bzl", "rules_python_internal_deps")
load("//:internal_dev_deps.bzl", "rules_python_internal_deps")

rules_python_internal_deps()

Expand All @@ -37,7 +37,7 @@ load("@stardoc_maven//:defs.bzl", stardoc_pinned_maven_install = "pinned_maven_i

stardoc_pinned_maven_install()

load("//:internal_setup.bzl", "rules_python_internal_setup")
load("//:internal_dev_setup.bzl", "rules_python_internal_setup")

rules_python_internal_setup()

Expand Down
10 changes: 8 additions & 2 deletions internal_deps.bzl → internal_dev_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Dependencies that are needed for rules_python tests and tools."""
"""Dependencies that are needed for development and testing of rules_python itself."""

load("@bazel_tools//tools/build_defs/repo:http.bzl", _http_archive = "http_archive", _http_file = "http_file")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
Expand All @@ -32,7 +32,13 @@ def http_file(name, **kwargs):
)

def rules_python_internal_deps():
"""Fetches all required dependencies for rules_python tests and tools."""
"""Fetches all required dependencies for developing/testing rules_python itself.
Setup of these dependencies is done by `internal_dev_setup.bzl`
For dependencies needed by *users* of rules_python, see
python/private/py_repositories.bzl.
"""

http_archive(
name = "bazel_skylib",
Expand Down
4 changes: 2 additions & 2 deletions internal_setup.bzl → internal_dev_setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Setup for rules_python tests and tools."""
"""WORKSPACE setup for development and testing of rules_python itself."""

load("@bazel_features//:deps.bzl", "bazel_features_deps")
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
Expand All @@ -30,7 +30,7 @@ load("//python/private:pythons_hub.bzl", "hub_repo") # buildifier: disable=bzl-
load("//python/private/pypi:deps.bzl", "pypi_deps") # buildifier: disable=bzl-visibility

def rules_python_internal_setup():
"""Setup for rules_python tests and tools."""
"""Setup for development and testing of rules_python itself."""

internal_config_repo(name = "rules_python_internal")
hub_repo(
Expand Down

0 comments on commit 4ee7e25

Please sign in to comment.