-
-
Notifications
You must be signed in to change notification settings - Fork 611
Closed
Description
🐞 bug report
Affected Rule
The issue is caused by the rule: pip_installIs this a regression?
Yes, the previous version in which this bug was not present was: 0.9.0Description
I'm trying to use assemble_pip
from https://github.com/vaticle/bazel-distribution/blob/master/pip/rules.bzl#L209, and its setup function calls pip_install
. However, this seems to raise an exception somehow. I say somehow because when I try to call pip_install
in my own workspace, I don't see the same error. But downgrading to rules_python 0.9.0 resolves the issue.
🔬 Minimal Reproduction
git_repository(
name = "vaticle_bazel_distribution",
commit = "e61daa787bc77d97e36df944e7223821cab309ea",
remote = "https://github.com/vaticle/bazel-distribution",
# shallow_since = "1639112081 +1100",
)
load("@vaticle_bazel_distribution//pip:deps.bzl", pip_deps = "deps")
pip_deps()
# BUILD
load("@vaticle_bazel_distribution//pip:rules.bzl", "assemble_pip")
🔥 Exception or Error
ERROR: /Users/casey.duquette/Snapchat/Dev/SC/sample-bazel-python/WORKSPACE:72:9: fetching pip_repository rule //external:vaticle_bazel_distribution_pip: Traceback (most recent call last):
File "/Users/casey.duquette/Snapchat/Dev/.cache/_bazel_root/b201cbe3bc260ed3896346109ccb8a9c/external/rules_python/python/pip_install/pip_repository.bzl", line 230, column 63, in _pip_repository_impl
environment = _create_repository_execution_environment(rctx),
File "/Users/casey.duquette/Snapchat/Dev/.cache/_bazel_root/b201cbe3bc260ed3896346109ccb8a9c/external/rules_python/python/pip_install/pip_repository.bzl", line 153, column 37, in _create_repository_execution_environment
_maybe_set_xcode_location_cflags(rctx, env)
File "/Users/casey.duquette/Snapchat/Dev/.cache/_bazel_root/b201cbe3bc260ed3896346109ccb8a9c/external/rules_python/python/pip_install/pip_repository.bzl", line 76, column 112, in _maybe_set_xcode_location_cflags
python_interpreter_workspace = rctx.path(Label("@{}//:WORKSPACE".format(rctx.attr.python_interpreter_target.workspace_name))).dirname
Error: 'NoneType' value has no field or method 'workspace_name'
🌍 Your Environment
Operating System:
MacOS 12.4
Output of bazel version
:
Build label: 5.1.1.0
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed May 4 17:45:51 2022 (1651686351)
Build timestamp: 1651686351
Build timestamp as int: 1651686351
Rules_python version:
0.10.1
Anything else relevant?
Metadata
Metadata
Assignees
Labels
No labels