1"""The input file for the python rule test""" 2 3def exercise_the_api(): 4 var1 = PyRuntimeInfo 5 var2 = PyInfo 6 7exercise_the_api() 8 9def my_rule_impl(ctx): 10 return [] 11 12py_related_rule = rule( 13 implementation = my_rule_impl, 14 doc = "This rule does python-related things.", 15 attrs = { 16 "first": attr.label( 17 mandatory = True, 18 doc = "this is the first doc string!", 19 allow_single_file = True, 20 ), 21 "second": attr.string_dict(mandatory = True), 22 "third": attr.output(mandatory = True), 23 "fourth": attr.bool(default = False, doc = "the fourth doc string.", mandatory = False), 24 "fifth": attr.bool(default = True, doc = "Hey look, its the fifth thing!"), 25 "sixth": attr.int_list( 26 default = range(10), 27 doc = "it's the sixth thing.", 28 mandatory = False, 29 ), 30 "_hidden": attr.string(), 31 }, 32) 33