1*1b3f573fSAndroid Build Coastguard Workerload("@rules_cc//cc:defs.bzl", "cc_library") 2*1b3f573fSAndroid Build Coastguard Worker 3*1b3f573fSAndroid Build Coastguard Workerexports_files(["BUILD.bazel"]) 4*1b3f573fSAndroid Build Coastguard Worker 5*1b3f573fSAndroid Build Coastguard Worker# This is a placeholder for python headers. Projects needing to use 6*1b3f573fSAndroid Build Coastguard Worker# fast cpp protos in protobuf's python interface should build with 7*1b3f573fSAndroid Build Coastguard Worker# --define=use_fast_cpp_protos=true, and in addition, provide 8*1b3f573fSAndroid Build Coastguard Worker# //external:python_headers dependency that in turn provides Python.h. 9*1b3f573fSAndroid Build Coastguard Worker# 10*1b3f573fSAndroid Build Coastguard Worker# Projects that include protobuf using a Bazel external repository will need to 11*1b3f573fSAndroid Build Coastguard Worker# add a workspace rule to their WORKSPACE files to add an external workspace 12*1b3f573fSAndroid Build Coastguard Worker# that includes the Python headers. For example, the protobuf WORKSPACE file 13*1b3f573fSAndroid Build Coastguard Worker# includes the following local_repository rule that points to this directory: 14*1b3f573fSAndroid Build Coastguard Worker# 15*1b3f573fSAndroid Build Coastguard Worker# new_local_repository( 16*1b3f573fSAndroid Build Coastguard Worker# name = "python_headers", 17*1b3f573fSAndroid Build Coastguard Worker# path = __workspace_dir__ + "/util/python", 18*1b3f573fSAndroid Build Coastguard Worker# ) 19*1b3f573fSAndroid Build Coastguard Workercc_library( 20*1b3f573fSAndroid Build Coastguard Worker name = "python_headers", 21*1b3f573fSAndroid Build Coastguard Worker visibility = ["//visibility:public"], 22*1b3f573fSAndroid Build Coastguard Worker) 23