Skip to content

Commit 82bf47d

Browse files
committed
fixup
1 parent b6973b8 commit 82bf47d

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

python/private/pypi/whl_library.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ def _whl_library_deps_impl(rctx):
695695
] + [
696696
" {} = {},".format(k, repr(v))
697697
for k, v in sorted(from_requires_kwargs.items())
698-
if v or k in ("name", "requires_dist", "dep_template", "nodeps_pkg", "src_pkg")
698+
if v or k in ("name", "requires_dist", "dep_template", "src_pkg")
699699
] + [
700700
")",
701701
"",

python/private/pypi/whl_library_targets.bzl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ def whl_library_targets(
125125
copy_files = {},
126126
copy_executables = {},
127127
native = native,
128-
nodeps_pkg = "",
129128
src_pkg = Label("//:BUILD.bazel"),
130129
rules = struct(
131130
copy_file = copy_file,
@@ -155,15 +154,12 @@ def whl_library_targets(
155154
dest locations for the targets.
156155
copy_files: {type}`dict[str, str]` The mapping between src and
157156
dest locations for the targets.
158-
nodeps_pkg: {type}`str` The package prefix for the no-deps targets
159-
(e.g., "@repo//:"). When empty, defaults to the current package.
160157
src_pkg: TODO
161158
data: {type}`list[str]` A list of labels to include as part of the `data` attribute in `py_library`.
162159
native: {type}`native` The native struct for overriding in tests.
163160
rules: {type}`struct` A struct with references to rules for creating targets.
164161
"""
165162
src_pkg = Label(src_pkg)
166-
print(src_pkg)
167163
for src, dest in copy_files.items():
168164
rules.copy_file(
169165
name = dest + ".copy",
@@ -243,7 +239,7 @@ def whl_library_targets(
243239
dependencies = sorted([normalize_name(d) for d in dependencies])
244240
native.filegroup(
245241
name = whl_file_label,
246-
srcs = [nodeps_pkg + NODEPS_WHL_FILE_LABEL],
242+
srcs = [src_pkg.same_package_label(NODEPS_WHL_FILE_LABEL)],
247243
data = _deps(
248244
deps = dependencies,
249245
deps_conditional = deps_conditional,
@@ -253,7 +249,7 @@ def whl_library_targets(
253249
)
254250
rules.py_library(
255251
name = py_library_label,
256-
deps = [nodeps_pkg + NODEPS_PY_LIBRARY_LABEL] + _deps(
252+
deps = [src_pkg.same_package_label(NODEPS_PY_LIBRARY_LABEL)] + _deps(
257253
deps = dependencies,
258254
deps_conditional = deps_conditional,
259255
tmpl = dep_template.format(name = "{}", target = PY_LIBRARY_PUBLIC_LABEL),

0 commit comments

Comments
 (0)