protoc 2.6.1.1 → 2.6.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/protoc/Makefile.in +10 -13
- data/ext/protoc/extconf.rb +0 -1
- data/ext/protoc/protobuf/CHANGES.txt +593 -0
- data/ext/protoc/protobuf/CONTRIBUTORS.txt +93 -0
- data/ext/protoc/protobuf/INSTALL.txt +237 -0
- data/ext/protoc/protobuf/LICENSE +33 -0
- data/ext/protoc/protobuf/Makefile.am +267 -0
- data/ext/protoc/protobuf/README.md +167 -0
- data/ext/protoc/protobuf/autogen.sh +41 -0
- data/ext/protoc/protobuf/benchmarks/ProtoBench.java +203 -0
- data/ext/protoc/protobuf/benchmarks/google_message1.dat +0 -0
- data/ext/protoc/protobuf/benchmarks/google_message2.dat +0 -0
- data/ext/protoc/protobuf/benchmarks/google_size.proto +136 -0
- data/ext/protoc/protobuf/benchmarks/google_speed.proto +136 -0
- data/ext/protoc/protobuf/benchmarks/readme.txt +50 -0
- data/ext/protoc/protobuf/configure.ac +159 -0
- data/ext/protoc/protobuf/editors/README.txt +5 -0
- data/ext/protoc/protobuf/editors/proto.vim +105 -0
- data/ext/protoc/protobuf/editors/protobuf-mode.el +220 -0
- data/ext/protoc/protobuf/examples/AddPerson.java +95 -0
- data/ext/protoc/protobuf/examples/ListPeople.java +50 -0
- data/ext/protoc/protobuf/examples/Makefile +58 -0
- data/ext/protoc/protobuf/examples/README.txt +29 -0
- data/ext/protoc/protobuf/examples/add_person.cc +95 -0
- data/ext/protoc/protobuf/examples/add_person.py +58 -0
- data/ext/protoc/protobuf/examples/addressbook.proto +30 -0
- data/ext/protoc/protobuf/examples/list_people.cc +68 -0
- data/ext/protoc/protobuf/examples/list_people.py +38 -0
- data/ext/protoc/protobuf/generate_descriptor_proto.sh +33 -0
- data/ext/protoc/protobuf/java/README.txt +96 -0
- data/ext/protoc/protobuf/java/pom.xml +217 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/AbstractMessage.java +466 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/AbstractMessageLite.java +355 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/AbstractParser.java +253 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/BlockingRpcChannel.java +51 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java +64 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/BoundedByteString.java +163 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ByteString.java +1022 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/CodedInputStream.java +1311 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/CodedOutputStream.java +1297 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Descriptors.java +2238 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/DynamicMessage.java +622 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Extension.java +96 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistry.java +392 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java +185 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/FieldSet.java +907 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessage.java +2213 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessageLite.java +949 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Internal.java +391 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java +122 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyField.java +154 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyFieldLite.java +176 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java +367 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyStringList.java +163 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LiteralByteString.java +362 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Message.java +244 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageLite.java +320 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java +60 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageOrBuilder.java +143 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageReflection.java +931 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Parser.java +261 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java +58 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ProtocolStringList.java +48 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java +696 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RopeByteString.java +957 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcCallback.java +47 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcChannel.java +71 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcController.java +118 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcUtil.java +134 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Service.java +117 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ServiceException.java +52 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java +241 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/SmallSortedMap.java +618 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/TextFormat.java +1984 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/UninitializedMessageException.java +99 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/UnknownFieldSet.java +995 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java +205 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Utf8.java +349 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/WireFormat.java +163 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/AbstractMessageTest.java +527 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java +68 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ByteStringTest.java +759 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/CheckUtf8Test.java +141 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/CodedInputStreamTest.java +769 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java +401 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/DeprecatedFieldTest.java +80 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/DescriptorsTest.java +735 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/DynamicMessageTest.java +326 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java +48 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/GeneratedMessageTest.java +1515 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/IsValidUtf8Test.java +180 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/IsValidUtf8TestUtil.java +421 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyFieldLiteTest.java +134 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyFieldTest.java +121 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyMessageLiteTest.java +319 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyStringArrayListTest.java +174 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyStringEndToEndTest.java +143 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LiteEqualsAndHashTest.java +85 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LiteTest.java +148 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LiteralByteStringTest.java +396 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/MessageTest.java +353 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/NestedBuildersTest.java +185 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ParserTest.java +381 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/RepeatedFieldBuilderTest.java +190 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java +97 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/RopeByteStringTest.java +115 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ServiceTest.java +320 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/SingleFieldBuilderTest.java +155 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/SmallSortedMapTest.java +420 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java +96 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/TestUtil.java +4124 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/TextFormatTest.java +994 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java +653 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java +227 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/WireFormatTest.java +606 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/lazy_fields_lite.proto +61 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/lite_equals_and_hash.proto +55 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto +77 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/nested_builders_test.proto +53 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/nested_extension.proto +46 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/nested_extension_lite.proto +48 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto +49 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension_lite.proto +50 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/outer_class_name_test.proto +38 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/outer_class_name_test2.proto +42 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/outer_class_name_test3.proto +43 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto +157 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_check_utf8.proto +50 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_check_utf8_size.proto +51 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_custom_options.proto +43 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_extra_interfaces.proto +60 -0
- data/ext/protoc/protobuf/m4/ac_system_extensions.m4 +37 -0
- data/ext/protoc/protobuf/m4/acx_check_suncc.m4 +75 -0
- data/ext/protoc/protobuf/m4/acx_pthread.m4 +397 -0
- data/ext/protoc/protobuf/m4/stl_hash.m4 +72 -0
- data/ext/protoc/protobuf/more_tests/Makefile +41 -0
- data/ext/protoc/protobuf/post_process_dist.sh +60 -0
- data/ext/protoc/protobuf/protobuf-lite.pc.in +13 -0
- data/ext/protoc/protobuf/protobuf.pc.in +14 -0
- data/ext/protoc/protobuf/python/README.txt +105 -0
- data/ext/protoc/protobuf/python/ez_setup.py +284 -0
- data/ext/protoc/protobuf/python/google/__init__.py +1 -0
- data/ext/protoc/protobuf/python/google/protobuf/__init__.py +0 -0
- data/ext/protoc/protobuf/python/google/protobuf/descriptor.py +849 -0
- data/ext/protoc/protobuf/python/google/protobuf/descriptor_database.py +137 -0
- data/ext/protoc/protobuf/python/google/protobuf/descriptor_pool.py +643 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/__init__.py +0 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/api_implementation.cc +139 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/api_implementation.py +89 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/api_implementation_default_test.py +63 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/containers.py +269 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/cpp_message.py +663 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/decoder.py +831 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_database_test.py +63 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_pool_test.py +564 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_pool_test1.proto +94 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_pool_test2.proto +70 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_python_test.py +54 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_test.py +669 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/encoder.py +788 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/enum_type_wrapper.py +89 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/factory_test1.proto +57 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/factory_test2.proto +92 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/generator_test.py +343 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_factory_python_test.py +54 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_factory_test.py +131 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_listener.py +78 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_python_test.py +54 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_test.py +681 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/missing_enum_values.proto +50 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/more_extensions.proto +58 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/more_extensions_dynamic.proto +49 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/more_messages.proto +51 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/python_message.py +1251 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/reflection_test.py +2934 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/service_reflection_test.py +136 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/symbol_database_test.py +120 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/test_bad_identifiers.proto +52 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/test_util.py +662 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/text_encoding_test.py +68 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/text_format_test.py +743 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/type_checkers.py +328 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/unknown_fields_test.py +231 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/wire_format.py +268 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/wire_format_test.py +253 -0
- data/ext/protoc/protobuf/python/google/protobuf/message.py +284 -0
- data/ext/protoc/protobuf/python/google/protobuf/message_factory.py +155 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/README +6 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/__init__.py +0 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/cpp_message.py +61 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/descriptor.cc +357 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/descriptor.h +96 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/descriptor_cpp2_test.py +58 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/extension_dict.cc +338 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/extension_dict.h +123 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/message.cc +2561 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/message.h +305 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/message_factory_cpp2_test.py +56 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/proto2_api_test.proto +38 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/python.proto +66 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/python_protobuf.h +57 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/reflection_cpp2_generated_test.py +94 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_composite_container.cc +763 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_composite_container.h +172 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_scalar_container.cc +825 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_scalar_container.h +112 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/scoped_pyobject_ptr.h +95 -0
- data/ext/protoc/protobuf/python/google/protobuf/reflection.py +205 -0
- data/ext/protoc/protobuf/python/google/protobuf/service.py +226 -0
- data/ext/protoc/protobuf/python/google/protobuf/service_reflection.py +284 -0
- data/ext/protoc/protobuf/python/google/protobuf/symbol_database.py +185 -0
- data/ext/protoc/protobuf/python/google/protobuf/text_encoding.py +110 -0
- data/ext/protoc/protobuf/python/google/protobuf/text_format.py +873 -0
- data/ext/protoc/protobuf/python/mox.py +1401 -0
- data/ext/protoc/protobuf/python/setup.py +201 -0
- data/ext/protoc/protobuf/python/stubout.py +140 -0
- data/ext/protoc/protobuf/src/Makefile.am +418 -0
- data/ext/protoc/protobuf/src/google/protobuf/SEBS +240 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/code_generator.cc +84 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/code_generator.h +145 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/command_line_interface.cc +1603 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/command_line_interface.h +378 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc +1654 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc +158 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc +288 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h +103 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc +431 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h +122 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc +210 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h +86 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc +166 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h +185 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc +665 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h +99 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc +125 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h +72 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc +494 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h +206 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc +2645 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h +175 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc +375 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h +121 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h +58 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc +123 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc +451 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h +123 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc +334 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h +118 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc +642 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h +127 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto +132 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc +2074 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.h +51 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/importer.cc +480 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/importer.h +317 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/importer_unittest.cc +617 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_context.cc +195 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_context.h +95 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc +233 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_doc_comment.h +69 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_doc_comment_unittest.cc +67 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum.cc +333 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum.h +99 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc +778 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum_field.h +158 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_extension.cc +207 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_extension.h +109 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_field.cc +213 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_field.h +162 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_file.cc +534 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_file.h +115 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator.cc +158 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator.h +72 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc +77 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator_factory.h +101 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_helpers.cc +737 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_helpers.h +322 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_lazy_message_field.cc +826 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_lazy_message_field.h +121 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message.cc +1666 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message.h +140 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message_field.cc +1343 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message_field.h +173 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc +266 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_name_resolver.h +124 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc +124 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc +877 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h +160 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_service.cc +473 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_service.h +135 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc +201 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.h +90 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_string_field.cc +1056 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_string_field.h +160 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/main.cc +61 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/mock_code_generator.cc +240 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/mock_code_generator.h +117 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/package_info.h +64 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/parser.cc +1750 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/parser.h +522 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/parser_unittest.cc +2612 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.cc +163 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.h +72 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.pb.cc +1148 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.pb.h +897 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.proto +147 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/python/python_generator.cc +1262 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/python/python_generator.h +166 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc +118 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/subprocess.cc +463 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/subprocess.h +108 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/test_plugin.cc +51 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/zip_output_unittest.sh +91 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/zip_writer.cc +218 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/zip_writer.h +93 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.cc +5420 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.h +1691 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.pb.cc +9135 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.pb.h +6761 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.proto +687 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_database.cc +543 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_database.h +369 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_database_unittest.cc +748 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_pb2_test.py +54 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_unittest.cc +5501 -0
- data/ext/protoc/protobuf/src/google/protobuf/dynamic_message.cc +764 -0
- data/ext/protoc/protobuf/src/google/protobuf/dynamic_message.h +148 -0
- data/ext/protoc/protobuf/src/google/protobuf/dynamic_message_unittest.cc +230 -0
- data/ext/protoc/protobuf/src/google/protobuf/extension_set.cc +1663 -0
- data/ext/protoc/protobuf/src/google/protobuf/extension_set.h +1234 -0
- data/ext/protoc/protobuf/src/google/protobuf/extension_set_heavy.cc +734 -0
- data/ext/protoc/protobuf/src/google/protobuf/extension_set_unittest.cc +1095 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_enum_reflection.h +91 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_reflection.cc +1683 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_reflection.h +504 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc +795 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_util.cc +65 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_util.h +113 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream.cc +914 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream.h +1220 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream_inl.h +69 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream_unittest.cc +1378 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/gzip_stream.cc +326 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/gzip_stream.h +209 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/gzip_stream_unittest.sh +44 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/package_info.h +54 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/printer.cc +198 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/printer.h +136 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/printer_unittest.cc +285 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/strtod.cc +113 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/strtod.h +50 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/tokenizer.cc +1127 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/tokenizer.h +402 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/tokenizer_unittest.cc +999 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream.cc +57 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream.h +248 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc +473 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h +358 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc +405 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h +354 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc +965 -0
- data/ext/protoc/protobuf/src/google/protobuf/lite_unittest.cc +350 -0
- data/ext/protoc/protobuf/src/google/protobuf/message.cc +358 -0
- data/ext/protoc/protobuf/src/google/protobuf/message.h +866 -0
- data/ext/protoc/protobuf/src/google/protobuf/message_lite.cc +335 -0
- data/ext/protoc/protobuf/src/google/protobuf/message_lite.h +247 -0
- data/ext/protoc/protobuf/src/google/protobuf/message_unittest.cc +427 -0
- data/ext/protoc/protobuf/src/google/protobuf/package_info.h +64 -0
- data/ext/protoc/protobuf/src/google/protobuf/reflection_ops.cc +269 -0
- data/ext/protoc/protobuf/src/google/protobuf/reflection_ops.h +81 -0
- data/ext/protoc/protobuf/src/google/protobuf/reflection_ops_unittest.cc +475 -0
- data/ext/protoc/protobuf/src/google/protobuf/repeated_field.cc +87 -0
- data/ext/protoc/protobuf/src/google/protobuf/repeated_field.h +1603 -0
- data/ext/protoc/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc +195 -0
- data/ext/protoc/protobuf/src/google/protobuf/repeated_field_unittest.cc +1442 -0
- data/ext/protoc/protobuf/src/google/protobuf/service.cc +46 -0
- data/ext/protoc/protobuf/src/google/protobuf/service.h +291 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops.h +227 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h +325 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h +151 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h +146 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h +122 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h +137 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h +225 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h +313 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h +73 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_solaris.h +188 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_tsan.h +219 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc +137 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h +293 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc +112 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.h +150 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/common.cc +395 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/common.h +1226 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/common_unittest.cc +357 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/hash.h +232 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/map_util.h +771 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/once.cc +99 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/once.h +166 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/once_unittest.cc +253 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/platform_macros.h +103 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/shared_ptr.h +470 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/stl_util.h +121 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/stringprintf.cc +175 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/stringprintf.h +76 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/stringprintf_unittest.cc +152 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/structurally_valid.cc +536 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/structurally_valid_unittest.cc +40 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/strutil.cc +1279 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/strutil.h +562 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/strutil_unittest.cc +73 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/substitute.cc +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/substitute.h +170 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/template_util.h +138 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/template_util_unittest.cc +130 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/type_traits.h +336 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/type_traits_unittest.cc +628 -0
- data/ext/protoc/protobuf/src/google/protobuf/test_util.cc +3345 -0
- data/ext/protoc/protobuf/src/google/protobuf/test_util.h +215 -0
- data/ext/protoc/protobuf/src/google/protobuf/test_util_lite.cc +1585 -0
- data/ext/protoc/protobuf/src/google/protobuf/test_util_lite.h +101 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/bad_utf8_string +1 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/golden_message +0 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/golden_message_oneof_implemented +0 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/golden_packed_fields_message +0 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data.txt +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt +129 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data_pointy.txt +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt +129 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data.txt +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/file.cc +194 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/file.h +97 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/googletest.cc +255 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/googletest.h +102 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/zcgunzip.cc +73 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/zcgzip.cc +79 -0
- data/ext/protoc/protobuf/src/google/protobuf/text_format.cc +1746 -0
- data/ext/protoc/protobuf/src/google/protobuf/text_format.h +473 -0
- data/ext/protoc/protobuf/src/google/protobuf/text_format_unittest.cc +1479 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest.proto +861 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_custom_options.proto +393 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_embed_optimize_for.proto +50 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_empty.proto +37 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_enormous_descriptor.proto +1046 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_import.proto +64 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_import_lite.proto +51 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_import_public.proto +40 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_import_public_lite.proto +42 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_lite.proto +384 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_lite_imports_nonlite.proto +43 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_mset.proto +83 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_no_generic_services.proto +53 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_optimize_for.proto +66 -0
- data/ext/protoc/protobuf/src/google/protobuf/unknown_field_set.cc +265 -0
- data/ext/protoc/protobuf/src/google/protobuf/unknown_field_set.h +318 -0
- data/ext/protoc/protobuf/src/google/protobuf/unknown_field_set_unittest.cc +599 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format.cc +1101 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format.h +336 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format_lite.cc +471 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format_lite.h +661 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format_lite_inl.h +860 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format_unittest.cc +1120 -0
- data/ext/protoc/protobuf/src/solaris/libstdc++.la +51 -0
- data/ext/protoc/protobuf/vsprojects/config.h +29 -0
- data/ext/protoc/protobuf/vsprojects/convert2008to2005.sh +20 -0
- data/ext/protoc/protobuf/vsprojects/extract_includes.bat +50 -0
- data/ext/protoc/protobuf/vsprojects/libprotobuf-lite.vcproj +302 -0
- data/ext/protoc/protobuf/vsprojects/libprotobuf.vcproj +470 -0
- data/ext/protoc/protobuf/vsprojects/libprotoc.vcproj +466 -0
- data/ext/protoc/protobuf/vsprojects/lite-test.vcproj +305 -0
- data/ext/protoc/protobuf/vsprojects/protobuf.sln +92 -0
- data/ext/protoc/protobuf/vsprojects/protoc.vcproj +192 -0
- data/ext/protoc/protobuf/vsprojects/readme.txt +114 -0
- data/ext/protoc/protobuf/vsprojects/test_plugin.vcproj +209 -0
- data/ext/protoc/protobuf/vsprojects/tests.vcproj +681 -0
- data/lib/protoc/version.rb +1 -1
- metadata +480 -3
@@ -0,0 +1,201 @@
|
|
1
|
+
#! /usr/bin/python
|
2
|
+
#
|
3
|
+
# See README for usage instructions.
|
4
|
+
import sys
|
5
|
+
import os
|
6
|
+
import subprocess
|
7
|
+
|
8
|
+
# We must use setuptools, not distutils, because we need to use the
|
9
|
+
# namespace_packages option for the "google" package.
|
10
|
+
try:
|
11
|
+
from setuptools import setup, Extension
|
12
|
+
except ImportError:
|
13
|
+
try:
|
14
|
+
from ez_setup import use_setuptools
|
15
|
+
use_setuptools()
|
16
|
+
from setuptools import setup, Extension
|
17
|
+
except ImportError:
|
18
|
+
sys.stderr.write(
|
19
|
+
"Could not import setuptools; make sure you have setuptools or "
|
20
|
+
"ez_setup installed.\n")
|
21
|
+
raise
|
22
|
+
from distutils.command.clean import clean as _clean
|
23
|
+
from distutils.command.build_py import build_py as _build_py
|
24
|
+
from distutils.spawn import find_executable
|
25
|
+
|
26
|
+
maintainer_email = "protobuf@googlegroups.com"
|
27
|
+
|
28
|
+
# Find the Protocol Compiler.
|
29
|
+
if 'PROTOC' in os.environ and os.path.exists(os.environ['PROTOC']):
|
30
|
+
protoc = os.environ['PROTOC']
|
31
|
+
elif os.path.exists("../src/protoc"):
|
32
|
+
protoc = "../src/protoc"
|
33
|
+
elif os.path.exists("../src/protoc.exe"):
|
34
|
+
protoc = "../src/protoc.exe"
|
35
|
+
elif os.path.exists("../vsprojects/Debug/protoc.exe"):
|
36
|
+
protoc = "../vsprojects/Debug/protoc.exe"
|
37
|
+
elif os.path.exists("../vsprojects/Release/protoc.exe"):
|
38
|
+
protoc = "../vsprojects/Release/protoc.exe"
|
39
|
+
else:
|
40
|
+
protoc = find_executable("protoc")
|
41
|
+
|
42
|
+
def generate_proto(source):
|
43
|
+
"""Invokes the Protocol Compiler to generate a _pb2.py from the given
|
44
|
+
.proto file. Does nothing if the output already exists and is newer than
|
45
|
+
the input."""
|
46
|
+
|
47
|
+
output = source.replace(".proto", "_pb2.py").replace("../src/", "")
|
48
|
+
|
49
|
+
if (not os.path.exists(output) or
|
50
|
+
(os.path.exists(source) and
|
51
|
+
os.path.getmtime(source) > os.path.getmtime(output))):
|
52
|
+
print ("Generating %s..." % output)
|
53
|
+
|
54
|
+
if not os.path.exists(source):
|
55
|
+
sys.stderr.write("Can't find required file: %s\n" % source)
|
56
|
+
sys.exit(-1)
|
57
|
+
|
58
|
+
if protoc == None:
|
59
|
+
sys.stderr.write(
|
60
|
+
"protoc is not installed nor found in ../src. Please compile it "
|
61
|
+
"or install the binary package.\n")
|
62
|
+
sys.exit(-1)
|
63
|
+
|
64
|
+
protoc_command = [ protoc, "-I../src", "-I.", "--python_out=.", source ]
|
65
|
+
if subprocess.call(protoc_command) != 0:
|
66
|
+
sys.exit(-1)
|
67
|
+
|
68
|
+
def GenerateUnittestProtos():
|
69
|
+
generate_proto("../src/google/protobuf/unittest.proto")
|
70
|
+
generate_proto("../src/google/protobuf/unittest_custom_options.proto")
|
71
|
+
generate_proto("../src/google/protobuf/unittest_import.proto")
|
72
|
+
generate_proto("../src/google/protobuf/unittest_import_public.proto")
|
73
|
+
generate_proto("../src/google/protobuf/unittest_mset.proto")
|
74
|
+
generate_proto("../src/google/protobuf/unittest_no_generic_services.proto")
|
75
|
+
generate_proto("google/protobuf/internal/descriptor_pool_test1.proto")
|
76
|
+
generate_proto("google/protobuf/internal/descriptor_pool_test2.proto")
|
77
|
+
generate_proto("google/protobuf/internal/test_bad_identifiers.proto")
|
78
|
+
generate_proto("google/protobuf/internal/missing_enum_values.proto")
|
79
|
+
generate_proto("google/protobuf/internal/more_extensions.proto")
|
80
|
+
generate_proto("google/protobuf/internal/more_extensions_dynamic.proto")
|
81
|
+
generate_proto("google/protobuf/internal/more_messages.proto")
|
82
|
+
generate_proto("google/protobuf/internal/factory_test1.proto")
|
83
|
+
generate_proto("google/protobuf/internal/factory_test2.proto")
|
84
|
+
generate_proto("google/protobuf/pyext/python.proto")
|
85
|
+
|
86
|
+
def MakeTestSuite():
|
87
|
+
# Test C++ implementation
|
88
|
+
import unittest
|
89
|
+
import google.protobuf.pyext.descriptor_cpp2_test as descriptor_cpp2_test
|
90
|
+
import google.protobuf.pyext.message_factory_cpp2_test \
|
91
|
+
as message_factory_cpp2_test
|
92
|
+
import google.protobuf.pyext.reflection_cpp2_generated_test \
|
93
|
+
as reflection_cpp2_generated_test
|
94
|
+
|
95
|
+
loader = unittest.defaultTestLoader
|
96
|
+
suite = unittest.TestSuite()
|
97
|
+
for test in [ descriptor_cpp2_test,
|
98
|
+
message_factory_cpp2_test,
|
99
|
+
reflection_cpp2_generated_test]:
|
100
|
+
suite.addTest(loader.loadTestsFromModule(test))
|
101
|
+
return suite
|
102
|
+
|
103
|
+
class clean(_clean):
|
104
|
+
def run(self):
|
105
|
+
# Delete generated files in the code tree.
|
106
|
+
for (dirpath, dirnames, filenames) in os.walk("."):
|
107
|
+
for filename in filenames:
|
108
|
+
filepath = os.path.join(dirpath, filename)
|
109
|
+
if filepath.endswith("_pb2.py") or filepath.endswith(".pyc") or \
|
110
|
+
filepath.endswith(".so") or filepath.endswith(".o") or \
|
111
|
+
filepath.endswith('google/protobuf/compiler/__init__.py'):
|
112
|
+
os.remove(filepath)
|
113
|
+
# _clean is an old-style class, so super() doesn't work.
|
114
|
+
_clean.run(self)
|
115
|
+
|
116
|
+
class build_py(_build_py):
|
117
|
+
def run(self):
|
118
|
+
# Generate necessary .proto file if it doesn't exist.
|
119
|
+
generate_proto("../src/google/protobuf/descriptor.proto")
|
120
|
+
generate_proto("../src/google/protobuf/compiler/plugin.proto")
|
121
|
+
GenerateUnittestProtos()
|
122
|
+
|
123
|
+
# Make sure google.protobuf/** are valid packages.
|
124
|
+
for path in ['', 'internal/', 'compiler/', 'pyext/']:
|
125
|
+
try:
|
126
|
+
open('google/protobuf/%s__init__.py' % path, 'a').close()
|
127
|
+
except EnvironmentError:
|
128
|
+
pass
|
129
|
+
# _build_py is an old-style class, so super() doesn't work.
|
130
|
+
_build_py.run(self)
|
131
|
+
# TODO(mrovner): Subclass to run 2to3 on some files only.
|
132
|
+
# Tracing what https://wiki.python.org/moin/PortingPythonToPy3k's "Approach 2"
|
133
|
+
# section on how to get 2to3 to run on source files during install under
|
134
|
+
# Python 3. This class seems like a good place to put logic that calls
|
135
|
+
# python3's distutils.util.run_2to3 on the subset of the files we have in our
|
136
|
+
# release that are subject to conversion.
|
137
|
+
# See code reference in previous code review.
|
138
|
+
|
139
|
+
if __name__ == '__main__':
|
140
|
+
ext_module_list = []
|
141
|
+
cpp_impl = '--cpp_implementation'
|
142
|
+
if cpp_impl in sys.argv:
|
143
|
+
sys.argv.remove(cpp_impl)
|
144
|
+
# C++ implementation extension
|
145
|
+
ext_module_list.append(Extension(
|
146
|
+
"google.protobuf.pyext._message",
|
147
|
+
[ "google/protobuf/pyext/descriptor.cc",
|
148
|
+
"google/protobuf/pyext/message.cc",
|
149
|
+
"google/protobuf/pyext/extension_dict.cc",
|
150
|
+
"google/protobuf/pyext/repeated_scalar_container.cc",
|
151
|
+
"google/protobuf/pyext/repeated_composite_container.cc" ],
|
152
|
+
define_macros=[('GOOGLE_PROTOBUF_HAS_ONEOF', '1')],
|
153
|
+
include_dirs = [ ".", "../src"],
|
154
|
+
libraries = [ "protobuf" ],
|
155
|
+
library_dirs = [ '../src/.libs' ],
|
156
|
+
))
|
157
|
+
|
158
|
+
setup(name = 'protobuf',
|
159
|
+
version = '2.6.1',
|
160
|
+
packages = [ 'google' ],
|
161
|
+
namespace_packages = [ 'google' ],
|
162
|
+
test_suite = 'setup.MakeTestSuite',
|
163
|
+
google_test_dir = "google/protobuf/internal",
|
164
|
+
# Must list modules explicitly so that we don't install tests.
|
165
|
+
py_modules = [
|
166
|
+
'google.protobuf.internal.api_implementation',
|
167
|
+
'google.protobuf.internal.containers',
|
168
|
+
'google.protobuf.internal.cpp_message',
|
169
|
+
'google.protobuf.internal.decoder',
|
170
|
+
'google.protobuf.internal.encoder',
|
171
|
+
'google.protobuf.internal.enum_type_wrapper',
|
172
|
+
'google.protobuf.internal.message_listener',
|
173
|
+
'google.protobuf.internal.python_message',
|
174
|
+
'google.protobuf.internal.type_checkers',
|
175
|
+
'google.protobuf.internal.wire_format',
|
176
|
+
'google.protobuf.descriptor',
|
177
|
+
'google.protobuf.descriptor_pb2',
|
178
|
+
'google.protobuf.compiler.plugin_pb2',
|
179
|
+
'google.protobuf.message',
|
180
|
+
'google.protobuf.descriptor_database',
|
181
|
+
'google.protobuf.descriptor_pool',
|
182
|
+
'google.protobuf.message_factory',
|
183
|
+
'google.protobuf.pyext.cpp_message',
|
184
|
+
'google.protobuf.reflection',
|
185
|
+
'google.protobuf.service',
|
186
|
+
'google.protobuf.service_reflection',
|
187
|
+
'google.protobuf.symbol_database',
|
188
|
+
'google.protobuf.text_encoding',
|
189
|
+
'google.protobuf.text_format'],
|
190
|
+
cmdclass = { 'clean': clean, 'build_py': build_py },
|
191
|
+
install_requires = ['setuptools'],
|
192
|
+
setup_requires = ['google-apputils'],
|
193
|
+
ext_modules = ext_module_list,
|
194
|
+
url = 'https://developers.google.com/protocol-buffers/',
|
195
|
+
maintainer = maintainer_email,
|
196
|
+
maintainer_email = 'protobuf@googlegroups.com',
|
197
|
+
license = 'New BSD License',
|
198
|
+
description = 'Protocol Buffers',
|
199
|
+
long_description =
|
200
|
+
"Protocol Buffers are Google's data interchange format.",
|
201
|
+
)
|
@@ -0,0 +1,140 @@
|
|
1
|
+
#!/usr/bin/python2.4
|
2
|
+
#
|
3
|
+
# Copyright 2008 Google Inc.
|
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
|
+
# This file is used for testing. The original is at:
|
18
|
+
# http://code.google.com/p/pymox/
|
19
|
+
|
20
|
+
class StubOutForTesting:
|
21
|
+
"""Sample Usage:
|
22
|
+
You want os.path.exists() to always return true during testing.
|
23
|
+
|
24
|
+
stubs = StubOutForTesting()
|
25
|
+
stubs.Set(os.path, 'exists', lambda x: 1)
|
26
|
+
...
|
27
|
+
stubs.UnsetAll()
|
28
|
+
|
29
|
+
The above changes os.path.exists into a lambda that returns 1. Once
|
30
|
+
the ... part of the code finishes, the UnsetAll() looks up the old value
|
31
|
+
of os.path.exists and restores it.
|
32
|
+
|
33
|
+
"""
|
34
|
+
def __init__(self):
|
35
|
+
self.cache = []
|
36
|
+
self.stubs = []
|
37
|
+
|
38
|
+
def __del__(self):
|
39
|
+
self.SmartUnsetAll()
|
40
|
+
self.UnsetAll()
|
41
|
+
|
42
|
+
def SmartSet(self, obj, attr_name, new_attr):
|
43
|
+
"""Replace obj.attr_name with new_attr. This method is smart and works
|
44
|
+
at the module, class, and instance level while preserving proper
|
45
|
+
inheritance. It will not stub out C types however unless that has been
|
46
|
+
explicitly allowed by the type.
|
47
|
+
|
48
|
+
This method supports the case where attr_name is a staticmethod or a
|
49
|
+
classmethod of obj.
|
50
|
+
|
51
|
+
Notes:
|
52
|
+
- If obj is an instance, then it is its class that will actually be
|
53
|
+
stubbed. Note that the method Set() does not do that: if obj is
|
54
|
+
an instance, it (and not its class) will be stubbed.
|
55
|
+
- The stubbing is using the builtin getattr and setattr. So, the __get__
|
56
|
+
and __set__ will be called when stubbing (TODO: A better idea would
|
57
|
+
probably be to manipulate obj.__dict__ instead of getattr() and
|
58
|
+
setattr()).
|
59
|
+
|
60
|
+
Raises AttributeError if the attribute cannot be found.
|
61
|
+
"""
|
62
|
+
if (inspect.ismodule(obj) or
|
63
|
+
(not inspect.isclass(obj) and obj.__dict__.has_key(attr_name))):
|
64
|
+
orig_obj = obj
|
65
|
+
orig_attr = getattr(obj, attr_name)
|
66
|
+
|
67
|
+
else:
|
68
|
+
if not inspect.isclass(obj):
|
69
|
+
mro = list(inspect.getmro(obj.__class__))
|
70
|
+
else:
|
71
|
+
mro = list(inspect.getmro(obj))
|
72
|
+
|
73
|
+
mro.reverse()
|
74
|
+
|
75
|
+
orig_attr = None
|
76
|
+
|
77
|
+
for cls in mro:
|
78
|
+
try:
|
79
|
+
orig_obj = cls
|
80
|
+
orig_attr = getattr(obj, attr_name)
|
81
|
+
except AttributeError:
|
82
|
+
continue
|
83
|
+
|
84
|
+
if orig_attr is None:
|
85
|
+
raise AttributeError("Attribute not found.")
|
86
|
+
|
87
|
+
# Calling getattr() on a staticmethod transforms it to a 'normal' function.
|
88
|
+
# We need to ensure that we put it back as a staticmethod.
|
89
|
+
old_attribute = obj.__dict__.get(attr_name)
|
90
|
+
if old_attribute is not None and isinstance(old_attribute, staticmethod):
|
91
|
+
orig_attr = staticmethod(orig_attr)
|
92
|
+
|
93
|
+
self.stubs.append((orig_obj, attr_name, orig_attr))
|
94
|
+
setattr(orig_obj, attr_name, new_attr)
|
95
|
+
|
96
|
+
def SmartUnsetAll(self):
|
97
|
+
"""Reverses all the SmartSet() calls, restoring things to their original
|
98
|
+
definition. Its okay to call SmartUnsetAll() repeatedly, as later calls
|
99
|
+
have no effect if no SmartSet() calls have been made.
|
100
|
+
|
101
|
+
"""
|
102
|
+
self.stubs.reverse()
|
103
|
+
|
104
|
+
for args in self.stubs:
|
105
|
+
setattr(*args)
|
106
|
+
|
107
|
+
self.stubs = []
|
108
|
+
|
109
|
+
def Set(self, parent, child_name, new_child):
|
110
|
+
"""Replace child_name's old definition with new_child, in the context
|
111
|
+
of the given parent. The parent could be a module when the child is a
|
112
|
+
function at module scope. Or the parent could be a class when a class'
|
113
|
+
method is being replaced. The named child is set to new_child, while
|
114
|
+
the prior definition is saved away for later, when UnsetAll() is called.
|
115
|
+
|
116
|
+
This method supports the case where child_name is a staticmethod or a
|
117
|
+
classmethod of parent.
|
118
|
+
"""
|
119
|
+
old_child = getattr(parent, child_name)
|
120
|
+
|
121
|
+
old_attribute = parent.__dict__.get(child_name)
|
122
|
+
if old_attribute is not None and isinstance(old_attribute, staticmethod):
|
123
|
+
old_child = staticmethod(old_child)
|
124
|
+
|
125
|
+
self.cache.append((parent, old_child, child_name))
|
126
|
+
setattr(parent, child_name, new_child)
|
127
|
+
|
128
|
+
def UnsetAll(self):
|
129
|
+
"""Reverses all the Set() calls, restoring things to their original
|
130
|
+
definition. Its okay to call UnsetAll() repeatedly, as later calls have
|
131
|
+
no effect if no Set() calls have been made.
|
132
|
+
|
133
|
+
"""
|
134
|
+
# Undo calls to Set() in reverse order, in case Set() was called on the
|
135
|
+
# same arguments repeatedly (want the original call to be last one undone)
|
136
|
+
self.cache.reverse()
|
137
|
+
|
138
|
+
for (parent, old_child, child_name) in self.cache:
|
139
|
+
setattr(parent, child_name, old_child)
|
140
|
+
self.cache = []
|
@@ -0,0 +1,418 @@
|
|
1
|
+
## Process this file with automake to produce Makefile.in
|
2
|
+
|
3
|
+
if HAVE_ZLIB
|
4
|
+
GZCHECKPROGRAMS = zcgzip zcgunzip
|
5
|
+
GZHEADERS = google/protobuf/io/gzip_stream.h
|
6
|
+
GZTESTS = google/protobuf/io/gzip_stream_unittest.sh
|
7
|
+
else
|
8
|
+
GZCHECKPROGRAMS =
|
9
|
+
GZHEADERS =
|
10
|
+
GZTESTS =
|
11
|
+
endif
|
12
|
+
|
13
|
+
if GCC
|
14
|
+
# These are good warnings to turn on by default
|
15
|
+
NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
|
16
|
+
else
|
17
|
+
NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS)
|
18
|
+
endif
|
19
|
+
|
20
|
+
AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG)
|
21
|
+
|
22
|
+
AM_LDFLAGS = $(PTHREAD_CFLAGS)
|
23
|
+
|
24
|
+
# If I say "dist_include_DATA", automake complains that $(includedir) is not
|
25
|
+
# a "legitimate" directory for DATA. Screw you, automake.
|
26
|
+
protodir = $(includedir)
|
27
|
+
nobase_dist_proto_DATA = google/protobuf/descriptor.proto \
|
28
|
+
google/protobuf/compiler/plugin.proto
|
29
|
+
|
30
|
+
# Not sure why these don't get cleaned automatically.
|
31
|
+
clean-local:
|
32
|
+
rm -f *.loT
|
33
|
+
|
34
|
+
CLEANFILES = $(protoc_outputs) unittest_proto_middleman \
|
35
|
+
testzip.jar testzip.list testzip.proto testzip.zip
|
36
|
+
|
37
|
+
MAINTAINERCLEANFILES = \
|
38
|
+
Makefile.in
|
39
|
+
|
40
|
+
nobase_include_HEADERS = \
|
41
|
+
google/protobuf/stubs/atomicops.h \
|
42
|
+
google/protobuf/stubs/atomicops_internals_arm_gcc.h \
|
43
|
+
google/protobuf/stubs/atomicops_internals_arm64_gcc.h \
|
44
|
+
google/protobuf/stubs/atomicops_internals_arm_qnx.h \
|
45
|
+
google/protobuf/stubs/atomicops_internals_atomicword_compat.h \
|
46
|
+
google/protobuf/stubs/atomicops_internals_generic_gcc.h \
|
47
|
+
google/protobuf/stubs/atomicops_internals_macosx.h \
|
48
|
+
google/protobuf/stubs/atomicops_internals_mips_gcc.h \
|
49
|
+
google/protobuf/stubs/atomicops_internals_pnacl.h \
|
50
|
+
google/protobuf/stubs/atomicops_internals_tsan.h \
|
51
|
+
google/protobuf/stubs/atomicops_internals_x86_gcc.h \
|
52
|
+
google/protobuf/stubs/atomicops_internals_x86_msvc.h \
|
53
|
+
google/protobuf/stubs/common.h \
|
54
|
+
google/protobuf/stubs/platform_macros.h \
|
55
|
+
google/protobuf/stubs/once.h \
|
56
|
+
google/protobuf/stubs/stl_util.h \
|
57
|
+
google/protobuf/stubs/template_util.h \
|
58
|
+
google/protobuf/stubs/type_traits.h \
|
59
|
+
google/protobuf/descriptor.h \
|
60
|
+
google/protobuf/descriptor.pb.h \
|
61
|
+
google/protobuf/descriptor_database.h \
|
62
|
+
google/protobuf/dynamic_message.h \
|
63
|
+
google/protobuf/extension_set.h \
|
64
|
+
google/protobuf/generated_enum_reflection.h \
|
65
|
+
google/protobuf/generated_message_util.h \
|
66
|
+
google/protobuf/generated_message_reflection.h \
|
67
|
+
google/protobuf/message.h \
|
68
|
+
google/protobuf/message_lite.h \
|
69
|
+
google/protobuf/reflection_ops.h \
|
70
|
+
google/protobuf/repeated_field.h \
|
71
|
+
google/protobuf/service.h \
|
72
|
+
google/protobuf/text_format.h \
|
73
|
+
google/protobuf/unknown_field_set.h \
|
74
|
+
google/protobuf/wire_format.h \
|
75
|
+
google/protobuf/wire_format_lite.h \
|
76
|
+
google/protobuf/wire_format_lite_inl.h \
|
77
|
+
google/protobuf/io/coded_stream.h \
|
78
|
+
$(GZHEADERS) \
|
79
|
+
google/protobuf/io/printer.h \
|
80
|
+
google/protobuf/io/strtod.h \
|
81
|
+
google/protobuf/io/tokenizer.h \
|
82
|
+
google/protobuf/io/zero_copy_stream.h \
|
83
|
+
google/protobuf/io/zero_copy_stream_impl.h \
|
84
|
+
google/protobuf/io/zero_copy_stream_impl_lite.h \
|
85
|
+
google/protobuf/compiler/code_generator.h \
|
86
|
+
google/protobuf/compiler/command_line_interface.h \
|
87
|
+
google/protobuf/compiler/importer.h \
|
88
|
+
google/protobuf/compiler/parser.h \
|
89
|
+
google/protobuf/compiler/plugin.h \
|
90
|
+
google/protobuf/compiler/plugin.pb.h \
|
91
|
+
google/protobuf/compiler/cpp/cpp_generator.h \
|
92
|
+
google/protobuf/compiler/java/java_generator.h \
|
93
|
+
google/protobuf/compiler/python/python_generator.h
|
94
|
+
|
95
|
+
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
|
96
|
+
|
97
|
+
libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
|
98
|
+
libprotobuf_lite_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
|
99
|
+
libprotobuf_lite_la_SOURCES = \
|
100
|
+
google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
|
101
|
+
google/protobuf/stubs/atomicops_internals_x86_msvc.cc \
|
102
|
+
google/protobuf/stubs/common.cc \
|
103
|
+
google/protobuf/stubs/once.cc \
|
104
|
+
google/protobuf/stubs/hash.h \
|
105
|
+
google/protobuf/stubs/map_util.h \
|
106
|
+
google/protobuf/stubs/shared_ptr.h \
|
107
|
+
google/protobuf/stubs/stringprintf.cc \
|
108
|
+
google/protobuf/stubs/stringprintf.h \
|
109
|
+
google/protobuf/extension_set.cc \
|
110
|
+
google/protobuf/generated_message_util.cc \
|
111
|
+
google/protobuf/message_lite.cc \
|
112
|
+
google/protobuf/repeated_field.cc \
|
113
|
+
google/protobuf/wire_format_lite.cc \
|
114
|
+
google/protobuf/io/coded_stream.cc \
|
115
|
+
google/protobuf/io/coded_stream_inl.h \
|
116
|
+
google/protobuf/io/zero_copy_stream.cc \
|
117
|
+
google/protobuf/io/zero_copy_stream_impl_lite.cc
|
118
|
+
|
119
|
+
libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
|
120
|
+
libprotobuf_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
|
121
|
+
libprotobuf_la_SOURCES = \
|
122
|
+
$(libprotobuf_lite_la_SOURCES) \
|
123
|
+
google/protobuf/stubs/strutil.cc \
|
124
|
+
google/protobuf/stubs/strutil.h \
|
125
|
+
google/protobuf/stubs/substitute.cc \
|
126
|
+
google/protobuf/stubs/substitute.h \
|
127
|
+
google/protobuf/stubs/structurally_valid.cc \
|
128
|
+
google/protobuf/descriptor.cc \
|
129
|
+
google/protobuf/descriptor.pb.cc \
|
130
|
+
google/protobuf/descriptor_database.cc \
|
131
|
+
google/protobuf/dynamic_message.cc \
|
132
|
+
google/protobuf/extension_set_heavy.cc \
|
133
|
+
google/protobuf/generated_message_reflection.cc \
|
134
|
+
google/protobuf/message.cc \
|
135
|
+
google/protobuf/reflection_ops.cc \
|
136
|
+
google/protobuf/service.cc \
|
137
|
+
google/protobuf/text_format.cc \
|
138
|
+
google/protobuf/unknown_field_set.cc \
|
139
|
+
google/protobuf/wire_format.cc \
|
140
|
+
google/protobuf/io/gzip_stream.cc \
|
141
|
+
google/protobuf/io/printer.cc \
|
142
|
+
google/protobuf/io/strtod.cc \
|
143
|
+
google/protobuf/io/tokenizer.cc \
|
144
|
+
google/protobuf/io/zero_copy_stream_impl.cc \
|
145
|
+
google/protobuf/compiler/importer.cc \
|
146
|
+
google/protobuf/compiler/parser.cc
|
147
|
+
|
148
|
+
libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
|
149
|
+
libprotoc_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
|
150
|
+
libprotoc_la_SOURCES = \
|
151
|
+
google/protobuf/compiler/code_generator.cc \
|
152
|
+
google/protobuf/compiler/command_line_interface.cc \
|
153
|
+
google/protobuf/compiler/plugin.cc \
|
154
|
+
google/protobuf/compiler/plugin.pb.cc \
|
155
|
+
google/protobuf/compiler/subprocess.cc \
|
156
|
+
google/protobuf/compiler/subprocess.h \
|
157
|
+
google/protobuf/compiler/zip_writer.cc \
|
158
|
+
google/protobuf/compiler/zip_writer.h \
|
159
|
+
google/protobuf/compiler/cpp/cpp_enum.cc \
|
160
|
+
google/protobuf/compiler/cpp/cpp_enum.h \
|
161
|
+
google/protobuf/compiler/cpp/cpp_enum_field.cc \
|
162
|
+
google/protobuf/compiler/cpp/cpp_enum_field.h \
|
163
|
+
google/protobuf/compiler/cpp/cpp_extension.cc \
|
164
|
+
google/protobuf/compiler/cpp/cpp_extension.h \
|
165
|
+
google/protobuf/compiler/cpp/cpp_field.cc \
|
166
|
+
google/protobuf/compiler/cpp/cpp_field.h \
|
167
|
+
google/protobuf/compiler/cpp/cpp_file.cc \
|
168
|
+
google/protobuf/compiler/cpp/cpp_file.h \
|
169
|
+
google/protobuf/compiler/cpp/cpp_generator.cc \
|
170
|
+
google/protobuf/compiler/cpp/cpp_helpers.cc \
|
171
|
+
google/protobuf/compiler/cpp/cpp_helpers.h \
|
172
|
+
google/protobuf/compiler/cpp/cpp_message.cc \
|
173
|
+
google/protobuf/compiler/cpp/cpp_message.h \
|
174
|
+
google/protobuf/compiler/cpp/cpp_message_field.cc \
|
175
|
+
google/protobuf/compiler/cpp/cpp_message_field.h \
|
176
|
+
google/protobuf/compiler/cpp/cpp_options.h \
|
177
|
+
google/protobuf/compiler/cpp/cpp_primitive_field.cc \
|
178
|
+
google/protobuf/compiler/cpp/cpp_primitive_field.h \
|
179
|
+
google/protobuf/compiler/cpp/cpp_service.cc \
|
180
|
+
google/protobuf/compiler/cpp/cpp_service.h \
|
181
|
+
google/protobuf/compiler/cpp/cpp_string_field.cc \
|
182
|
+
google/protobuf/compiler/cpp/cpp_string_field.h \
|
183
|
+
google/protobuf/compiler/java/java_context.cc \
|
184
|
+
google/protobuf/compiler/java/java_context.h \
|
185
|
+
google/protobuf/compiler/java/java_enum.cc \
|
186
|
+
google/protobuf/compiler/java/java_enum.h \
|
187
|
+
google/protobuf/compiler/java/java_enum_field.cc \
|
188
|
+
google/protobuf/compiler/java/java_enum_field.h \
|
189
|
+
google/protobuf/compiler/java/java_extension.cc \
|
190
|
+
google/protobuf/compiler/java/java_extension.h \
|
191
|
+
google/protobuf/compiler/java/java_field.cc \
|
192
|
+
google/protobuf/compiler/java/java_field.h \
|
193
|
+
google/protobuf/compiler/java/java_file.cc \
|
194
|
+
google/protobuf/compiler/java/java_file.h \
|
195
|
+
google/protobuf/compiler/java/java_generator.cc \
|
196
|
+
google/protobuf/compiler/java/java_generator_factory.cc \
|
197
|
+
google/protobuf/compiler/java/java_generator_factory.h \
|
198
|
+
google/protobuf/compiler/java/java_helpers.cc \
|
199
|
+
google/protobuf/compiler/java/java_helpers.h \
|
200
|
+
google/protobuf/compiler/java/java_lazy_message_field.cc \
|
201
|
+
google/protobuf/compiler/java/java_lazy_message_field.h \
|
202
|
+
google/protobuf/compiler/java/java_message.cc \
|
203
|
+
google/protobuf/compiler/java/java_message.h \
|
204
|
+
google/protobuf/compiler/java/java_message_field.cc \
|
205
|
+
google/protobuf/compiler/java/java_message_field.h \
|
206
|
+
google/protobuf/compiler/java/java_name_resolver.cc \
|
207
|
+
google/protobuf/compiler/java/java_name_resolver.h \
|
208
|
+
google/protobuf/compiler/java/java_primitive_field.cc \
|
209
|
+
google/protobuf/compiler/java/java_primitive_field.h \
|
210
|
+
google/protobuf/compiler/java/java_shared_code_generator.cc \
|
211
|
+
google/protobuf/compiler/java/java_shared_code_generator.h \
|
212
|
+
google/protobuf/compiler/java/java_service.cc \
|
213
|
+
google/protobuf/compiler/java/java_service.h \
|
214
|
+
google/protobuf/compiler/java/java_string_field.cc \
|
215
|
+
google/protobuf/compiler/java/java_string_field.h \
|
216
|
+
google/protobuf/compiler/java/java_doc_comment.cc \
|
217
|
+
google/protobuf/compiler/java/java_doc_comment.h \
|
218
|
+
google/protobuf/compiler/python/python_generator.cc
|
219
|
+
|
220
|
+
bin_PROGRAMS = protoc
|
221
|
+
protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
|
222
|
+
protoc_SOURCES = google/protobuf/compiler/main.cc
|
223
|
+
|
224
|
+
# Tests ==============================================================
|
225
|
+
|
226
|
+
protoc_inputs = \
|
227
|
+
google/protobuf/unittest.proto \
|
228
|
+
google/protobuf/unittest_empty.proto \
|
229
|
+
google/protobuf/unittest_import.proto \
|
230
|
+
google/protobuf/unittest_import_public.proto \
|
231
|
+
google/protobuf/unittest_mset.proto \
|
232
|
+
google/protobuf/unittest_optimize_for.proto \
|
233
|
+
google/protobuf/unittest_embed_optimize_for.proto \
|
234
|
+
google/protobuf/unittest_custom_options.proto \
|
235
|
+
google/protobuf/unittest_lite.proto \
|
236
|
+
google/protobuf/unittest_import_lite.proto \
|
237
|
+
google/protobuf/unittest_import_public_lite.proto \
|
238
|
+
google/protobuf/unittest_lite_imports_nonlite.proto \
|
239
|
+
google/protobuf/unittest_no_generic_services.proto \
|
240
|
+
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto
|
241
|
+
|
242
|
+
EXTRA_DIST = \
|
243
|
+
$(protoc_inputs) \
|
244
|
+
solaris/libstdc++.la \
|
245
|
+
google/protobuf/io/gzip_stream.h \
|
246
|
+
google/protobuf/io/gzip_stream_unittest.sh \
|
247
|
+
google/protobuf/testdata/golden_message \
|
248
|
+
google/protobuf/testdata/golden_message_oneof_implemented \
|
249
|
+
google/protobuf/testdata/golden_packed_fields_message \
|
250
|
+
google/protobuf/testdata/bad_utf8_string \
|
251
|
+
google/protobuf/testdata/text_format_unittest_data.txt \
|
252
|
+
google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \
|
253
|
+
google/protobuf/testdata/text_format_unittest_data_pointy.txt \
|
254
|
+
google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \
|
255
|
+
google/protobuf/testdata/text_format_unittest_extensions_data.txt \
|
256
|
+
google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \
|
257
|
+
google/protobuf/package_info.h \
|
258
|
+
google/protobuf/io/package_info.h \
|
259
|
+
google/protobuf/compiler/package_info.h \
|
260
|
+
google/protobuf/compiler/zip_output_unittest.sh \
|
261
|
+
google/protobuf/unittest_enormous_descriptor.proto
|
262
|
+
|
263
|
+
protoc_lite_outputs = \
|
264
|
+
google/protobuf/unittest_lite.pb.cc \
|
265
|
+
google/protobuf/unittest_lite.pb.h \
|
266
|
+
google/protobuf/unittest_import_lite.pb.cc \
|
267
|
+
google/protobuf/unittest_import_lite.pb.h \
|
268
|
+
google/protobuf/unittest_import_public_lite.pb.cc \
|
269
|
+
google/protobuf/unittest_import_public_lite.pb.h
|
270
|
+
|
271
|
+
protoc_outputs = \
|
272
|
+
$(protoc_lite_outputs) \
|
273
|
+
google/protobuf/unittest.pb.cc \
|
274
|
+
google/protobuf/unittest.pb.h \
|
275
|
+
google/protobuf/unittest_empty.pb.cc \
|
276
|
+
google/protobuf/unittest_empty.pb.h \
|
277
|
+
google/protobuf/unittest_import.pb.cc \
|
278
|
+
google/protobuf/unittest_import.pb.h \
|
279
|
+
google/protobuf/unittest_import_public.pb.cc \
|
280
|
+
google/protobuf/unittest_import_public.pb.h \
|
281
|
+
google/protobuf/unittest_mset.pb.cc \
|
282
|
+
google/protobuf/unittest_mset.pb.h \
|
283
|
+
google/protobuf/unittest_optimize_for.pb.cc \
|
284
|
+
google/protobuf/unittest_optimize_for.pb.h \
|
285
|
+
google/protobuf/unittest_embed_optimize_for.pb.cc \
|
286
|
+
google/protobuf/unittest_embed_optimize_for.pb.h \
|
287
|
+
google/protobuf/unittest_custom_options.pb.cc \
|
288
|
+
google/protobuf/unittest_custom_options.pb.h \
|
289
|
+
google/protobuf/unittest_lite_imports_nonlite.pb.cc \
|
290
|
+
google/protobuf/unittest_lite_imports_nonlite.pb.h \
|
291
|
+
google/protobuf/unittest_no_generic_services.pb.cc \
|
292
|
+
google/protobuf/unittest_no_generic_services.pb.h \
|
293
|
+
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \
|
294
|
+
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h
|
295
|
+
|
296
|
+
BUILT_SOURCES = $(protoc_outputs)
|
297
|
+
|
298
|
+
if USE_EXTERNAL_PROTOC
|
299
|
+
|
300
|
+
unittest_proto_middleman: $(protoc_inputs)
|
301
|
+
$(PROTOC) -I$(srcdir) --cpp_out=. $^
|
302
|
+
touch unittest_proto_middleman
|
303
|
+
|
304
|
+
else
|
305
|
+
|
306
|
+
# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is
|
307
|
+
# relative to srcdir, which may not be the same as the current directory when
|
308
|
+
# building out-of-tree.
|
309
|
+
unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)
|
310
|
+
oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) )
|
311
|
+
touch unittest_proto_middleman
|
312
|
+
|
313
|
+
endif
|
314
|
+
|
315
|
+
$(protoc_outputs): unittest_proto_middleman
|
316
|
+
|
317
|
+
COMMON_TEST_SOURCES = \
|
318
|
+
google/protobuf/test_util.cc \
|
319
|
+
google/protobuf/test_util.h \
|
320
|
+
google/protobuf/testing/googletest.cc \
|
321
|
+
google/protobuf/testing/googletest.h \
|
322
|
+
google/protobuf/testing/file.cc \
|
323
|
+
google/protobuf/testing/file.h
|
324
|
+
|
325
|
+
check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
|
326
|
+
protobuf-lite-test test_plugin $(GZCHECKPROGRAMS)
|
327
|
+
protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
|
328
|
+
$(top_builddir)/gtest/lib/libgtest.la \
|
329
|
+
$(top_builddir)/gtest/lib/libgtest_main.la
|
330
|
+
protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
|
331
|
+
-I$(top_builddir)/gtest/include
|
332
|
+
# Disable optimization for tests unless the user explicitly asked for it,
|
333
|
+
# since test_util.cc takes forever to compile with optimization (with GCC).
|
334
|
+
# See configure.ac for more info.
|
335
|
+
protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
|
336
|
+
protobuf_test_SOURCES = \
|
337
|
+
google/protobuf/stubs/common_unittest.cc \
|
338
|
+
google/protobuf/stubs/once_unittest.cc \
|
339
|
+
google/protobuf/stubs/strutil_unittest.cc \
|
340
|
+
google/protobuf/stubs/structurally_valid_unittest.cc \
|
341
|
+
google/protobuf/stubs/stringprintf_unittest.cc \
|
342
|
+
google/protobuf/stubs/template_util_unittest.cc \
|
343
|
+
google/protobuf/stubs/type_traits_unittest.cc \
|
344
|
+
google/protobuf/descriptor_database_unittest.cc \
|
345
|
+
google/protobuf/descriptor_unittest.cc \
|
346
|
+
google/protobuf/dynamic_message_unittest.cc \
|
347
|
+
google/protobuf/extension_set_unittest.cc \
|
348
|
+
google/protobuf/generated_message_reflection_unittest.cc \
|
349
|
+
google/protobuf/message_unittest.cc \
|
350
|
+
google/protobuf/reflection_ops_unittest.cc \
|
351
|
+
google/protobuf/repeated_field_unittest.cc \
|
352
|
+
google/protobuf/repeated_field_reflection_unittest.cc \
|
353
|
+
google/protobuf/text_format_unittest.cc \
|
354
|
+
google/protobuf/unknown_field_set_unittest.cc \
|
355
|
+
google/protobuf/wire_format_unittest.cc \
|
356
|
+
google/protobuf/io/coded_stream_unittest.cc \
|
357
|
+
google/protobuf/io/printer_unittest.cc \
|
358
|
+
google/protobuf/io/tokenizer_unittest.cc \
|
359
|
+
google/protobuf/io/zero_copy_stream_unittest.cc \
|
360
|
+
google/protobuf/compiler/command_line_interface_unittest.cc \
|
361
|
+
google/protobuf/compiler/importer_unittest.cc \
|
362
|
+
google/protobuf/compiler/mock_code_generator.cc \
|
363
|
+
google/protobuf/compiler/mock_code_generator.h \
|
364
|
+
google/protobuf/compiler/parser_unittest.cc \
|
365
|
+
google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \
|
366
|
+
google/protobuf/compiler/cpp/cpp_unittest.h \
|
367
|
+
google/protobuf/compiler/cpp/cpp_unittest.cc \
|
368
|
+
google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \
|
369
|
+
google/protobuf/compiler/java/java_plugin_unittest.cc \
|
370
|
+
google/protobuf/compiler/java/java_doc_comment_unittest.cc \
|
371
|
+
google/protobuf/compiler/python/python_plugin_unittest.cc \
|
372
|
+
$(COMMON_TEST_SOURCES)
|
373
|
+
nodist_protobuf_test_SOURCES = $(protoc_outputs)
|
374
|
+
|
375
|
+
# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
|
376
|
+
protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
|
377
|
+
libprotoc.la \
|
378
|
+
$(top_builddir)/gtest/lib/libgtest.la \
|
379
|
+
$(top_builddir)/gtest/lib/libgtest_main.la
|
380
|
+
protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \
|
381
|
+
-I$(top_builddir)/gtest/include \
|
382
|
+
-DPROTOBUF_TEST_NO_DESCRIPTORS
|
383
|
+
protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
|
384
|
+
protobuf_lazy_descriptor_test_SOURCES = \
|
385
|
+
google/protobuf/compiler/cpp/cpp_unittest.cc \
|
386
|
+
$(COMMON_TEST_SOURCES)
|
387
|
+
nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs)
|
388
|
+
|
389
|
+
# Build lite_unittest separately, since it doesn't use gtest.
|
390
|
+
protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la
|
391
|
+
protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
|
392
|
+
protobuf_lite_test_SOURCES = \
|
393
|
+
google/protobuf/lite_unittest.cc \
|
394
|
+
google/protobuf/test_util_lite.cc \
|
395
|
+
google/protobuf/test_util_lite.h
|
396
|
+
nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
|
397
|
+
|
398
|
+
# Test plugin binary.
|
399
|
+
test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
|
400
|
+
$(top_builddir)/gtest/lib/libgtest.la
|
401
|
+
test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include \
|
402
|
+
-I$(top_builddir)/gtest/include
|
403
|
+
test_plugin_SOURCES = \
|
404
|
+
google/protobuf/compiler/mock_code_generator.cc \
|
405
|
+
google/protobuf/testing/file.cc \
|
406
|
+
google/protobuf/testing/file.h \
|
407
|
+
google/protobuf/compiler/test_plugin.cc
|
408
|
+
|
409
|
+
if HAVE_ZLIB
|
410
|
+
zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
|
411
|
+
zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc
|
412
|
+
|
413
|
+
zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la
|
414
|
+
zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc
|
415
|
+
endif
|
416
|
+
|
417
|
+
TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
|
418
|
+
google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS)
|