mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Uses $location in the genrule and a path that's relative to the script to find expected files so that this works both as a local rule and if tensorflow is used as a remote repository.
25 lines
507 B
Python
25 lines
507 B
Python
licenses(["restricted"])
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
cc_library(
|
|
name = "python_headers",
|
|
hdrs = glob([
|
|
"python_include/**/*.h",
|
|
]),
|
|
data = [":python_checked"],
|
|
includes = ["python_include"],
|
|
)
|
|
|
|
genrule(
|
|
name = "python_check",
|
|
srcs = [
|
|
"python_config.sh",
|
|
],
|
|
outs = [
|
|
"python_checked",
|
|
],
|
|
cmd = "OUTPUTDIR=\"$(@D)/\"; $(location :python_config.sh) --check && touch $$OUTPUTDIR/python_checked",
|
|
local = 1,
|
|
)
|