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/any.upb.c",
44            "src/core/ext/upb-generated/google/protobuf/descriptor.upb.c",
45            "src/core/ext/upb-generated/google/protobuf/duration.upb.c",
46            "src/core/ext/upb-generated/google/protobuf/empty.upb.c",
47            "src/core/ext/upb-generated/google/protobuf/struct.upb.c",
48            "src/core/ext/upb-generated/google/protobuf/timestamp.upb.c",
49            "src/core/ext/upb-generated/google/protobuf/wrappers.upb.c",
50            "src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c",
51            "src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c",
52            "src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c",
53            "src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c",
54            "src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c",
55            "src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c",
56            "src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c",
57        ],
58        'headers': [
59            "third_party/upb/upb/decode_fast.h",
60            "third_party/upb/upb/decode.h",
61            "third_party/upb/upb/decode.int.h",
62            "third_party/upb/upb/def.h",
63            "third_party/upb/upb/def.hpp",
64            "third_party/upb/upb/encode.h",
65            "third_party/upb/upb/json_decode.h",
66            "third_party/upb/upb/json_encode.h",
67            "third_party/upb/upb/msg.h",
68            "third_party/upb/upb/port_def.inc",
69            "third_party/upb/upb/port_undef.inc",
70            "third_party/upb/upb/reflection.h",
71            "third_party/upb/upb/table.int.h",
72            "third_party/upb/upb/text_encode.h",
73            "third_party/upb/upb/upb.h",
74            "third_party/upb/upb/upb.hpp",
75            "third_party/upb/upb/upb.int.h",
76            "third_party/upb/third_party/wyhash/wyhash.h",
77            "src/core/ext/upb-generated/google/protobuf/any.upb.h",
78            "src/core/ext/upb-generated/google/protobuf/descriptor.upb.h",
79            "src/core/ext/upb-generated/google/protobuf/duration.upb.h",
80            "src/core/ext/upb-generated/google/protobuf/empty.upb.h",
81            "src/core/ext/upb-generated/google/protobuf/struct.upb.h",
82            "src/core/ext/upb-generated/google/protobuf/timestamp.upb.h",
83            "src/core/ext/upb-generated/google/protobuf/wrappers.upb.h",
84            "src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h",
85            "src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h",
86            "src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h",
87            "src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h",
88            "src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h",
89            "src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h",
90            "src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h",
91        ],
92        'secure': False,
93    }]
94except:
95    pass
96
97print(yaml.dump(out))
98