fabmilo
fabmilo

Reputation: 48310

How to pass the workspace path to a bazel rule

seems there is a make env variable workspace that keeps the path value of the original bazel workspace.

But I am not sure how to pass this variable to the bazel rule.

exports_files([
  "configure.py", 
])

py_binary(
    name = "configure",
    srcs = [
        "configure.py",
    ],
    data = [
        "//tensorflow/tools/git:gen_git_source.py",
        "//tools",
    ],
    args = [
#        "--workspace=" + $(location workspace), # the path to the repository
        "--tf_workspace=$(location workspace)" , # the path to the 
    ]
)

Upvotes: 1

Views: 1012

Answers (1)

László
László

Reputation: 4271

Unfortunately Bazel supports neither $(location workspace) nor $(workspace).

What makes you think it does?

Upvotes: 1

Related Questions