Skip to content

Commit 61cfa88

Browse files
castleraignas
andauthored
fix(pip_compile): Forward target compatibility to *.update (#3787)
With this changset we enable users to build and test `//...` in their repositories also with platforms that do not support Python. For example, a user might use Python for tooling and automation, where he develops only on Linux. Then he could set `target_compatible_with` to `@platforms//os:linux`, but he uses C++ for his production code. Where he crosscompiles to other operating systems (e.g. QNX, TriCore). In order to enable this, we need to forward `target_compatible_with` also to the ` also to the also to the `*.update` target. --------- Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
1 parent f4ebb5b commit 61cfa88

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ END_UNRELEASED_TEMPLATE
8888
path separators; the bootstrap stub is now declared as a sibling of the
8989
`.exe` launcher
9090
([#3789](https://github.com/bazel-contrib/rules_python/issues/3789)).
91+
* Fix the forwarding of `target_compatible_with` from `compile_pip_requirements`
92+
towards the underlying `*.update` target.
93+
([#3787](https://github.com/bazel-contrib/rules_python/pull/3787))
9194

9295

9396
{#v0-0-0-added}

python/private/pypi/pip_compile.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def pip_compile(
173173
name = name + ".update",
174174
env = env,
175175
python_version = kwargs.get("python_version", None),
176+
target_compatible_with = kwargs.get("target_compatible_with", []),
176177
**attrs
177178
)
178179

0 commit comments

Comments
 (0)