Skip to content

Commit 95fcfbb

Browse files
committed
pip_compile: Forward target compatibility to *.update
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.
1 parent 4b99ec3 commit 95fcfbb

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ END_UNRELEASED_TEMPLATE
8484
path separators; the bootstrap stub is now declared as a sibling of the
8585
`.exe` launcher
8686
([#3789](https://github.com/bazel-contrib/rules_python/issues/3789)).
87+
* Fix the forwarding of `target_compatible_with` from `compile_pip_requirements`
88+
towards the underlying `*.update` target
8789

8890

8991
{#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)