1load("@org_tensorflow//tensorflow:tensorflow.bzl", "pybind_extension") 2 3package( 4 default_visibility = [ 5 "//visibility:public", 6 ], 7 licenses = ["notice"], # Apache 2.0 8) 9 10pybind_extension( 11 name = "_pywrap_codegen", 12 srcs = [ 13 "codegen_lib.cc", 14 ], 15 features = ["-use_header_modules"], 16 module_name = "_pywrap_codegen", 17 deps = [ 18 "//tensorflow_lite_support/codegen:android_java_generator", 19 "//tensorflow_lite_support/codegen:code_generator", 20 "@local_config_python//:python_headers", 21 "@pybind11", 22 ], 23) 24 25py_binary( 26 name = "codegen", 27 srcs = [ 28 "codegen.py", 29 ], 30 python_version = "PY3", 31 deps = [ 32 ":_pywrap_codegen", 33 "@absl_py//absl:app", 34 "@absl_py//absl/flags", 35 "@absl_py//absl/logging", 36 ], 37) 38