aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Pulley <lpulley@ocient.com>2023-07-06 09:54:43 -0500
committerGitHub <noreply@github.com>2023-07-06 14:54:43 +0000
commit4082693e23ec9615f3e9b2ed9fae542e2b3bed12 (patch)
treeb60f18e8bab2267addd2091c081bcff22b535a4a
parent5b8fa22a2f22501b18b4aea97c5dbfe3a6913a0c (diff)
downloadbazelbuild-rules_python-4082693e23ec9615f3e9b2ed9fae542e2b3bed12.tar.gz
fix: add `format()` calls to `glob_exclude` templates (#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 a47c6cd681b34b1ad990ed40dcc01ab5f024406a.
-rw-r--r--python/repositories.bzl6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/repositories.bzl b/python/repositories.bzl
index 39182af..04de657 100644
--- a/python/repositories.bzl
+++ b/python/repositories.bzl
@@ -204,12 +204,12 @@ def _python_repository_impl(rctx):
"**/* *", # Bazel does not support spaces in file names.
# Unused shared libraries. `python` executable and the `:libpython` target
# depend on `libpython{python_version}.so.1.0`.
- "lib/libpython{python_version}.so",
+ "lib/libpython{python_version}.so".format(python_version = python_short_version),
# static libraries
"lib/**/*.a",
# tests for the standard libraries.
- "lib/python{python_version}/**/test/**",
- "lib/python{python_version}/**/tests/**",
+ "lib/python{python_version}/**/test/**".format(python_version = python_short_version),
+ "lib/python{python_version}/**/tests/**".format(python_version = python_short_version),
]
if rctx.attr.ignore_root_user_error: