Skip to content

Commit bd5a35c

Browse files
committed
refactor: split out the python_repository rule to a separate file
1 parent f5cb171 commit bd5a35c

File tree

6 files changed

+434
-371
lines changed

6 files changed

+434
-371
lines changed

examples/bzlmod/MODULE.bazel.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ bzl_library(
231231
deps = [
232232
"//python/private:py_repositories_bzl",
233233
"//python/private:python_repositories_bzl",
234+
"//python/private:python_repository_bzl",
234235
],
235236
)
236237

python/private/BUILD.bazel

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,25 +146,37 @@ bzl_library(
146146
name = "py_repositories_bzl",
147147
srcs = ["py_repositories.bzl"],
148148
deps = [
149-
"//python/private:bazel_tools_bzl",
150-
"//python/private:internal_config_repo_bzl",
149+
":bazel_tools_bzl",
150+
":internal_config_repo_bzl",
151151
"//python/private/pypi:deps_bzl",
152152
],
153153
)
154154

155+
bzl_library(
156+
name = "python_repository_bzl",
157+
srcs = ["python_repository.bzl"],
158+
deps = [
159+
":auth_bzl",
160+
":repo_utils_bzl",
161+
":text_util_bzl",
162+
"//python:versions_bzl",
163+
],
164+
)
165+
155166
bzl_library(
156167
name = "python_repositories_bzl",
157168
srcs = ["python_repositories.bzl"],
158169
deps = [
170+
":auth_bzl",
171+
":bazel_tools_bzl",
172+
":bzlmod_enabled_bzl",
173+
":coverage_deps_bzl",
174+
":full_version_bzl",
175+
":internal_config_repo_bzl",
176+
":python_repository_bzl",
177+
":repo_utils_bzl",
178+
":toolchains_repo_bzl",
159179
"//python:versions_bzl",
160-
"//python/private:auth_bzl",
161-
"//python/private:bazel_tools_bzl",
162-
"//python/private:bzlmod_enabled_bzl",
163-
"//python/private:coverage_deps_bzl",
164-
"//python/private:full_version_bzl",
165-
"//python/private:internal_config_repo_bzl",
166-
"//python/private:repo_utils_bzl",
167-
"//python/private:toolchains_repo_bzl",
168180
"//python/private/pypi:deps_bzl",
169181
],
170182
)

0 commit comments

Comments
 (0)