|
|
@ -1,9 +1,10 @@ |
|
|
|
#! /usr/bin/env python |
|
|
|
#! /usr/bin/env python |
|
|
|
# |
|
|
|
# |
|
|
|
# See README for usage instructions. |
|
|
|
# See README for usage instructions. |
|
|
|
import sys |
|
|
|
import glob |
|
|
|
import os |
|
|
|
import os |
|
|
|
import subprocess |
|
|
|
import subprocess |
|
|
|
|
|
|
|
import sys |
|
|
|
|
|
|
|
|
|
|
|
# We must use setuptools, not distutils, because we need to use the |
|
|
|
# We must use setuptools, not distutils, because we need to use the |
|
|
|
# namespace_packages option for the "google" package. |
|
|
|
# namespace_packages option for the "google" package. |
|
|
@ -86,6 +87,10 @@ def generate_proto(source): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def GenerateUnittestProtos(): |
|
|
|
def GenerateUnittestProtos(): |
|
|
|
|
|
|
|
# Unittest protos are only needed for development. |
|
|
|
|
|
|
|
if not os.path.exists("../.git"): |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
generate_proto("../src/google/protobuf/unittest.proto") |
|
|
|
generate_proto("../src/google/protobuf/unittest.proto") |
|
|
|
generate_proto("../src/google/protobuf/unittest_custom_options.proto") |
|
|
|
generate_proto("../src/google/protobuf/unittest_custom_options.proto") |
|
|
|
generate_proto("../src/google/protobuf/unittest_import.proto") |
|
|
|
generate_proto("../src/google/protobuf/unittest_import.proto") |
|
|
@ -153,15 +158,7 @@ if __name__ == '__main__': |
|
|
|
ext_module_list.append( |
|
|
|
ext_module_list.append( |
|
|
|
Extension( |
|
|
|
Extension( |
|
|
|
"google.protobuf.pyext._message", |
|
|
|
"google.protobuf.pyext._message", |
|
|
|
[ |
|
|
|
glob.glob('google/protobuf/pyext/*.cc'), |
|
|
|
"google/protobuf/pyext/descriptor.cc", |
|
|
|
|
|
|
|
"google/protobuf/pyext/descriptor_containers.cc", |
|
|
|
|
|
|
|
"google/protobuf/pyext/descriptor_pool.cc", |
|
|
|
|
|
|
|
"google/protobuf/pyext/extension_dict.cc", |
|
|
|
|
|
|
|
"google/protobuf/pyext/message.cc", |
|
|
|
|
|
|
|
"google/protobuf/pyext/repeated_composite_container.cc", |
|
|
|
|
|
|
|
"google/protobuf/pyext/repeated_scalar_container.cc", |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
define_macros=[('GOOGLE_PROTOBUF_HAS_ONEOF', '1')], |
|
|
|
define_macros=[('GOOGLE_PROTOBUF_HAS_ONEOF', '1')], |
|
|
|
include_dirs=[".", "../src"], |
|
|
|
include_dirs=[".", "../src"], |
|
|
|
libraries=['protobuf'], |
|
|
|
libraries=['protobuf'], |
|
|
|