1#!/usr/bin/env python2.7 2 3# Copyright 2015 gRPC authors. 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17# TODO: This should ideally be in upb submodule to avoid hardcoding this here. 18 19import re 20import os 21import sys 22import yaml 23 24out = {} 25 26try: 27 out['libs'] = [{ 28 'name': 'upb', 29 'build': 'all', 30 'language': 'c', 31 'src': [ 32 "third_party/upb/upb/decode_fast.c", 33 "third_party/upb/upb/decode.c", 34 "third_party/upb/upb/def.c", 35 "third_party/upb/upb/encode.c", 36 "third_party/upb/upb/json_decode.c", 37 "third_party/upb/upb/json_encode.c", 38 "third_party/upb/upb/msg.c", 39 "third_party/upb/upb/reflection.c", 40 "third_party/upb/upb/table.c", 41 "third_party/upb/upb/text_encode.c", 42 "third_party/upb/upb/upb.c", 43 "src/core/ext/upb-generated/google/protobuf/descriptor.upb.c", 44 "src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c", 45 ], 46 'headers': [ 47 "third_party/upb/upb/decode_fast.h", 48 "third_party/upb/upb/decode.h", 49 "third_party/upb/upb/decode.int.h", 50 "third_party/upb/upb/def.h", 51 "third_party/upb/upb/def.hpp", 52 "third_party/upb/upb/encode.h", 53 "third_party/upb/upb/json_decode.h", 54 "third_party/upb/upb/json_encode.h", 55 "third_party/upb/upb/msg.h", 56 "third_party/upb/upb/port_def.inc", 57 "third_party/upb/upb/port_undef.inc", 58 "third_party/upb/upb/reflection.h", 59 "third_party/upb/upb/table.int.h", 60 "third_party/upb/upb/text_encode.h", 61 "third_party/upb/upb/upb.h", 62 "third_party/upb/upb/upb.hpp", 63 "third_party/upb/upb/upb.int.h", 64 "third_party/upb/third_party/wyhash/wyhash.h", 65 "src/core/ext/upb-generated/google/protobuf/descriptor.upb.h", 66 "src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h", 67 ], 68 'secure': False, 69 }] 70except: 71 pass 72 73print(yaml.dump(out)) 74