rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

Turn on incompatible_python_disallow_native_rules for end-to-end tests

Open alexeagle opened this issue 2 years ago • 2 comments

I'd like to enable that option in a repo downstream of rules_python, but it seems like there's a violation shipped with the project:

ERROR: /private/var/tmp/_bazel_alexeagle/3eecd93732ac7c6f4f360a54a468da50/external/rules_python~0.27.1~python~python_3_9_aarch64-apple-darwin/BUILD.bazel:63:11: in py_runtime rule @@rules_python~0.27.1~python~python_3_9_aarch64-apple-darwin//:py3_runtime: 
Traceback (most recent call last):
        File "/virtual_builtins_bzl/common/python/py_runtime_rule.bzl", line 24, column 25, in _py_runtime_impl
        File "/virtual_builtins_bzl/common/python/common.bzl", line 489, column 28, in check_native_allowed
Error in Label: invalid label in Label(): invalid package name '__EXTERNAL_REPOS__/rules_python~0.27.1~python~python_3_9_aarch64-apple-darwin/': package names may not end with '/' (perhaps you meant ":"?)

alexeagle avatar Dec 21 '23 00:12 alexeagle

This is, unfortunately, a bug in Bazel that I missed before release. It's fixed at head and planned for the 7.1 release in Feb.

This issue is the pkg portion of the label is empty. If the label was //something:py3_runtime, then it'd be OK. Hm, actually, maybe we could just create a sub-dir and stick an alias in there and things would be happy enough.

https://github.com/bazelbuild/bazel/issues/17773#issuecomment-1852313089

rickeylev avatar Dec 21 '23 02:12 rickeylev

This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_python!

github-actions[bot] avatar Jun 18 '24 22:06 github-actions[bot]