8000 fix: add `format()` calls to `glob_exclude` templates (#1285) · matts1/rules_python@4082693 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4082693

Browse files
authored
fix: add format() calls to glob_exclude templates (bazel-contrib#1285)
Currently, Python toolchain `:files` and `:py3_runtime` include some unnecessary files. This is because these globs result in literally `lib/libpython{python_version}.so` etc., which do not match anything. The formatting needs to be applied here since it will not be applied later. I believe this was introduced by a47c6cd.
1 parent 5b8fa22 commit 4082693

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/repositories.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ def _python_repository_impl(rctx):
204204
"**/* *", # Bazel does not support spaces in file names.
205205
# Unused shared libraries. `python` executable and the `:libpython` target
206206
# depend on `libpython{python_version}.so.1.0`.
207-
"lib/libpython{python_version}.so",
207+
"lib/libpython{python_version}.so".format(python_version = python_short_version),
208208
# static libraries
209209
"lib/**/*.a",
210210
# tests for the standard libraries.
211-
"lib/python{python_version}/**/test/**",
212-
"lib/python{python_version}/**/tests/**",
211+
"lib/python{python_version}/**/test/**".format(python_version = python_short_version),
212+
"lib/python{python_version}/**/tests/**".format(python_version = python_short_version),
213213
]
214214

215215
if rctx.attr.ignore_root_user_error:

0 commit comments

Comments
 (0)
0